From cc0eeebfac058afa7fcc38fb1441e6aad96afd79 Mon Sep 17 00:00:00 2001 From: Aaron Straup Cope Date: Wed, 29 Jan 2025 15:00:53 -0800 Subject: [PATCH] Add `foursquare` package (#6) * update vendor deps * add 4sq package * more deps, not duckdb builds * add cmd/embeddings tool --------- Co-authored-by: sfomuseumbot --- .gitignore | 1 + cmd/compare-locations/main.go | 1 + cmd/embeddings/main.go | 77 + cmd/index-locations/main.go | 1 + compare/database.go | 2 +- compare/geohash.go | 5 +- embeddings/llamafile.go | 2 +- foursquare/foursqure.go | 1 + foursquare/iterator.go | 88 + foursquare/parser.go | 91 + go.mod | 98 +- go.sum | 232 +- vector/duckdb.go | 2 +- vector/weviate.go | 2 +- .../github.com/aaronland/go-aws-auth/Makefile | 1 + .../aaronland/go-aws-auth/README.md | 88 +- .../aaronland/go-aws-auth/config.go | 54 +- .../github.com/aaronland/go-aws-auth/mfa.go | 12 +- .../aaronland/go-uid-proxy/proxy.go | 20 +- .../aaronland/gocloud-blob/bucket/uri.go | 65 + .../apache/arrow-go/v18/LICENSE.txt | 236 + .../v17 => arrow-go/v18}/arrow/.editorconfig | 0 .../go/v17 => arrow-go/v18}/arrow/.gitignore | 0 .../go/v17 => arrow-go/v18}/arrow/Gopkg.lock | 0 .../go/v17 => arrow-go/v18}/arrow/Gopkg.toml | 0 .../go/v17 => arrow-go/v18}/arrow/Makefile | 0 .../go/v17 => arrow-go/v18}/arrow/array.go | 4 +- .../v17 => arrow-go/v18}/arrow/array/array.go | 8 +- .../v18}/arrow/array/binary.go | 6 +- .../v18}/arrow/array/binarybuilder.go | 8 +- .../v18}/arrow/array/boolean.go | 8 +- .../v18}/arrow/array/booleanbuilder.go | 10 +- .../v18}/arrow/array/bufferbuilder.go | 8 +- .../v18}/arrow/array/bufferbuilder_byte.go | 2 +- .../arrow/array/bufferbuilder_numeric.gen.go | 6 +- .../array/bufferbuilder_numeric.gen.go.tmpl | 6 +- .../v18}/arrow/array/builder.go | 27 +- .../v18}/arrow/array/compare.go | 26 +- .../v18}/arrow/array/concat.go | 14 +- .../v17 => arrow-go/v18}/arrow/array/data.go | 6 +- .../arrow-go/v18/arrow/array/decimal.go | 432 + .../v18}/arrow/array/dictionary.go | 86 +- .../v17 => arrow-go/v18}/arrow/array/diff.go | 2 +- .../v17 => arrow-go/v18}/arrow/array/doc.go | 0 .../v18}/arrow/array/encoded.go | 12 +- .../v18}/arrow/array/extension.go | 6 +- .../v18/arrow/array/extension_builder.go | 25 + .../v18}/arrow/array/fixed_size_list.go | 10 +- .../v18}/arrow/array/fixedsize_binary.go | 4 +- .../arrow/array/fixedsize_binarybuilder.go | 8 +- .../v18}/arrow/array/float16.go | 6 +- .../v18}/arrow/array/float16_builder.go | 12 +- .../v18}/arrow/array/interval.go | 10 +- .../v18}/arrow/array/json_reader.go | 8 +- .../v17 => arrow-go/v18}/arrow/array/list.go | 10 +- .../v17 => arrow-go/v18}/arrow/array/map.go | 6 +- .../v17 => arrow-go/v18}/arrow/array/null.go | 8 +- .../v18}/arrow/array/numeric.gen.go | 21 +- .../v18}/arrow/array/numeric.gen.go.tmpl | 4 +- .../v18}/arrow/array/numericbuilder.gen.go | 10 +- .../arrow/array/numericbuilder.gen.go.tmpl | 10 +- .../array/numericbuilder.gen_test.go.tmpl | 6 +- .../v18}/arrow/array/record.go | 8 +- .../v18}/arrow/array/string.go | 6 +- .../v18}/arrow/array/struct.go | 44 +- .../v17 => arrow-go/v18}/arrow/array/table.go | 4 +- .../v18}/arrow/array/timestamp.go | 10 +- .../v17 => arrow-go/v18}/arrow/array/union.go | 12 +- .../v17 => arrow-go/v18}/arrow/array/util.go | 10 +- .../v17 => arrow-go/v18}/arrow/arrio/arrio.go | 2 +- .../v18}/arrow/bitutil/Makefile | 0 .../v18}/arrow/bitutil/bitmap_ops.go | 0 .../v18}/arrow/bitutil/bitmap_ops_amd64.go | 0 .../v18}/arrow/bitutil/bitmap_ops_arm64.go | 0 .../arrow/bitutil/bitmap_ops_avx2_amd64.go | 0 .../arrow/bitutil/bitmap_ops_avx2_amd64.s | 0 .../v18}/arrow/bitutil/bitmap_ops_noasm.go | 0 .../v18}/arrow/bitutil/bitmap_ops_ppc64le.go | 0 .../v18}/arrow/bitutil/bitmap_ops_s390x.go | 0 .../arrow/bitutil/bitmap_ops_sse4_amd64.go | 0 .../arrow/bitutil/bitmap_ops_sse4_amd64.s | 0 .../v18}/arrow/bitutil/bitmaps.go | 6 +- .../v18}/arrow/bitutil/bitutil.go | 2 +- .../v18}/arrow/bitutil/bitutil_bytes.go | 0 .../v18}/arrow/bitutil/endian_default.go | 0 .../v18}/arrow/bitutil/endian_s390x.go | 0 .../v17 => arrow-go/v18}/arrow/cdata/cdata.go | 21 +- .../v18}/arrow/cdata/cdata_allocate.go | 0 .../v18}/arrow/cdata/cdata_exports.go | 14 +- .../v18}/arrow/cdata/cdata_fulltest.c | 0 .../v18}/arrow/cdata/cdata_test_framework.go | 8 +- .../v18}/arrow/cdata/exports.go | 4 +- .../v18}/arrow/cdata/import_allocator.go | 2 +- .../v18}/arrow/cdata/interface.go | 8 +- .../v18}/arrow/cdata/trampoline.c | 0 .../v17 => arrow-go/v18}/arrow/cdata/utils.h | 0 .../go/v17 => arrow-go/v18}/arrow/compare.go | 0 .../go/v17 => arrow-go/v18}/arrow/datatype.go | 26 +- .../v18}/arrow/datatype_binary.go | 0 .../v18}/arrow/datatype_encoded.go | 0 .../v18}/arrow/datatype_extension.go | 0 .../v18}/arrow/datatype_fixedwidth.go | 91 +- .../v18}/arrow/datatype_nested.go | 2 +- .../v18}/arrow/datatype_null.go | 0 .../v18}/arrow/datatype_numeric.gen.go | 0 .../v18}/arrow/datatype_numeric.gen.go.tmpl | 0 .../arrow/datatype_numeric.gen.go.tmpldata | 0 .../v18}/arrow/datatype_viewheader.go | 6 +- .../v18}/arrow/datatype_viewheader_inline.go | 2 +- .../datatype_viewheader_inline_go1.19.go | 2 +- .../datatype_viewheader_inline_tinygo.go | 2 +- .../arrow-go/v18/arrow/decimal/decimal.go | 473 + .../arrow-go/v18/arrow/decimal/traits.go | 78 + .../v18}/arrow/decimal128/decimal128.go | 12 +- .../v18}/arrow/decimal256/decimal256.go | 14 +- .../go/v17 => arrow-go/v18}/arrow/doc.go | 2 +- .../v18}/arrow/encoded/ree_utils.go | 2 +- .../v17 => arrow-go/v18}/arrow/endian/big.go | 0 .../v18}/arrow/endian/endian.go | 4 +- .../v18}/arrow/endian/little.go | 0 .../go/v17 => arrow-go/v18}/arrow/errors.go | 0 .../v18}/arrow/float16/float16.go | 0 .../v18}/arrow/internal/debug/assert_off.go | 0 .../v18}/arrow/internal/debug/assert_on.go | 0 .../v18}/arrow/internal/debug/doc.go | 0 .../v18}/arrow/internal/debug/log_off.go | 0 .../v18}/arrow/internal/debug/log_on.go | 0 .../v18}/arrow/internal/debug/util.go | 0 .../v18}/arrow/internal/dictutils/dict.go | 6 +- .../v18}/arrow/internal/flatbuf/Binary.go | 0 .../v18}/arrow/internal/flatbuf/BinaryView.go | 0 .../v18}/arrow/internal/flatbuf/Block.go | 0 .../arrow/internal/flatbuf/BodyCompression.go | 0 .../internal/flatbuf/BodyCompressionMethod.go | 0 .../v18}/arrow/internal/flatbuf/Bool.go | 0 .../v18}/arrow/internal/flatbuf/Buffer.go | 0 .../arrow/internal/flatbuf/CompressionType.go | 0 .../v18}/arrow/internal/flatbuf/Date.go | 0 .../v18}/arrow/internal/flatbuf/DateUnit.go | 0 .../v18}/arrow/internal/flatbuf/Decimal.go | 24 +- .../arrow/internal/flatbuf/DictionaryBatch.go | 0 .../internal/flatbuf/DictionaryEncoding.go | 0 .../arrow/internal/flatbuf/DictionaryKind.go | 0 .../v18}/arrow/internal/flatbuf/Duration.go | 0 .../v18}/arrow/internal/flatbuf/Endianness.go | 0 .../v18}/arrow/internal/flatbuf/Feature.go | 0 .../v18}/arrow/internal/flatbuf/Field.go | 0 .../v18}/arrow/internal/flatbuf/FieldNode.go | 0 .../arrow/internal/flatbuf/FixedSizeBinary.go | 0 .../arrow/internal/flatbuf/FixedSizeList.go | 0 .../arrow/internal/flatbuf/FloatingPoint.go | 0 .../v18}/arrow/internal/flatbuf/Footer.go | 0 .../v18}/arrow/internal/flatbuf/Int.go | 0 .../v18}/arrow/internal/flatbuf/Interval.go | 0 .../arrow/internal/flatbuf/IntervalUnit.go | 0 .../v18}/arrow/internal/flatbuf/KeyValue.go | 0 .../arrow/internal/flatbuf/LargeBinary.go | 0 .../v18}/arrow/internal/flatbuf/LargeList.go | 0 .../arrow/internal/flatbuf/LargeListView.go | 0 .../v18}/arrow/internal/flatbuf/LargeUtf8.go | 0 .../v18}/arrow/internal/flatbuf/List.go | 0 .../v18}/arrow/internal/flatbuf/ListView.go | 0 .../v18}/arrow/internal/flatbuf/Map.go | 0 .../v18}/arrow/internal/flatbuf/Message.go | 0 .../arrow/internal/flatbuf/MessageHeader.go | 0 .../arrow/internal/flatbuf/MetadataVersion.go | 0 .../v18}/arrow/internal/flatbuf/Null.go | 0 .../v18}/arrow/internal/flatbuf/Precision.go | 0 .../arrow/internal/flatbuf/RecordBatch.go | 0 .../arrow/internal/flatbuf/RunEndEncoded.go | 0 .../internal/flatbuf/RunLengthEncoded.go | 0 .../v18}/arrow/internal/flatbuf/Schema.go | 0 .../flatbuf/SparseMatrixCompressedAxis.go | 0 .../internal/flatbuf/SparseMatrixIndexCSR.go | 0 .../internal/flatbuf/SparseMatrixIndexCSX.go | 0 .../arrow/internal/flatbuf/SparseTensor.go | 0 .../internal/flatbuf/SparseTensorIndex.go | 0 .../internal/flatbuf/SparseTensorIndexCOO.go | 0 .../internal/flatbuf/SparseTensorIndexCSF.go | 0 .../v18}/arrow/internal/flatbuf/Struct_.go | 0 .../v18}/arrow/internal/flatbuf/Tensor.go | 0 .../v18}/arrow/internal/flatbuf/TensorDim.go | 0 .../v18}/arrow/internal/flatbuf/Time.go | 0 .../v18}/arrow/internal/flatbuf/TimeUnit.go | 0 .../v18}/arrow/internal/flatbuf/Timestamp.go | 0 .../v18}/arrow/internal/flatbuf/Type.go | 0 .../v18}/arrow/internal/flatbuf/Union.go | 0 .../v18}/arrow/internal/flatbuf/UnionMode.go | 0 .../v18}/arrow/internal/flatbuf/Utf8.go | 0 .../v18}/arrow/internal/flatbuf/Utf8View.go | 0 .../v18}/arrow/internal/utils.go | 4 +- .../v18}/arrow/ipc/compression.go | 6 +- .../v18}/arrow/ipc/endian_swap.go | 6 +- .../v18}/arrow/ipc/file_reader.go | 18 +- .../v18}/arrow/ipc/file_writer.go | 92 +- .../go/v17 => arrow-go/v18}/arrow/ipc/ipc.go | 8 +- .../v17 => arrow-go/v18}/arrow/ipc/message.go | 6 +- .../v18}/arrow/ipc/metadata.go | 30 +- .../v17 => arrow-go/v18}/arrow/ipc/reader.go | 16 +- .../v17 => arrow-go/v18}/arrow/ipc/writer.go | 60 +- .../v18}/arrow/memory/Makefile | 0 .../v18}/arrow/memory/allocator.go | 0 .../v18}/arrow/memory/buffer.go | 2 +- .../v18}/arrow/memory/cgo_allocator.go | 2 +- .../arrow/memory/cgo_allocator_defaults.go | 0 .../arrow/memory/cgo_allocator_logging.go | 0 .../v18}/arrow/memory/checked_allocator.go | 0 .../v18}/arrow/memory/default_allocator.go | 0 .../v18}/arrow/memory/default_mallocator.go | 2 +- .../v17 => arrow-go/v18}/arrow/memory/doc.go | 0 .../v18}/arrow/memory/go_allocator.go | 0 .../memory/internal/cgoalloc/allocator.cc | 0 .../memory/internal/cgoalloc/allocator.go | 0 .../memory/internal/cgoalloc/allocator.h | 0 .../arrow/memory/internal/cgoalloc/helpers.h | 0 .../v18}/arrow/memory/mallocator/doc.go | 0 .../arrow/memory/mallocator/mallocator.go | 0 .../memory/mallocator/mallocator_util.go | 0 .../v18}/arrow/memory/memory.go | 0 .../v18}/arrow/memory/memory_amd64.go | 0 .../v18}/arrow/memory/memory_arm64.go | 0 .../v18}/arrow/memory/memory_avx2_amd64.go | 0 .../v18}/arrow/memory/memory_avx2_amd64.s | 0 .../v18}/arrow/memory/memory_js_wasm.go | 0 .../v18}/arrow/memory/memory_neon_arm64.go | 0 .../v18}/arrow/memory/memory_neon_arm64.s | 0 .../v18}/arrow/memory/memory_noasm.go | 0 .../v18}/arrow/memory/memory_sse4_amd64.go | 0 .../v18}/arrow/memory/memory_sse4_amd64.s | 0 .../v17 => arrow-go/v18}/arrow/memory/util.go | 0 .../v18}/arrow/numeric.schema.json | 0 .../v18}/arrow/numeric.tmpldata | 0 .../go/v17 => arrow-go/v18}/arrow/record.go | 2 +- .../go/v17 => arrow-go/v18}/arrow/schema.go | 2 +- .../go/v17 => arrow-go/v18}/arrow/table.go | 4 +- .../go/v17 => arrow-go/v18}/arrow/tools.go | 0 .../v17 => arrow-go/v18}/arrow/type_string.go | 6 +- .../v17 => arrow-go/v18}/arrow/type_traits.go | 7 +- .../v18}/arrow/type_traits_boolean.go | 2 +- .../v18}/arrow/type_traits_decimal128.go | 16 +- .../v18}/arrow/type_traits_decimal256.go | 16 +- .../v18/arrow/type_traits_decimal32.go | 57 + .../v18/arrow/type_traits_decimal64.go | 57 + .../v18}/arrow/type_traits_float16.go | 4 +- .../v18}/arrow/type_traits_interval.go | 4 +- .../v18}/arrow/type_traits_numeric.gen.go | 2 +- .../arrow/type_traits_numeric.gen.go.tmpl | 2 +- .../type_traits_numeric.gen_test.go.tmpl | 2 +- .../v18}/arrow/type_traits_timestamp.go | 2 +- .../v18}/arrow/type_traits_view.go | 2 +- .../v18}/arrow/unionmode_string.go | 0 .../internal/bitutils/bit_block_counter.go | 4 +- .../v18}/internal/bitutils/bit_run_reader.go | 6 +- .../internal/bitutils/bit_set_run_reader.go | 4 +- .../v18}/internal/bitutils/bitmap_generate.go | 2 +- .../v18}/internal/hashing/hash_funcs.go | 0 .../v18}/internal/hashing/hash_string.go | 0 .../v18}/internal/hashing/types.tmpldata | 0 .../internal/hashing/xxh3_memo_table.gen.go | 6 +- .../hashing/xxh3_memo_table.gen.go.tmpl | 4 +- .../v18}/internal/hashing/xxh3_memo_table.go | 0 .../v18}/internal/json/json.go | 0 .../v18}/internal/json/json_tinygo.go | 0 .../v18}/internal/utils/Makefile | 0 .../v18}/internal/utils/buf_reader.go | 0 .../v18}/internal/utils/endians_default.go | 0 .../v18}/internal/utils/endians_s390x.go | 0 .../v18}/internal/utils/math.go | 0 .../v18}/internal/utils/min_max.go | 0 .../v18}/internal/utils/min_max_amd64.go | 0 .../v18}/internal/utils/min_max_arm64.go | 0 .../v18}/internal/utils/min_max_avx2_amd64.go | 0 .../v18}/internal/utils/min_max_avx2_amd64.s | 0 .../v18}/internal/utils/min_max_neon_arm64.go | 0 .../v18}/internal/utils/min_max_neon_arm64.s | 0 .../v18}/internal/utils/min_max_noasm.go | 0 .../v18}/internal/utils/min_max_ppc64le.go | 0 .../v18}/internal/utils/min_max_s390x.go | 0 .../v18}/internal/utils/min_max_sse4_amd64.go | 0 .../v18}/internal/utils/min_max_sse4_amd64.s | 0 .../v18}/internal/utils/recovery.go | 0 .../v18/internal/utils/ref_count.go} | 13 +- .../v18}/internal/utils/transpose_ints.go | 0 .../internal/utils/transpose_ints.go.tmpl | 0 .../internal/utils/transpose_ints.tmpldata | 0 .../internal/utils/transpose_ints_amd64.go | 0 .../utils/transpose_ints_amd64.go.tmpl | 0 .../internal/utils/transpose_ints_arm64.go | 0 .../utils/transpose_ints_avx2_amd64.go | 0 .../utils/transpose_ints_avx2_amd64.s | 0 .../v18}/internal/utils/transpose_ints_def.go | 2 +- .../internal/utils/transpose_ints_noasm.go | 0 .../utils/transpose_ints_noasm.go.tmpl | 0 .../internal/utils/transpose_ints_ppc64le.go | 0 .../internal/utils/transpose_ints_s390x.go | 0 .../utils/transpose_ints_s390x.go.tmpl | 0 .../utils/transpose_ints_simd.go.tmpl | 0 .../utils/transpose_ints_sse4_amd64.go | 0 .../utils/transpose_ints_sse4_amd64.s | 0 .../apache/arrow/go/v17/LICENSE.txt | 1791 ---- .../arrow/go/v17/arrow/array/decimal128.go | 368 - .../arrow/go/v17/arrow/array/decimal256.go | 368 - .../asg017/sqlite-vec-go-bindings/cgo/lib.go | 1 + .../sqlite-vec-go-bindings/cgo/sqlite-vec.c | 3401 +++++- .../sqlite-vec-go-bindings/cgo/sqlite-vec.h | 38 +- .../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +- .../aws/middleware/private/metrics/metrics.go | 320 - .../aws/middleware/request_id_retriever.go | 4 + .../aws/middleware/user_agent.go | 1 + .../aws/retry/attempt_metrics.go | 51 + .../aws/aws-sdk-go-v2/aws/retry/middleware.go | 51 +- .../aws/signer/internal/v4/headers.go | 1 - .../aws-sdk-go-v2/aws/signer/v4/middleware.go | 8 +- .../aws/aws-sdk-go-v2/aws/signer/v4/v4.go | 13 +- .../aws/transport/http/client.go | 36 +- .../aws/aws-sdk-go-v2/config/CHANGELOG.md | 81 + .../config/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/config/load_options.go | 33 + .../config/resolve_credentials.go | 15 +- .../aws-sdk-go-v2/credentials/CHANGELOG.md | 69 + .../credentials/go_module_metadata.go | 2 +- .../credentials/ssocreds/sso_cached_token.go | 2 +- .../feature/ec2/imds/CHANGELOG.md | 33 + .../feature/ec2/imds/go_module_metadata.go | 2 +- .../internal/configsources/CHANGELOG.md | 38 + .../configsources/go_module_metadata.go | 2 +- .../endpoints/awsrulesfn/partitions.json | 5 +- .../internal/endpoints/v2/CHANGELOG.md | 38 + .../endpoints/v2/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/internal/ini/CHANGELOG.md | 4 + .../internal/ini/go_module_metadata.go | 2 +- .../service/cognitoidentity/CHANGELOG.md | 63 + .../service/cognitoidentity/api_client.go | 351 +- .../api_op_CreateIdentityPool.go | 15 + .../api_op_DeleteIdentities.go | 15 + .../api_op_DeleteIdentityPool.go | 15 + .../api_op_DescribeIdentity.go | 15 + .../api_op_DescribeIdentityPool.go | 15 + .../api_op_GetCredentialsForIdentity.go | 15 + .../service/cognitoidentity/api_op_GetId.go | 15 + .../api_op_GetIdentityPoolRoles.go | 15 + .../cognitoidentity/api_op_GetOpenIdToken.go | 15 + ...i_op_GetOpenIdTokenForDeveloperIdentity.go | 15 + .../api_op_GetPrincipalTagAttributeMap.go | 15 + .../cognitoidentity/api_op_ListIdentities.go | 15 + .../api_op_ListIdentityPools.go | 15 + .../api_op_ListTagsForResource.go | 15 + .../api_op_LookupDeveloperIdentity.go | 15 + .../api_op_MergeDeveloperIdentities.go | 15 + .../api_op_SetIdentityPoolRoles.go | 15 + .../api_op_SetPrincipalTagAttributeMap.go | 15 + .../cognitoidentity/api_op_TagResource.go | 15 + .../api_op_UnlinkDeveloperIdentity.go | 15 + .../cognitoidentity/api_op_UnlinkIdentity.go | 15 + .../cognitoidentity/api_op_UntagResource.go | 15 + .../api_op_UpdateIdentityPool.go | 15 + .../service/cognitoidentity/auth.go | 35 +- .../service/cognitoidentity/deserializers.go | 115 +- .../service/cognitoidentity/endpoints.go | 16 +- .../cognitoidentity/go_module_metadata.go | 2 +- .../internal/endpoints/endpoints.go | 2 +- .../service/cognitoidentity/options.go | 11 +- .../service/cognitoidentity/serializers.go | 139 + .../aws-sdk-go-v2/service/iam/CHANGELOG.md | 60 + .../aws-sdk-go-v2/service/iam/api_client.go | 351 +- ...i_op_AddClientIDToOpenIDConnectProvider.go | 15 + .../iam/api_op_AddRoleToInstanceProfile.go | 15 + .../service/iam/api_op_AddUserToGroup.go | 15 + .../service/iam/api_op_AttachGroupPolicy.go | 15 + .../service/iam/api_op_AttachRolePolicy.go | 15 + .../service/iam/api_op_AttachUserPolicy.go | 15 + .../service/iam/api_op_ChangePassword.go | 15 + .../service/iam/api_op_CreateAccessKey.go | 15 + .../service/iam/api_op_CreateAccountAlias.go | 15 + .../service/iam/api_op_CreateGroup.go | 15 + .../iam/api_op_CreateInstanceProfile.go | 15 + .../service/iam/api_op_CreateLoginProfile.go | 15 + .../iam/api_op_CreateOpenIDConnectProvider.go | 27 +- .../service/iam/api_op_CreatePolicy.go | 15 + .../service/iam/api_op_CreatePolicyVersion.go | 15 + .../service/iam/api_op_CreateRole.go | 15 + .../service/iam/api_op_CreateSAMLProvider.go | 15 + .../iam/api_op_CreateServiceLinkedRole.go | 15 + .../api_op_CreateServiceSpecificCredential.go | 15 + .../service/iam/api_op_CreateUser.go | 15 + .../iam/api_op_CreateVirtualMFADevice.go | 15 + .../service/iam/api_op_DeactivateMFADevice.go | 15 + .../service/iam/api_op_DeleteAccessKey.go | 15 + .../service/iam/api_op_DeleteAccountAlias.go | 15 + .../iam/api_op_DeleteAccountPasswordPolicy.go | 15 + .../service/iam/api_op_DeleteGroup.go | 15 + .../service/iam/api_op_DeleteGroupPolicy.go | 15 + .../iam/api_op_DeleteInstanceProfile.go | 15 + .../service/iam/api_op_DeleteLoginProfile.go | 15 + .../iam/api_op_DeleteOpenIDConnectProvider.go | 15 + .../service/iam/api_op_DeletePolicy.go | 15 + .../service/iam/api_op_DeletePolicyVersion.go | 15 + .../service/iam/api_op_DeleteRole.go | 15 + .../api_op_DeleteRolePermissionsBoundary.go | 15 + .../service/iam/api_op_DeleteRolePolicy.go | 15 + .../service/iam/api_op_DeleteSAMLProvider.go | 15 + .../service/iam/api_op_DeleteSSHPublicKey.go | 15 + .../iam/api_op_DeleteServerCertificate.go | 15 + .../iam/api_op_DeleteServiceLinkedRole.go | 15 + .../api_op_DeleteServiceSpecificCredential.go | 15 + .../iam/api_op_DeleteSigningCertificate.go | 15 + .../service/iam/api_op_DeleteUser.go | 15 + .../api_op_DeleteUserPermissionsBoundary.go | 15 + .../service/iam/api_op_DeleteUserPolicy.go | 15 + .../iam/api_op_DeleteVirtualMFADevice.go | 15 + .../service/iam/api_op_DetachGroupPolicy.go | 15 + .../service/iam/api_op_DetachRolePolicy.go | 15 + .../service/iam/api_op_DetachUserPolicy.go | 15 + .../service/iam/api_op_EnableMFADevice.go | 15 + .../iam/api_op_GenerateCredentialReport.go | 15 + ...pi_op_GenerateOrganizationsAccessReport.go | 15 + ...i_op_GenerateServiceLastAccessedDetails.go | 15 + .../iam/api_op_GetAccessKeyLastUsed.go | 15 + .../api_op_GetAccountAuthorizationDetails.go | 15 + .../iam/api_op_GetAccountPasswordPolicy.go | 15 + .../service/iam/api_op_GetAccountSummary.go | 15 + .../api_op_GetContextKeysForCustomPolicy.go | 15 + ...api_op_GetContextKeysForPrincipalPolicy.go | 15 + .../service/iam/api_op_GetCredentialReport.go | 15 + .../service/iam/api_op_GetGroup.go | 15 + .../service/iam/api_op_GetGroupPolicy.go | 15 + .../service/iam/api_op_GetInstanceProfile.go | 15 + .../service/iam/api_op_GetLoginProfile.go | 15 + .../service/iam/api_op_GetMFADevice.go | 15 + .../iam/api_op_GetOpenIDConnectProvider.go | 15 + .../api_op_GetOrganizationsAccessReport.go | 15 + .../service/iam/api_op_GetPolicy.go | 15 + .../service/iam/api_op_GetPolicyVersion.go | 15 + .../service/iam/api_op_GetRole.go | 15 + .../service/iam/api_op_GetRolePolicy.go | 15 + .../service/iam/api_op_GetSAMLProvider.go | 15 + .../service/iam/api_op_GetSSHPublicKey.go | 15 + .../iam/api_op_GetServerCertificate.go | 15 + .../api_op_GetServiceLastAccessedDetails.go | 15 + ...tServiceLastAccessedDetailsWithEntities.go | 15 + ...i_op_GetServiceLinkedRoleDeletionStatus.go | 15 + .../service/iam/api_op_GetUser.go | 15 + .../service/iam/api_op_GetUserPolicy.go | 15 + .../service/iam/api_op_ListAccessKeys.go | 15 + .../service/iam/api_op_ListAccountAliases.go | 19 +- .../iam/api_op_ListAttachedGroupPolicies.go | 15 + .../iam/api_op_ListAttachedRolePolicies.go | 15 + .../iam/api_op_ListAttachedUserPolicies.go | 15 + .../iam/api_op_ListEntitiesForPolicy.go | 15 + .../service/iam/api_op_ListGroupPolicies.go | 15 + .../service/iam/api_op_ListGroups.go | 15 + .../service/iam/api_op_ListGroupsForUser.go | 15 + .../iam/api_op_ListInstanceProfileTags.go | 15 + .../iam/api_op_ListInstanceProfiles.go | 15 + .../iam/api_op_ListInstanceProfilesForRole.go | 15 + .../service/iam/api_op_ListMFADeviceTags.go | 15 + .../service/iam/api_op_ListMFADevices.go | 15 + .../api_op_ListOpenIDConnectProviderTags.go | 15 + .../iam/api_op_ListOpenIDConnectProviders.go | 15 + .../service/iam/api_op_ListPolicies.go | 15 + ...pi_op_ListPoliciesGrantingServiceAccess.go | 15 + .../service/iam/api_op_ListPolicyTags.go | 15 + .../service/iam/api_op_ListPolicyVersions.go | 15 + .../service/iam/api_op_ListRolePolicies.go | 15 + .../service/iam/api_op_ListRoleTags.go | 15 + .../service/iam/api_op_ListRoles.go | 15 + .../iam/api_op_ListSAMLProviderTags.go | 15 + .../service/iam/api_op_ListSAMLProviders.go | 15 + .../service/iam/api_op_ListSSHPublicKeys.go | 15 + .../iam/api_op_ListServerCertificateTags.go | 15 + .../iam/api_op_ListServerCertificates.go | 15 + .../api_op_ListServiceSpecificCredentials.go | 15 + .../iam/api_op_ListSigningCertificates.go | 15 + .../service/iam/api_op_ListUserPolicies.go | 15 + .../service/iam/api_op_ListUserTags.go | 15 + .../service/iam/api_op_ListUsers.go | 15 + .../iam/api_op_ListVirtualMFADevices.go | 15 + .../service/iam/api_op_PutGroupPolicy.go | 15 + .../iam/api_op_PutRolePermissionsBoundary.go | 15 + .../service/iam/api_op_PutRolePolicy.go | 15 + .../iam/api_op_PutUserPermissionsBoundary.go | 15 + .../service/iam/api_op_PutUserPolicy.go | 15 + ...RemoveClientIDFromOpenIDConnectProvider.go | 15 + .../api_op_RemoveRoleFromInstanceProfile.go | 15 + .../service/iam/api_op_RemoveUserFromGroup.go | 15 + .../api_op_ResetServiceSpecificCredential.go | 15 + .../service/iam/api_op_ResyncMFADevice.go | 15 + .../iam/api_op_SetDefaultPolicyVersion.go | 15 + ...i_op_SetSecurityTokenServicePreferences.go | 15 + .../iam/api_op_SimulateCustomPolicy.go | 15 + .../iam/api_op_SimulatePrincipalPolicy.go | 15 + .../service/iam/api_op_TagInstanceProfile.go | 15 + .../service/iam/api_op_TagMFADevice.go | 15 + .../iam/api_op_TagOpenIDConnectProvider.go | 15 + .../service/iam/api_op_TagPolicy.go | 15 + .../service/iam/api_op_TagRole.go | 15 + .../service/iam/api_op_TagSAMLProvider.go | 15 + .../iam/api_op_TagServerCertificate.go | 15 + .../service/iam/api_op_TagUser.go | 15 + .../iam/api_op_UntagInstanceProfile.go | 15 + .../service/iam/api_op_UntagMFADevice.go | 15 + .../iam/api_op_UntagOpenIDConnectProvider.go | 15 + .../service/iam/api_op_UntagPolicy.go | 15 + .../service/iam/api_op_UntagRole.go | 15 + .../service/iam/api_op_UntagSAMLProvider.go | 15 + .../iam/api_op_UntagServerCertificate.go | 15 + .../service/iam/api_op_UntagUser.go | 15 + .../service/iam/api_op_UpdateAccessKey.go | 15 + .../iam/api_op_UpdateAccountPasswordPolicy.go | 15 + .../iam/api_op_UpdateAssumeRolePolicy.go | 15 + .../service/iam/api_op_UpdateGroup.go | 15 + .../service/iam/api_op_UpdateLoginProfile.go | 15 + ...p_UpdateOpenIDConnectProviderThumbprint.go | 27 +- .../service/iam/api_op_UpdateRole.go | 15 + .../iam/api_op_UpdateRoleDescription.go | 15 + .../service/iam/api_op_UpdateSAMLProvider.go | 15 + .../service/iam/api_op_UpdateSSHPublicKey.go | 15 + .../iam/api_op_UpdateServerCertificate.go | 15 + .../api_op_UpdateServiceSpecificCredential.go | 15 + .../iam/api_op_UpdateSigningCertificate.go | 15 + .../service/iam/api_op_UpdateUser.go | 15 + .../service/iam/api_op_UploadSSHPublicKey.go | 15 + .../iam/api_op_UploadServerCertificate.go | 15 + .../iam/api_op_UploadSigningCertificate.go | 15 + .../aws/aws-sdk-go-v2/service/iam/auth.go | 35 +- .../service/iam/deserializers.go | 637 ++ .../aws-sdk-go-v2/service/iam/endpoints.go | 16 +- .../service/iam/go_module_metadata.go | 2 +- .../iam/internal/endpoints/endpoints.go | 2 +- .../aws/aws-sdk-go-v2/service/iam/options.go | 11 +- .../aws-sdk-go-v2/service/iam/serializers.go | 955 ++ .../aws-sdk-go-v2/service/iam/types/types.go | 28 +- .../internal/accept-encoding/CHANGELOG.md | 16 + .../accept-encoding/go_module_metadata.go | 2 +- .../internal/presigned-url/CHANGELOG.md | 39 + .../presigned-url/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/ssm/CHANGELOG.md | 68 + .../aws-sdk-go-v2/service/ssm/api_client.go | 351 +- .../service/ssm/api_op_AddTagsToResource.go | 15 + .../ssm/api_op_AssociateOpsItemRelatedItem.go | 15 + .../service/ssm/api_op_CancelCommand.go | 15 + ...api_op_CancelMaintenanceWindowExecution.go | 15 + .../service/ssm/api_op_CreateActivation.go | 25 +- .../service/ssm/api_op_CreateAssociation.go | 19 +- .../ssm/api_op_CreateAssociationBatch.go | 15 + .../service/ssm/api_op_CreateDocument.go | 17 +- .../ssm/api_op_CreateMaintenanceWindow.go | 15 + .../service/ssm/api_op_CreateOpsItem.go | 15 + .../service/ssm/api_op_CreateOpsMetadata.go | 15 + .../service/ssm/api_op_CreatePatchBaseline.go | 23 +- .../ssm/api_op_CreateResourceDataSync.go | 19 +- .../service/ssm/api_op_DeleteActivation.go | 15 + .../service/ssm/api_op_DeleteAssociation.go | 15 + .../service/ssm/api_op_DeleteDocument.go | 15 + .../service/ssm/api_op_DeleteInventory.go | 19 +- .../ssm/api_op_DeleteMaintenanceWindow.go | 15 + .../service/ssm/api_op_DeleteOpsItem.go | 15 + .../service/ssm/api_op_DeleteOpsMetadata.go | 15 + .../service/ssm/api_op_DeleteParameter.go | 15 + .../service/ssm/api_op_DeleteParameters.go | 15 + .../service/ssm/api_op_DeletePatchBaseline.go | 15 + .../ssm/api_op_DeleteResourceDataSync.go | 15 + .../ssm/api_op_DeleteResourcePolicy.go | 15 + .../ssm/api_op_DeregisterManagedInstance.go | 15 + ...op_DeregisterPatchBaselineForPatchGroup.go | 15 + ...p_DeregisterTargetFromMaintenanceWindow.go | 15 + ..._op_DeregisterTaskFromMaintenanceWindow.go | 15 + .../service/ssm/api_op_DescribeActivations.go | 15 + .../service/ssm/api_op_DescribeAssociation.go | 15 + ..._op_DescribeAssociationExecutionTargets.go | 15 + .../api_op_DescribeAssociationExecutions.go | 15 + .../api_op_DescribeAutomationExecutions.go | 15 + ...api_op_DescribeAutomationStepExecutions.go | 15 + .../ssm/api_op_DescribeAvailablePatches.go | 15 + .../service/ssm/api_op_DescribeDocument.go | 15 + .../ssm/api_op_DescribeDocumentPermission.go | 15 + ...p_DescribeEffectiveInstanceAssociations.go | 15 + ...escribeEffectivePatchesForPatchBaseline.go | 15 + ...i_op_DescribeInstanceAssociationsStatus.go | 15 + .../ssm/api_op_DescribeInstanceInformation.go | 15 + .../ssm/api_op_DescribeInstancePatchStates.go | 15 + ...escribeInstancePatchStatesForPatchGroup.go | 15 + .../ssm/api_op_DescribeInstancePatches.go | 19 +- .../ssm/api_op_DescribeInstanceProperties.go | 15 + .../ssm/api_op_DescribeInventoryDeletions.go | 15 + ...intenanceWindowExecutionTaskInvocations.go | 15 + ...DescribeMaintenanceWindowExecutionTasks.go | 15 + ..._op_DescribeMaintenanceWindowExecutions.go | 17 +- ...pi_op_DescribeMaintenanceWindowSchedule.go | 15 + ...api_op_DescribeMaintenanceWindowTargets.go | 15 + .../api_op_DescribeMaintenanceWindowTasks.go | 15 + .../ssm/api_op_DescribeMaintenanceWindows.go | 15 + ..._op_DescribeMaintenanceWindowsForTarget.go | 15 + .../service/ssm/api_op_DescribeOpsItems.go | 15 + .../service/ssm/api_op_DescribeParameters.go | 15 + .../ssm/api_op_DescribePatchBaselines.go | 15 + .../ssm/api_op_DescribePatchGroupState.go | 15 + .../service/ssm/api_op_DescribePatchGroups.go | 15 + .../ssm/api_op_DescribePatchProperties.go | 15 + .../service/ssm/api_op_DescribeSessions.go | 15 + .../api_op_DisassociateOpsItemRelatedItem.go | 15 + .../ssm/api_op_GetAutomationExecution.go | 15 + .../service/ssm/api_op_GetCalendarState.go | 15 + .../ssm/api_op_GetCommandInvocation.go | 15 + .../service/ssm/api_op_GetConnectionStatus.go | 15 + .../ssm/api_op_GetDefaultPatchBaseline.go | 15 + ...p_GetDeployablePatchSnapshotForInstance.go | 15 + .../service/ssm/api_op_GetDocument.go | 15 + .../service/ssm/api_op_GetInventory.go | 15 + .../service/ssm/api_op_GetInventorySchema.go | 15 + .../ssm/api_op_GetMaintenanceWindow.go | 15 + .../api_op_GetMaintenanceWindowExecution.go | 15 + ...pi_op_GetMaintenanceWindowExecutionTask.go | 15 + ...aintenanceWindowExecutionTaskInvocation.go | 15 + .../ssm/api_op_GetMaintenanceWindowTask.go | 19 +- .../service/ssm/api_op_GetOpsItem.go | 15 + .../service/ssm/api_op_GetOpsMetadata.go | 15 + .../service/ssm/api_op_GetOpsSummary.go | 15 + .../service/ssm/api_op_GetParameter.go | 17 +- .../service/ssm/api_op_GetParameterHistory.go | 15 + .../service/ssm/api_op_GetParameters.go | 15 + .../service/ssm/api_op_GetParametersByPath.go | 15 + .../service/ssm/api_op_GetPatchBaseline.go | 15 + .../api_op_GetPatchBaselineForPatchGroup.go | 15 + .../service/ssm/api_op_GetResourcePolicies.go | 15 + .../service/ssm/api_op_GetServiceSetting.go | 15 + .../ssm/api_op_LabelParameterVersion.go | 15 + .../ssm/api_op_ListAssociationVersions.go | 15 + .../service/ssm/api_op_ListAssociations.go | 15 + .../ssm/api_op_ListCommandInvocations.go | 15 + .../service/ssm/api_op_ListCommands.go | 15 + .../service/ssm/api_op_ListComplianceItems.go | 15 + .../ssm/api_op_ListComplianceSummaries.go | 15 + .../ssm/api_op_ListDocumentMetadataHistory.go | 15 + .../ssm/api_op_ListDocumentVersions.go | 15 + .../service/ssm/api_op_ListDocuments.go | 15 + .../ssm/api_op_ListInventoryEntries.go | 15 + .../service/ssm/api_op_ListOpsItemEvents.go | 15 + .../ssm/api_op_ListOpsItemRelatedItems.go | 15 + .../service/ssm/api_op_ListOpsMetadata.go | 15 + .../api_op_ListResourceComplianceSummaries.go | 15 + .../ssm/api_op_ListResourceDataSync.go | 15 + .../service/ssm/api_op_ListTagsForResource.go | 15 + .../ssm/api_op_ModifyDocumentPermission.go | 15 + .../service/ssm/api_op_PutComplianceItems.go | 15 + .../service/ssm/api_op_PutInventory.go | 15 + .../service/ssm/api_op_PutParameter.go | 15 + .../service/ssm/api_op_PutResourcePolicy.go | 15 + .../api_op_RegisterDefaultPatchBaseline.go | 15 + ...i_op_RegisterPatchBaselineForPatchGroup.go | 15 + ..._op_RegisterTargetWithMaintenanceWindow.go | 15 + ...pi_op_RegisterTaskWithMaintenanceWindow.go | 19 +- .../ssm/api_op_RemoveTagsFromResource.go | 15 + .../service/ssm/api_op_ResetServiceSetting.go | 15 + .../service/ssm/api_op_ResumeSession.go | 15 + .../ssm/api_op_SendAutomationSignal.go | 15 + .../service/ssm/api_op_SendCommand.go | 15 + .../ssm/api_op_StartAssociationsOnce.go | 15 + .../ssm/api_op_StartAutomationExecution.go | 32 +- .../ssm/api_op_StartChangeRequestExecution.go | 15 + .../service/ssm/api_op_StartSession.go | 15 + .../ssm/api_op_StopAutomationExecution.go | 15 + .../service/ssm/api_op_TerminateSession.go | 15 + .../ssm/api_op_UnlabelParameterVersion.go | 15 + .../service/ssm/api_op_UpdateAssociation.go | 15 + .../ssm/api_op_UpdateAssociationStatus.go | 15 + .../service/ssm/api_op_UpdateDocument.go | 15 + .../api_op_UpdateDocumentDefaultVersion.go | 15 + .../ssm/api_op_UpdateDocumentMetadata.go | 15 + .../ssm/api_op_UpdateMaintenanceWindow.go | 15 + .../api_op_UpdateMaintenanceWindowTarget.go | 15 + .../ssm/api_op_UpdateMaintenanceWindowTask.go | 23 +- .../ssm/api_op_UpdateManagedInstanceRole.go | 19 +- .../service/ssm/api_op_UpdateOpsItem.go | 19 +- .../service/ssm/api_op_UpdateOpsMetadata.go | 15 + .../service/ssm/api_op_UpdatePatchBaseline.go | 23 +- .../ssm/api_op_UpdateResourceDataSync.go | 15 + .../ssm/api_op_UpdateServiceSetting.go | 15 + .../aws/aws-sdk-go-v2/service/ssm/auth.go | 35 +- .../service/ssm/deserializers.go | 888 +- .../aws-sdk-go-v2/service/ssm/endpoints.go | 16 +- .../service/ssm/go_module_metadata.go | 2 +- .../ssm/internal/endpoints/endpoints.go | 5 +- .../aws/aws-sdk-go-v2/service/ssm/options.go | 11 +- .../aws-sdk-go-v2/service/ssm/serializers.go | 886 ++ .../aws-sdk-go-v2/service/ssm/types/errors.go | 4 +- .../aws-sdk-go-v2/service/ssm/types/types.go | 127 +- .../aws-sdk-go-v2/service/sso/CHANGELOG.md | 63 + .../aws-sdk-go-v2/service/sso/api_client.go | 351 +- .../service/sso/api_op_GetRoleCredentials.go | 15 + .../service/sso/api_op_ListAccountRoles.go | 15 + .../service/sso/api_op_ListAccounts.go | 15 + .../service/sso/api_op_Logout.go | 15 + .../aws/aws-sdk-go-v2/service/sso/auth.go | 35 +- .../service/sso/deserializers.go | 29 +- .../aws-sdk-go-v2/service/sso/endpoints.go | 16 +- .../service/sso/go_module_metadata.go | 2 +- .../sso/internal/endpoints/endpoints.go | 2 +- .../aws/aws-sdk-go-v2/service/sso/options.go | 11 +- .../aws-sdk-go-v2/service/sso/serializers.go | 33 +- .../service/ssooidc/CHANGELOG.md | 59 + .../service/ssooidc/api_client.go | 351 +- .../service/ssooidc/api_op_CreateToken.go | 15 + .../ssooidc/api_op_CreateTokenWithIAM.go | 15 + .../service/ssooidc/api_op_RegisterClient.go | 15 + .../api_op_StartDeviceAuthorization.go | 15 + .../aws/aws-sdk-go-v2/service/ssooidc/auth.go | 35 +- .../service/ssooidc/deserializers.go | 21 + .../service/ssooidc/endpoints.go | 16 +- .../service/ssooidc/go_module_metadata.go | 2 +- .../ssooidc/internal/endpoints/endpoints.go | 2 +- .../aws-sdk-go-v2/service/ssooidc/options.go | 11 +- .../service/ssooidc/serializers.go | 25 + .../aws-sdk-go-v2/service/sts/CHANGELOG.md | 63 + .../aws-sdk-go-v2/service/sts/api_client.go | 351 +- .../service/sts/api_op_AssumeRole.go | 15 + .../service/sts/api_op_AssumeRoleWithSAML.go | 15 + .../sts/api_op_AssumeRoleWithWebIdentity.go | 15 + .../sts/api_op_DecodeAuthorizationMessage.go | 15 + .../service/sts/api_op_GetAccessKeyInfo.go | 15 + .../service/sts/api_op_GetCallerIdentity.go | 15 + .../service/sts/api_op_GetFederationToken.go | 15 + .../service/sts/api_op_GetSessionToken.go | 15 + .../aws/aws-sdk-go-v2/service/sts/auth.go | 35 +- .../service/sts/deserializers.go | 33 + .../aws-sdk-go-v2/service/sts/endpoints.go | 16 +- .../service/sts/go_module_metadata.go | 2 +- .../sts/internal/endpoints/endpoints.go | 5 +- .../aws/aws-sdk-go-v2/service/sts/options.go | 11 +- .../aws-sdk-go-v2/service/sts/serializers.go | 49 + vendor/github.com/aws/smithy-go/CHANGELOG.md | 43 + vendor/github.com/aws/smithy-go/README.md | 74 +- .../encoding/httpbinding/path_replace.go | 30 +- .../aws/smithy-go/go_module_metadata.go | 2 +- .../aws/smithy-go/metrics/metrics.go | 136 + .../github.com/aws/smithy-go/metrics/nop.go | 67 + .../aws/smithy-go/middleware/context.go | 41 + vendor/github.com/aws/smithy-go/properties.go | 19 +- .../aws/smithy-go/tracing/context.go | 96 + .../github.com/aws/smithy-go/tracing/nop.go | 32 + .../aws/smithy-go/tracing/tracing.go | 95 + .../aws/smithy-go/transport/http/client.go | 45 +- .../aws/smithy-go/transport/http/metrics.go | 184 + .../github.com/blevesearch/bleve/v2/README.md | 27 +- .../github.com/blevesearch/bleve/v2/index.go | 3 + .../bleve/v2/index/scorch/event.go | 4 + .../bleve/v2/index/scorch/optimize_knn.go | 44 +- .../bleve/v2/index/scorch/scorch.go | 12 +- .../bleve/v2/index/scorch/snapshot_index.go | 30 +- .../v2/index/scorch/snapshot_index_vr.go | 38 +- .../v2/index/scorch/snapshot_vector_index.go | 26 + .../blevesearch/bleve/v2/index_impl.go | 15 + .../bleve/v2/mapping/mapping_vectors.go | 18 + .../bleve/v2/search/collector/eligible.go | 157 + .../bleve/v2/search/collector/slice.go | 4 +- .../bleve/v2/search/query/boolean.go | 9 + .../blevesearch/bleve/v2/search/query/knn.go | 20 +- .../bleve/v2/search/searcher/search_knn.go | 13 +- .../blevesearch/bleve/v2/search_knn.go | 121 +- .../blevesearch/bleve_index_api/index.go | 8 + .../blevesearch/bleve_index_api/vector.go | 10 +- .../bleve_index_api/vector_index.go | 7 +- .../github.com/blevesearch/go-faiss/faiss.go | 11 + .../github.com/blevesearch/go-faiss/index.go | 134 +- .../blevesearch/go-faiss/index_ivf.go | 8 + .../blevesearch/go-faiss/search_params.go | 97 +- .../blevesearch/go-faiss/selector.go | 30 +- .../scorch_segment_api/v2/segment_vector.go | 6 +- .../github.com/blevesearch/zapx/v15/chunk.go | 17 + .../blevesearch/zapx/v15/contentcoder.go | 7 +- .../blevesearch/zapx/v15/docvalues.go | 1 - .../blevesearch/zapx/v15/intDecoder.go | 1 - .../blevesearch/zapx/v15/intcoder.go | 6 +- .../github.com/blevesearch/zapx/v15/merge.go | 4 + vendor/github.com/blevesearch/zapx/v15/new.go | 11 +- .../blevesearch/zapx/v15/posting.go | 13 +- .../github.com/blevesearch/zapx/v16/build.go | 12 +- .../github.com/blevesearch/zapx/v16/chunk.go | 17 + .../blevesearch/zapx/v16/contentcoder.go | 7 +- .../blevesearch/zapx/v16/docvalues.go | 1 - .../zapx/v16/faiss_vector_cache.go | 133 +- .../zapx/v16/faiss_vector_posting.go | 269 +- .../blevesearch/zapx/v16/intDecoder.go | 1 - .../blevesearch/zapx/v16/intcoder.go | 6 +- .../github.com/blevesearch/zapx/v16/merge.go | 26 +- vendor/github.com/blevesearch/zapx/v16/new.go | 33 +- .../blevesearch/zapx/v16/posting.go | 13 +- .../zapx/v16/section_faiss_vector_index.go | 72 +- .../zapx/v16/section_inverted_text_index.go | 11 +- .../blevesearch/zapx/v16/segment.go | 13 +- .../github.com/blevesearch/zapx/v16/write.go | 2 +- .../klauspost/compress/.goreleaser.yml | 6 +- .../github.com/klauspost/compress/README.md | 29 +- .../klauspost/compress/fse/decompress.go | 2 +- .../klauspost/compress/huff0/decompress.go | 4 +- .../klauspost/compress/zstd/blockdec.go | 4 +- .../klauspost/compress/zstd/enc_better.go | 32 +- .../klauspost/compress/zstd/enc_dfast.go | 16 +- .../klauspost/compress/zstd/encoder.go | 45 +- .../klauspost/compress/zstd/framedec.go | 4 +- .../klauspost/compress/zstd/seqdec_amd64.go | 4 +- .../klauspost/compress/zstd/seqdec_amd64.s | 8 +- .../klauspost/compress/zstd/zstd.go | 4 + .../marcboeker/go-duckdb/.gitignore | 2 + .../github.com/marcboeker/go-duckdb/Makefile | 32 +- .../github.com/marcboeker/go-duckdb/README.md | 176 +- .../marcboeker/go-duckdb/appender.go | 41 +- .../github.com/marcboeker/go-duckdb/arrow.go | 50 +- .../marcboeker/go-duckdb/cgo_static.go | 4 +- .../marcboeker/go-duckdb/connection.go | 176 +- .../marcboeker/go-duckdb/data_chunk.go | 45 +- .../github.com/marcboeker/go-duckdb/duckdb.go | 9 +- .../github.com/marcboeker/go-duckdb/duckdb.h | 2520 +++-- .../github.com/marcboeker/go-duckdb/errors.go | 90 +- .../marcboeker/go-duckdb/profiling.go | 72 + .../marcboeker/go-duckdb/replacement_scan.go | 17 +- vendor/github.com/marcboeker/go-duckdb/row.go | 37 + .../github.com/marcboeker/go-duckdb/rows.go | 154 +- .../marcboeker/go-duckdb/scalarUDF.go | 283 + .../marcboeker/go-duckdb/statement.go | 9 +- .../marcboeker/go-duckdb/tableUDF.go | 484 + .../github.com/marcboeker/go-duckdb/type.go | 100 + .../marcboeker/go-duckdb/type_info.go | 320 + .../github.com/marcboeker/go-duckdb/types.go | 59 +- .../marcboeker/go-duckdb/udf_utils.go | 55 + .../github.com/marcboeker/go-duckdb/value.go | 66 + .../github.com/marcboeker/go-duckdb/vector.go | 528 +- .../marcboeker/go-duckdb/vector_getters.go | 123 +- .../marcboeker/go-duckdb/vector_setters.go | 487 +- .../mattn/go-sqlite3/sqlite3-binding.c | 9075 ++++++++++------- .../mattn/go-sqlite3/sqlite3-binding.h | 116 +- vendor/github.com/mattn/go-sqlite3/sqlite3.go | 2 +- .../mattn/go-sqlite3/sqlite3_libsqlite3.go | 1 + .../mattn/go-sqlite3/sqlite3_opt_userauth.go | 2 +- vendor/github.com/ollama/ollama/api/client.go | 6 +- vendor/github.com/ollama/ollama/api/types.go | 31 +- .../ollama/ollama/envconfig/config.go | 130 +- .../philippgille/chromem-go/CHANGELOG.md | 24 + .../philippgille/chromem-go/LICENSE | 1034 +- .../philippgille/chromem-go/README.md | 9 +- .../philippgille/chromem-go/collection.go | 215 +- .../github.com/philippgille/chromem-go/db.go | 98 +- .../philippgille/chromem-go/embed_cohere.go | 9 +- .../philippgille/chromem-go/embed_compat.go | 36 +- .../philippgille/chromem-go/embed_openai.go | 3 +- .../philippgille/chromem-go/embed_vertex.go | 157 + .../philippgille/chromem-go/persistence.go | 6 +- .../philippgille/chromem-go/query.go | 30 +- .../philippgille/chromem-go/vector.go | 11 + vendor/github.com/tidwall/gjson/README.md | 22 +- vendor/github.com/tidwall/gjson/gjson.go | 160 +- .../go-foursquare-places/.gitignore | 4 + .../whosonfirst/go-foursquare-places/LICENSE | 27 + .../whosonfirst/go-foursquare-places/Makefile | 6 + .../go-foursquare-places/README.md | 189 + .../go-foursquare-places/emitter/csv.go | 169 + .../go-foursquare-places/emitter/emitter.go | 98 + .../whosonfirst/go-foursquare-places/place.go | 40 + vendor/gocloud.dev/blob/blob.go | 16 +- vendor/gocloud.dev/blob/blob_fs.go | 8 +- vendor/golang.org/x/exp/LICENSE | 4 +- vendor/golang.org/x/mod/LICENSE | 4 +- vendor/golang.org/x/mod/module/module.go | 2 - vendor/golang.org/x/net/http2/config.go | 122 + vendor/golang.org/x/net/http2/config_go124.go | 61 + .../x/net/http2/config_pre_go124.go | 16 + vendor/golang.org/x/net/http2/http2.go | 53 +- vendor/golang.org/x/net/http2/server.go | 181 +- vendor/golang.org/x/net/http2/transport.go | 143 +- vendor/golang.org/x/net/http2/write.go | 10 + vendor/golang.org/x/sys/cpu/cpu.go | 19 + .../golang.org/x/sys/cpu/cpu_linux_noinit.go | 2 +- .../golang.org/x/sys/cpu/cpu_linux_riscv64.go | 137 + vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 11 +- vendor/golang.org/x/sys/unix/README.md | 2 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 5 +- vendor/golang.org/x/sys/unix/syscall_aix.go | 2 +- .../golang.org/x/sys/unix/syscall_darwin.go | 37 + vendor/golang.org/x/sys/unix/syscall_hurd.go | 1 + vendor/golang.org/x/sys/unix/syscall_linux.go | 63 +- .../x/sys/unix/syscall_linux_arm64.go | 2 + .../x/sys/unix/syscall_linux_loong64.go | 2 + .../x/sys/unix/syscall_linux_riscv64.go | 2 + .../golang.org/x/sys/unix/vgetrandom_linux.go | 13 + .../unix/vgetrandom_unsupported.go} | 11 +- .../x/sys/unix/zerrors_darwin_amd64.go | 7 + .../x/sys/unix/zerrors_darwin_arm64.go | 7 + vendor/golang.org/x/sys/unix/zerrors_linux.go | 13 +- .../x/sys/unix/zerrors_linux_386.go | 5 + .../x/sys/unix/zerrors_linux_amd64.go | 5 + .../x/sys/unix/zerrors_linux_arm.go | 5 + .../x/sys/unix/zerrors_linux_arm64.go | 5 + .../x/sys/unix/zerrors_linux_loong64.go | 5 + .../x/sys/unix/zerrors_linux_mips.go | 5 + .../x/sys/unix/zerrors_linux_mips64.go | 5 + .../x/sys/unix/zerrors_linux_mips64le.go | 5 + .../x/sys/unix/zerrors_linux_mipsle.go | 5 + .../x/sys/unix/zerrors_linux_ppc.go | 5 + .../x/sys/unix/zerrors_linux_ppc64.go | 5 + .../x/sys/unix/zerrors_linux_ppc64le.go | 5 + .../x/sys/unix/zerrors_linux_riscv64.go | 5 + .../x/sys/unix/zerrors_linux_s390x.go | 5 + .../x/sys/unix/zerrors_linux_sparc64.go | 5 + .../x/sys/unix/zerrors_zos_s390x.go | 2 + .../x/sys/unix/zsyscall_darwin_amd64.go | 20 + .../x/sys/unix/zsyscall_darwin_amd64.s | 5 + .../x/sys/unix/zsyscall_darwin_arm64.go | 20 + .../x/sys/unix/zsyscall_darwin_arm64.s | 5 + .../golang.org/x/sys/unix/zsyscall_linux.go | 17 - .../x/sys/unix/zsysnum_linux_amd64.go | 1 + .../x/sys/unix/zsysnum_linux_arm64.go | 2 +- .../x/sys/unix/zsysnum_linux_loong64.go | 2 + .../x/sys/unix/zsysnum_linux_riscv64.go | 2 +- .../x/sys/unix/ztypes_darwin_amd64.go | 13 + .../x/sys/unix/ztypes_darwin_arm64.go | 13 + .../x/sys/unix/ztypes_freebsd_386.go | 1 + .../x/sys/unix/ztypes_freebsd_amd64.go | 1 + .../x/sys/unix/ztypes_freebsd_arm.go | 1 + .../x/sys/unix/ztypes_freebsd_arm64.go | 1 + .../x/sys/unix/ztypes_freebsd_riscv64.go | 1 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 90 +- .../x/sys/unix/ztypes_linux_riscv64.go | 33 + .../golang.org/x/sys/windows/dll_windows.go | 2 +- .../x/sys/windows/syscall_windows.go | 4 + .../golang.org/x/sys/windows/types_windows.go | 1 + .../x/sys/windows/zsyscall_windows.go | 38 + vendor/golang.org/x/tools/LICENSE | 4 +- .../x/tools/cmd/goimports/goimports.go | 2 + .../x/tools/cmd/stringer/stringer.go | 203 +- .../x/tools/go/ast/astutil/enclosing.go | 24 +- .../golang.org/x/tools/go/ast/astutil/util.go | 11 +- .../tools/go/internal/packagesdriver/sizes.go | 54 - vendor/golang.org/x/tools/go/packages/doc.go | 15 +- .../x/tools/go/packages/external.go | 2 +- .../golang.org/x/tools/go/packages/golist.go | 44 +- .../x/tools/go/packages/loadmode_string.go | 69 +- .../x/tools/go/packages/packages.go | 39 +- .../golang.org/x/tools/go/packages/visit.go | 9 + .../x/tools/go/types/objectpath/objectpath.go | 103 +- .../x/tools/go/types/typeutil/callee.go | 68 + .../x/tools/go/types/typeutil/imports.go | 30 + .../x/tools/go/types/typeutil/map.go | 517 + .../tools/go/types/typeutil/methodsetcache.go | 71 + .../x/tools/go/types/typeutil/ui.go | 53 + .../x/tools/internal/aliases/aliases.go | 10 +- .../x/tools/internal/aliases/aliases_go121.go | 31 - .../x/tools/internal/aliases/aliases_go122.go | 57 +- .../x/tools/internal/gcimporter/bimport.go | 61 - .../x/tools/internal/gcimporter/gcimporter.go | 11 +- .../x/tools/internal/gcimporter/iexport.go | 260 +- .../x/tools/internal/gcimporter/iimport.go | 31 +- .../internal/gcimporter/newInterface10.go | 22 - .../internal/gcimporter/newInterface11.go | 14 - .../tools/internal/gcimporter/predeclared.go | 91 + .../internal/gcimporter/support_go118.go | 34 - .../x/tools/internal/gcimporter/unified_no.go | 10 - .../tools/internal/gcimporter/unified_yes.go | 10 - .../tools/internal/gcimporter/ureader_yes.go | 44 +- .../x/tools/internal/gocommand/invoke.go | 37 +- .../x/tools/internal/imports/fix.go | 348 +- .../x/tools/internal/imports/imports.go | 4 +- .../x/tools/internal/imports/mod.go | 17 +- .../x/tools/internal/pkgbits/decoder.go | 38 +- .../x/tools/internal/pkgbits/encoder.go | 43 +- .../x/tools/internal/pkgbits/frames_go1.go | 21 - .../x/tools/internal/pkgbits/frames_go17.go | 28 - .../x/tools/internal/pkgbits/support.go | 2 +- .../x/tools/internal/pkgbits/sync.go | 23 + .../internal/pkgbits/syncmarker_string.go | 7 +- .../x/tools/internal/pkgbits/version.go | 85 + .../x/tools/internal/stdlib/manifest.go | 111 + .../internal/tokeninternal/tokeninternal.go | 137 - .../x/tools/internal/typeparams/common.go | 140 + .../x/tools/internal/typeparams/coretype.go | 150 + .../x/tools/internal/typeparams/free.go | 118 + .../x/tools/internal/typeparams/normalize.go | 218 + .../x/tools/internal/typeparams/termlist.go | 163 + .../x/tools/internal/typeparams/typeterm.go | 169 + .../x/tools/internal/typesinternal/element.go | 133 + .../tools/internal/typesinternal/errorcode.go | 8 +- .../x/tools/internal/typesinternal/recv.go | 8 +- .../x/tools/internal/typesinternal/types.go | 15 + .../x/tools/internal/versions/constraint.go | 13 + ...toolchain_go121.go => constraint_go121.go} | 6 +- .../x/tools/internal/versions/toolchain.go | 14 - .../internal/versions/toolchain_go120.go | 14 - .../x/tools/internal/versions/types.go | 33 +- .../x/tools/internal/versions/types_go121.go | 30 - .../x/tools/internal/versions/types_go122.go | 41 - vendor/google.golang.org/grpc/CONTRIBUTING.md | 16 +- vendor/google.golang.org/grpc/MAINTAINERS.md | 33 +- vendor/google.golang.org/grpc/SECURITY.md | 2 +- .../google.golang.org/grpc/backoff/backoff.go | 2 +- .../grpc/balancer/balancer.go | 36 +- .../grpc/balancer/base/balancer.go | 6 +- .../balancer/pickfirst/internal/internal.go | 24 + .../grpc/balancer/pickfirst/pickfirst.go | 18 +- .../pickfirst/pickfirstleaf/pickfirstleaf.go | 625 ++ .../grpc/balancer_wrapper.go | 78 +- .../grpc_binarylog_v1/binarylog.pb.go | 24 +- vendor/google.golang.org/grpc/clientconn.go | 134 +- vendor/google.golang.org/grpc/codec.go | 69 +- .../grpc/credentials/insecure/insecure.go | 2 +- .../google.golang.org/grpc/credentials/tls.go | 29 +- vendor/google.golang.org/grpc/dialoptions.go | 31 +- vendor/google.golang.org/grpc/doc.go | 2 +- .../grpc/encoding/encoding.go | 5 +- .../grpc/encoding/encoding_v2.go | 81 + .../grpc/encoding/proto/proto.go | 44 +- .../grpc/experimental/stats/metricregistry.go | 269 + .../grpc/experimental/stats/metrics.go | 114 + .../grpc/grpclog/component.go | 10 +- .../google.golang.org/grpc/grpclog/grpclog.go | 104 +- .../grpc/grpclog/internal/grpclog.go | 26 + .../grpc/grpclog/internal/logger.go | 87 + .../internal/loggerv2.go} | 178 +- .../google.golang.org/grpc/grpclog/logger.go | 59 +- .../grpc/grpclog/loggerv2.go | 181 +- .../balancer/gracefulswitch/config.go | 2 + .../grpc/internal/binarylog/method_logger.go | 2 +- .../grpc/internal/channelz/channel.go | 15 + .../grpc/internal/channelz/channelmap.go | 9 +- .../grpc/internal/channelz/funcs.go | 2 +- .../grpc/internal/channelz/server.go | 2 + .../grpc/internal/channelz/socket.go | 7 + .../grpc/internal/channelz/subchannel.go | 2 + .../internal/channelz/syscall_nonlinux.go | 4 +- .../grpc/internal/channelz/trace.go | 19 +- .../grpc/internal/envconfig/envconfig.go | 11 +- .../grpc/internal/experimental.go | 8 +- .../{prefixLogger.go => prefix_logger.go} | 40 +- .../internal/grpcsync/callback_serializer.go | 24 +- .../grpc/internal/grpcsync/pubsub.go | 4 +- .../grpc/internal/grpcutil/method.go | 2 +- .../grpc/internal/idle/idle.go | 4 +- .../grpc/internal/internal.go | 30 +- .../internal/resolver/dns/dns_resolver.go | 2 +- .../resolver/passthrough/passthrough.go | 2 +- .../grpc/internal/stats/labels.go | 42 + .../internal/stats/metrics_recorder_list.go | 105 + .../grpc/internal/status/status.go | 39 +- .../grpc/internal/syscall/syscall_nonlinux.go | 6 +- .../grpc/internal/tcp_keepalive_unix.go | 2 +- .../grpc/internal/tcp_keepalive_windows.go | 2 +- .../grpc/internal/transport/controlbuf.go | 256 +- .../grpc/internal/transport/handler_server.go | 47 +- .../grpc/internal/transport/http2_client.go | 135 +- .../grpc/internal/transport/http2_server.go | 49 +- .../grpc/internal/transport/http_util.go | 24 +- .../grpc/internal/transport/proxy.go | 10 +- .../grpc/internal/transport/transport.go | 249 +- .../grpc/keepalive/keepalive.go | 20 +- .../google.golang.org/grpc/mem/buffer_pool.go | 194 + .../grpc/mem/buffer_slice.go | 226 + vendor/google.golang.org/grpc/mem/buffers.go | 268 + .../grpc/metadata/metadata.go | 7 +- vendor/google.golang.org/grpc/preloader.go | 28 +- vendor/google.golang.org/grpc/regenerate.sh | 123 - .../grpc/resolver_wrapper.go | 9 +- vendor/google.golang.org/grpc/rpc_util.go | 330 +- vendor/google.golang.org/grpc/server.go | 99 +- .../grpc/shared_buffer_pool.go | 154 - vendor/google.golang.org/grpc/stats/stats.go | 6 - vendor/google.golang.org/grpc/stream.go | 213 +- .../grpc/stream_interfaces.go | 86 + vendor/google.golang.org/grpc/version.go | 2 +- .../protobuf/encoding/protojson/decode.go | 2 +- .../protobuf/encoding/protojson/encode.go | 4 +- .../encoding/protojson/well_known_types.go | 6 +- .../protobuf/internal/descopts/options.go | 20 +- .../editiondefaults/editions_defaults.binpb | Bin 93 -> 99 bytes .../internal/editionssupport/editions.go | 7 +- .../protobuf/internal/filedesc/desc.go | 19 + .../protobuf/internal/filedesc/desc_init.go | 2 + .../protobuf/internal/filedesc/desc_lazy.go | 2 + .../protobuf/internal/filedesc/editions.go | 6 +- .../protobuf/internal/genid/doc.go | 2 +- .../internal/genid/go_features_gen.go | 32 +- .../protobuf/internal/genid/map_entry.go | 2 +- .../protobuf/internal/genid/wrappers.go | 2 +- .../protobuf/internal/impl/codec_extension.go | 11 +- .../protobuf/internal/impl/codec_field.go | 3 + .../protobuf/internal/impl/codec_message.go | 3 + .../protobuf/internal/impl/codec_reflect.go | 210 - .../protobuf/internal/impl/codec_unsafe.go | 3 - .../protobuf/internal/impl/convert.go | 2 +- .../protobuf/internal/impl/encode.go | 2 +- .../protobuf/internal/impl/equal.go | 224 + .../internal/impl/legacy_extension.go | 1 + .../protobuf/internal/impl/message.go | 4 +- .../protobuf/internal/impl/pointer_reflect.go | 215 - .../protobuf/internal/impl/pointer_unsafe.go | 3 - .../protobuf/internal/strs/strings_pure.go | 28 - .../internal/strs/strings_unsafe_go120.go | 3 +- .../internal/strs/strings_unsafe_go121.go | 3 +- .../protobuf/internal/version/version.go | 2 +- .../google.golang.org/protobuf/proto/equal.go | 9 + .../protobuf/proto/extension.go | 71 + .../protobuf/reflect/protodesc/desc.go | 12 +- .../protobuf/reflect/protodesc/desc_init.go | 4 + .../protobuf/reflect/protodesc/editions.go | 7 +- .../protobuf/reflect/protoreflect/methods.go | 10 + .../reflect/protoreflect/value_pure.go | 60 - .../protoreflect/value_unsafe_go120.go | 3 +- .../protoreflect/value_unsafe_go121.go | 3 +- .../protobuf/runtime/protoiface/methods.go | 18 + .../types/descriptorpb/descriptor.pb.go | 748 +- .../types/gofeaturespb/go_features.pb.go | 155 +- .../protobuf/types/known/anypb/any.pb.go | 24 +- .../types/known/durationpb/duration.pb.go | 24 +- .../types/known/timestamppb/timestamp.pb.go | 24 +- vendor/modules.txt | 214 +- whosonfirst/iterator.go | 2 + 1113 files changed, 40546 insertions(+), 14743 deletions(-) create mode 100644 cmd/embeddings/main.go create mode 100644 foursquare/foursqure.go create mode 100644 foursquare/iterator.go create mode 100644 foursquare/parser.go create mode 100644 vendor/github.com/aaronland/gocloud-blob/bucket/uri.go create mode 100644 vendor/github.com/apache/arrow-go/v18/LICENSE.txt rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/.editorconfig (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/.gitignore (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/Gopkg.lock (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/Gopkg.toml (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/Makefile (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/array.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/binary.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/binarybuilder.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/boolean.go (94%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/booleanbuilder.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/bufferbuilder.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/bufferbuilder_byte.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/bufferbuilder_numeric.gen.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/bufferbuilder_numeric.gen.go.tmpl (94%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/builder.go (93%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/compare.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/concat.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/data.go (98%) create mode 100644 vendor/github.com/apache/arrow-go/v18/arrow/array/decimal.go rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/dictionary.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/diff.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/doc.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/encoded.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/extension.go (98%) create mode 100644 vendor/github.com/apache/arrow-go/v18/arrow/array/extension_builder.go rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/fixed_size_list.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/fixedsize_binary.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/fixedsize_binarybuilder.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/float16.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/float16_builder.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/interval.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/json_reader.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/list.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/map.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/null.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/numeric.gen.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/numeric.gen.go.tmpl (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/numericbuilder.gen.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/numericbuilder.gen.go.tmpl (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/numericbuilder.gen_test.go.tmpl (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/record.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/string.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/struct.go (88%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/table.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/timestamp.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/union.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/array/util.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/arrio/arrio.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/Makefile (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops_arm64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops_avx2_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops_avx2_amd64.s (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops_noasm.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops_ppc64le.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops_s390x.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops_sse4_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmap_ops_sse4_amd64.s (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitmaps.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitutil.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/bitutil_bytes.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/endian_default.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/bitutil/endian_s390x.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/cdata.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/cdata_allocate.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/cdata_exports.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/cdata_fulltest.c (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/cdata_test_framework.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/exports.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/import_allocator.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/interface.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/trampoline.c (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/cdata/utils.h (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/compare.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype.go (94%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_binary.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_encoded.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_extension.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_fixedwidth.go (87%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_nested.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_null.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_numeric.gen.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_numeric.gen.go.tmpl (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_numeric.gen.go.tmpldata (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_viewheader.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_viewheader_inline.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_viewheader_inline_go1.19.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/datatype_viewheader_inline_tinygo.go (95%) create mode 100644 vendor/github.com/apache/arrow-go/v18/arrow/decimal/decimal.go create mode 100644 vendor/github.com/apache/arrow-go/v18/arrow/decimal/traits.go rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/decimal128/decimal128.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/decimal256/decimal256.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/doc.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/encoded/ree_utils.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/endian/big.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/endian/endian.go (91%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/endian/little.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/errors.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/float16/float16.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/debug/assert_off.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/debug/assert_on.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/debug/doc.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/debug/log_off.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/debug/log_on.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/debug/util.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/dictutils/dict.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Binary.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/BinaryView.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Block.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/BodyCompression.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/BodyCompressionMethod.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Bool.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Buffer.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/CompressionType.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Date.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/DateUnit.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Decimal.go (79%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/DictionaryBatch.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/DictionaryEncoding.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/DictionaryKind.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Duration.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Endianness.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Feature.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Field.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/FieldNode.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/FixedSizeBinary.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/FixedSizeList.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/FloatingPoint.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Footer.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Int.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Interval.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/IntervalUnit.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/KeyValue.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/LargeBinary.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/LargeList.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/LargeListView.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/LargeUtf8.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/List.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/ListView.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Map.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Message.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/MessageHeader.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/MetadataVersion.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Null.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Precision.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/RecordBatch.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/RunEndEncoded.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/RunLengthEncoded.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Schema.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/SparseMatrixIndexCSR.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/SparseMatrixIndexCSX.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/SparseTensor.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/SparseTensorIndex.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/SparseTensorIndexCOO.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/SparseTensorIndexCSF.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Struct_.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Tensor.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/TensorDim.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Time.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/TimeUnit.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Timestamp.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Type.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Union.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/UnionMode.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Utf8.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/flatbuf/Utf8View.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/internal/utils.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/ipc/compression.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/ipc/endian_swap.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/ipc/file_reader.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/ipc/file_writer.go (79%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/ipc/ipc.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/ipc/message.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/ipc/metadata.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/ipc/reader.go (94%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/ipc/writer.go (94%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/Makefile (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/allocator.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/buffer.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/cgo_allocator.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/cgo_allocator_defaults.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/cgo_allocator_logging.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/checked_allocator.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/default_allocator.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/default_mallocator.go (94%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/doc.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/go_allocator.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/internal/cgoalloc/allocator.cc (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/internal/cgoalloc/allocator.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/internal/cgoalloc/allocator.h (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/internal/cgoalloc/helpers.h (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/mallocator/doc.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/mallocator/mallocator.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/mallocator/mallocator_util.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_arm64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_avx2_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_avx2_amd64.s (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_js_wasm.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_neon_arm64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_neon_arm64.s (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_noasm.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_sse4_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/memory_sse4_amd64.s (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/memory/util.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/numeric.schema.json (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/numeric.tmpldata (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/record.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/schema.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/table.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/tools.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_string.go (93%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_boolean.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_decimal128.go (76%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_decimal256.go (71%) create mode 100644 vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal32.go create mode 100644 vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal64.go rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_float16.go (95%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_interval.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_numeric.gen.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_numeric.gen.go.tmpl (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_numeric.gen_test.go.tmpl (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_timestamp.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/type_traits_view.go (96%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/arrow/unionmode_string.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/bitutils/bit_block_counter.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/bitutils/bit_run_reader.go (97%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/bitutils/bit_set_run_reader.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/bitutils/bitmap_generate.go (98%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/hashing/hash_funcs.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/hashing/hash_string.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/hashing/types.tmpldata (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/hashing/xxh3_memo_table.gen.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/hashing/xxh3_memo_table.gen.go.tmpl (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/hashing/xxh3_memo_table.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/json/json.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/json/json_tinygo.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/Makefile (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/buf_reader.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/endians_default.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/endians_s390x.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/math.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_arm64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_avx2_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_avx2_amd64.s (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_neon_arm64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_neon_arm64.s (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_noasm.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_ppc64le.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_s390x.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_sse4_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/min_max_sse4_amd64.s (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/recovery.go (100%) rename vendor/github.com/apache/{arrow/go/v17/arrow/array/extension_builder.go => arrow-go/v18/internal/utils/ref_count.go} (71%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints.go.tmpl (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints.tmpldata (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_amd64.go.tmpl (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_arm64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_avx2_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_avx2_amd64.s (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_def.go (99%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_noasm.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_noasm.go.tmpl (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_ppc64le.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_s390x.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_s390x.go.tmpl (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_simd.go.tmpl (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_sse4_amd64.go (100%) rename vendor/github.com/apache/{arrow/go/v17 => arrow-go/v18}/internal/utils/transpose_ints_sse4_amd64.s (100%) delete mode 100644 vendor/github.com/apache/arrow/go/v17/LICENSE.txt delete mode 100644 vendor/github.com/apache/arrow/go/v17/arrow/array/decimal128.go delete mode 100644 vendor/github.com/apache/arrow/go/v17/arrow/array/decimal256.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/attempt_metrics.go create mode 100644 vendor/github.com/aws/smithy-go/metrics/metrics.go create mode 100644 vendor/github.com/aws/smithy-go/metrics/nop.go create mode 100644 vendor/github.com/aws/smithy-go/middleware/context.go create mode 100644 vendor/github.com/aws/smithy-go/tracing/context.go create mode 100644 vendor/github.com/aws/smithy-go/tracing/nop.go create mode 100644 vendor/github.com/aws/smithy-go/tracing/tracing.go create mode 100644 vendor/github.com/aws/smithy-go/transport/http/metrics.go create mode 100644 vendor/github.com/blevesearch/bleve/v2/search/collector/eligible.go create mode 100644 vendor/github.com/marcboeker/go-duckdb/profiling.go create mode 100644 vendor/github.com/marcboeker/go-duckdb/row.go create mode 100644 vendor/github.com/marcboeker/go-duckdb/scalarUDF.go create mode 100644 vendor/github.com/marcboeker/go-duckdb/tableUDF.go create mode 100644 vendor/github.com/marcboeker/go-duckdb/type.go create mode 100644 vendor/github.com/marcboeker/go-duckdb/type_info.go create mode 100644 vendor/github.com/marcboeker/go-duckdb/udf_utils.go create mode 100644 vendor/github.com/marcboeker/go-duckdb/value.go create mode 100644 vendor/github.com/philippgille/chromem-go/embed_vertex.go create mode 100644 vendor/github.com/whosonfirst/go-foursquare-places/.gitignore create mode 100644 vendor/github.com/whosonfirst/go-foursquare-places/LICENSE create mode 100644 vendor/github.com/whosonfirst/go-foursquare-places/Makefile create mode 100644 vendor/github.com/whosonfirst/go-foursquare-places/README.md create mode 100644 vendor/github.com/whosonfirst/go-foursquare-places/emitter/csv.go create mode 100644 vendor/github.com/whosonfirst/go-foursquare-places/emitter/emitter.go create mode 100644 vendor/github.com/whosonfirst/go-foursquare-places/place.go create mode 100644 vendor/golang.org/x/net/http2/config.go create mode 100644 vendor/golang.org/x/net/http2/config_go124.go create mode 100644 vendor/golang.org/x/net/http2/config_pre_go124.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go create mode 100644 vendor/golang.org/x/sys/unix/vgetrandom_linux.go rename vendor/golang.org/x/{tools/internal/versions/toolchain_go119.go => sys/unix/vgetrandom_unsupported.go} (56%) delete mode 100644 vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go create mode 100644 vendor/golang.org/x/tools/go/types/typeutil/callee.go create mode 100644 vendor/golang.org/x/tools/go/types/typeutil/imports.go create mode 100644 vendor/golang.org/x/tools/go/types/typeutil/map.go create mode 100644 vendor/golang.org/x/tools/go/types/typeutil/methodsetcache.go create mode 100644 vendor/golang.org/x/tools/go/types/typeutil/ui.go delete mode 100644 vendor/golang.org/x/tools/internal/aliases/aliases_go121.go delete mode 100644 vendor/golang.org/x/tools/internal/gcimporter/newInterface10.go delete mode 100644 vendor/golang.org/x/tools/internal/gcimporter/newInterface11.go create mode 100644 vendor/golang.org/x/tools/internal/gcimporter/predeclared.go delete mode 100644 vendor/golang.org/x/tools/internal/gcimporter/support_go118.go delete mode 100644 vendor/golang.org/x/tools/internal/gcimporter/unified_no.go delete mode 100644 vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go delete mode 100644 vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go delete mode 100644 vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go create mode 100644 vendor/golang.org/x/tools/internal/pkgbits/version.go delete mode 100644 vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go create mode 100644 vendor/golang.org/x/tools/internal/typeparams/common.go create mode 100644 vendor/golang.org/x/tools/internal/typeparams/coretype.go create mode 100644 vendor/golang.org/x/tools/internal/typeparams/free.go create mode 100644 vendor/golang.org/x/tools/internal/typeparams/normalize.go create mode 100644 vendor/golang.org/x/tools/internal/typeparams/termlist.go create mode 100644 vendor/golang.org/x/tools/internal/typeparams/typeterm.go create mode 100644 vendor/golang.org/x/tools/internal/typesinternal/element.go create mode 100644 vendor/golang.org/x/tools/internal/versions/constraint.go rename vendor/golang.org/x/tools/internal/versions/{toolchain_go121.go => constraint_go121.go} (75%) delete mode 100644 vendor/golang.org/x/tools/internal/versions/toolchain.go delete mode 100644 vendor/golang.org/x/tools/internal/versions/toolchain_go120.go delete mode 100644 vendor/golang.org/x/tools/internal/versions/types_go121.go delete mode 100644 vendor/golang.org/x/tools/internal/versions/types_go122.go create mode 100644 vendor/google.golang.org/grpc/balancer/pickfirst/internal/internal.go create mode 100644 vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go create mode 100644 vendor/google.golang.org/grpc/encoding/encoding_v2.go create mode 100644 vendor/google.golang.org/grpc/experimental/stats/metricregistry.go create mode 100644 vendor/google.golang.org/grpc/experimental/stats/metrics.go create mode 100644 vendor/google.golang.org/grpc/grpclog/internal/grpclog.go create mode 100644 vendor/google.golang.org/grpc/grpclog/internal/logger.go rename vendor/google.golang.org/grpc/{internal/grpclog/grpclog.go => grpclog/internal/loggerv2.go} (52%) rename vendor/google.golang.org/grpc/internal/grpclog/{prefixLogger.go => prefix_logger.go} (63%) create mode 100644 vendor/google.golang.org/grpc/internal/stats/labels.go create mode 100644 vendor/google.golang.org/grpc/internal/stats/metrics_recorder_list.go create mode 100644 vendor/google.golang.org/grpc/mem/buffer_pool.go create mode 100644 vendor/google.golang.org/grpc/mem/buffer_slice.go create mode 100644 vendor/google.golang.org/grpc/mem/buffers.go delete mode 100644 vendor/google.golang.org/grpc/regenerate.sh delete mode 100644 vendor/google.golang.org/grpc/shared_buffer_pool.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go create mode 100644 vendor/google.golang.org/protobuf/internal/impl/equal.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go delete mode 100644 vendor/google.golang.org/protobuf/internal/strs/strings_pure.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go diff --git a/.gitignore b/.gitignore index 71d90348..2a7f1eca 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ bin work *.db +libduckdb.a \ No newline at end of file diff --git a/cmd/compare-locations/main.go b/cmd/compare-locations/main.go index 5900b8f0..7c3be699 100644 --- a/cmd/compare-locations/main.go +++ b/cmd/compare-locations/main.go @@ -6,6 +6,7 @@ import ( _ "github.com/mattn/go-sqlite3" _ "github.com/whosonfirst/go-dedupe/alltheplaces" + _ "github.com/whosonfirst/go-dedupe/foursquare" _ "github.com/whosonfirst/go-dedupe/ilms" _ "github.com/whosonfirst/go-dedupe/overture" _ "github.com/whosonfirst/go-dedupe/whosonfirst" diff --git a/cmd/embeddings/main.go b/cmd/embeddings/main.go new file mode 100644 index 00000000..a7710afb --- /dev/null +++ b/cmd/embeddings/main.go @@ -0,0 +1,77 @@ +package main + +import ( + "context" + "encoding/json" + "flag" + "io" + "log" + "log/slog" + "os" + + "github.com/whosonfirst/go-dedupe/embeddings" +) + +const stdin string = "-" + +func main() { + + var embedder_uri string + var is_image bool + + flag.StringVar(&embedder_uri, "embedder-uri", "null://", "A registered whosonfirst/go-dedupe/embeddings.Embedder URI.") + flag.BoolVar(&is_image, "image", false, "A boolean flag indicating whether to derive embeddings for an image.") + + flag.Parse() + + ctx := context.Background() + + emb, err := embeddings.NewEmbedder(ctx, embedder_uri) + + if err != nil { + log.Fatalf("Failed to create embedder, %v", err) + } + + for _, path := range flag.Args() { + + var data []float64 + var input []byte + var err error + + if path == stdin { + + input, err = io.ReadAll(os.Stdin) + + if err != nil { + log.Fatalf("Failed to read data from STDIN, %v", err) + } + + } else { + + input, err = os.ReadFile(path) + + if err != nil { + log.Fatalf("Failed to read data from %s, %v", path, err) + } + + } + + if is_image { + data, err = emb.ImageEmbeddings(ctx, input) + } else { + data, err = emb.Embeddings(ctx, string(input)) + } + + if err != nil { + log.Fatalf("Failed to derive embeddings, %v", err) + } + + enc := json.NewEncoder(os.Stdout) + err = enc.Encode(data) + + if err != nil { + log.Fatalf("Failed to encode embeddings, %v", err) + } + } + +} diff --git a/cmd/index-locations/main.go b/cmd/index-locations/main.go index cb9fd81a..05b1c586 100644 --- a/cmd/index-locations/main.go +++ b/cmd/index-locations/main.go @@ -12,6 +12,7 @@ import ( _ "github.com/mattn/go-sqlite3" _ "github.com/whosonfirst/go-dedupe/alltheplaces" + _ "github.com/whosonfirst/go-dedupe/foursquare" _ "github.com/whosonfirst/go-dedupe/ilms" _ "github.com/whosonfirst/go-dedupe/overture" _ "github.com/whosonfirst/go-dedupe/whosonfirst" diff --git a/compare/database.go b/compare/database.go index 92bfdc7a..b5829c93 100644 --- a/compare/database.go +++ b/compare/database.go @@ -197,7 +197,7 @@ func CompareLocationDatabases(ctx context.Context, opts *CompareLocationDatabase logger := slog.Default() logger = logger.With("geohash", geohash) - logger.Debug("Process geohash") + logger.Info("Process geohash") source_suffix := fmt.Sprintf("*-%s-source.jsonl", geohash) target_suffix := fmt.Sprintf("*-%s-target.jsonl", geohash) diff --git a/compare/geohash.go b/compare/geohash.go index ffe19b5f..d609fc2d 100644 --- a/compare/geohash.go +++ b/compare/geohash.go @@ -116,7 +116,7 @@ func CompareLocationsForGeohash(ctx context.Context, opts *CompareLocationsForGe t1 := time.Now() - // logger.Info("Walk sources", "path", opts.SourceLocations) + logger.Info("Walk sources", "path", opts.SourceLocations) err = walk_reader(ctx, source_r, source_walk_cb) if err != nil { @@ -138,7 +138,7 @@ func CompareLocationsForGeohash(ctx context.Context, opts *CompareLocationsForGe geohash := opts.Geohash threshold := opts.Threshold - logger.Debug("Compare location from target database", "location", loc.String()) + logger.Info("Compare location from target database", "location", loc.String()) // t1 := time.Now() @@ -235,6 +235,7 @@ func walk_reader(ctx context.Context, r io.Reader, cb func(ctx context.Context, case r := <-record_ch: err := cb(ctx, r.Path, r) + // slog.Info("Process", "path", r.Path, "error", err) r.CompletedChannel <- true diff --git a/embeddings/llamafile.go b/embeddings/llamafile.go index 9e2fabff..811e8b8d 100644 --- a/embeddings/llamafile.go +++ b/embeddings/llamafile.go @@ -16,8 +16,8 @@ import ( _ "io" "net/http" "net/url" - "strings" "strconv" + "strings" "time" ) diff --git a/foursquare/foursqure.go b/foursquare/foursqure.go new file mode 100644 index 00000000..cd39e2fa --- /dev/null +++ b/foursquare/foursqure.go @@ -0,0 +1 @@ +package foursquare diff --git a/foursquare/iterator.go b/foursquare/iterator.go new file mode 100644 index 00000000..da4104de --- /dev/null +++ b/foursquare/iterator.go @@ -0,0 +1,88 @@ +package foursquare + +// ./bin/index-locations -iterator-uri 'foursquare://?emitter-uri=csv:///usr/local/data/4sq/4sq.csv.bz2' -location-parser-uri 'foursquare://' -location-database-uri 'sql://sqlite3?dsn=/usr/local/data/4sq/4sq-locations.db' + +import ( + "context" + "encoding/json" + "fmt" + "net/url" + + "github.com/whosonfirst/go-dedupe/iterator" + "github.com/whosonfirst/go-foursquare-places/emitter" +) + +type FoursquareIterator struct { + iterator.Iterator + emitter emitter.Emitter +} + +func init() { + ctx := context.Background() + err := iterator.RegisterIterator(ctx, "foursquare", NewFoursquareIterator) + if err != nil { + panic(err) + } +} + +func NewFoursquareIterator(ctx context.Context, uri string) (iterator.Iterator, error) { + + u, err := url.Parse(uri) + + if err != nil { + return nil, err + } + + q := u.Query() + + emitter_uri := q.Get("emitter-uri") + + e, err := emitter.NewEmitter(ctx, emitter_uri) + + if err != nil { + return nil, err + } + + iter := &FoursquareIterator{ + emitter: e, + } + + return iter, nil +} + +func (iter *FoursquareIterator) IterateWithCallback(ctx context.Context, cb iterator.IteratorCallback, uris ...string) error { + + var iter_err error + + for pl, err := range iter.emitter.Emit(ctx) { + + if err != nil { + iter_err = fmt.Errorf("Failed to iterate places, %w", err) + break + } + + body, err := json.Marshal(pl) + + if err != nil { + iter_err = fmt.Errorf("Failed to marshal place %s, %w", pl, err) + break + } + + err = cb(ctx, body) + + if err != nil { + iter_err = fmt.Errorf("Failed to execute callback for place %s, %w", pl, err) + break + } + } + + if iter_err != nil { + return iter_err + } + + return nil +} + +func (iter *FoursquareIterator) Close(ctx context.Context) error { + return iter.emitter.Close() +} diff --git a/foursquare/parser.go b/foursquare/parser.go new file mode 100644 index 00000000..8ec8e821 --- /dev/null +++ b/foursquare/parser.go @@ -0,0 +1,91 @@ +package foursquare + +import ( + "context" + "fmt" + _ "log/slog" + "strings" + + "github.com/paulmach/orb" + "github.com/tidwall/gjson" + "github.com/whosonfirst/go-dedupe" + "github.com/whosonfirst/go-dedupe/location" +) + +type FoursquarePlaceParser struct { + location.Parser + addr_keys []string +} + +func init() { + ctx := context.Background() + err := location.RegisterParser(ctx, "foursquare", NewFoursquarePlaceParser) + + if err != nil { + panic(err) + } +} + +func NewFoursquarePlaceParser(ctx context.Context, uri string) (location.Parser, error) { + + addr_keys := []string{ + "address", + "po_box", + "post_town", + "region", + "admin_regin", + "post_code", + "country", + } + + p := &FoursquarePlaceParser{ + addr_keys: addr_keys, + } + + return p, nil +} + +func (p *FoursquarePlaceParser) Parse(ctx context.Context, body []byte) (*location.Location, error) { + + id_rsp := gjson.GetBytes(body, "fsq_place_id") + id := id_rsp.String() + + name_rsp := gjson.GetBytes(body, "name") + name := name_rsp.String() + + addr_components := make([]string, 0) + + for _, k := range p.addr_keys { + + rsp := gjson.GetBytes(body, k) + + if rsp.Exists() && rsp.String() != "" { + addr_components = append(addr_components, rsp.String()) + } + } + + if len(addr_components) == 0 { + return nil, dedupe.InvalidRecord(id, fmt.Errorf("Missing 'address' properties")) + } + + // Something something something libpostal... + + addr := strings.Join(addr_components, " ") + + lat_rsp := gjson.GetBytes(body, "latitude") + lon_rsp := gjson.GetBytes(body, "longitude") + + lat := lat_rsp.Float() + lon := lon_rsp.Float() + + centroid := orb.Point([2]float64{lon, lat}) + + c := &location.Location{ + ID: id, + Name: name, + Address: addr, + Centroid: ¢roid, + } + + return c, nil +} diff --git a/go.mod b/go.mod index 1b7673af..2fe33e60 100644 --- a/go.mod +++ b/go.mod @@ -1,34 +1,32 @@ module github.com/whosonfirst/go-dedupe -go 1.22.5 - -// This fixes a problem where io.Readers are not closed which results in filehandle exhaustion -replace github.com/philippgille/chromem-go v0.6.0 => github.com/philippgille/chromem-go v0.0.0-20240602150210-34ba8797e203 +go 1.23.2 require ( github.com/aaronland/go-jsonl v0.0.21 github.com/aaronland/go-roster v1.0.0 - github.com/aaronland/gocloud-blob v0.3.0 - github.com/asg017/sqlite-vec-go-bindings v0.1.1 - github.com/blevesearch/bleve/v2 v2.4.2 + github.com/aaronland/gocloud-blob v0.4.0 + github.com/asg017/sqlite-vec-go-bindings v0.1.6 + github.com/blevesearch/bleve/v2 v2.4.3 github.com/bwmarrin/snowflake v0.3.0 github.com/json-iterator/go v1.1.12 - github.com/marcboeker/go-duckdb v1.7.1 - github.com/mattn/go-sqlite3 v1.14.22 + github.com/marcboeker/go-duckdb v1.8.3 + github.com/mattn/go-sqlite3 v1.14.24 github.com/mmcloughlin/geohash v0.10.0 github.com/neuml/txtai.go v1.0.0 - github.com/ollama/ollama v0.3.6 + github.com/ollama/ollama v0.4.4 github.com/opensearch-project/opensearch-go/v2 v2.3.0 github.com/paulmach/orb v0.11.1 - github.com/philippgille/chromem-go v0.6.0 + github.com/philippgille/chromem-go v0.7.0 github.com/sfomuseum/go-csvdict v1.0.0 github.com/sfomuseum/go-edtf v1.2.1 github.com/sfomuseum/go-flags v0.10.0 github.com/sfomuseum/go-timings v1.4.0 - github.com/tidwall/gjson v1.17.3 + github.com/tidwall/gjson v1.18.0 + github.com/whosonfirst/go-foursquare-places v0.0.1 github.com/whosonfirst/go-overture v0.0.0-20240812171335-eb48d41e6c6c github.com/whosonfirst/go-reader v1.0.2 - github.com/whosonfirst/go-whosonfirst-export/v2 v2.8.2 + github.com/whosonfirst/go-whosonfirst-export/v2 v2.8.3 github.com/whosonfirst/go-whosonfirst-feature v0.0.28 github.com/whosonfirst/go-whosonfirst-iterate/v2 v2.5.0 github.com/whosonfirst/go-whosonfirst-opensearch v0.0.18 @@ -36,47 +34,47 @@ require ( github.com/whosonfirst/go-whosonfirst-uri v1.3.0 github.com/whosonfirst/go-whosonfirst-writer/v3 v3.1.4 github.com/whosonfirst/go-writer/v3 v3.1.1 - gocloud.dev v0.39.0 + gocloud.dev v0.40.0 ) require ( github.com/RoaringBitmap/roaring v1.9.3 // indirect github.com/aaronland/go-artisanal-integers v0.9.1 // indirect - github.com/aaronland/go-aws-auth v1.6.3 // indirect + github.com/aaronland/go-aws-auth v1.7.0 // indirect github.com/aaronland/go-brooklynintegers-api v1.2.7 // indirect github.com/aaronland/go-json-query v0.1.5 // indirect github.com/aaronland/go-pool/v2 v2.0.0 // indirect github.com/aaronland/go-string v1.0.0 // indirect github.com/aaronland/go-uid v0.4.0 // indirect github.com/aaronland/go-uid-artisanal v0.0.4 // indirect - github.com/aaronland/go-uid-proxy v0.2.0 // indirect + github.com/aaronland/go-uid-proxy v0.3.0 // indirect github.com/aaronland/go-uid-whosonfirst v0.0.5 // indirect - github.com/apache/arrow/go/v17 v17.0.0 // indirect - github.com/aws/aws-sdk-go-v2 v1.30.3 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.27 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.27 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.25.5 // indirect - github.com/aws/aws-sdk-go-v2/service/iam v1.34.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.17 // indirect - github.com/aws/aws-sdk-go-v2/service/ssm v1.52.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.4 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 // indirect - github.com/aws/smithy-go v1.20.3 // indirect + github.com/apache/arrow-go/v18 v18.0.0 // indirect + github.com/aws/aws-sdk-go-v2 v1.32.5 // indirect + github.com/aws/aws-sdk-go-v2/config v1.28.3 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.44 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.27.5 // indirect + github.com/aws/aws-sdk-go-v2/service/iam v1.37.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssm v1.55.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 // indirect + github.com/aws/smithy-go v1.22.1 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/bits-and-blooms/bitset v1.12.0 // indirect - github.com/blevesearch/bleve_index_api v1.1.10 // indirect + github.com/blevesearch/bleve_index_api v1.1.12 // indirect github.com/blevesearch/geo v0.1.20 // indirect - github.com/blevesearch/go-faiss v1.0.20 // indirect + github.com/blevesearch/go-faiss v1.0.23 // indirect github.com/blevesearch/go-porterstemmer v1.0.3 // indirect github.com/blevesearch/gtreap v0.1.1 // indirect github.com/blevesearch/mmap-go v1.0.4 // indirect - github.com/blevesearch/scorch_segment_api/v2 v2.2.15 // indirect + github.com/blevesearch/scorch_segment_api/v2 v2.2.16 // indirect github.com/blevesearch/segment v0.9.1 // indirect github.com/blevesearch/snowballstem v0.9.0 // indirect github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect @@ -85,8 +83,8 @@ require ( github.com/blevesearch/zapx/v12 v12.3.10 // indirect github.com/blevesearch/zapx/v13 v13.3.10 // indirect github.com/blevesearch/zapx/v14 v14.3.10 // indirect - github.com/blevesearch/zapx/v15 v15.3.13 // indirect - github.com/blevesearch/zapx/v16 v16.1.5 // indirect + github.com/blevesearch/zapx/v15 v15.3.16 // indirect + github.com/blevesearch/zapx/v16 v16.1.8 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/g8rswimmer/error-chain v1.0.0 // indirect github.com/go-ini/ini v1.67.0 // indirect @@ -101,7 +99,7 @@ require ( github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -117,7 +115,7 @@ require ( github.com/whosonfirst/go-whosonfirst-crawl v0.2.2 // indirect github.com/whosonfirst/go-whosonfirst-flags v0.5.2 // indirect github.com/whosonfirst/go-whosonfirst-format v0.4.1 // indirect - github.com/whosonfirst/go-whosonfirst-id v1.2.4 // indirect + github.com/whosonfirst/go-whosonfirst-id v1.2.5 // indirect github.com/whosonfirst/go-whosonfirst-sources v0.1.0 // indirect github.com/whosonfirst/walk v0.0.2 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect @@ -125,16 +123,16 @@ require ( go.mongodb.org/mongo-driver v1.11.4 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/ratelimit v0.3.0 // indirect - golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/text v0.17.0 // indirect - golang.org/x/tools v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect + golang.org/x/tools v0.26.0 // indirect golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect google.golang.org/api v0.191.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240812133136-8ffd90a71988 // indirect - google.golang.org/grpc v1.65.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.68.0 // indirect + google.golang.org/protobuf v1.35.2 // indirect ) diff --git a/go.sum b/go.sum index 4226d393..7d54f07a 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ github.com/RoaringBitmap/roaring v1.9.3 h1:t4EbC5qQwnisr5PrP9nt0IRhRTb9gMUgQF4t4 github.com/RoaringBitmap/roaring v1.9.3/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= github.com/aaronland/go-artisanal-integers v0.9.1 h1:VnTR0sTbgCKlFS3dDv3MEJ5KZn9K7llzAlTyJW3W07A= github.com/aaronland/go-artisanal-integers v0.9.1/go.mod h1:/KpdlAI8n4re3/aSkz5koLU+UxXDwPpP7Nxzmg89UMA= -github.com/aaronland/go-aws-auth v1.6.3 h1:AL5Q3nBRB+zeAz9Br8KRO8Y5wpeb2SaB/169CHlP9v8= -github.com/aaronland/go-aws-auth v1.6.3/go.mod h1:+t/vLj8Uq/Sjf13LQOJdgP2GG+/c+dBxQxA7wYad4bQ= +github.com/aaronland/go-aws-auth v1.7.0 h1:iTX4JsdBB43zLa6G9M76RT8kwJrIkBERigeemUXXy2c= +github.com/aaronland/go-aws-auth v1.7.0/go.mod h1:vtYPj+S4vkRGx1+lbtkYpzykIKFCUtGf32Hi8KnJO3U= github.com/aaronland/go-brooklynintegers-api v1.2.7 h1:NpMlXLI9UU0l+IfA8Vy9EB3PCEedL1sEvSa2Ois3BSE= github.com/aaronland/go-brooklynintegers-api v1.2.7/go.mod h1:qH7vwhOM1OXFYsDZqy32R52rsPLU19CXjLZ5qjvuX5k= github.com/aaronland/go-json-query v0.1.5 h1:fSNnOKrNmQzw86Ih6L+xlL4hmJuiEK17HXo9rArYC4o= @@ -34,96 +34,100 @@ github.com/aaronland/go-uid v0.4.0 h1:2qQ2yRQarrUCEU9ApvBpaC9osAcqTCCvD77rOkDp7m github.com/aaronland/go-uid v0.4.0/go.mod h1:HwQ09mooJ8j684z3W5lPKO6Odf557O6h3P3o1PquqXE= github.com/aaronland/go-uid-artisanal v0.0.4 h1:I/29nzNnj32gax6rkBLeNtnwtXLqLAIE0mOlMq6KWWY= github.com/aaronland/go-uid-artisanal v0.0.4/go.mod h1:fNtTeUssikRxhttmzQeR3yDLJpSchzwTVqvsOIlglks= -github.com/aaronland/go-uid-proxy v0.2.0 h1:owPhro/6SlHkxKAIuO60oGIScs4MJjTAVwLj2zfttF4= -github.com/aaronland/go-uid-proxy v0.2.0/go.mod h1:LFZBtJBMR7HNOv2Qvd1C2uCsOsHeL6xpXEVrqiC+6tM= +github.com/aaronland/go-uid-proxy v0.3.0 h1:GxAgpLdtHuHW/cTyx+FhWLQxKIiDasCgLu+QTlWseZo= +github.com/aaronland/go-uid-proxy v0.3.0/go.mod h1:LFZBtJBMR7HNOv2Qvd1C2uCsOsHeL6xpXEVrqiC+6tM= github.com/aaronland/go-uid-whosonfirst v0.0.5 h1:j5/vWjq/im3YPcx43R/8sJDJ4F2e7LlnQSK9/MMfsWw= github.com/aaronland/go-uid-whosonfirst v0.0.5/go.mod h1:Z/VSvb6IzCBnSNjDzgiuiJyptUbKSWhwexrjLEO4+24= -github.com/aaronland/gocloud-blob v0.3.0 h1:brS+Voawrvya9YvZAMDCu8/FcS6UcxFpTOJ3lo523cU= -github.com/aaronland/gocloud-blob v0.3.0/go.mod h1:XB62Je0TEAsgyTFbpgjy2SK51NPGM1/DrocgmMa5ub8= +github.com/aaronland/gocloud-blob v0.4.0 h1:Vc8RrtZc97CPlG+oLzP6LmTfFDu7Zo7luQa1q6kf2Xc= +github.com/aaronland/gocloud-blob v0.4.0/go.mod h1:xywFPeaBwgXO10iJ7zaMI91TmmkMHJeAVHb4dnWddq0= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/apache/arrow/go/v17 v17.0.0 h1:RRR2bdqKcdbss9Gxy2NS/hK8i4LDMh23L6BbkN5+F54= -github.com/apache/arrow/go/v17 v17.0.0/go.mod h1:jR7QHkODl15PfYyjM2nU+yTLScZ/qfj7OSUZmJ8putc= -github.com/asg017/sqlite-vec-go-bindings v0.1.1 h1:GA9HxVT1dJFDw7QxEHfssaGw/7Vn+ui23nMnoqQ+OCM= -github.com/asg017/sqlite-vec-go-bindings v0.1.1/go.mod h1:A8+cTt/nKFsYCQF6OgzSNpKZrzNo5gQsXBTfsXHXY0Q= +github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= +github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA= +github.com/apache/arrow-go/v18 v18.0.0 h1:1dBDaSbH3LtulTyOVYaBCHO3yVRwjV+TZaqn3g6V7ZM= +github.com/apache/arrow-go/v18 v18.0.0/go.mod h1:t6+cWRSmKgdQ6HsxisQjok+jBpKGhRDiqcf3p0p/F+A= +github.com/apache/thrift v0.21.0 h1:tdPmh/ptjE1IJnhbhrcl2++TauVjy242rkV/UzJChnE= +github.com/apache/thrift v0.21.0/go.mod h1:W1H8aR/QRtYNvrPeFXBtobyRkd0/YVhTc6i07XIAgDw= +github.com/asg017/sqlite-vec-go-bindings v0.1.6 h1:Nx0jAzyS38XpkKznJ9xQjFXz2X9tI7KqjwVxV8RNoww= +github.com/asg017/sqlite-vec-go-bindings v0.1.6/go.mod h1:A8+cTt/nKFsYCQF6OgzSNpKZrzNo5gQsXBTfsXHXY0Q= github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2 v1.30.3 h1:jUeBtG0Ih+ZIFH0F4UkmL9w3cSpaMv9tYYDbzILP8dY= -github.com/aws/aws-sdk-go-v2 v1.30.3/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 h1:tW1/Rkad38LA15X4UQtjXZXNKsCgkshC3EbmcUmghTg= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3/go.mod h1:UbnqO+zjqk3uIt9yCACHJ9IVNhyhOCnYk8yA19SAWrM= +github.com/aws/aws-sdk-go-v2 v1.32.5 h1:U8vdWJuY7ruAkzaOdD7guwJjD06YSKmnKCJs7s3IkIo= +github.com/aws/aws-sdk-go-v2 v1.32.5/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 h1:lL7IfaFzngfx0ZwUGOZdsFFnQ5uLvR0hWqqhyE7Q9M8= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7/go.mod h1:QraP0UcVlQJsmHfioCrveWOC1nbiWUl3ej08h4mXWoc= github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/config v1.27.27 h1:HdqgGt1OAP0HkEDDShEl0oSYa9ZZBSOmKpdpsDMdO90= -github.com/aws/aws-sdk-go-v2/config v1.27.27/go.mod h1:MVYamCg76dFNINkZFu4n4RjDixhVr51HLj4ErWzrVwg= +github.com/aws/aws-sdk-go-v2/config v1.28.3 h1:kL5uAptPcPKaJ4q0sDUjUIdueO18Q7JDzl64GpVwdOM= +github.com/aws/aws-sdk-go-v2/config v1.28.3/go.mod h1:SPEn1KA8YbgQnwiJ/OISU4fz7+F6Fe309Jf0QTsRCl4= github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/credentials v1.17.27 h1:2raNba6gr2IfA0eqqiP2XiQ0UVOpGPgDSi0I9iAP+UI= -github.com/aws/aws-sdk-go-v2/credentials v1.17.27/go.mod h1:gniiwbGahQByxan6YjQUMcW4Aov6bLC3m+evgcoN4r4= +github.com/aws/aws-sdk-go-v2/credentials v1.17.44 h1:qqfs5kulLUHUEXlHEZXLJkgGoF3kkUeFUTVA585cFpU= +github.com/aws/aws-sdk-go-v2/credentials v1.17.44/go.mod h1:0Lm2YJ8etJdEdw23s+q/9wTpOeo2HhNE97XcRa7T8MA= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 h1:KreluoV8FZDEtI6Co2xuNk/UqI9iwMrOx/87PBNIKqw= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11/go.mod h1:SeSUYBLsMYFoRvHE0Tjvn7kbxaUhl75CJi1sbfhMxkU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 h1:woXadbf0c7enQ2UGCi8gW/WuKmE0xIzxBF/eD94jMKQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19/go.mod h1:zminj5ucw7w0r65bP6nhyOd3xL6veAUMc3ElGMoLVb4= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10 h1:zeN9UtUlA6FTx0vFSayxSX32HDw73Yb6Hh2izDSFxXY= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10/go.mod h1:3HKuexPDcwLWPaqpW2UR/9n8N/u/3CKcGAzSs8p8u8g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15 h1:SoNJ4RlFEQEbtDcCEt+QG56MY4fm4W8rYirAmq+/DdU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15/go.mod h1:U9ke74k1n2bf+RIgoX1SXFed1HLs51OgUSs+Ph0KJP8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 h1:4usbeaes3yJnCFC7kfeyhkdkPtoRYPa/hTmCqMpKpLI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24/go.mod h1:5CI1JemjVwde8m2WG3cz23qHKPOxbpkq0HaoreEgLIY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15 h1:C6WHdGnTDIYETAm5iErQUiVNsclNx9qbJVPIt03B6bI= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15/go.mod h1:ZQLZqhcu+JhSrA9/NXRm8SkDvsycE+JkV3WGY41e+IM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 h1:N1zsICrQglfzaBnrfM0Ys00860C+QFwu6u/5+LomP+o= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24/go.mod h1:dCn9HbJ8+K31i8IQ8EWmWj0EiIk0+vKiHNMxTTYveAg= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.15 h1:Z5r7SycxmSllHYmaAZPpmN8GviDrSGhMS6bldqtXZPw= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.15/go.mod h1:CetW7bDE00QoGEmPUoZuRog07SGVAUVW6LFpNP0YfIg= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.25.5 h1:iMKC49JNJGq0MLvdKU7DSuB5uZUg33bIfcasNZjoMh4= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.25.5/go.mod h1:nEqtURWmhc/EXQ1yYIoEtvCqQYgl5yYKxdQU8taJnv0= -github.com/aws/aws-sdk-go-v2/service/iam v1.34.3 h1:p4L/tixJ3JUIxCteMGT6oMlqCbEv/EzSZoVwdiib8sU= -github.com/aws/aws-sdk-go-v2/service/iam v1.34.3/go.mod h1:rfOWxxwdecWvSC9C2/8K/foW3Blf+aKnIIPP9kQ2DPE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.17 h1:YPYe6ZmvUfDDDELqEKtAd6bo8zxhkm+XEFEzQisqUIE= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.17/go.mod h1:oBtcnYua/CgzCWYN7NZ5j7PotFDaFSUjCYVTtfyn7vw= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24 h1:JX70yGKLj25+lMC5Yyh8wBtvB01GDilyRuJvXJ4piD0= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24/go.mod h1:+Ln60j9SUTD0LEwnhEB0Xhg61DHqplBrbZpLgyjoEHg= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.27.5 h1:BH9f0H3Tl44iCofo/Vx+4LGfVJ/Ptjh3j/4cn25cU0E= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.27.5/go.mod h1:JcmPakQKiVFzqrJFefuBFabERYm56bndwJqMHys0pEg= +github.com/aws/aws-sdk-go-v2/service/iam v1.37.4 h1:MrH2MJRzxPGXtavvL1JtDLFJzXN+4ObO090jzauqcPk= +github.com/aws/aws-sdk-go-v2/service/iam v1.37.4/go.mod h1:WJARDpnEOhixhh41f+kTTr67y28OvjIUVht++rfcILY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.5 h1:gvZOjQKPxFXy1ft3QnEyXmT+IqneM9QAUWlM3r0mfqw= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.5/go.mod h1:DLWnfvIcm9IET/mmjdxeXbBKmTCm0ZB8p1za9BVteM8= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.17 h1:HGErhhrxZlQ044RiM+WdoZxp0p+EGM62y3L6pwA4olE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.17/go.mod h1:RkZEx4l0EHYDJpWppMJ3nD9wZJAa8/0lq9aVC+r2UII= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.15 h1:246A4lSTXWJw/rmlQI+TT2OcqeDMKBdyjEQrafMaQdA= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.15/go.mod h1:haVfg3761/WF7YPuJOER2MP0k4UAXyHaLclKXB6usDg= -github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3 h1:hT8ZAZRIfqBqHbzKTII+CIiY8G2oC9OpLedkZ51DWl8= -github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3/go.mod h1:Lcxzg5rojyVPU/0eFwLtcyTaek/6Mtic5B1gJo7e/zE= -github.com/aws/aws-sdk-go-v2/service/ssm v1.52.4 h1:hgSBvRT7JEWx2+vEGI9/Ld5rZtl7M5lu8PqdvOmbRHw= -github.com/aws/aws-sdk-go-v2/service/ssm v1.52.4/go.mod h1:v7NIzEFIHBiicOMaMTuEmbnzGnqW0d+6ulNALul6fYE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 h1:wtpJ4zcwrSbwhECWQoI/g6WM9zqCcSpHDJIWSbMLOu4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5/go.mod h1:qu/W9HXQbbQ4+1+JcZp0ZNPV31ym537ZJN+fiS7Ti8E= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5 h1:P1doBzv5VEg1ONxnJss1Kh5ZG/ewoIE4MQtKKc6Crgg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5/go.mod h1:NOP+euMW7W3Ukt28tAxPuoWao4rhhqJD3QEBk7oCg7w= +github.com/aws/aws-sdk-go-v2/service/s3 v1.68.0 h1:bFpcqdwtAEsgpZXvkTxIThFQx/EM0oV6kXmfFIGjxME= +github.com/aws/aws-sdk-go-v2/service/s3 v1.68.0/go.mod h1:ralv4XawHjEMaHOWnTFushl0WRqim/gQWesAMF6hTow= +github.com/aws/aws-sdk-go-v2/service/ssm v1.55.5 h1:lGHvjwVUclt6xo91f+H0vdVMfCjw2zclL0sVQXgTOp8= +github.com/aws/aws-sdk-go-v2/service/ssm v1.55.5/go.mod h1:zH7gDT/mAjLk10jcoltSXvjruPmvDSpfCTqzA+0B3l4= github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.4 h1:BXx0ZIxvrJdSgSvKTZ+yRBeSqqgPM89VPlulEcl37tM= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.4/go.mod h1:ooyCOXjvJEsUw7x+ZDHeISPMhtwI3ZCB7ggFMcFfWLU= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.5 h1:HJwZwRt2Z2Tdec+m+fPjvdmkq2s9Ra+VR0hjF7V2o40= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.5/go.mod h1:wrMCEwjFPms+V86TCQQeOxQF/If4vT44FGIOFiMC2ck= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 h1:yiwVzJW2ZxZTurVbYWA7QOrAaCYQR72t0wrSBfoesUE= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4/go.mod h1:0oxfLkpz3rQ/CHlx5hB7H69YUpFiI1tql6Q6Ne+1bCw= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 h1:zcx9LiGWZ6i6pjdcoE9oXAB6mUdeyC36Ia/QEiIvYdg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4/go.mod h1:Tp/ly1cTjRLGBBmNccFumbZ8oqpZlpdhFf80SrRh4is= github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 h1:ZsDKRLXGWHk8WdtyYMoGNO7bTudrvuKpDKgMVRlepGE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.3/go.mod h1:zwySh8fpFyXp9yOr/KVzxOl8SRqgf/IDw5aUt9UKFcQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 h1:yDxvkz3/uOKfxnv8YhzOi9m+2OGIxF+on3KOISbK5IU= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.4/go.mod h1:9XEUty5v5UAsMiFOBJrNibZgwCeOma73jgGwwhgffa8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= -github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= +github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/blevesearch/bleve/v2 v2.4.2 h1:NooYP1mb3c0StkiY9/xviiq2LGSaE8BQBCc/pirMx0U= -github.com/blevesearch/bleve/v2 v2.4.2/go.mod h1:ATNKj7Yl2oJv/lGuF4kx39bST2dveX6w0th2FFYLkc8= -github.com/blevesearch/bleve_index_api v1.1.10 h1:PDLFhVjrjQWr6jCuU7TwlmByQVCSEURADHdCqVS9+g0= -github.com/blevesearch/bleve_index_api v1.1.10/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8= +github.com/blevesearch/bleve/v2 v2.4.3 h1:XDYj+1prgX84L2Cf+V3ojrOPqXxy0qxyd2uLMmeuD+4= +github.com/blevesearch/bleve/v2 v2.4.3/go.mod h1:hEPDPrbYw3vyrm5VOa36GyS4bHWuIf4Fflp7460QQXY= +github.com/blevesearch/bleve_index_api v1.1.12 h1:P4bw9/G/5rulOF7SJ9l4FsDoo7UFJ+5kexNy1RXfegY= +github.com/blevesearch/bleve_index_api v1.1.12/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8= github.com/blevesearch/geo v0.1.20 h1:paaSpu2Ewh/tn5DKn/FB5SzvH0EWupxHEIwbCk/QPqM= github.com/blevesearch/geo v0.1.20/go.mod h1:DVG2QjwHNMFmjo+ZgzrIq2sfCh6rIHzy9d9d0B59I6w= -github.com/blevesearch/go-faiss v1.0.20 h1:AIkdTQFWuZ5LQmKQSebgMR4RynGNw8ZseJXaan5kvtI= -github.com/blevesearch/go-faiss v1.0.20/go.mod h1:jrxHrbl42X/RnDPI+wBoZU8joxxuRwedrxqswQ3xfU8= +github.com/blevesearch/go-faiss v1.0.23 h1:Wmc5AFwDLKGl2L6mjLX1Da3vCL0EKa2uHHSorcIS1Uc= +github.com/blevesearch/go-faiss v1.0.23/go.mod h1:OMGQwOaRRYxrmeNdMrXJPvVx8gBnvE5RYrr0BahNnkk= github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= github.com/blevesearch/gtreap v0.1.1 h1:2JWigFrzDMR+42WGIN/V2p0cUvn4UP3C4Q5nmaZGW8Y= github.com/blevesearch/gtreap v0.1.1/go.mod h1:QaQyDRAT51sotthUWAH4Sj08awFSSWzgYICSZ3w0tYk= github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc= github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs= -github.com/blevesearch/scorch_segment_api/v2 v2.2.15 h1:prV17iU/o+A8FiZi9MXmqbagd8I0bCqM7OKUYPbnb5Y= -github.com/blevesearch/scorch_segment_api/v2 v2.2.15/go.mod h1:db0cmP03bPNadXrCDuVkKLV6ywFSiRgPFT1YVrestBc= +github.com/blevesearch/scorch_segment_api/v2 v2.2.16 h1:uGvKVvG7zvSxCwcm4/ehBa9cCEuZVE+/zvrSl57QUVY= +github.com/blevesearch/scorch_segment_api/v2 v2.2.16/go.mod h1:VF5oHVbIFTu+znY1v30GjSpT5+9YFs9dV2hjvuh34F0= github.com/blevesearch/segment v0.9.1 h1:+dThDy+Lvgj5JMxhmOVlgFfkUtZV2kw49xax4+jTfSU= github.com/blevesearch/segment v0.9.1/go.mod h1:zN21iLm7+GnBHWTao9I+Au/7MBiL8pPFtJBJTsk6kQw= github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s= @@ -140,10 +144,10 @@ github.com/blevesearch/zapx/v13 v13.3.10 h1:0KY9tuxg06rXxOZHg3DwPJBjniSlqEgVpxIq github.com/blevesearch/zapx/v13 v13.3.10/go.mod h1:w2wjSDQ/WBVeEIvP0fvMJZAzDwqwIEzVPnCPrz93yAk= github.com/blevesearch/zapx/v14 v14.3.10 h1:SG6xlsL+W6YjhX5N3aEiL/2tcWh3DO75Bnz77pSwwKU= github.com/blevesearch/zapx/v14 v14.3.10/go.mod h1:qqyuR0u230jN1yMmE4FIAuCxmahRQEOehF78m6oTgns= -github.com/blevesearch/zapx/v15 v15.3.13 h1:6EkfaZiPlAxqXz0neniq35my6S48QI94W/wyhnpDHHQ= -github.com/blevesearch/zapx/v15 v15.3.13/go.mod h1:Turk/TNRKj9es7ZpKK95PS7f6D44Y7fAFy8F4LXQtGg= -github.com/blevesearch/zapx/v16 v16.1.5 h1:b0sMcarqNFxuXvjoXsF8WtwVahnxyhEvBSRJi/AUHjU= -github.com/blevesearch/zapx/v16 v16.1.5/go.mod h1:J4mSF39w1QELc11EWRSBFkPeZuO7r/NPKkHzDCoiaI8= +github.com/blevesearch/zapx/v15 v15.3.16 h1:Ct3rv7FUJPfPk99TI/OofdC+Kpb4IdyfdMH48sb+FmE= +github.com/blevesearch/zapx/v15 v15.3.16/go.mod h1:Turk/TNRKj9es7ZpKK95PS7f6D44Y7fAFy8F4LXQtGg= +github.com/blevesearch/zapx/v16 v16.1.8 h1:Bxzpw6YQpFs7UjoCV1+RvDw6fmAT2GZxldwX8b3wVBM= +github.com/blevesearch/zapx/v16 v16.1.8/go.mod h1:JqQlOqlRVaYDkpLIl3JnKql8u4zKTNlVEa3nLsi0Gn8= github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= @@ -232,18 +236,24 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= +github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/marcboeker/go-duckdb v1.7.1 h1:m9/nKfP7cG9AptcQ95R1vfacRuhtrZE5pZF8BPUb/Iw= -github.com/marcboeker/go-duckdb v1.7.1/go.mod h1:2oV8BZv88S16TKGKM+Lwd0g7DX84x0jMxjTInThC8Is= -github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= -github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/marcboeker/go-duckdb v1.8.3 h1:ZkYwiIZhbYsT6MmJsZ3UPTHrTZccDdM4ztoqSlEMXiQ= +github.com/marcboeker/go-duckdb v1.8.3/go.mod h1:C9bYRE1dPYb1hhfu/SSomm78B0FXmNgRvv6YBW/Hooc= +github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM= +github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mmcloughlin/geohash v0.10.0 h1:9w1HchfDfdeLc+jFEf/04D27KP7E2QmpDu52wPbJWRE= @@ -260,15 +270,15 @@ github.com/natefinch/atomic v1.0.1 h1:ZPYKxkqQOx3KZ+RsbnP/YsgvxWQPGxjC0oBt2AhwV0 github.com/natefinch/atomic v1.0.1/go.mod h1:N/D/ELrljoqDyT3rZrsUmtsuzvHkeB/wWjHV22AZRbM= github.com/neuml/txtai.go v1.0.0 h1:h8uN/3uNIouzv2sSz/uoGMfKHZjA2IvUnMUlDxoV46Q= github.com/neuml/txtai.go v1.0.0/go.mod h1:tgXSUc3MvGdyuXDAxZUiADDMfPRzKS8Z/qjC8CE6gfc= -github.com/ollama/ollama v0.3.6 h1:nA/N0AmjP327po5cZDGLqI40nl+aeei0pD0dLa92ypE= -github.com/ollama/ollama v0.3.6/go.mod h1:YrWoNkFnPOYsnDvsf/Ztb1wxU9/IXrNsQHqcxbY2r94= +github.com/ollama/ollama v0.4.4 h1:OYFI9EBmTvIphz+riVQnaq3ZxcGpfWTkGUqvSnw91So= +github.com/ollama/ollama v0.4.4/go.mod h1:VOVhYMX6UX1WZF1eptEgwDdev6A3qdvbsQLeVQItYe0= github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU= github.com/paulmach/orb v0.11.1/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= -github.com/philippgille/chromem-go v0.0.0-20240602150210-34ba8797e203 h1:bSUw4aCuNxKER0mKhTh+7AcB9LqIpkwF+rI1d7wl7Pk= -github.com/philippgille/chromem-go v0.0.0-20240602150210-34ba8797e203/go.mod h1:hTd+wGEm/fFPQl7ilfCwQXkgEUxceYh86iIdoKMolPo= +github.com/philippgille/chromem-go v0.7.0 h1:4jfvfyKymjKNfGxBUhHUcj1kp7B17NL/I1P+vGh1RvY= +github.com/philippgille/chromem-go v0.7.0/go.mod h1:hTd+wGEm/fFPQl7ilfCwQXkgEUxceYh86iIdoKMolPo= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -301,8 +311,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.17.3 h1:bwWLZU7icoKRG+C+0PNwIKC6FCJO/Q3p2pZvuP0jN94= -github.com/tidwall/gjson v1.17.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -311,6 +321,8 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= +github.com/whosonfirst/go-foursquare-places v0.0.1 h1:Nbz4VVShH94SsOlxlWjRhVvpYR+78+v2caSH4urwFi0= +github.com/whosonfirst/go-foursquare-places v0.0.1/go.mod h1:uzQy9+P7lLhpnum6nuJY8EHOuC9n9H+2X3Gc1E88BAc= github.com/whosonfirst/go-ioutil v1.0.2 h1:+GJPfa42OFn5A+5yJSc5jQTQIkNV3/MhYyg4pavdrC8= github.com/whosonfirst/go-ioutil v1.0.2/go.mod h1:2dS1vWdAIkiHDvDF8fYyjv6k2NISmwaIjJJeEDBEdvg= github.com/whosonfirst/go-overture v0.0.0-20240812171335-eb48d41e6c6c h1:BL2SXk/H4VLfPZnmyD8DkvYaUdIbzr/4/alZPlr5BVQ= @@ -319,16 +331,16 @@ github.com/whosonfirst/go-reader v1.0.2 h1:eccnKKSMGR+X1SJyHUZN0/7qE7VbFQULqSVQU github.com/whosonfirst/go-reader v1.0.2/go.mod h1:2w9l/QusYZSiGuEof3RwCHUFnM492SSOF2H7UxS4YIE= github.com/whosonfirst/go-whosonfirst-crawl v0.2.2 h1:7nwpNV/BFoPR0R7KMMy1iiYAer7wlHJBUOiL+NLzIFs= github.com/whosonfirst/go-whosonfirst-crawl v0.2.2/go.mod h1:2GZkaK9jaOisWRnBQGWzmb7H55TUFl9y9F30lrk2hwk= -github.com/whosonfirst/go-whosonfirst-export/v2 v2.8.2 h1:Jg8Ed4trgPZVKiXjhnH8oFfG9LeosrdgfDRNsYG4k7s= -github.com/whosonfirst/go-whosonfirst-export/v2 v2.8.2/go.mod h1:7LEVZByKDtHRLtu40mNR3/q9Mp0f8Db5YEh7gk7oLaY= +github.com/whosonfirst/go-whosonfirst-export/v2 v2.8.3 h1:mq1OjMP2Trenb+1wJGrYdKaFzkwWWHYSjdfPjok437A= +github.com/whosonfirst/go-whosonfirst-export/v2 v2.8.3/go.mod h1:e75gUUyEq8WhG+BVQ0wktZ6IqDLeJZlONDtXHpjxGtg= github.com/whosonfirst/go-whosonfirst-feature v0.0.28 h1:XCNNzjnk1i50UnqrNtrN9xNvJDwZGjsPHbb3HRPixXA= github.com/whosonfirst/go-whosonfirst-feature v0.0.28/go.mod h1:8kc2Ei7mCankyWQcfzLHdKAc1//B/ptY7uEFsT5I8m4= github.com/whosonfirst/go-whosonfirst-flags v0.5.2 h1:vSx7fcM04HiSAEF+WOKfuyJawac99skN9HJAeqBXWpI= github.com/whosonfirst/go-whosonfirst-flags v0.5.2/go.mod h1:kozBozsyI8cKekUces1m10vJ301sH2EqLZtjX1xCSqQ= github.com/whosonfirst/go-whosonfirst-format v0.4.1 h1:TVSrbbB/sXhAgyaTenaS93lERRITGQHBKIDwoEgxoqA= github.com/whosonfirst/go-whosonfirst-format v0.4.1/go.mod h1:lMBIXCnD9ZA+wCNtu6XFYoq5DTfnEALO8k6OkEn11MM= -github.com/whosonfirst/go-whosonfirst-id v1.2.4 h1:KC5VGR+mweXcECFL5MGfX3GcrlbZscCa+aSoU7OAAtM= -github.com/whosonfirst/go-whosonfirst-id v1.2.4/go.mod h1:3Tr/dxs4o8dvfcTyJrkS0wQ93Os+YjAVcWMD81BCFHE= +github.com/whosonfirst/go-whosonfirst-id v1.2.5 h1:WEQafWDflwiHG9zA4XKvo7+k/Tjvb/yf0+6lpXqdRyk= +github.com/whosonfirst/go-whosonfirst-id v1.2.5/go.mod h1:V0xr7Bs7Uuo+JJMRRoALlME6/R2K5CDm0BRp5NNThxc= github.com/whosonfirst/go-whosonfirst-iterate/v2 v2.5.0 h1:aLThv46NCuScTnulbsgmKPZiCqnv7UH8X4ojO2151KI= github.com/whosonfirst/go-whosonfirst-iterate/v2 v2.5.0/go.mod h1:wF/nVhSEVJdkWd24+TcXb5Pir92WDUqRa9oLu/qf9N4= github.com/whosonfirst/go-whosonfirst-opensearch v0.0.18 h1:80nUIF1DMLqBei1V6HihkF6vcyrFiXy8iikrxq9P4+g= @@ -376,26 +388,26 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/ratelimit v0.3.0 h1:IdZd9wqvFXnvLvSEBo0KPcGfkoBGNkpTHlrE3Rcjkjw= go.uber.org/ratelimit v0.3.0/go.mod h1:So5LG7CV1zWpY1sHe+DXTJqQvOx+FFPFaAs2SnoyBaI= -gocloud.dev v0.39.0 h1:EYABYGhAalPUaMrbSKOr5lejxoxvXj99nE8XFtsDgds= -gocloud.dev v0.39.0/go.mod h1:drz+VyYNBvrMTW0KZiBAYEdl8lbNZx+OQ7oQvdrFmSQ= +gocloud.dev v0.40.0 h1:f8LgP+4WDqOG/RXoUcyLpeIAGOcAbZrZbDQCUee10ng= +gocloud.dev v0.40.0/go.mod h1:drz+VyYNBvrMTW0KZiBAYEdl8lbNZx+OQ7oQvdrFmSQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +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/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -411,11 +423,11 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -423,8 +435,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/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 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -437,8 +449,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -449,8 +461,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -462,16 +474,16 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +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= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 h1:LLhsEBxRTBLuKlQxFBYUOU8xyFgXv6cOTp2HASDlsDk= golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= -gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= +gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= +gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= google.golang.org/api v0.191.0 h1:cJcF09Z+4HAB2t5qTQM1ZtfL/PemsLFkcFG67qq2afk= google.golang.org/api v0.191.0/go.mod h1:tD5dsFGxFza0hnQveGfVk9QQYKcfp+VzgRqyXFxE0+E= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -481,17 +493,17 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20240812133136-8ffd90a71988 h1:CT2Thj5AuPV9phrYMtzX11k+XkzMGfRAet42PmoTATM= google.golang.org/genproto v0.0.0-20240812133136-8ffd90a71988/go.mod h1:7uvplUBj4RjHAxIZ//98LzOvrQ04JBkaixRmCMI29hc= -google.golang.org/genproto/googleapis/api v0.0.0-20240812133136-8ffd90a71988 h1:+/tmTy5zAieooKIXfzDm9KiA3Bv6JBwriRN9LY+yayk= -google.golang.org/genproto/googleapis/api v0.0.0-20240812133136-8ffd90a71988/go.mod h1:4+X6GvPs+25wZKbQq9qyAXrwIRExv7w0Ea6MgZLZiDM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240812133136-8ffd90a71988 h1:V71AcdLZr2p8dC9dbOIMCpqi4EmRl8wUwnJzXXLmbmc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240812133136-8ffd90a71988/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -503,8 +515,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vector/duckdb.go b/vector/duckdb.go index c6f70116..83b00923 100644 --- a/vector/duckdb.go +++ b/vector/duckdb.go @@ -196,7 +196,7 @@ func (db *DuckDBDatabase) Query(ctx context.Context, loc *location.Location) ([] rows, err := db.vec_db.QueryContext(ctx, q, string(v)) if err != nil { - return nil, fmt.Errorf("Failed to execute query, %w", err) + return nil, fmt.Errorf("Failed to execute query (%s), %w", q, err) } slog.Debug("Query context", "time", time.Since(t1)) diff --git a/vector/weviate.go b/vector/weviate.go index 5a68a2dc..cc6670c4 100644 --- a/vector/weviate.go +++ b/vector/weviate.go @@ -1,3 +1,3 @@ -package database +package vector // https://weaviate.io/developers/weaviate/quickstart diff --git a/vendor/github.com/aaronland/go-aws-auth/Makefile b/vendor/github.com/aaronland/go-aws-auth/Makefile index e65efd2a..4280fabf 100644 --- a/vendor/github.com/aaronland/go-aws-auth/Makefile +++ b/vendor/github.com/aaronland/go-aws-auth/Makefile @@ -2,6 +2,7 @@ GOMOD=$(shell test -f "go.work" && echo "readonly" || echo "vendor") LDFLAGS=-s -w cli: + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/aws-sts-session cmd/aws-sts-session/main.go go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/aws-mfa-session cmd/aws-mfa-session/main.go go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/aws-get-credentials cmd/aws-get-credentials/main.go go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/aws-cognito-credentials cmd/aws-cognito-credentials/main.go diff --git a/vendor/github.com/aaronland/go-aws-auth/README.md b/vendor/github.com/aaronland/go-aws-auth/README.md index d991b4f2..a61a67e4 100644 --- a/vendor/github.com/aaronland/go-aws-auth/README.md +++ b/vendor/github.com/aaronland/go-aws-auth/README.md @@ -2,8 +2,6 @@ Go package providing methods and tools for determining or assigning AWS credentials. -This package targets [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2/). For similar functionality targeting `aws-sdk-go` please consult the [aaronland/go-aws-session](https://github.com/aaronland/go-aws-session) package. - ## Documentation [![Go Reference](https://pkg.go.dev/badge/github.com/aaronland/go-aws-auth.svg)](https://pkg.go.dev/github.com/aaronland/go-aws-auth) @@ -12,6 +10,7 @@ This package targets [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2/). For ``` $> make cli +go build -mod vendor -ldflags="-s -w" -o bin/aws-sts-session cmd/aws-sts-session/main.go go build -mod vendor -ldflags="-s -w" -o bin/aws-mfa-session cmd/aws-mfa-session/main.go go build -mod vendor -ldflags="-s -w" -o bin/aws-get-credentials cmd/aws-get-credentials/main.go go build -mod vendor -ldflags="-s -w" -o bin/aws-cognito-credentials cmd/aws-cognito-credentials/main.go @@ -231,6 +230,89 @@ $> bin/aws-sign-request \ } ``` +### aws-sts-session + +Generate STS credentials for a given profile and MFA token and then write those credentials back to an AWS "credentials" file in a specific profile section. + +``` +$> ./bin/aws-sts-session -h +Generate STS credentials for a given profile and MFA token and then write those credentials back to an AWS "credentials" file in a specific profile section. +Usage: + ./bin/aws-sts-session [options] +Valid options are: + -config-uri string + A valid aaronland/gp-aws-auth.Config URI. + -mfa + Require a valid MFA token code when assuming role. (default true) + -mfa-serial-number string + The unique identifier of the MFA device being used for authentication. + -mfa-token string + A valid MFA token string. If empty then data will be read from a command line prompt. + -role-arn string + The AWS role ARN URI of the role you want to assume. + -role-duration int + The duration, in seconds, of the role session. (default 3600) + -role-session string + A unique name to identify the session. + -session-profile string + The name of the AWS credentials profile to associate the temporary credentials with. +``` + +For example: + +``` +$> ./bin/aws-sts-session -config-uri 'aws://?region={REGION}&credentials={CREDENTIALS}' \ + -role-arn 'arn:aws:iam::{AWS_ACCOUNT}:role/{IAM_ROLE}' \ + -role-session debug \ + -mfa-serial-number arn:aws:iam::{AWS_ACCOUNT}:mfa/{MFA_LABEL} \ + -mfa-token {TOKEN} \ + -session-profile test + +2024/11/08 08:23:25 Assumed role "arn:aws:sts::{AWS_ACCOUNT}:assumed-role/{IAM_ROLE}/debug", expires 2024-11-08 17:23:25 +0000 UTC +``` + +Note that this assumes a role with a "trust policy" equivalent to this: + +``` +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "Statement1", + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam::{AWS_ACCOUNT}:user/{IAM_USER}" + }, + "Action": "sts:AssumeRole", + "Condition": { + "Bool": { + "aws:MultiFactorAuthPresent": true + } + } + } + ] +} +``` + +## Credentials + +Credentials for URIs are defined as string labels. They are: + +| Label | Description | +| --- | --- | +| `anon:` | Empty or anonymous credentials. | +| `env:` | Read credentials from AWS defined environment variables. | +| `iam:` | Assume AWS IAM credentials are in effect. | +| `sts:{ARN}` | Assume the role defined by `{ARN}` using STS credentials. | +| `{AWS_PROFILE_NAME}` | This this profile from the default AWS credentials location. | +| `{AWS_CREDENTIALS_PATH}:{AWS_PROFILE_NAME}` | This this profile from a user-defined AWS credentials location. | + +For example: + +``` +aws:///us-east-1?credentials=iam: +``` + ## See also: -* https://github.com/aws/aws-sdk-go-v2/ +* https://github.com/aws/aws-sdk-go-v2/ \ No newline at end of file diff --git a/vendor/github.com/aaronland/go-aws-auth/config.go b/vendor/github.com/aaronland/go-aws-auth/config.go index 590843bd..8d210120 100644 --- a/vendor/github.com/aaronland/go-aws-auth/config.go +++ b/vendor/github.com/aaronland/go-aws-auth/config.go @@ -3,10 +3,11 @@ package auth import ( "context" "fmt" + "log/slog" "net/url" "os/user" "path/filepath" - "sort" + _ "sort" "strings" "github.com/aws/aws-sdk-go-v2/aws" @@ -17,20 +18,49 @@ import ( // null_cfg is a placeholder to return in error contexts. var null_cfg aws.Config -// CredentialsStringPatterns() returns the list of valid credential strings patterns. -func CredentialsStringPatterns() []string { +const AnonymousCredentialsString string = "anon:" + +const EnvironmentCredentialsString string = "env:" + +const IAMCredentialsString string = "iam:" + +const ProfileCredentialsTemplate string = "{profile}" + +const ProfileFromPathCredentialsTemplate string = "{path}:{profile}" + +const StaticCredentialsTemplate string = "static:{id}:{key}:{secret}" + +const StaticCredentialsPrefix string = "static:" + +const STSCredentialsPrefix string = "sts:" - patterns := []string{ - "anon:", - "env:", - "iam:", - "{PROFILE}", - "{PATH}:{PROFILE}", - "static:{KEY}:{SECRET}:{TOKEN}", +// ValidCredentials() returns the list of valid credential strings patterns. +func ValidCredentials() []string { + + valid := []string{ + AnonymousCredentialsString, + EnvironmentCredentialsString, + IAMCredentialsString, + STSCredentialsPrefix, + ProfileCredentialsTemplate, + ProfileFromPathCredentialsTemplate, + StaticCredentialsTemplate, } - sort.Strings(patterns) - return patterns + return valid +} + +func ValidCredentialsString() string { + + valid := ValidCredentials() + + return fmt.Sprintf("Valid credential flags are: %s", strings.Join(valid, ", ")) +} + +// CredentialsStringPatterns() returns the list of valid credential strings patterns. DEPRECATED. Please use `ValidCredentials` instead. +func CredentialsStringPatterns() []string { + slog.Warn("CredentialsStringPatterns() is deprecated. Please call ValidCredentials() instead.") + return ValidCredentials() } // NewConfig() returns a new `aws.Config` derived from 'uri' which is expected to be configured diff --git a/vendor/github.com/aaronland/go-aws-auth/mfa.go b/vendor/github.com/aaronland/go-aws-auth/mfa.go index 3afdd461..f92ab8df 100644 --- a/vendor/github.com/aaronland/go-aws-auth/mfa.go +++ b/vendor/github.com/aaronland/go-aws-auth/mfa.go @@ -55,7 +55,17 @@ func username(ctx context.Context, sts_client *sts.Client) (string, error) { arn := rsp.Arn - return strings.Split(*arn, ":user/")[1], nil + if strings.Contains(*arn, ":user/") { + return strings.Split(*arn, ":user/")[1], nil + } + + /* + if strings.Contains(*arn, ":assumed-role/") { + return strings.Split(*arn, ":assumed-role/")[1], nil + } + */ + + return "", fmt.Errorf("Failed to derive user name from ARN") } func mfaDevice(ctx context.Context, iam_client *iam.Client, userArn string) (string, error) { diff --git a/vendor/github.com/aaronland/go-uid-proxy/proxy.go b/vendor/github.com/aaronland/go-uid-proxy/proxy.go index 4c17c11a..03f9ced3 100644 --- a/vendor/github.com/aaronland/go-uid-proxy/proxy.go +++ b/vendor/github.com/aaronland/go-uid-proxy/proxy.go @@ -44,6 +44,19 @@ func NewProxyProvider(ctx context.Context, uri string) (uid.Provider, error) { q := u.Query() + status_monitor := false + + if q.Has("status-monitor") { + + v, err := strconv.ParseBool(q.Get("status-monitor")) + + if err != nil { + return nil, fmt.Errorf("Invalid ?status-monitor= parameter, %w", err) + } + + status_monitor = v + } + source_uri := q.Get("provider") if source_uri == "" { @@ -105,9 +118,13 @@ func NewProxyProvider(ctx context.Context, uri string) (uid.Provider, error) { } go pr.refillPool(ctx) - go pr.status(ctx) go pr.monitor(ctx) + if status_monitor { + slog.Debug("Starting status monitor") + go pr.status(ctx) + } + if minimum > 0 { refill <- true } @@ -148,6 +165,7 @@ func (pr *ProxyProvider) status(ctx context.Context) { for { select { case <-ctx.Done(): + slog.Debug("Status monitor received done signal, exiting") return case <-time.After(5 * time.Second): slog.Debug("Status", "pool length", pr.pool.Length(ctx)) diff --git a/vendor/github.com/aaronland/gocloud-blob/bucket/uri.go b/vendor/github.com/aaronland/gocloud-blob/bucket/uri.go new file mode 100644 index 00000000..14878a9e --- /dev/null +++ b/vendor/github.com/aaronland/gocloud-blob/bucket/uri.go @@ -0,0 +1,65 @@ +package bucket + +import ( + "fmt" + "net/url" + "path/filepath" + "strings" +) + +// Parse a URI in to its `gocloud.dev/blob.Bucket` URI and key values. +func ParseURI(uri string) (string, string, error) { + + u, err := url.Parse(uri) + + if err != nil { + return "", "", fmt.Errorf("Failed to parse source URI, %w", err) + } + + var bucket_uri string + var bucket_key string + + if u.Scheme == "" { + + path := u.Path + abs_path, err := filepath.Abs(path) + + if err != nil { + return "", "", fmt.Errorf("Failed to derive absolute path, %w", err) + } + + root := filepath.Dir(abs_path) + base := filepath.Base(abs_path) + + root = strings.Trim(root, "/") + root = fmt.Sprintf("%s/", root) + + q := u.Query() + q.Set("prefix", root) + + u.Scheme = "file" + u.Host = u.Host + u.Path = "/" + + u.RawQuery = q.Encode() + + bucket_uri = u.String() + bucket_key = base + + } else { + + path := u.Path + root := filepath.Dir(path) + base := filepath.Base(path) + + root = strings.TrimRight(root, "/") + root = fmt.Sprintf("%s/", root) + + u.Path = root + + bucket_uri = u.String() + bucket_key = base + } + + return bucket_uri, bucket_key, nil +} diff --git a/vendor/github.com/apache/arrow-go/v18/LICENSE.txt b/vendor/github.com/apache/arrow-go/v18/LICENSE.txt new file mode 100644 index 00000000..d722f3ee --- /dev/null +++ b/vendor/github.com/apache/arrow-go/v18/LICENSE.txt @@ -0,0 +1,236 @@ + + 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. + +-------------------------------------------------------------------------------- + +This project includes code from the Go project, BSD 3-clause license + PATENTS +weak patent termination clause +(https://github.com/golang/go/blob/master/PATENTS). + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/.editorconfig b/vendor/github.com/apache/arrow-go/v18/arrow/.editorconfig similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/.editorconfig rename to vendor/github.com/apache/arrow-go/v18/arrow/.editorconfig diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/.gitignore b/vendor/github.com/apache/arrow-go/v18/arrow/.gitignore similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/.gitignore rename to vendor/github.com/apache/arrow-go/v18/arrow/.gitignore diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/Gopkg.lock b/vendor/github.com/apache/arrow-go/v18/arrow/Gopkg.lock similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/Gopkg.lock rename to vendor/github.com/apache/arrow-go/v18/arrow/Gopkg.lock diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/Gopkg.toml b/vendor/github.com/apache/arrow-go/v18/arrow/Gopkg.toml similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/Gopkg.toml rename to vendor/github.com/apache/arrow-go/v18/arrow/Gopkg.toml diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/Makefile b/vendor/github.com/apache/arrow-go/v18/arrow/Makefile similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/Makefile rename to vendor/github.com/apache/arrow-go/v18/arrow/Makefile diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array.go b/vendor/github.com/apache/arrow-go/v18/arrow/array.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array.go index 7f04eab7..df186f2d 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array.go @@ -19,8 +19,8 @@ package arrow import ( "fmt" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // ArrayData is the underlying memory and metadata of an Arrow array, corresponding diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/array.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/array.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/array.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/array.go index be6ba864..6e281a43 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/array.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/array.go @@ -19,9 +19,9 @@ package array import ( "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) const ( @@ -160,6 +160,8 @@ func init() { arrow.TIME64: func(data arrow.ArrayData) arrow.Array { return NewTime64Data(data) }, arrow.INTERVAL_MONTHS: func(data arrow.ArrayData) arrow.Array { return NewMonthIntervalData(data) }, arrow.INTERVAL_DAY_TIME: func(data arrow.ArrayData) arrow.Array { return NewDayTimeIntervalData(data) }, + arrow.DECIMAL32: func(data arrow.ArrayData) arrow.Array { return NewDecimal32Data(data) }, + arrow.DECIMAL64: func(data arrow.ArrayData) arrow.Array { return NewDecimal64Data(data) }, arrow.DECIMAL128: func(data arrow.ArrayData) arrow.Array { return NewDecimal128Data(data) }, arrow.DECIMAL256: func(data arrow.ArrayData) arrow.Array { return NewDecimal256Data(data) }, arrow.LIST: func(data arrow.ArrayData) arrow.Array { return NewListData(data) }, diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/binary.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/binary.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/binary.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/binary.go index d36c0aac..1af7631b 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/binary.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/binary.go @@ -23,9 +23,9 @@ import ( "strings" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) type BinaryLike interface { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/binarybuilder.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/binarybuilder.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/binarybuilder.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/binarybuilder.go index e5b4dd63..794ac688 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/binarybuilder.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/binarybuilder.go @@ -25,10 +25,10 @@ import ( "sync/atomic" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // A BinaryBuilder is used to build a Binary array using the Append methods. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/boolean.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/boolean.go similarity index 94% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/boolean.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/boolean.go index 50a4101d..fb2dba73 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/boolean.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/boolean.go @@ -21,10 +21,10 @@ import ( "strconv" "strings" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // A type which represents an immutable sequence of boolean values. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/booleanbuilder.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/booleanbuilder.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/booleanbuilder.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/booleanbuilder.go index d58ff801..951fe3a9 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/booleanbuilder.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/booleanbuilder.go @@ -23,11 +23,11 @@ import ( "strconv" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) type BooleanBuilder struct { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder.go index b9638b31..085d43ef 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder.go @@ -20,10 +20,10 @@ import ( "sync/atomic" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" ) type bufBuilder interface { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder_byte.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder_byte.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder_byte.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder_byte.go index dd39d6b8..78bb938e 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder_byte.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder_byte.go @@ -16,7 +16,7 @@ package array -import "github.com/apache/arrow/go/v17/arrow/memory" +import "github.com/apache/arrow-go/v18/arrow/memory" type byteBufferBuilder struct { bufferBuilder diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder_numeric.gen.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder_numeric.gen.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder_numeric.gen.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder_numeric.gen.go index 19388e27..3812c5e7 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder_numeric.gen.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder_numeric.gen.go @@ -19,9 +19,9 @@ package array import ( - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/memory" ) type int64BufferBuilder struct { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder_numeric.gen.go.tmpl b/vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder_numeric.gen.go.tmpl similarity index 94% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder_numeric.gen.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder_numeric.gen.go.tmpl index 40c96b59..c3c39de1 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/bufferbuilder_numeric.gen.go.tmpl +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/bufferbuilder_numeric.gen.go.tmpl @@ -17,9 +17,9 @@ package array import ( - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/memory" ) {{range .In}} diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/builder.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/builder.go similarity index 93% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/builder.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/builder.go index 88c0ac47..a2a40d48 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/builder.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/builder.go @@ -20,10 +20,10 @@ import ( "fmt" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) const ( @@ -313,6 +313,14 @@ func NewBuilder(mem memory.Allocator, dtype arrow.DataType) Builder { return NewDayTimeIntervalBuilder(mem) case arrow.INTERVAL_MONTH_DAY_NANO: return NewMonthDayNanoIntervalBuilder(mem) + case arrow.DECIMAL32: + if typ, ok := dtype.(*arrow.Decimal32Type); ok { + return NewDecimal32Builder(mem, typ) + } + case arrow.DECIMAL64: + if typ, ok := dtype.(*arrow.Decimal64Type); ok { + return NewDecimal64Builder(mem, typ) + } case arrow.DECIMAL128: if typ, ok := dtype.(*arrow.Decimal128Type); ok { return NewDecimal128Builder(mem, typ) @@ -349,12 +357,13 @@ func NewBuilder(mem memory.Allocator, dtype arrow.DataType) Builder { typ := dtype.(*arrow.LargeListViewType) return NewLargeListViewBuilderWithField(mem, typ.ElemField()) case arrow.EXTENSION: - typ := dtype.(arrow.ExtensionType) - bldr := NewExtensionBuilder(mem, typ) - if custom, ok := typ.(ExtensionBuilderWrapper); ok { - return custom.NewBuilder(bldr) + if custom, ok := dtype.(CustomExtensionBuilder); ok { + return custom.NewBuilder(mem) + } + if typ, ok := dtype.(arrow.ExtensionType); ok { + return NewExtensionBuilder(mem, typ) } - return bldr + panic(fmt.Errorf("arrow/array: invalid extension type: %T", dtype)) case arrow.FIXED_SIZE_LIST: typ := dtype.(*arrow.FixedSizeListType) return NewFixedSizeListBuilderWithField(mem, typ.Len(), typ.ElemField()) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/compare.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/compare.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/compare.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/compare.go index 7c6f3cab..ad3a50b8 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/compare.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/compare.go @@ -20,9 +20,9 @@ import ( "fmt" "math" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/float16" - "github.com/apache/arrow/go/v17/internal/bitutils" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/float16" + "github.com/apache/arrow-go/v18/internal/bitutils" ) // RecordEqual reports whether the two provided records are equal. @@ -271,12 +271,18 @@ func Equal(left, right arrow.Array) bool { case *Float64: r := right.(*Float64) return arrayEqualFloat64(l, r) + case *Decimal32: + r := right.(*Decimal32) + return arrayEqualDecimal(l, r) + case *Decimal64: + r := right.(*Decimal64) + return arrayEqualDecimal(l, r) case *Decimal128: r := right.(*Decimal128) - return arrayEqualDecimal128(l, r) + return arrayEqualDecimal(l, r) case *Decimal256: r := right.(*Decimal256) - return arrayEqualDecimal256(l, r) + return arrayEqualDecimal(l, r) case *Date32: r := right.(*Date32) return arrayEqualDate32(l, r) @@ -527,12 +533,18 @@ func arrayApproxEqual(left, right arrow.Array, opt equalOption) bool { case *Float64: r := right.(*Float64) return arrayApproxEqualFloat64(l, r, opt) + case *Decimal32: + r := right.(*Decimal32) + return arrayEqualDecimal(l, r) + case *Decimal64: + r := right.(*Decimal64) + return arrayEqualDecimal(l, r) case *Decimal128: r := right.(*Decimal128) - return arrayEqualDecimal128(l, r) + return arrayEqualDecimal(l, r) case *Decimal256: r := right.(*Decimal256) - return arrayEqualDecimal256(l, r) + return arrayEqualDecimal(l, r) case *Date32: r := right.(*Date32) return arrayEqualDate32(l, r) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/concat.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/concat.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/concat.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/concat.go index 184f7143..bb50354b 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/concat.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/concat.go @@ -23,13 +23,13 @@ import ( "math/bits" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/encoded" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/bitutils" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/encoded" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/bitutils" + "github.com/apache/arrow-go/v18/internal/utils" ) // Concatenate creates a new arrow.Array which is the concatenation of the diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/data.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/data.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/data.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/data.go index 40fad0df..be75c7c7 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/data.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/data.go @@ -22,9 +22,9 @@ import ( "sync/atomic" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" ) // Data represents the memory and metadata of an Arrow array. diff --git a/vendor/github.com/apache/arrow-go/v18/arrow/array/decimal.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/decimal.go new file mode 100644 index 00000000..1a9d61c1 --- /dev/null +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/decimal.go @@ -0,0 +1,432 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.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 array + +import ( + "bytes" + "fmt" + "reflect" + "strings" + "sync/atomic" + + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/decimal" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" +) + +type baseDecimal[T interface { + decimal.DecimalTypes + decimal.Num[T] +}] struct { + array + + values []T +} + +func newDecimalData[T interface { + decimal.DecimalTypes + decimal.Num[T] +}](data arrow.ArrayData) *baseDecimal[T] { + a := &baseDecimal[T]{} + a.refCount = 1 + a.setData(data.(*Data)) + return a +} + +func (a *baseDecimal[T]) Value(i int) T { return a.values[i] } + +func (a *baseDecimal[T]) ValueStr(i int) string { + if a.IsNull(i) { + return NullValueStr + } + return a.GetOneForMarshal(i).(string) +} + +func (a *baseDecimal[T]) Values() []T { return a.values } + +func (a *baseDecimal[T]) String() string { + o := new(strings.Builder) + o.WriteString("[") + for i := 0; i < a.Len(); i++ { + if i > 0 { + fmt.Fprintf(o, " ") + } + switch { + case a.IsNull(i): + o.WriteString(NullValueStr) + default: + fmt.Fprintf(o, "%v", a.Value(i)) + } + } + o.WriteString("]") + return o.String() +} + +func (a *baseDecimal[T]) setData(data *Data) { + a.array.setData(data) + vals := data.buffers[1] + if vals != nil { + a.values = arrow.GetData[T](vals.Bytes()) + beg := a.array.data.offset + end := beg + a.array.data.length + a.values = a.values[beg:end] + } +} + +func (a *baseDecimal[T]) GetOneForMarshal(i int) any { + if a.IsNull(i) { + return nil + } + + typ := a.DataType().(arrow.DecimalType) + n, scale := a.Value(i), typ.GetScale() + return n.ToBigFloat(scale).Text('g', int(typ.GetPrecision())) +} + +func (a *baseDecimal[T]) MarshalJSON() ([]byte, error) { + vals := make([]any, a.Len()) + for i := 0; i < a.Len(); i++ { + vals[i] = a.GetOneForMarshal(i) + } + return json.Marshal(vals) +} + +func arrayEqualDecimal[T interface { + decimal.DecimalTypes + decimal.Num[T] +}](left, right *baseDecimal[T]) bool { + for i := 0; i < left.Len(); i++ { + if left.IsNull(i) { + continue + } + + if left.Value(i) != right.Value(i) { + return false + } + } + return true +} + +type Decimal32 = baseDecimal[decimal.Decimal32] + +func NewDecimal32Data(data arrow.ArrayData) *Decimal32 { + return newDecimalData[decimal.Decimal32](data) +} + +type Decimal64 = baseDecimal[decimal.Decimal64] + +func NewDecimal64Data(data arrow.ArrayData) *Decimal64 { + return newDecimalData[decimal.Decimal64](data) +} + +type Decimal128 = baseDecimal[decimal.Decimal128] + +func NewDecimal128Data(data arrow.ArrayData) *Decimal128 { + return newDecimalData[decimal.Decimal128](data) +} + +type Decimal256 = baseDecimal[decimal.Decimal256] + +func NewDecimal256Data(data arrow.ArrayData) *Decimal256 { + return newDecimalData[decimal.Decimal256](data) +} + +type Decimal32Builder = baseDecimalBuilder[decimal.Decimal32] +type Decimal64Builder = baseDecimalBuilder[decimal.Decimal64] +type Decimal128Builder struct { + *baseDecimalBuilder[decimal.Decimal128] +} + +func (b *Decimal128Builder) NewDecimal128Array() *Decimal128 { + return b.NewDecimalArray() +} + +type Decimal256Builder struct { + *baseDecimalBuilder[decimal.Decimal256] +} + +func (b *Decimal256Builder) NewDecimal256Array() *Decimal256 { + return b.NewDecimalArray() +} + +type baseDecimalBuilder[T interface { + decimal.DecimalTypes + decimal.Num[T] +}] struct { + builder + traits decimal.Traits[T] + + dtype arrow.DecimalType + data *memory.Buffer + rawData []T +} + +func newDecimalBuilder[T interface { + decimal.DecimalTypes + decimal.Num[T] +}, DT arrow.DecimalType](mem memory.Allocator, dtype DT) *baseDecimalBuilder[T] { + return &baseDecimalBuilder[T]{ + builder: builder{refCount: 1, mem: mem}, + dtype: dtype, + } +} + +func (b *baseDecimalBuilder[T]) Type() arrow.DataType { return b.dtype } + +func (b *baseDecimalBuilder[T]) Release() { + debug.Assert(atomic.LoadInt64(&b.refCount) > 0, "too many releases") + + if atomic.AddInt64(&b.refCount, -1) == 0 { + if b.nullBitmap != nil { + b.nullBitmap.Release() + b.nullBitmap = nil + } + if b.data != nil { + b.data.Release() + b.data, b.rawData = nil, nil + } + } +} + +func (b *baseDecimalBuilder[T]) Append(v T) { + b.Reserve(1) + b.UnsafeAppend(v) +} + +func (b *baseDecimalBuilder[T]) UnsafeAppend(v T) { + bitutil.SetBit(b.nullBitmap.Bytes(), b.length) + b.rawData[b.length] = v + b.length++ +} + +func (b *baseDecimalBuilder[T]) AppendNull() { + b.Reserve(1) + b.UnsafeAppendBoolToBitmap(false) +} + +func (b *baseDecimalBuilder[T]) AppendNulls(n int) { + for i := 0; i < n; i++ { + b.AppendNull() + } +} + +func (b *baseDecimalBuilder[T]) AppendEmptyValue() { + var empty T + b.Append(empty) +} + +func (b *baseDecimalBuilder[T]) AppendEmptyValues(n int) { + for i := 0; i < n; i++ { + b.AppendEmptyValue() + } +} + +func (b *baseDecimalBuilder[T]) UnsafeAppendBoolToBitmap(isValid bool) { + if isValid { + bitutil.SetBit(b.nullBitmap.Bytes(), b.length) + } else { + b.nulls++ + } + b.length++ +} + +func (b *baseDecimalBuilder[T]) AppendValues(v []T, valid []bool) { + if len(v) != len(valid) && len(valid) != 0 { + panic("len(v) != len(valid) && len(valid) != 0") + } + + if len(v) == 0 { + return + } + + b.Reserve(len(v)) + if len(v) > 0 { + copy(b.rawData[b.length:], v) + } + b.builder.unsafeAppendBoolsToBitmap(valid, len(v)) +} + +func (b *baseDecimalBuilder[T]) init(capacity int) { + b.builder.init(capacity) + + b.data = memory.NewResizableBuffer(b.mem) + bytesN := int(reflect.TypeFor[T]().Size()) * capacity + b.data.Resize(bytesN) + b.rawData = arrow.GetData[T](b.data.Bytes()) +} + +func (b *baseDecimalBuilder[T]) Reserve(n int) { + b.builder.reserve(n, b.Resize) +} + +func (b *baseDecimalBuilder[T]) Resize(n int) { + nBuilder := n + if n < minBuilderCapacity { + n = minBuilderCapacity + } + + if b.capacity == 0 { + b.init(n) + } else { + b.builder.resize(nBuilder, b.init) + b.data.Resize(b.traits.BytesRequired(n)) + b.rawData = arrow.GetData[T](b.data.Bytes()) + } +} + +func (b *baseDecimalBuilder[T]) NewDecimalArray() (a *baseDecimal[T]) { + data := b.newData() + a = newDecimalData[T](data) + data.Release() + return +} + +func (b *baseDecimalBuilder[T]) NewArray() arrow.Array { + return b.NewDecimalArray() +} + +func (b *baseDecimalBuilder[T]) newData() (data *Data) { + bytesRequired := b.traits.BytesRequired(b.length) + if bytesRequired > 0 && bytesRequired < b.data.Len() { + // trim buffers + b.data.Resize(bytesRequired) + } + data = NewData(b.dtype, b.length, []*memory.Buffer{b.nullBitmap, b.data}, nil, b.nulls, 0) + b.reset() + + if b.data != nil { + b.data.Release() + b.data, b.rawData = nil, nil + } + + return +} + +func (b *baseDecimalBuilder[T]) AppendValueFromString(s string) error { + if s == NullValueStr { + b.AppendNull() + return nil + } + + val, err := b.traits.FromString(s, b.dtype.GetPrecision(), b.dtype.GetScale()) + if err != nil { + b.AppendNull() + return err + } + b.Append(val) + return nil +} + +func (b *baseDecimalBuilder[T]) UnmarshalOne(dec *json.Decoder) error { + t, err := dec.Token() + if err != nil { + return err + } + + var token T + switch v := t.(type) { + case float64: + token, err = b.traits.FromFloat64(v, b.dtype.GetPrecision(), b.dtype.GetScale()) + if err != nil { + return err + } + b.Append(token) + case string: + token, err = b.traits.FromString(v, b.dtype.GetPrecision(), b.dtype.GetScale()) + if err != nil { + return err + } + b.Append(token) + case json.Number: + token, err = b.traits.FromString(v.String(), b.dtype.GetPrecision(), b.dtype.GetScale()) + if err != nil { + return err + } + b.Append(token) + case nil: + b.AppendNull() + default: + return &json.UnmarshalTypeError{ + Value: fmt.Sprint(t), + Type: reflect.TypeFor[T](), + Offset: dec.InputOffset(), + } + } + + return nil +} + +func (b *baseDecimalBuilder[T]) Unmarshal(dec *json.Decoder) error { + for dec.More() { + if err := b.UnmarshalOne(dec); err != nil { + return err + } + } + return nil +} + +func (b *baseDecimalBuilder[T]) UnmarshalJSON(data []byte) error { + dec := json.NewDecoder(bytes.NewReader(data)) + t, err := dec.Token() + if err != nil { + return err + } + + if delim, ok := t.(json.Delim); !ok || delim != '[' { + return fmt.Errorf("decimal builder must unpack from json array, found %s", delim) + } + + return b.Unmarshal(dec) +} + +func NewDecimal32Builder(mem memory.Allocator, dtype *arrow.Decimal32Type) *Decimal32Builder { + b := newDecimalBuilder[decimal.Decimal32](mem, dtype) + b.traits = decimal.Dec32Traits + return b +} + +func NewDecimal64Builder(mem memory.Allocator, dtype *arrow.Decimal64Type) *Decimal64Builder { + b := newDecimalBuilder[decimal.Decimal64](mem, dtype) + b.traits = decimal.Dec64Traits + return b +} + +func NewDecimal128Builder(mem memory.Allocator, dtype *arrow.Decimal128Type) *Decimal128Builder { + b := newDecimalBuilder[decimal.Decimal128](mem, dtype) + b.traits = decimal.Dec128Traits + return &Decimal128Builder{b} +} + +func NewDecimal256Builder(mem memory.Allocator, dtype *arrow.Decimal256Type) *Decimal256Builder { + b := newDecimalBuilder[decimal.Decimal256](mem, dtype) + b.traits = decimal.Dec256Traits + return &Decimal256Builder{b} +} + +var ( + _ arrow.Array = (*Decimal32)(nil) + _ arrow.Array = (*Decimal64)(nil) + _ arrow.Array = (*Decimal128)(nil) + _ arrow.Array = (*Decimal256)(nil) + _ Builder = (*Decimal32Builder)(nil) + _ Builder = (*Decimal64Builder)(nil) + _ Builder = (*Decimal128Builder)(nil) + _ Builder = (*Decimal256Builder)(nil) +) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/dictionary.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/dictionary.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/dictionary.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/dictionary.go index 6e202dee..0c23934a 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/dictionary.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/dictionary.go @@ -25,16 +25,17 @@ import ( "sync/atomic" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/decimal128" - "github.com/apache/arrow/go/v17/arrow/decimal256" - "github.com/apache/arrow/go/v17/arrow/float16" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/hashing" - "github.com/apache/arrow/go/v17/internal/json" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/decimal" + "github.com/apache/arrow-go/v18/arrow/decimal128" + "github.com/apache/arrow-go/v18/arrow/decimal256" + "github.com/apache/arrow-go/v18/arrow/float16" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/hashing" + "github.com/apache/arrow-go/v18/internal/json" + "github.com/apache/arrow-go/v18/internal/utils" ) // Dictionary represents the type for dictionary-encoded data with a data @@ -392,7 +393,8 @@ func createMemoTable(mem memory.Allocator, dt arrow.DataType) (ret hashing.MemoT ret = hashing.NewFloat32MemoTable(0) case arrow.FLOAT64: ret = hashing.NewFloat64MemoTable(0) - case arrow.BINARY, arrow.FIXED_SIZE_BINARY, arrow.DECIMAL128, arrow.DECIMAL256, arrow.INTERVAL_DAY_TIME, arrow.INTERVAL_MONTH_DAY_NANO: + case arrow.BINARY, arrow.FIXED_SIZE_BINARY, arrow.DECIMAL32, arrow.DECIMAL64, + arrow.DECIMAL128, arrow.DECIMAL256, arrow.INTERVAL_DAY_TIME, arrow.INTERVAL_MONTH_DAY_NANO: ret = hashing.NewBinaryMemoTable(0, 0, NewBinaryBuilder(mem, arrow.BinaryTypes.Binary)) case arrow.STRING: ret = hashing.NewBinaryMemoTable(0, 0, NewBinaryBuilder(mem, arrow.BinaryTypes.String)) @@ -623,6 +625,22 @@ func NewDictionaryBuilderWithDict(mem memory.Allocator, dt *arrow.DictionaryType } } return ret + case arrow.DECIMAL32: + ret := &Decimal32DictionaryBuilder{bldr} + if init != nil { + if err = ret.InsertDictValues(init.(*Decimal32)); err != nil { + panic(err) + } + } + return ret + case arrow.DECIMAL64: + ret := &Decimal64DictionaryBuilder{bldr} + if init != nil { + if err = ret.InsertDictValues(init.(*Decimal64)); err != nil { + panic(err) + } + } + return ret case arrow.DECIMAL128: ret := &Decimal128DictionaryBuilder{bldr} if init != nil { @@ -906,6 +924,16 @@ func getvalFn(arr arrow.Array) func(i int) interface{} { return func(i int) interface{} { return typedarr.Value(i) } case *String: return func(i int) interface{} { return typedarr.Value(i) } + case *Decimal32: + return func(i int) interface{} { + val := typedarr.Value(i) + return (*(*[arrow.Decimal32SizeBytes]byte)(unsafe.Pointer(&val)))[:] + } + case *Decimal64: + return func(i int) interface{} { + val := typedarr.Value(i) + return (*(*[arrow.Decimal64SizeBytes]byte)(unsafe.Pointer(&val)))[:] + } case *Decimal128: return func(i int) interface{} { val := typedarr.Value(i) @@ -1394,6 +1422,42 @@ func (b *FixedSizeBinaryDictionaryBuilder) InsertDictValues(arr *FixedSizeBinary return } +type Decimal32DictionaryBuilder struct { + dictionaryBuilder +} + +func (b *Decimal32DictionaryBuilder) Append(v decimal.Decimal32) error { + return b.appendValue((*(*[arrow.Decimal32SizeBytes]byte)(unsafe.Pointer(&v)))[:]) +} +func (b *Decimal32DictionaryBuilder) InsertDictValues(arr *Decimal32) (err error) { + data := arrow.Decimal32Traits.CastToBytes(arr.values) + for len(data) > 0 { + if err = b.insertDictValue(data[:arrow.Decimal32SizeBytes]); err != nil { + break + } + data = data[arrow.Decimal32SizeBytes:] + } + return +} + +type Decimal64DictionaryBuilder struct { + dictionaryBuilder +} + +func (b *Decimal64DictionaryBuilder) Append(v decimal.Decimal64) error { + return b.appendValue((*(*[arrow.Decimal64SizeBytes]byte)(unsafe.Pointer(&v)))[:]) +} +func (b *Decimal64DictionaryBuilder) InsertDictValues(arr *Decimal64) (err error) { + data := arrow.Decimal64Traits.CastToBytes(arr.values) + for len(data) > 0 { + if err = b.insertDictValue(data[:arrow.Decimal64SizeBytes]); err != nil { + break + } + data = data[arrow.Decimal64SizeBytes:] + } + return +} + type Decimal128DictionaryBuilder struct { dictionaryBuilder } diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/diff.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/diff.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/diff.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/diff.go index 7110804d..9320ec98 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/diff.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/diff.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "github.com/apache/arrow/go/v17/arrow" + "github.com/apache/arrow-go/v18/arrow" ) // Edit represents one entry in the edit script to compare two arrays. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/doc.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/doc.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/doc.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/doc.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/encoded.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/encoded.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/encoded.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/encoded.go index 7df66061..81c375c9 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/encoded.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/encoded.go @@ -23,12 +23,12 @@ import ( "reflect" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/encoded" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/encoded" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" + "github.com/apache/arrow-go/v18/internal/utils" ) // RunEndEncoded represents an array containing two children: diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/extension.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/extension.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/extension.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/extension.go index 5df86c89..d1a28350 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/extension.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/extension.go @@ -20,9 +20,9 @@ import ( "fmt" "reflect" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // ExtensionArray is the interface that needs to be implemented to handle diff --git a/vendor/github.com/apache/arrow-go/v18/arrow/array/extension_builder.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/extension_builder.go new file mode 100644 index 00000000..9442ac01 --- /dev/null +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/extension_builder.go @@ -0,0 +1,25 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.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 array + +import "github.com/apache/arrow-go/v18/arrow/memory" + +// CustomExtensionBuilder is an interface that custom extension types may implement to provide a custom builder +// instead of the underlying storage type's builder when array.NewBuilder is called with that type. +type CustomExtensionBuilder interface { + NewBuilder(memory.Allocator) Builder +} diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/fixed_size_list.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/fixed_size_list.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/fixed_size_list.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/fixed_size_list.go index 830361b5..84036f94 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/fixed_size_list.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/fixed_size_list.go @@ -22,11 +22,11 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // FixedSizeList represents an immutable sequence of N array values. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/fixedsize_binary.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/fixedsize_binary.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/fixedsize_binary.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/fixedsize_binary.go index 535b2d51..7049c9c0 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/fixedsize_binary.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/fixedsize_binary.go @@ -22,8 +22,8 @@ import ( "fmt" "strings" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/internal/json" ) // A type which represents an immutable sequence of fixed-length binary strings. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/fixedsize_binarybuilder.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/fixedsize_binarybuilder.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/fixedsize_binarybuilder.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/fixedsize_binarybuilder.go index 08e8ae84..02e72a25 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/fixedsize_binarybuilder.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/fixedsize_binarybuilder.go @@ -23,10 +23,10 @@ import ( "reflect" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // A FixedSizeBinaryBuilder is used to build a FixedSizeBinary array using the Append methods. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/float16.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/float16.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/float16.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/float16.go index b71f23b2..6b0e820f 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/float16.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/float16.go @@ -20,9 +20,9 @@ import ( "fmt" "strings" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/float16" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/float16" + "github.com/apache/arrow-go/v18/internal/json" ) // A type which represents an immutable sequence of Float16 values. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/float16_builder.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/float16_builder.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/float16_builder.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/float16_builder.go index 9eeb22fe..93dbfbc0 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/float16_builder.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/float16_builder.go @@ -23,12 +23,12 @@ import ( "strconv" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/float16" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/float16" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) type Float16Builder struct { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/interval.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/interval.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/interval.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/interval.go index 2cabfad1..324647e8 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/interval.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/interval.go @@ -23,11 +23,11 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) func NewIntervalData(data arrow.ArrayData) arrow.Array { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/json_reader.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/json_reader.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/json_reader.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/json_reader.go index 4f5ebea6..7835b280 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/json_reader.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/json_reader.go @@ -22,10 +22,10 @@ import ( "io" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) type Option func(config) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/list.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/list.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/list.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/list.go index 16b7cf1b..e80bc896 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/list.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/list.go @@ -22,11 +22,11 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) type ListLike interface { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/map.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/map.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/map.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/map.go index eb11f963..5609ccd0 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/map.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/map.go @@ -20,9 +20,9 @@ import ( "bytes" "fmt" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // Map represents an immutable sequence of Key/Value structs. It is a diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/null.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/null.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/null.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/null.go index 365964eb..76e56a49 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/null.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/null.go @@ -23,10 +23,10 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // Null represents an immutable, degenerate array with no physical storage. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/numeric.gen.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/numeric.gen.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/numeric.gen.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/numeric.gen.go index b962cda4..7e94fe5c 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/numeric.gen.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/numeric.gen.go @@ -24,8 +24,8 @@ import ( "strconv" "strings" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/internal/json" ) // A type which represents an immutable sequence of int64 values. @@ -101,11 +101,13 @@ func (a *Int64) GetOneForMarshal(i int) interface{} { func (a *Int64) MarshalJSON() ([]byte, error) { vals := make([]interface{}, a.Len()) for i := 0; i < a.Len(); i++ { + if a.IsValid(i) { vals[i] = a.values[i] } else { vals[i] = nil } + } return json.Marshal(vals) @@ -196,11 +198,13 @@ func (a *Uint64) GetOneForMarshal(i int) interface{} { func (a *Uint64) MarshalJSON() ([]byte, error) { vals := make([]interface{}, a.Len()) for i := 0; i < a.Len(); i++ { + if a.IsValid(i) { vals[i] = a.values[i] } else { vals[i] = nil } + } return json.Marshal(vals) @@ -398,11 +402,13 @@ func (a *Int32) GetOneForMarshal(i int) interface{} { func (a *Int32) MarshalJSON() ([]byte, error) { vals := make([]interface{}, a.Len()) for i := 0; i < a.Len(); i++ { + if a.IsValid(i) { vals[i] = a.values[i] } else { vals[i] = nil } + } return json.Marshal(vals) @@ -493,11 +499,13 @@ func (a *Uint32) GetOneForMarshal(i int) interface{} { func (a *Uint32) MarshalJSON() ([]byte, error) { vals := make([]interface{}, a.Len()) for i := 0; i < a.Len(); i++ { + if a.IsValid(i) { vals[i] = a.values[i] } else { vals[i] = nil } + } return json.Marshal(vals) @@ -602,6 +610,7 @@ func (a *Float32) MarshalJSON() ([]byte, error) { default: vals[i] = f } + } return json.Marshal(vals) @@ -692,11 +701,13 @@ func (a *Int16) GetOneForMarshal(i int) interface{} { func (a *Int16) MarshalJSON() ([]byte, error) { vals := make([]interface{}, a.Len()) for i := 0; i < a.Len(); i++ { + if a.IsValid(i) { vals[i] = a.values[i] } else { vals[i] = nil } + } return json.Marshal(vals) @@ -787,11 +798,13 @@ func (a *Uint16) GetOneForMarshal(i int) interface{} { func (a *Uint16) MarshalJSON() ([]byte, error) { vals := make([]interface{}, a.Len()) for i := 0; i < a.Len(); i++ { + if a.IsValid(i) { vals[i] = a.values[i] } else { vals[i] = nil } + } return json.Marshal(vals) @@ -882,11 +895,13 @@ func (a *Int8) GetOneForMarshal(i int) interface{} { func (a *Int8) MarshalJSON() ([]byte, error) { vals := make([]interface{}, a.Len()) for i := 0; i < a.Len(); i++ { + if a.IsValid(i) { vals[i] = float64(a.values[i]) // prevent uint8 from being seen as binary data } else { vals[i] = nil } + } return json.Marshal(vals) @@ -977,11 +992,13 @@ func (a *Uint8) GetOneForMarshal(i int) interface{} { func (a *Uint8) MarshalJSON() ([]byte, error) { vals := make([]interface{}, a.Len()) for i := 0; i < a.Len(); i++ { + if a.IsValid(i) { vals[i] = float64(a.values[i]) // prevent uint8 from being seen as binary data } else { vals[i] = nil } + } return json.Marshal(vals) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/numeric.gen.go.tmpl b/vendor/github.com/apache/arrow-go/v18/arrow/array/numeric.gen.go.tmpl similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/numeric.gen.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/arrow/array/numeric.gen.go.tmpl index d9daa558..df07f205 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/numeric.gen.go.tmpl +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/numeric.gen.go.tmpl @@ -21,8 +21,8 @@ import ( "strings" "time" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/internal/json" ) {{range .In}} diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/numericbuilder.gen.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/numericbuilder.gen.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/numericbuilder.gen.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/numericbuilder.gen.go index 227fcb2f..1618dba0 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/numericbuilder.gen.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/numericbuilder.gen.go @@ -27,11 +27,11 @@ import ( "sync/atomic" "time" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) type Int64Builder struct { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/numericbuilder.gen.go.tmpl b/vendor/github.com/apache/arrow-go/v18/arrow/array/numericbuilder.gen.go.tmpl similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/numericbuilder.gen.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/arrow/array/numericbuilder.gen.go.tmpl index c701c49c..e84e095c 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/numericbuilder.gen.go.tmpl +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/numericbuilder.gen.go.tmpl @@ -17,11 +17,11 @@ package array import ( - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) {{range .In}} diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/numericbuilder.gen_test.go.tmpl b/vendor/github.com/apache/arrow-go/v18/arrow/array/numericbuilder.gen_test.go.tmpl similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/numericbuilder.gen_test.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/arrow/array/numericbuilder.gen_test.go.tmpl index 9f381aa0..a5d58f48 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/numericbuilder.gen_test.go.tmpl +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/numericbuilder.gen_test.go.tmpl @@ -19,9 +19,9 @@ package array_test import ( "testing" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/memory" "github.com/stretchr/testify/assert" ) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/record.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/record.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/record.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/record.go index 93543f92..b8041e27 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/record.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/record.go @@ -22,10 +22,10 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // RecordReader reads a stream of records. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/string.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/string.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/string.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/string.go index f4735f2c..d3de86b5 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/string.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/string.go @@ -23,9 +23,9 @@ import ( "strings" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) type StringLike interface { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/struct.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/struct.go similarity index 88% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/struct.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/struct.go index 1921ee86..7f65f8d2 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/struct.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/struct.go @@ -23,11 +23,11 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // Struct represents an ordered sequence of relative types. @@ -43,6 +43,40 @@ func NewStructArray(cols []arrow.Array, names []string) (*Struct, error) { return NewStructArrayWithNulls(cols, names, nil, 0, 0) } +// NewStructArrayWithFields builds a new Struct Array using the passed columns +// and provided fields. As opposed to NewStructArray, this allows you to provide +// the full fields to utilize for the struct column instead of just the names. +func NewStructArrayWithFields(cols []arrow.Array, fields []arrow.Field) (*Struct, error) { + if len(cols) != len(fields) { + return nil, fmt.Errorf("%w: mismatching number of fields and child arrays", arrow.ErrInvalid) + } + if len(cols) == 0 { + return nil, fmt.Errorf("%w: can't infer struct array length with 0 child arrays", arrow.ErrInvalid) + } + + length := cols[0].Len() + children := make([]arrow.ArrayData, len(cols)) + for i, c := range cols { + if length != c.Len() { + return nil, fmt.Errorf("%w: mismatching child array lengths", arrow.ErrInvalid) + } + if !arrow.TypeEqual(fields[i].Type, c.DataType()) { + return nil, fmt.Errorf("%w: mismatching data type for child #%d, field says '%s', got '%s'", + arrow.ErrInvalid, i, fields[i].Type, c.DataType()) + } + if !fields[i].Nullable && c.NullN() > 0 { + return nil, fmt.Errorf("%w: field says not-nullable, child #%d has nulls", + arrow.ErrInvalid, i) + } + + children[i] = c.Data() + } + + data := NewData(arrow.StructOf(fields...), length, []*memory.Buffer{nil}, children, 0, 0) + defer data.Release() + return NewStructData(data), nil +} + // NewStructArrayWithNulls is like NewStructArray as a convenience function, // but also takes in a null bitmap, the number of nulls, and an optional offset // to use for creating the Struct Array. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/table.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/table.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/table.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/table.go index 54299ba6..95ac67f2 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/table.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/table.go @@ -23,8 +23,8 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) // NewColumnSlice returns a new zero-copy slice of the column with the indicated diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/timestamp.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/timestamp.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/timestamp.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/timestamp.go index dfd62ad6..37359db1 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/timestamp.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/timestamp.go @@ -24,11 +24,11 @@ import ( "sync/atomic" "time" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/json" ) // Timestamp represents an immutable sequence of arrow.Timestamp values. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/union.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/union.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/union.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/union.go index 10dc5603..6f3a9a6e 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/union.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/union.go @@ -25,12 +25,12 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/bitutils" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/bitutils" + "github.com/apache/arrow-go/v18/internal/json" ) // Union is a convenience interface to encompass both Sparse and Dense diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/util.go b/vendor/github.com/apache/arrow-go/v18/arrow/array/util.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/util.go rename to vendor/github.com/apache/arrow-go/v18/arrow/array/util.go index e82eb246..e21290f1 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/util.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/array/util.go @@ -22,11 +22,11 @@ import ( "io" "strings" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/hashing" - "github.com/apache/arrow/go/v17/internal/json" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/hashing" + "github.com/apache/arrow-go/v18/internal/json" ) func min(a, b int) int { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/arrio/arrio.go b/vendor/github.com/apache/arrow-go/v18/arrow/arrio/arrio.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/arrio/arrio.go rename to vendor/github.com/apache/arrow-go/v18/arrow/arrio/arrio.go index 74bebd7e..22fabc22 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/arrio/arrio.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/arrio/arrio.go @@ -22,7 +22,7 @@ import ( "errors" "io" - "github.com/apache/arrow/go/v17/arrow" + "github.com/apache/arrow-go/v18/arrow" ) // Reader is the interface that wraps the Read method. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/Makefile b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/Makefile similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/Makefile rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/Makefile diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_amd64.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_amd64.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_arm64.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_arm64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_arm64.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_avx2_amd64.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_avx2_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_avx2_amd64.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_avx2_amd64.s b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_avx2_amd64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_avx2_amd64.s rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_avx2_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_noasm.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_noasm.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_noasm.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_noasm.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_ppc64le.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_ppc64le.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_ppc64le.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_ppc64le.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_s390x.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_s390x.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_s390x.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_s390x.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_sse4_amd64.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_sse4_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_sse4_amd64.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_sse4_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_sse4_amd64.s b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_sse4_amd64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmap_ops_sse4_amd64.s rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmap_ops_sse4_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmaps.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmaps.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmaps.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmaps.go index eb321004..0ac7ff58 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitmaps.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitmaps.go @@ -22,9 +22,9 @@ import ( "math/bits" "unsafe" - "github.com/apache/arrow/go/v17/arrow/endian" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" ) // BitmapReader is a simple bitmap reader for a byte slice. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitutil.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitutil.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitutil.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitutil.go index a6497196..47af2b2e 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitutil.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitutil.go @@ -21,7 +21,7 @@ import ( "math/bits" "unsafe" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow/memory" ) var ( diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitutil_bytes.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitutil_bytes.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/bitutil_bytes.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/bitutil_bytes.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/endian_default.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/endian_default.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/endian_default.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/endian_default.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/bitutil/endian_s390x.go b/vendor/github.com/apache/arrow-go/v18/arrow/bitutil/endian_s390x.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/bitutil/endian_s390x.go rename to vendor/github.com/apache/arrow-go/v18/arrow/bitutil/endian_s390x.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata.go b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata.go rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata.go index 157df47a..d5748a35 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata.go @@ -50,10 +50,10 @@ import ( "syscall" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/memory" "golang.org/x/xerrors" ) @@ -254,12 +254,17 @@ func importSchema(schema *CArrowSchema) (ret arrow.Field, err error) { return ret, xerrors.Errorf("could not parse decimal scale in '%s': %s", f, err.Error()) } - if bitwidth == 128 { + switch bitwidth { + case 32: + dt = &arrow.Decimal32Type{Precision: int32(precision), Scale: int32(scale)} + case 64: + dt = &arrow.Decimal64Type{Precision: int32(precision), Scale: int32(scale)} + case 128: dt = &arrow.Decimal128Type{Precision: int32(precision), Scale: int32(scale)} - } else if bitwidth == 256 { + case 256: dt = &arrow.Decimal256Type{Precision: int32(precision), Scale: int32(scale)} - } else { - return ret, xerrors.Errorf("only decimal128 and decimal256 are supported, got '%s'", f) + default: + return ret, xerrors.Errorf("unsupported decimal bitwidth, got '%s'", f) } } diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_allocate.go b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_allocate.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_allocate.go rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_allocate.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_exports.go b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_exports.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_exports.go rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_exports.go index b971cb21..d3673481 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_exports.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_exports.go @@ -44,11 +44,11 @@ import ( "strings" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/endian" - "github.com/apache/arrow/go/v17/arrow/internal" - "github.com/apache/arrow/go/v17/arrow/ipc" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/internal" + "github.com/apache/arrow-go/v18/arrow/ipc" ) func encodeCMetadata(keys, values []string) []byte { @@ -154,6 +154,10 @@ func (exp *schemaExporter) exportFormat(dt arrow.DataType) string { return "g" case *arrow.FixedSizeBinaryType: return fmt.Sprintf("w:%d", dt.ByteWidth) + case *arrow.Decimal32Type: + return fmt.Sprintf("d:%d,%d,32", dt.Precision, dt.Scale) + case *arrow.Decimal64Type: + return fmt.Sprintf("d:%d,%d,64", dt.Precision, dt.Scale) case *arrow.Decimal128Type: return fmt.Sprintf("d:%d,%d", dt.Precision, dt.Scale) case *arrow.Decimal256Type: diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_fulltest.c b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_fulltest.c similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_fulltest.c rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_fulltest.c diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_test_framework.go b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_test_framework.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_test_framework.go rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_test_framework.go index caa1208a..c979c3fb 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/cdata_test_framework.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/cdata_test_framework.go @@ -69,10 +69,10 @@ import ( "runtime/cgo" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/internal" - "github.com/apache/arrow/go/v17/arrow/memory/mallocator" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/internal" + "github.com/apache/arrow-go/v18/arrow/memory/mallocator" ) const ( diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/exports.go b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/exports.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/exports.go rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/exports.go index 40f5fb20..bf64ea75 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/exports.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/exports.go @@ -20,8 +20,8 @@ import ( "runtime/cgo" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" ) // #include diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/import_allocator.go b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/import_allocator.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/import_allocator.go rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/import_allocator.go index ad107902..ccea91c8 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/import_allocator.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/import_allocator.go @@ -20,7 +20,7 @@ import ( "sync/atomic" "unsafe" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) // #include "arrow/c/helpers.h" diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/interface.go b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/interface.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/interface.go rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/interface.go index ba821896..93aedc28 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/interface.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/interface.go @@ -22,10 +22,10 @@ package cdata import ( "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/arrio" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/arrio" + "github.com/apache/arrow-go/v18/arrow/memory" "golang.org/x/xerrors" ) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/trampoline.c b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/trampoline.c similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/trampoline.c rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/trampoline.c diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/cdata/utils.h b/vendor/github.com/apache/arrow-go/v18/arrow/cdata/utils.h similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/cdata/utils.h rename to vendor/github.com/apache/arrow-go/v18/arrow/cdata/utils.h diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/compare.go b/vendor/github.com/apache/arrow-go/v18/arrow/compare.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/compare.go rename to vendor/github.com/apache/arrow-go/v18/arrow/compare.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype.go similarity index 94% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype.go index 8fff5e65..95565859 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/datatype.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/datatype.go @@ -21,7 +21,7 @@ import ( "hash/maphash" "strings" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) // Type is a logical type. They can be expressed as @@ -107,7 +107,7 @@ const ( // parameters. DECIMAL128 - // DECIMAL256 is a precision and scale based decimal type, with 256 bit max. not yet implemented + // DECIMAL256 is a precision and scale based decimal type, with 256 bit max. DECIMAL256 // LIST is a list of some logical data type @@ -116,10 +116,10 @@ const ( // STRUCT of logical types STRUCT - // SPARSE_UNION of logical types. not yet implemented + // SPARSE_UNION of logical types SPARSE_UNION - // DENSE_UNION of logical types. not yet implemented + // DENSE_UNION of logical types DENSE_UNION // DICTIONARY aka Category type @@ -138,13 +138,13 @@ const ( // or nanoseconds. DURATION - // like STRING, but 64-bit offsets. not yet implemented + // like STRING, but 64-bit offsets LARGE_STRING - // like BINARY but with 64-bit offsets, not yet implemented + // like BINARY but with 64-bit offsets LARGE_BINARY - // like LIST but with 64-bit offsets. not yet implemented + // like LIST but with 64-bit offsets LARGE_LIST // calendar interval with three fields @@ -165,6 +165,12 @@ const ( // like LIST but with 64-bit offsets LARGE_LIST_VIEW + // Decimal value with 32-bit representation + DECIMAL32 + + // Decimal value with 64-bit representation + DECIMAL64 + // Alias to ensure we do not break any consumers DECIMAL = DECIMAL128 ) @@ -365,10 +371,10 @@ func IsLargeBinaryLike(t Type) bool { return false } -// IsFixedSizeBinary returns true for Decimal128/256 and FixedSizeBinary +// IsFixedSizeBinary returns true for Decimal32/64/128/256 and FixedSizeBinary func IsFixedSizeBinary(t Type) bool { switch t { - case DECIMAL128, DECIMAL256, FIXED_SIZE_BINARY: + case DECIMAL32, DECIMAL64, DECIMAL128, DECIMAL256, FIXED_SIZE_BINARY: return true } return false @@ -377,7 +383,7 @@ func IsFixedSizeBinary(t Type) bool { // IsDecimal returns true for Decimal128 and Decimal256 func IsDecimal(t Type) bool { switch t { - case DECIMAL128, DECIMAL256: + case DECIMAL32, DECIMAL64, DECIMAL128, DECIMAL256: return true } return false diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_binary.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_binary.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_binary.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_binary.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_encoded.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_encoded.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_encoded.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_encoded.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_extension.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_extension.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_extension.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_extension.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_fixedwidth.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_fixedwidth.go similarity index 87% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_fixedwidth.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_fixedwidth.go index a1c2834b..5928be3a 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_fixedwidth.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_fixedwidth.go @@ -22,8 +22,9 @@ import ( "sync" "time" - "github.com/apache/arrow/go/v17/internal/json" - + "github.com/apache/arrow-go/v18/arrow/decimal" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/internal/json" "golang.org/x/xerrors" ) @@ -532,19 +533,103 @@ type DecimalType interface { DataType GetPrecision() int32 GetScale() int32 + BitWidth() int +} + +// NarrowestDecimalType constructs the smallest decimal type that can represent +// the requested precision. An error is returned if the requested precision +// cannot be represented (prec <= 0 || prec > 76). +// +// For reference: +// +// prec in [ 1, 9] => Decimal32Type +// prec in [10, 18] => Decimal64Type +// prec in [19, 38] => Decimal128Type +// prec in [39, 76] => Decimal256Type +func NarrowestDecimalType(prec, scale int32) (DecimalType, error) { + switch { + case prec <= 0: + return nil, fmt.Errorf("%w: precision must be > 0 for decimal types, got %d", + ErrInvalid, prec) + case prec <= int32(decimal.MaxPrecision[decimal.Decimal32]()): + return &Decimal32Type{Precision: prec, Scale: scale}, nil + case prec <= int32(decimal.MaxPrecision[decimal.Decimal64]()): + return &Decimal64Type{Precision: prec, Scale: scale}, nil + case prec <= int32(decimal.MaxPrecision[decimal.Decimal128]()): + return &Decimal128Type{Precision: prec, Scale: scale}, nil + case prec <= int32(decimal.MaxPrecision[decimal.Decimal256]()): + return &Decimal256Type{Precision: prec, Scale: scale}, nil + default: + return nil, fmt.Errorf("%w: invalid precision for decimal types, %d", + ErrInvalid, prec) + } } func NewDecimalType(id Type, prec, scale int32) (DecimalType, error) { switch id { + case DECIMAL32: + debug.Assert(prec <= int32(decimal.MaxPrecision[decimal.Decimal32]()), "invalid precision for decimal32") + return &Decimal32Type{Precision: prec, Scale: scale}, nil + case DECIMAL64: + debug.Assert(prec <= int32(decimal.MaxPrecision[decimal.Decimal64]()), "invalid precision for decimal64") + return &Decimal64Type{Precision: prec, Scale: scale}, nil case DECIMAL128: + debug.Assert(prec <= int32(decimal.MaxPrecision[decimal.Decimal128]()), "invalid precision for decimal128") return &Decimal128Type{Precision: prec, Scale: scale}, nil case DECIMAL256: + debug.Assert(prec <= int32(decimal.MaxPrecision[decimal.Decimal256]()), "invalid precision for decimal256") return &Decimal256Type{Precision: prec, Scale: scale}, nil default: - return nil, fmt.Errorf("%w: must use DECIMAL128 or DECIMAL256 to create a DecimalType", ErrInvalid) + return nil, fmt.Errorf("%w: must use one of the DECIMAL IDs to create a DecimalType", ErrInvalid) } } +// Decimal32Type represents a fixed-size 32-bit decimal type. +type Decimal32Type struct { + Precision int32 + Scale int32 +} + +func (*Decimal32Type) ID() Type { return DECIMAL32 } +func (*Decimal32Type) Name() string { return "decimal32" } +func (*Decimal32Type) BitWidth() int { return 32 } +func (*Decimal32Type) Bytes() int { return Decimal32SizeBytes } +func (t *Decimal32Type) String() string { + return fmt.Sprintf("%s(%d, %d)", t.Name(), t.Precision, t.Scale) +} +func (t *Decimal32Type) Fingerprint() string { + return fmt.Sprintf("%s[%d,%d,%d]", typeFingerprint(t), t.BitWidth(), t.Precision, t.Scale) +} +func (t *Decimal32Type) GetPrecision() int32 { return t.Precision } +func (t *Decimal32Type) GetScale() int32 { return t.Scale } + +func (Decimal32Type) Layout() DataTypeLayout { + return DataTypeLayout{Buffers: []BufferSpec{SpecBitmap(), SpecFixedWidth(Decimal32SizeBytes)}} +} + +// Decimal64Type represents a fixed-size 32-bit decimal type. +type Decimal64Type struct { + Precision int32 + Scale int32 +} + +func (*Decimal64Type) ID() Type { return DECIMAL64 } +func (*Decimal64Type) Name() string { return "decimal64" } +func (*Decimal64Type) BitWidth() int { return 64 } +func (*Decimal64Type) Bytes() int { return Decimal64SizeBytes } +func (t *Decimal64Type) String() string { + return fmt.Sprintf("%s(%d, %d)", t.Name(), t.Precision, t.Scale) +} +func (t *Decimal64Type) Fingerprint() string { + return fmt.Sprintf("%s[%d,%d,%d]", typeFingerprint(t), t.BitWidth(), t.Precision, t.Scale) +} +func (t *Decimal64Type) GetPrecision() int32 { return t.Precision } +func (t *Decimal64Type) GetScale() int32 { return t.Scale } + +func (Decimal64Type) Layout() DataTypeLayout { + return DataTypeLayout{Buffers: []BufferSpec{SpecBitmap(), SpecFixedWidth(Decimal64SizeBytes)}} +} + // Decimal128Type represents a fixed-size 128-bit decimal type. type Decimal128Type struct { Precision int32 diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_nested.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_nested.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_nested.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_nested.go index b38983b7..32c3ed05 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_nested.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_nested.go @@ -22,7 +22,7 @@ import ( "strconv" "strings" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) type ( diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_null.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_null.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_null.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_null.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_numeric.gen.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_numeric.gen.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_numeric.gen.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_numeric.gen.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_numeric.gen.go.tmpl b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_numeric.gen.go.tmpl similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_numeric.gen.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_numeric.gen.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_numeric.gen.go.tmpldata b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_numeric.gen.go.tmpldata similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_numeric.gen.go.tmpldata rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_numeric.gen.go.tmpldata diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader.go index 8dd2fa48..691b97df 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader.go @@ -20,9 +20,9 @@ import ( "bytes" "unsafe" - "github.com/apache/arrow/go/v17/arrow/endian" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/memory" ) const ( diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader_inline.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader_inline.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader_inline.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader_inline.go index 24f518d0..960cc060 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader_inline.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader_inline.go @@ -21,7 +21,7 @@ package arrow import ( "unsafe" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) func (sh *ViewHeader) InlineString() (data string) { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader_inline_go1.19.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader_inline_go1.19.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader_inline_go1.19.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader_inline_go1.19.go index 2f7299ec..e1219030 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader_inline_go1.19.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader_inline_go1.19.go @@ -22,7 +22,7 @@ import ( "reflect" "unsafe" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) func (sh *ViewHeader) InlineString() (data string) { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader_inline_tinygo.go b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader_inline_tinygo.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader_inline_tinygo.go rename to vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader_inline_tinygo.go index b309c077..b4cedbda 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/datatype_viewheader_inline_tinygo.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/datatype_viewheader_inline_tinygo.go @@ -22,7 +22,7 @@ import ( "reflect" "unsafe" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) func (sh *ViewHeader) InlineString() (data string) { diff --git a/vendor/github.com/apache/arrow-go/v18/arrow/decimal/decimal.go b/vendor/github.com/apache/arrow-go/v18/arrow/decimal/decimal.go new file mode 100644 index 00000000..098a4e0f --- /dev/null +++ b/vendor/github.com/apache/arrow-go/v18/arrow/decimal/decimal.go @@ -0,0 +1,473 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.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 decimal + +import ( + "errors" + "fmt" + "math" + "math/big" + "math/bits" + "unsafe" + + "github.com/apache/arrow-go/v18/arrow/decimal128" + "github.com/apache/arrow-go/v18/arrow/decimal256" + "github.com/apache/arrow-go/v18/arrow/internal/debug" +) + +// DecimalTypes is a generic constraint representing the implemented decimal types +// in this package, and a single point of update for future additions. Everything +// else is constrained by this. +type DecimalTypes interface { + Decimal32 | Decimal64 | Decimal128 | Decimal256 +} + +// Num is an interface that is useful for building generic types for all decimal +// type implementations. It presents all the methods and interfaces necessary to +// operate on the decimal objects without having to care about the bit width. +type Num[T DecimalTypes] interface { + Negate() T + Add(T) T + Sub(T) T + Mul(T) T + Div(T) (res, rem T) + Pow(T) T + + FitsInPrecision(int32) bool + Abs() T + Sign() int + Rescale(int32, int32) (T, error) + Cmp(T) int + + IncreaseScaleBy(int32) T + ReduceScaleBy(int32, bool) T + + ToFloat32(int32) float32 + ToFloat64(int32) float64 + ToBigFloat(int32) *big.Float + + ToString(int32) string +} + +type ( + Decimal32 int32 + Decimal64 int64 + Decimal128 = decimal128.Num + Decimal256 = decimal256.Num +) + +func MaxPrecision[T DecimalTypes]() int { + // max precision is computed by Floor(log10(2^(nbytes * 8 - 1) - 1)) + var z T + return int(math.Floor(math.Log10(math.Pow(2, float64(unsafe.Sizeof(z))*8-1) - 1))) +} + +func (d Decimal32) Negate() Decimal32 { return -d } +func (d Decimal64) Negate() Decimal64 { return -d } + +func (d Decimal32) Add(rhs Decimal32) Decimal32 { return d + rhs } +func (d Decimal64) Add(rhs Decimal64) Decimal64 { return d + rhs } + +func (d Decimal32) Sub(rhs Decimal32) Decimal32 { return d - rhs } +func (d Decimal64) Sub(rhs Decimal64) Decimal64 { return d - rhs } + +func (d Decimal32) Mul(rhs Decimal32) Decimal32 { return d * rhs } +func (d Decimal64) Mul(rhs Decimal64) Decimal64 { return d * rhs } + +func (d Decimal32) Div(rhs Decimal32) (res, rem Decimal32) { + return d / rhs, d % rhs +} + +func (d Decimal64) Div(rhs Decimal64) (res, rem Decimal64) { + return d / rhs, d % rhs +} + +// about 4-5x faster than using math.Pow which requires converting to float64 +// and back to integers +func intPow[T int32 | int64](base, exp T) T { + result := T(1) + for { + if exp&1 == 1 { + result *= base + } + exp >>= 1 + if exp == 0 { + break + } + base *= base + } + + return result +} + +func (d Decimal32) Pow(rhs Decimal32) Decimal32 { + return Decimal32(intPow(int32(d), int32(rhs))) +} + +func (d Decimal64) Pow(rhs Decimal64) Decimal64 { + return Decimal64(intPow(int64(d), int64(rhs))) +} + +func (d Decimal32) Sign() int { + if d == 0 { + return 0 + } + return int(1 | (d >> 31)) +} + +func (d Decimal64) Sign() int { + if d == 0 { + return 0 + } + return int(1 | (d >> 63)) +} + +func (n Decimal32) Abs() Decimal32 { + if n < 0 { + return -n + } + return n +} + +func (n Decimal64) Abs() Decimal64 { + if n < 0 { + return -n + } + return n +} + +func (n Decimal32) FitsInPrecision(prec int32) bool { + debug.Assert(prec > 0, "precision must be > 0") + debug.Assert(prec <= 9, "precision must be <= 9") + return n.Abs() < Decimal32(math.Pow10(int(prec))) +} + +func (n Decimal64) FitsInPrecision(prec int32) bool { + debug.Assert(prec > 0, "precision must be > 0") + debug.Assert(prec <= 18, "precision must be <= 18") + return n.Abs() < Decimal64(math.Pow10(int(prec))) +} + +func (n Decimal32) ToString(scale int32) string { + return n.ToBigFloat(scale).Text('f', int(scale)) +} + +func (n Decimal64) ToString(scale int32) string { + return n.ToBigFloat(scale).Text('f', int(scale)) +} + +var pt5 = big.NewFloat(0.5) + +func decimalFromString[T interface { + Decimal32 | Decimal64 + FitsInPrecision(int32) bool +}](v string, prec, scale int32) (n T, err error) { + var nbits = uint(unsafe.Sizeof(T(0))) * 8 + + var out *big.Float + out, _, err = big.ParseFloat(v, 10, nbits, big.ToNearestEven) + + if scale < 0 { + var tmp big.Int + val, _ := out.Int(&tmp) + if val.BitLen() > int(nbits) { + return n, fmt.Errorf("bitlen too large for decimal%d", nbits) + } + + n = T(val.Int64() / int64(math.Pow10(int(-scale)))) + } else { + var precInBits = uint(math.Round(float64(prec+scale+1)/math.Log10(2))) + 1 + + p := (&big.Float{}).SetInt(big.NewInt(int64(math.Pow10(int(scale))))) + out.SetPrec(precInBits).Mul(out, p) + if out.Signbit() { + out.Sub(out, pt5) + } else { + out.Add(out, pt5) + } + + var tmp big.Int + val, _ := out.Int(&tmp) + if val.BitLen() > int(nbits) { + return n, fmt.Errorf("bitlen too large for decimal%d", nbits) + } + n = T(val.Int64()) + } + + if !n.FitsInPrecision(prec) { + err = fmt.Errorf("val %v doesn't fit in precision %d", n, prec) + } + return +} + +func Decimal32FromString(v string, prec, scale int32) (n Decimal32, err error) { + return decimalFromString[Decimal32](v, prec, scale) +} + +func Decimal64FromString(v string, prec, scale int32) (n Decimal64, err error) { + return decimalFromString[Decimal64](v, prec, scale) +} + +func Decimal128FromString(v string, prec, scale int32) (n Decimal128, err error) { + return decimal128.FromString(v, prec, scale) +} + +func Decimal256FromString(v string, prec, scale int32) (n Decimal256, err error) { + return decimal256.FromString(v, prec, scale) +} + +func scalePositiveFloat64(v float64, prec, scale int32) (float64, error) { + v *= math.Pow10(int(scale)) + v = math.RoundToEven(v) + + maxabs := math.Pow10(int(prec)) + if v >= maxabs { + return 0, fmt.Errorf("cannot convert %f to decimal(precision=%d, scale=%d)", v, prec, scale) + } + return v, nil +} + +func fromPositiveFloat[T Decimal32 | Decimal64, F float32 | float64](v F, prec, scale int32) (T, error) { + if prec > int32(MaxPrecision[T]()) { + return T(0), fmt.Errorf("invalid precision %d for converting float to Decimal", prec) + } + + val, err := scalePositiveFloat64(float64(v), prec, scale) + if err != nil { + return T(0), err + } + + return T(F(val)), nil +} + +func Decimal32FromFloat[F float32 | float64](v F, prec, scale int32) (Decimal32, error) { + if v < 0 { + dec, err := fromPositiveFloat[Decimal32](-v, prec, scale) + if err != nil { + return dec, err + } + + return -dec, nil + } + + return fromPositiveFloat[Decimal32](v, prec, scale) +} + +func Decimal64FromFloat[F float32 | float64](v F, prec, scale int32) (Decimal64, error) { + if v < 0 { + dec, err := fromPositiveFloat[Decimal64](-v, prec, scale) + if err != nil { + return dec, err + } + + return -dec, nil + } + + return fromPositiveFloat[Decimal64](v, prec, scale) +} + +func Decimal128FromFloat(v float64, prec, scale int32) (Decimal128, error) { + return decimal128.FromFloat64(v, prec, scale) +} + +func Decimal256FromFloat(v float64, prec, scale int32) (Decimal256, error) { + return decimal256.FromFloat64(v, prec, scale) +} + +func (n Decimal32) ToFloat32(scale int32) float32 { + return float32(n.ToFloat64(scale)) +} + +func (n Decimal64) ToFloat32(scale int32) float32 { + return float32(n.ToFloat64(scale)) +} + +func (n Decimal32) ToFloat64(scale int32) float64 { + return float64(n) * math.Pow10(-int(scale)) +} + +func (n Decimal64) ToFloat64(scale int32) float64 { + return float64(n) * math.Pow10(-int(scale)) +} + +func (n Decimal32) ToBigFloat(scale int32) *big.Float { + f := (&big.Float{}).SetInt64(int64(n)) + if scale < 0 { + f.SetPrec(32).Mul(f, (&big.Float{}).SetInt64(intPow(10, -int64(scale)))) + } else { + f.SetPrec(32).Quo(f, (&big.Float{}).SetInt64(intPow(10, int64(scale)))) + } + return f +} + +func (n Decimal64) ToBigFloat(scale int32) *big.Float { + f := (&big.Float{}).SetInt64(int64(n)) + if scale < 0 { + f.SetPrec(64).Mul(f, (&big.Float{}).SetInt64(intPow(10, -int64(scale)))) + } else { + f.SetPrec(64).Quo(f, (&big.Float{}).SetInt64(intPow(10, int64(scale)))) + } + return f +} + +func cmpDec[T Decimal32 | Decimal64](lhs, rhs T) int { + switch { + case lhs > rhs: + return 1 + case lhs < rhs: + return -1 + } + return 0 +} + +func (n Decimal32) Cmp(other Decimal32) int { + return cmpDec(n, other) +} + +func (n Decimal64) Cmp(other Decimal64) int { + return cmpDec(n, other) +} + +func (n Decimal32) IncreaseScaleBy(increase int32) Decimal32 { + debug.Assert(increase >= 0, "invalid increase scale for decimal32") + debug.Assert(increase <= 9, "invalid increase scale for decimal32") + + return n * Decimal32(intPow(10, increase)) +} + +func (n Decimal64) IncreaseScaleBy(increase int32) Decimal64 { + debug.Assert(increase >= 0, "invalid increase scale for decimal64") + debug.Assert(increase <= 18, "invalid increase scale for decimal64") + + return n * Decimal64(intPow(10, int64(increase))) +} + +func reduceScale[T interface { + Decimal32 | Decimal64 + Abs() T +}](n T, reduce int32, round bool) T { + if reduce == 0 { + return n + } + + divisor := T(intPow(10, reduce)) + if !round { + return n / divisor + } + + quo, remainder := n/divisor, n%divisor + divisorHalf := divisor / 2 + if remainder.Abs() >= divisorHalf { + if n > 0 { + quo++ + } else { + quo-- + } + } + + return quo +} + +func (n Decimal32) ReduceScaleBy(reduce int32, round bool) Decimal32 { + debug.Assert(reduce >= 0, "invalid reduce scale for decimal32") + debug.Assert(reduce <= 9, "invalid reduce scale for decimal32") + + return reduceScale(n, reduce, round) +} + +func (n Decimal64) ReduceScaleBy(reduce int32, round bool) Decimal64 { + debug.Assert(reduce >= 0, "invalid reduce scale for decimal32") + debug.Assert(reduce <= 18, "invalid reduce scale for decimal32") + + return reduceScale(n, reduce, round) +} + +//lint:ignore U1000 function is being used, staticcheck seems to not follow generics +func (n Decimal32) rescaleWouldCauseDataLoss(deltaScale int32, multiplier Decimal32) (out Decimal32, loss bool) { + if deltaScale < 0 { + debug.Assert(multiplier != 0, "multiplier must not be zero") + quo, remainder := bits.Div32(0, uint32(n), uint32(multiplier)) + return Decimal32(quo), remainder != 0 + } + + overflow, result := bits.Mul32(uint32(n), uint32(multiplier)) + if overflow != 0 { + return Decimal32(result), true + } + + out = Decimal32(result) + return out, out < n +} + +//lint:ignore U1000 function is being used, staticcheck seems to not follow generics +func (n Decimal64) rescaleWouldCauseDataLoss(deltaScale int32, multiplier Decimal64) (out Decimal64, loss bool) { + if deltaScale < 0 { + debug.Assert(multiplier != 0, "multiplier must not be zero") + quo, remainder := bits.Div32(0, uint32(n), uint32(multiplier)) + return Decimal64(quo), remainder != 0 + } + + overflow, result := bits.Mul32(uint32(n), uint32(multiplier)) + if overflow != 0 { + return Decimal64(result), true + } + + out = Decimal64(result) + return out, out < n +} + +func rescale[T interface { + Decimal32 | Decimal64 + rescaleWouldCauseDataLoss(int32, T) (T, bool) + Sign() int +}](n T, originalScale, newScale int32) (out T, err error) { + if originalScale == newScale { + return n, nil + } + + deltaScale := newScale - originalScale + absDeltaScale := int32(math.Abs(float64(deltaScale))) + + sign := n.Sign() + if n < 0 { + n = -n + } + + multiplier := T(intPow(10, absDeltaScale)) + var wouldHaveLoss bool + out, wouldHaveLoss = n.rescaleWouldCauseDataLoss(deltaScale, multiplier) + if wouldHaveLoss { + err = errors.New("rescale data loss") + } + out *= T(sign) + return +} + +func (n Decimal32) Rescale(originalScale, newScale int32) (out Decimal32, err error) { + return rescale(n, originalScale, newScale) +} + +func (n Decimal64) Rescale(originalScale, newScale int32) (out Decimal64, err error) { + return rescale(n, originalScale, newScale) +} + +var ( + _ Num[Decimal32] = Decimal32(0) + _ Num[Decimal64] = Decimal64(0) + _ Num[Decimal128] = Decimal128{} + _ Num[Decimal256] = Decimal256{} +) diff --git a/vendor/github.com/apache/arrow-go/v18/arrow/decimal/traits.go b/vendor/github.com/apache/arrow-go/v18/arrow/decimal/traits.go new file mode 100644 index 00000000..0ec0c315 --- /dev/null +++ b/vendor/github.com/apache/arrow-go/v18/arrow/decimal/traits.go @@ -0,0 +1,78 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.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 decimal + +// Traits is a convenience for building generic objects for operating on +// Decimal values to get around the limitations of Go generics. By providing this +// interface a generic object can handle producing the proper types to generate +// new decimal values. +type Traits[T DecimalTypes] interface { + BytesRequired(int) int + FromString(string, int32, int32) (T, error) + FromFloat64(float64, int32, int32) (T, error) +} + +var ( + Dec32Traits dec32Traits + Dec64Traits dec64Traits + Dec128Traits dec128Traits + Dec256Traits dec256Traits +) + +type ( + dec32Traits struct{} + dec64Traits struct{} + dec128Traits struct{} + dec256Traits struct{} +) + +func (dec32Traits) BytesRequired(n int) int { return 4 * n } +func (dec64Traits) BytesRequired(n int) int { return 8 * n } +func (dec128Traits) BytesRequired(n int) int { return 16 * n } +func (dec256Traits) BytesRequired(n int) int { return 32 * n } + +func (dec32Traits) FromString(v string, prec, scale int32) (Decimal32, error) { + return Decimal32FromString(v, prec, scale) +} + +func (dec64Traits) FromString(v string, prec, scale int32) (Decimal64, error) { + return Decimal64FromString(v, prec, scale) +} + +func (dec128Traits) FromString(v string, prec, scale int32) (Decimal128, error) { + return Decimal128FromString(v, prec, scale) +} + +func (dec256Traits) FromString(v string, prec, scale int32) (Decimal256, error) { + return Decimal256FromString(v, prec, scale) +} + +func (dec32Traits) FromFloat64(v float64, prec, scale int32) (Decimal32, error) { + return Decimal32FromFloat(v, prec, scale) +} + +func (dec64Traits) FromFloat64(v float64, prec, scale int32) (Decimal64, error) { + return Decimal64FromFloat(v, prec, scale) +} + +func (dec128Traits) FromFloat64(v float64, prec, scale int32) (Decimal128, error) { + return Decimal128FromFloat(v, prec, scale) +} + +func (dec256Traits) FromFloat64(v float64, prec, scale int32) (Decimal256, error) { + return Decimal256FromFloat(v, prec, scale) +} diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/decimal128/decimal128.go b/vendor/github.com/apache/arrow-go/v18/arrow/decimal128/decimal128.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/decimal128/decimal128.go rename to vendor/github.com/apache/arrow-go/v18/arrow/decimal128/decimal128.go index e4b19797..660c4131 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/decimal128/decimal128.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/decimal128/decimal128.go @@ -23,7 +23,7 @@ import ( "math/big" "math/bits" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) const ( @@ -327,6 +327,16 @@ func (n Num) ToFloat64(scale int32) float64 { return n.tofloat64Positive(scale) } +func (n Num) ToBigFloat(scale int32) *big.Float { + f := (&big.Float{}).SetInt(n.BigInt()) + if scale < 0 { + f.SetPrec(128).Mul(f, (&big.Float{}).SetInt(scaleMultipliers[-scale].BigInt())) + } else { + f.SetPrec(128).Quo(f, (&big.Float{}).SetInt(scaleMultipliers[scale].BigInt())) + } + return f +} + // LowBits returns the low bits of the two's complement representation of the number. func (n Num) LowBits() uint64 { return n.lo } diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/decimal256/decimal256.go b/vendor/github.com/apache/arrow-go/v18/arrow/decimal256/decimal256.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/decimal256/decimal256.go rename to vendor/github.com/apache/arrow-go/v18/arrow/decimal256/decimal256.go index d5abfc22..82c52a65 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/decimal256/decimal256.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/decimal256/decimal256.go @@ -23,8 +23,8 @@ import ( "math/big" "math/bits" - "github.com/apache/arrow/go/v17/arrow/decimal128" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/decimal128" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) const ( @@ -339,6 +339,16 @@ func (n Num) ToFloat64(scale int32) float64 { return n.tofloat64Positive(scale) } +func (n Num) ToBigFloat(scale int32) *big.Float { + f := (&big.Float{}).SetInt(n.BigInt()) + if scale < 0 { + f.SetPrec(256).Mul(f, (&big.Float{}).SetInt(scaleMultipliers[-scale].BigInt())) + } else { + f.SetPrec(256).Quo(f, (&big.Float{}).SetInt(scaleMultipliers[scale].BigInt())) + } + return f +} + func (n Num) Sign() int { if n == (Num{}) { return 0 diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/doc.go b/vendor/github.com/apache/arrow-go/v18/arrow/doc.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/doc.go rename to vendor/github.com/apache/arrow-go/v18/arrow/doc.go index 648184de..44eda7ec 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/doc.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/doc.go @@ -34,7 +34,7 @@ To build with tinygo include the noasm build tag. */ package arrow -const PkgVersion = "17.0.0" +const PkgVersion = "18.0.0" //go:generate go run _tools/tmpl/main.go -i -data=numeric.tmpldata type_traits_numeric.gen.go.tmpl type_traits_numeric.gen_test.go.tmpl array/numeric.gen.go.tmpl array/numericbuilder.gen.go.tmpl array/bufferbuilder_numeric.gen.go.tmpl //go:generate go run _tools/tmpl/main.go -i -data=datatype_numeric.gen.go.tmpldata datatype_numeric.gen.go.tmpl tensor/numeric.gen.go.tmpl tensor/numeric.gen_test.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/encoded/ree_utils.go b/vendor/github.com/apache/arrow-go/v18/arrow/encoded/ree_utils.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/encoded/ree_utils.go rename to vendor/github.com/apache/arrow-go/v18/arrow/encoded/ree_utils.go index 0493d71f..fd0c166b 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/encoded/ree_utils.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/encoded/ree_utils.go @@ -20,7 +20,7 @@ import ( "math" "sort" - "github.com/apache/arrow/go/v17/arrow" + "github.com/apache/arrow-go/v18/arrow" ) // FindPhysicalIndex performs a binary search on the run-ends to return diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/endian/big.go b/vendor/github.com/apache/arrow-go/v18/arrow/endian/big.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/endian/big.go rename to vendor/github.com/apache/arrow-go/v18/arrow/endian/big.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/endian/endian.go b/vendor/github.com/apache/arrow-go/v18/arrow/endian/endian.go similarity index 91% rename from vendor/github.com/apache/arrow/go/v17/arrow/endian/endian.go rename to vendor/github.com/apache/arrow-go/v18/arrow/endian/endian.go index 234c58cd..f369945d 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/endian/endian.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/endian/endian.go @@ -17,8 +17,8 @@ package endian import ( - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" ) type Endianness flatbuf.Endianness diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/endian/little.go b/vendor/github.com/apache/arrow-go/v18/arrow/endian/little.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/endian/little.go rename to vendor/github.com/apache/arrow-go/v18/arrow/endian/little.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/errors.go b/vendor/github.com/apache/arrow-go/v18/arrow/errors.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/errors.go rename to vendor/github.com/apache/arrow-go/v18/arrow/errors.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/float16/float16.go b/vendor/github.com/apache/arrow-go/v18/arrow/float16/float16.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/float16/float16.go rename to vendor/github.com/apache/arrow-go/v18/arrow/float16/float16.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/assert_off.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/assert_off.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/assert_off.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/assert_off.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/assert_on.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/assert_on.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/assert_on.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/assert_on.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/doc.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/doc.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/doc.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/doc.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/log_off.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/log_off.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/log_off.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/log_off.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/log_on.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/log_on.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/log_on.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/log_on.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/util.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/util.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/debug/util.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/debug/util.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/dictutils/dict.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/dictutils/dict.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/dictutils/dict.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/dictutils/dict.go index 76382a3d..184e29c0 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/internal/dictutils/dict.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/internal/dictutils/dict.go @@ -21,9 +21,9 @@ import ( "fmt" "hash/maphash" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/memory" ) type Kind int8 diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Binary.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Binary.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Binary.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Binary.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/BinaryView.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/BinaryView.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/BinaryView.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/BinaryView.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Block.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Block.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Block.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Block.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/BodyCompression.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/BodyCompression.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/BodyCompression.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/BodyCompression.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/BodyCompressionMethod.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/BodyCompressionMethod.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/BodyCompressionMethod.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/BodyCompressionMethod.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Bool.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Bool.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Bool.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Bool.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Buffer.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Buffer.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Buffer.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Buffer.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/CompressionType.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/CompressionType.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/CompressionType.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/CompressionType.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Date.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Date.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Date.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Date.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/DateUnit.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/DateUnit.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/DateUnit.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/DateUnit.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Decimal.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Decimal.go similarity index 79% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Decimal.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Decimal.go index 2fc9d5ad..234c3964 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Decimal.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Decimal.go @@ -22,10 +22,10 @@ import ( flatbuffers "github.com/google/flatbuffers/go" ) -// / Exact decimal value represented as an integer value in two's -// / complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers -// / are used. The representation uses the endianness indicated -// / in the Schema. +/// Exact decimal value represented as an integer value in two's +/// complement. Currently 32-bit (4-byte), 64-bit (8-byte), +/// 128-bit (16-byte) and 256-bit (32-byte) integers are used. +/// The representation uses the endianness indicated in the Schema. type Decimal struct { _tab flatbuffers.Table } @@ -46,7 +46,7 @@ func (rcv *Decimal) Table() flatbuffers.Table { return rcv._tab } -// / Total number of decimal digits +/// Total number of decimal digits func (rcv *Decimal) Precision() int32 { o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) if o != 0 { @@ -55,12 +55,12 @@ func (rcv *Decimal) Precision() int32 { return 0 } -// / Total number of decimal digits +/// Total number of decimal digits func (rcv *Decimal) MutatePrecision(n int32) bool { return rcv._tab.MutateInt32Slot(4, n) } -// / Number of digits after the decimal point "." +/// Number of digits after the decimal point "." func (rcv *Decimal) Scale() int32 { o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) if o != 0 { @@ -69,13 +69,13 @@ func (rcv *Decimal) Scale() int32 { return 0 } -// / Number of digits after the decimal point "." +/// Number of digits after the decimal point "." func (rcv *Decimal) MutateScale(n int32) bool { return rcv._tab.MutateInt32Slot(6, n) } -// / Number of bits per value. The only accepted widths are 128 and 256. -// / We use bitWidth for consistency with Int::bitWidth. +/// Number of bits per value. The accepted widths are 32, 64, 128 and 256. +/// We use bitWidth for consistency with Int::bitWidth. func (rcv *Decimal) BitWidth() int32 { o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) if o != 0 { @@ -84,8 +84,8 @@ func (rcv *Decimal) BitWidth() int32 { return 128 } -// / Number of bits per value. The only accepted widths are 128 and 256. -// / We use bitWidth for consistency with Int::bitWidth. +/// Number of bits per value. The accepted widths are 32, 64, 128 and 256. +/// We use bitWidth for consistency with Int::bitWidth. func (rcv *Decimal) MutateBitWidth(n int32) bool { return rcv._tab.MutateInt32Slot(8, n) } diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/DictionaryBatch.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/DictionaryBatch.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/DictionaryBatch.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/DictionaryBatch.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/DictionaryEncoding.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/DictionaryEncoding.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/DictionaryEncoding.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/DictionaryEncoding.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/DictionaryKind.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/DictionaryKind.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/DictionaryKind.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/DictionaryKind.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Duration.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Duration.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Duration.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Duration.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Endianness.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Endianness.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Endianness.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Endianness.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Feature.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Feature.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Feature.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Feature.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Field.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Field.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Field.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Field.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/FieldNode.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/FieldNode.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/FieldNode.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/FieldNode.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/FixedSizeBinary.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/FixedSizeBinary.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/FixedSizeBinary.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/FixedSizeBinary.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/FixedSizeList.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/FixedSizeList.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/FixedSizeList.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/FixedSizeList.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/FloatingPoint.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/FloatingPoint.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/FloatingPoint.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/FloatingPoint.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Footer.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Footer.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Footer.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Footer.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Int.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Int.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Int.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Int.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Interval.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Interval.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Interval.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Interval.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/IntervalUnit.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/IntervalUnit.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/IntervalUnit.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/IntervalUnit.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/KeyValue.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/KeyValue.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/KeyValue.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/KeyValue.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/LargeBinary.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/LargeBinary.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/LargeBinary.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/LargeBinary.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/LargeList.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/LargeList.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/LargeList.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/LargeList.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/LargeListView.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/LargeListView.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/LargeListView.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/LargeListView.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/LargeUtf8.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/LargeUtf8.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/LargeUtf8.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/LargeUtf8.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/List.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/List.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/List.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/List.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/ListView.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/ListView.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/ListView.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/ListView.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Map.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Map.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Map.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Map.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Message.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Message.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Message.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Message.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/MessageHeader.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/MessageHeader.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/MessageHeader.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/MessageHeader.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/MetadataVersion.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/MetadataVersion.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/MetadataVersion.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/MetadataVersion.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Null.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Null.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Null.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Null.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Precision.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Precision.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Precision.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Precision.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/RecordBatch.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/RecordBatch.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/RecordBatch.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/RecordBatch.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/RunEndEncoded.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/RunEndEncoded.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/RunEndEncoded.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/RunEndEncoded.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/RunLengthEncoded.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/RunLengthEncoded.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/RunLengthEncoded.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/RunLengthEncoded.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Schema.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Schema.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Schema.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Schema.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseMatrixIndexCSR.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseMatrixIndexCSR.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseMatrixIndexCSR.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseMatrixIndexCSR.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseMatrixIndexCSX.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseMatrixIndexCSX.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseMatrixIndexCSX.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseMatrixIndexCSX.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseTensor.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseTensor.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseTensor.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseTensor.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseTensorIndex.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseTensorIndex.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseTensorIndex.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseTensorIndex.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseTensorIndexCOO.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseTensorIndexCOO.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseTensorIndexCOO.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseTensorIndexCOO.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseTensorIndexCSF.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseTensorIndexCSF.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/SparseTensorIndexCSF.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/SparseTensorIndexCSF.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Struct_.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Struct_.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Struct_.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Struct_.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Tensor.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Tensor.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Tensor.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Tensor.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/TensorDim.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/TensorDim.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/TensorDim.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/TensorDim.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Time.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Time.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Time.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Time.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/TimeUnit.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/TimeUnit.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/TimeUnit.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/TimeUnit.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Timestamp.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Timestamp.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Timestamp.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Timestamp.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Type.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Type.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Type.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Type.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Union.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Union.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Union.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Union.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/UnionMode.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/UnionMode.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/UnionMode.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/UnionMode.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Utf8.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Utf8.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Utf8.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Utf8.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Utf8View.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Utf8View.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/flatbuf/Utf8View.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/flatbuf/Utf8View.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/internal/utils.go b/vendor/github.com/apache/arrow-go/v18/arrow/internal/utils.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/internal/utils.go rename to vendor/github.com/apache/arrow-go/v18/arrow/internal/utils.go index 2f1f2346..d471e62a 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/internal/utils.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/internal/utils.go @@ -17,8 +17,8 @@ package internal import ( - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" ) const CurMetadataVersion = flatbuf.MetadataVersionV5 diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/compression.go b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/compression.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/ipc/compression.go rename to vendor/github.com/apache/arrow-go/v18/arrow/ipc/compression.go index 12bb5d40..f74510a5 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/compression.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/compression.go @@ -19,9 +19,9 @@ package ipc import ( "io" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow/memory" "github.com/klauspost/compress/zstd" "github.com/pierrec/lz4/v4" ) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/endian_swap.go b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/endian_swap.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/ipc/endian_swap.go rename to vendor/github.com/apache/arrow-go/v18/arrow/ipc/endian_swap.go index af4dead4..80d8b3cc 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/endian_swap.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/endian_swap.go @@ -21,9 +21,9 @@ import ( "fmt" "math/bits" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/memory" ) // swap the endianness of the array's buffers as needed in-place to save diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/file_reader.go b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/file_reader.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/ipc/file_reader.go rename to vendor/github.com/apache/arrow-go/v18/arrow/ipc/file_reader.go index 031a028a..2715831e 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/file_reader.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/file_reader.go @@ -23,14 +23,14 @@ import ( "fmt" "io" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/endian" - "github.com/apache/arrow/go/v17/arrow/internal" - "github.com/apache/arrow/go/v17/arrow/internal/dictutils" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/internal" + "github.com/apache/arrow-go/v18/arrow/internal/dictutils" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow/memory" ) // FileReader is an Arrow file reader. @@ -476,7 +476,7 @@ func (ctx *arrayLoaderContext) loadArray(dt arrow.DataType) arrow.ArrayData { *arrow.Int8Type, *arrow.Int16Type, *arrow.Int32Type, *arrow.Int64Type, *arrow.Uint8Type, *arrow.Uint16Type, *arrow.Uint32Type, *arrow.Uint64Type, *arrow.Float16Type, *arrow.Float32Type, *arrow.Float64Type, - *arrow.Decimal128Type, *arrow.Decimal256Type, + arrow.DecimalType, *arrow.Time32Type, *arrow.Time64Type, *arrow.TimestampType, *arrow.Date32Type, *arrow.Date64Type, diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/file_writer.go b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/file_writer.go similarity index 79% rename from vendor/github.com/apache/arrow/go/v17/arrow/ipc/file_writer.go rename to vendor/github.com/apache/arrow-go/v18/arrow/ipc/file_writer.go index 8cea4581..c6aefd59 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/file_writer.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/file_writer.go @@ -21,11 +21,11 @@ import ( "fmt" "io" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal/dictutils" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal/dictutils" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow/memory" ) // PayloadWriter is an interface for injecting a different payloadwriter @@ -37,23 +37,17 @@ type PayloadWriter interface { Close() error } -type pwriter struct { - w io.WriteSeeker - pos int64 +type fileWriter struct { + streamWriter schema *arrow.Schema dicts []fileBlock recs []fileBlock } -func (w *pwriter) Start() error { +func (w *fileWriter) Start() error { var err error - err = w.updatePos() - if err != nil { - return fmt.Errorf("arrow/ipc: could not update position while in start: %w", err) - } - // only necessary to align to 8-byte boundary at the start of the file _, err = w.Write(Magic) if err != nil { @@ -65,10 +59,10 @@ func (w *pwriter) Start() error { return fmt.Errorf("arrow/ipc: could not align start block: %w", err) } - return err + return w.streamWriter.Start() } -func (w *pwriter) WritePayload(p Payload) error { +func (w *fileWriter) WritePayload(p Payload) error { blk := fileBlock{Offset: w.pos, Meta: 0, Body: p.size} n, err := writeIPCPayload(w, p) if err != nil { @@ -77,11 +71,6 @@ func (w *pwriter) WritePayload(p Payload) error { blk.Meta = int32(n) - err = w.updatePos() - if err != nil { - return fmt.Errorf("arrow/ipc: could not update position while in write-payload: %w", err) - } - switch flatbuf.MessageHeader(p.msg) { case flatbuf.MessageHeaderDictionaryBatch: w.dicts = append(w.dicts, blk) @@ -92,27 +81,18 @@ func (w *pwriter) WritePayload(p Payload) error { return nil } -func (w *pwriter) Close() error { +func (w *fileWriter) Close() error { var err error - // write file footer - err = w.updatePos() - if err != nil { - return fmt.Errorf("arrow/ipc: could not update position while in close: %w", err) + if err = w.streamWriter.Close(); err != nil { + return err } pos := w.pos - err = writeFileFooter(w.schema, w.dicts, w.recs, w) - if err != nil { + if err = writeFileFooter(w.schema, w.dicts, w.recs, w); err != nil { return fmt.Errorf("arrow/ipc: could not write file footer: %w", err) } - // write file footer length - err = w.updatePos() // not strictly needed as we passed w to writeFileFooter... - if err != nil { - return fmt.Errorf("arrow/ipc: could not compute file footer length: %w", err) - } - size := w.pos - pos if size <= 0 { return fmt.Errorf("arrow/ipc: invalid file footer size (size=%d)", size) @@ -133,13 +113,7 @@ func (w *pwriter) Close() error { return nil } -func (w *pwriter) updatePos() error { - var err error - w.pos, err = w.w.Seek(0, io.SeekCurrent) - return err -} - -func (w *pwriter) align(align int32) error { +func (w *fileWriter) align(align int32) error { remainder := paddedLength(w.pos, align) - w.pos if remainder == 0 { return nil @@ -149,12 +123,6 @@ func (w *pwriter) align(align int32) error { return err } -func (w *pwriter) Write(p []byte) (int, error) { - n, err := w.w.Write(p) - w.pos += int64(n) - return n, err -} - func writeIPCPayload(w io.Writer, p Payload) (int, error) { n, err := writeMessage(p.meta, kArrowIPCAlignment, w) if err != nil { @@ -259,18 +227,12 @@ func (ps payloads) Release() { // FileWriter is an Arrow file writer. type FileWriter struct { - w io.WriteSeeker + w io.Writer mem memory.Allocator - header struct { - started bool - offset int64 - } - - footer struct { - written bool - } + headerStarted bool + footerWritten bool pw PayloadWriter @@ -289,7 +251,7 @@ type FileWriter struct { } // NewFileWriter opens an Arrow file using the provided writer w. -func NewFileWriter(w io.WriteSeeker, opts ...Option) (*FileWriter, error) { +func NewFileWriter(w io.Writer, opts ...Option) (*FileWriter, error) { var ( cfg = newConfig(opts...) err error @@ -297,7 +259,7 @@ func NewFileWriter(w io.WriteSeeker, opts ...Option) (*FileWriter, error) { f := FileWriter{ w: w, - pw: &pwriter{w: w, schema: cfg.schema, pos: -1}, + pw: &fileWriter{streamWriter: streamWriter{w: w}, schema: cfg.schema}, mem: cfg.alloc, schema: cfg.schema, codec: cfg.codec, @@ -306,12 +268,6 @@ func NewFileWriter(w io.WriteSeeker, opts ...Option) (*FileWriter, error) { compressors: make([]compressor, cfg.compressNP), } - pos, err := f.w.Seek(0, io.SeekCurrent) - if err != nil { - return nil, fmt.Errorf("arrow/ipc: could not seek current position: %w", err) - } - f.header.offset = pos - return &f, err } @@ -321,7 +277,7 @@ func (f *FileWriter) Close() error { return fmt.Errorf("arrow/ipc: could not write empty file: %w", err) } - if f.footer.written { + if f.footerWritten { return nil } @@ -329,7 +285,7 @@ func (f *FileWriter) Close() error { if err != nil { return fmt.Errorf("arrow/ipc: could not close payload writer: %w", err) } - f.footer.written = true + f.footerWritten = true return nil } @@ -367,14 +323,14 @@ func (f *FileWriter) Write(rec arrow.Record) error { } func (f *FileWriter) checkStarted() error { - if !f.header.started { + if !f.headerStarted { return f.start() } return nil } func (f *FileWriter) start() error { - f.header.started = true + f.headerStarted = true err := f.pw.Start() if err != nil { return err diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/ipc.go b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/ipc.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/ipc/ipc.go rename to vendor/github.com/apache/arrow-go/v18/arrow/ipc/ipc.go index b31a358a..c4589da6 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/ipc.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/ipc.go @@ -19,10 +19,10 @@ package ipc import ( "io" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/arrio" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/arrio" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow/memory" ) const ( diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/message.go b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/message.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/ipc/message.go rename to vendor/github.com/apache/arrow-go/v18/arrow/ipc/message.go index 23142d04..f989cf2a 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/message.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/message.go @@ -22,9 +22,9 @@ import ( "io" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow/memory" ) // MetadataVersion represents the Arrow metadata version. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/metadata.go b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/metadata.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/ipc/metadata.go rename to vendor/github.com/apache/arrow-go/v18/arrow/ipc/metadata.go index 604adab3..a5bf1877 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/metadata.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/metadata.go @@ -23,11 +23,11 @@ import ( "io" "sort" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/endian" - "github.com/apache/arrow/go/v17/arrow/internal/dictutils" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v17/arrow/memory" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/internal/dictutils" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow/memory" flatbuffers "github.com/google/flatbuffers/go" ) @@ -281,20 +281,12 @@ func (fv *fieldVisitor) visit(field arrow.Field) { fv.dtype = flatbuf.TypeFloatingPoint fv.offset = floatToFB(fv.b, int32(dt.BitWidth())) - case *arrow.Decimal128Type: + case arrow.DecimalType: fv.dtype = flatbuf.TypeDecimal flatbuf.DecimalStart(fv.b) - flatbuf.DecimalAddPrecision(fv.b, dt.Precision) - flatbuf.DecimalAddScale(fv.b, dt.Scale) - flatbuf.DecimalAddBitWidth(fv.b, 128) - fv.offset = flatbuf.DecimalEnd(fv.b) - - case *arrow.Decimal256Type: - fv.dtype = flatbuf.TypeDecimal - flatbuf.DecimalStart(fv.b) - flatbuf.DecimalAddPrecision(fv.b, dt.Precision) - flatbuf.DecimalAddScale(fv.b, dt.Scale) - flatbuf.DecimalAddBitWidth(fv.b, 256) + flatbuf.DecimalAddPrecision(fv.b, dt.GetPrecision()) + flatbuf.DecimalAddScale(fv.b, dt.GetScale()) + flatbuf.DecimalAddBitWidth(fv.b, int32(dt.BitWidth())) fv.offset = flatbuf.DecimalEnd(fv.b) case *arrow.FixedSizeBinaryType: @@ -947,6 +939,10 @@ func floatToFB(b *flatbuffers.Builder, bw int32) flatbuffers.UOffsetT { func decimalFromFB(data flatbuf.Decimal) (arrow.DataType, error) { switch data.BitWidth() { + case 32: + return &arrow.Decimal32Type{Precision: data.Precision(), Scale: data.Scale()}, nil + case 64: + return &arrow.Decimal64Type{Precision: data.Precision(), Scale: data.Scale()}, nil case 128: return &arrow.Decimal128Type{Precision: data.Precision(), Scale: data.Scale()}, nil case 256: diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/reader.go b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/reader.go similarity index 94% rename from vendor/github.com/apache/arrow/go/v17/arrow/ipc/reader.go rename to vendor/github.com/apache/arrow-go/v18/arrow/ipc/reader.go index aeb47cfb..f74fddd3 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/reader.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/reader.go @@ -23,14 +23,14 @@ import ( "io" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/endian" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/internal/dictutils" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/dictutils" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/utils" ) // Reader reads records from an io.Reader. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/writer.go b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/writer.go similarity index 94% rename from vendor/github.com/apache/arrow/go/v17/arrow/ipc/writer.go rename to vendor/github.com/apache/arrow-go/v18/arrow/ipc/writer.go index f2afd2db..0919494a 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/ipc/writer.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/ipc/writer.go @@ -26,29 +26,29 @@ import ( "sync" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/internal" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/internal/dictutils" - "github.com/apache/arrow/go/v17/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/internal" + "github.com/apache/arrow-go/v18/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/dictutils" + "github.com/apache/arrow-go/v18/arrow/internal/flatbuf" + "github.com/apache/arrow-go/v18/arrow/memory" + "github.com/apache/arrow-go/v18/internal/utils" ) -type swriter struct { +type streamWriter struct { w io.Writer pos int64 } -func (w *swriter) Start() error { return nil } -func (w *swriter) Close() error { +func (w *streamWriter) Start() error { return nil } +func (w *streamWriter) Close() error { _, err := w.Write(kEOS[:]) return err } -func (w *swriter) WritePayload(p Payload) error { +func (w *streamWriter) WritePayload(p Payload) error { _, err := writeIPCPayload(w, p) if err != nil { return err @@ -56,7 +56,7 @@ func (w *swriter) WritePayload(p Payload) error { return nil } -func (w *swriter) Write(p []byte) (int, error) { +func (w *streamWriter) Write(p []byte) (int, error) { n, err := w.w.Write(p) w.pos += int64(n) return n, err @@ -118,7 +118,7 @@ func NewWriter(w io.Writer, opts ...Option) *Writer { return &Writer{ w: w, mem: cfg.alloc, - pw: &swriter{w: w}, + pw: &streamWriter{w: w}, schema: cfg.schema, codec: cfg.codec, emitDictDeltas: cfg.emitDictDeltas, @@ -159,15 +159,19 @@ func (w *Writer) Write(rec arrow.Record) (err error) { } }() + incomingSchema := rec.Schema() + if !w.started { + if w.schema == nil { + w.schema = incomingSchema + } err := w.start() if err != nil { return err } } - schema := rec.Schema() - if schema == nil || !schema.Equal(w.schema) { + if incomingSchema == nil || !incomingSchema.Equal(w.schema) { return errInconsistentSchema } @@ -853,19 +857,35 @@ func (w *recordEncoder) getZeroBasedValueOffsets(arr arrow.Array) *memory.Buffer return nil } + dataTypeWidth := arr.DataType().Layout().Buffers[1].ByteWidth + // if we have a non-zero offset, then the value offsets do not start at // zero. we must a) create a new offsets array with shifted offsets and // b) slice the values array accordingly - // + hasNonZeroOffset := data.Offset() != 0 + // or if there are more value offsets than values (the array has been sliced) // we need to trim off the trailing offsets - needsTruncateAndShift := data.Offset() != 0 || offsetBytesNeeded < voffsets.Len() + hasMoreOffsetsThanValues := offsetBytesNeeded < voffsets.Len() + + // or if the offsets do not start from the zero index, we need to shift them + // and slice the values array + var firstOffset int64 + if dataTypeWidth == 8 { + firstOffset = arrow.Int64Traits.CastFromBytes(voffsets.Bytes())[0] + } else { + firstOffset = int64(arrow.Int32Traits.CastFromBytes(voffsets.Bytes())[0]) + } + offsetsDoNotStartFromZero := firstOffset != 0 + + // determine whether the offsets array should be shifted + needsTruncateAndShift := hasNonZeroOffset || hasMoreOffsetsThanValues || offsetsDoNotStartFromZero if needsTruncateAndShift { shiftedOffsets := memory.NewResizableBuffer(w.mem) shiftedOffsets.Resize(offsetBytesNeeded) - switch arr.DataType().Layout().Buffers[1].ByteWidth { + switch dataTypeWidth { case 8: dest := arrow.Int64Traits.CastFromBytes(shiftedOffsets.Bytes()) offsets := arrow.Int64Traits.CastFromBytes(voffsets.Bytes())[data.Offset() : data.Offset()+data.Len()+1] diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/Makefile b/vendor/github.com/apache/arrow-go/v18/arrow/memory/Makefile similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/Makefile rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/Makefile diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/allocator.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/allocator.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/allocator.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/allocator.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/buffer.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/buffer.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/buffer.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/buffer.go index 55a17afc..04722225 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/memory/buffer.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/memory/buffer.go @@ -19,7 +19,7 @@ package memory import ( "sync/atomic" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) // Buffer is a wrapper type for a buffer of bytes. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/cgo_allocator.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/cgo_allocator.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/cgo_allocator.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/cgo_allocator.go index 5eb66ade..57f3d922 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/memory/cgo_allocator.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/memory/cgo_allocator.go @@ -22,7 +22,7 @@ package memory import ( "runtime" - cga "github.com/apache/arrow/go/v17/arrow/memory/internal/cgoalloc" + cga "github.com/apache/arrow-go/v18/arrow/memory/internal/cgoalloc" ) // CgoArrowAllocator is an allocator which exposes the C++ memory pool class diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/cgo_allocator_defaults.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/cgo_allocator_defaults.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/cgo_allocator_defaults.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/cgo_allocator_defaults.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/cgo_allocator_logging.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/cgo_allocator_logging.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/cgo_allocator_logging.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/cgo_allocator_logging.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/checked_allocator.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/checked_allocator.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/checked_allocator.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/checked_allocator.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/default_allocator.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/default_allocator.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/default_allocator.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/default_allocator.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/default_mallocator.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/default_mallocator.go similarity index 94% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/default_mallocator.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/default_mallocator.go index b30e7e75..4eefc1e9 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/memory/default_mallocator.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/memory/default_mallocator.go @@ -19,7 +19,7 @@ package memory import ( - "github.com/apache/arrow/go/v17/arrow/memory/mallocator" + "github.com/apache/arrow-go/v18/arrow/memory/mallocator" ) // DefaultAllocator is a default implementation of Allocator and can be used anywhere diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/doc.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/doc.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/doc.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/doc.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/go_allocator.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/go_allocator.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/go_allocator.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/go_allocator.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/internal/cgoalloc/allocator.cc b/vendor/github.com/apache/arrow-go/v18/arrow/memory/internal/cgoalloc/allocator.cc similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/internal/cgoalloc/allocator.cc rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/internal/cgoalloc/allocator.cc diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/internal/cgoalloc/allocator.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/internal/cgoalloc/allocator.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/internal/cgoalloc/allocator.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/internal/cgoalloc/allocator.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/internal/cgoalloc/allocator.h b/vendor/github.com/apache/arrow-go/v18/arrow/memory/internal/cgoalloc/allocator.h similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/internal/cgoalloc/allocator.h rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/internal/cgoalloc/allocator.h diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/internal/cgoalloc/helpers.h b/vendor/github.com/apache/arrow-go/v18/arrow/memory/internal/cgoalloc/helpers.h similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/internal/cgoalloc/helpers.h rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/internal/cgoalloc/helpers.h diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/mallocator/doc.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/mallocator/doc.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/mallocator/doc.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/mallocator/doc.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/mallocator/mallocator.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/mallocator/mallocator.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/mallocator/mallocator.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/mallocator/mallocator.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/mallocator/mallocator_util.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/mallocator/mallocator_util.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/mallocator/mallocator_util.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/mallocator/mallocator_util.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_amd64.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_amd64.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_arm64.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_arm64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_arm64.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_avx2_amd64.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_avx2_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_avx2_amd64.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_avx2_amd64.s b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_avx2_amd64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_avx2_amd64.s rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_avx2_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_js_wasm.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_js_wasm.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_js_wasm.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_js_wasm.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_neon_arm64.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_neon_arm64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_neon_arm64.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_neon_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_neon_arm64.s b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_neon_arm64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_neon_arm64.s rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_neon_arm64.s diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_noasm.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_noasm.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_noasm.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_noasm.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_sse4_amd64.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_sse4_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_sse4_amd64.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_sse4_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_sse4_amd64.s b/vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_sse4_amd64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/memory_sse4_amd64.s rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/memory_sse4_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/memory/util.go b/vendor/github.com/apache/arrow-go/v18/arrow/memory/util.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/memory/util.go rename to vendor/github.com/apache/arrow-go/v18/arrow/memory/util.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/numeric.schema.json b/vendor/github.com/apache/arrow-go/v18/arrow/numeric.schema.json similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/numeric.schema.json rename to vendor/github.com/apache/arrow-go/v18/arrow/numeric.schema.json diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/numeric.tmpldata b/vendor/github.com/apache/arrow-go/v18/arrow/numeric.tmpldata similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/numeric.tmpldata rename to vendor/github.com/apache/arrow-go/v18/arrow/numeric.tmpldata diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/record.go b/vendor/github.com/apache/arrow-go/v18/arrow/record.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/record.go rename to vendor/github.com/apache/arrow-go/v18/arrow/record.go index a2234d03..4fd6b13c 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/record.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/record.go @@ -16,7 +16,7 @@ package arrow -import "github.com/apache/arrow/go/v17/internal/json" +import "github.com/apache/arrow-go/v18/internal/json" // Record is a collection of equal-length arrays matching a particular Schema. // Also known as a RecordBatch in the spec and in some implementations. diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/schema.go b/vendor/github.com/apache/arrow-go/v18/arrow/schema.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/schema.go rename to vendor/github.com/apache/arrow-go/v18/arrow/schema.go index bdfee7f4..65702e7b 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/schema.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/schema.go @@ -21,7 +21,7 @@ import ( "sort" "strings" - "github.com/apache/arrow/go/v17/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/endian" ) type Metadata struct { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/table.go b/vendor/github.com/apache/arrow-go/v18/arrow/table.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/table.go rename to vendor/github.com/apache/arrow-go/v18/arrow/table.go index ccf28547..6d19d9f1 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/table.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/table.go @@ -20,7 +20,7 @@ import ( "fmt" "sync/atomic" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) // Table represents a logical sequence of chunked arrays of equal length. It is @@ -49,7 +49,7 @@ type Table interface { // To get strongly typed data from a Column, you need to iterate the // chunks and type assert each individual Array. For example: // -// switch column.DataType().ID { +// switch column.DataType().ID() { // case arrow.INT32: // for _, c := range column.Data().Chunks() { // arr := c.(*array.Int32) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/tools.go b/vendor/github.com/apache/arrow-go/v18/arrow/tools.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/tools.go rename to vendor/github.com/apache/arrow-go/v18/arrow/tools.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_string.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_string.go similarity index 93% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_string.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_string.go index ee3ccb7e..6e5a943d 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_string.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_string.go @@ -51,11 +51,13 @@ func _() { _ = x[BINARY_VIEW-40] _ = x[LIST_VIEW-41] _ = x[LARGE_LIST_VIEW-42] + _ = x[DECIMAL32-43] + _ = x[DECIMAL64-44] } -const _Type_name = "NULLBOOLUINT8INT8UINT16INT16UINT32INT32UINT64INT64FLOAT16FLOAT32FLOAT64STRINGBINARYFIXED_SIZE_BINARYDATE32DATE64TIMESTAMPTIME32TIME64INTERVAL_MONTHSINTERVAL_DAY_TIMEDECIMAL128DECIMAL256LISTSTRUCTSPARSE_UNIONDENSE_UNIONDICTIONARYMAPEXTENSIONFIXED_SIZE_LISTDURATIONLARGE_STRINGLARGE_BINARYLARGE_LISTINTERVAL_MONTH_DAY_NANORUN_END_ENCODEDSTRING_VIEWBINARY_VIEWLIST_VIEWLARGE_LIST_VIEW" +const _Type_name = "NULLBOOLUINT8INT8UINT16INT16UINT32INT32UINT64INT64FLOAT16FLOAT32FLOAT64STRINGBINARYFIXED_SIZE_BINARYDATE32DATE64TIMESTAMPTIME32TIME64INTERVAL_MONTHSINTERVAL_DAY_TIMEDECIMAL128DECIMAL256LISTSTRUCTSPARSE_UNIONDENSE_UNIONDICTIONARYMAPEXTENSIONFIXED_SIZE_LISTDURATIONLARGE_STRINGLARGE_BINARYLARGE_LISTINTERVAL_MONTH_DAY_NANORUN_END_ENCODEDSTRING_VIEWBINARY_VIEWLIST_VIEWLARGE_LIST_VIEWDECIMAL32DECIMAL64" -var _Type_index = [...]uint16{0, 4, 8, 13, 17, 23, 28, 34, 39, 45, 50, 57, 64, 71, 77, 83, 100, 106, 112, 121, 127, 133, 148, 165, 175, 185, 189, 195, 207, 218, 228, 231, 240, 255, 263, 275, 287, 297, 320, 335, 346, 357, 366, 381} +var _Type_index = [...]uint16{0, 4, 8, 13, 17, 23, 28, 34, 39, 45, 50, 57, 64, 71, 77, 83, 100, 106, 112, 121, 127, 133, 148, 165, 175, 185, 189, 195, 207, 218, 228, 231, 240, 255, 263, 275, 287, 297, 320, 335, 346, 357, 366, 381, 390, 399} func (i Type) String() string { if i < 0 || i >= Type(len(_Type_index)-1) { diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits.go index e8e7cf17..7185ef25 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits.go @@ -20,9 +20,8 @@ import ( "reflect" "unsafe" - "github.com/apache/arrow/go/v17/arrow/decimal128" - "github.com/apache/arrow/go/v17/arrow/decimal256" - "github.com/apache/arrow/go/v17/arrow/float16" + "github.com/apache/arrow-go/v18/arrow/decimal" + "github.com/apache/arrow-go/v18/arrow/float16" "golang.org/x/exp/constraints" ) @@ -68,7 +67,7 @@ type NumericType interface { // as a bitmap and thus the buffer can't be just reinterpreted as a []bool type FixedWidthType interface { IntType | UintType | - FloatType | decimal128.Num | decimal256.Num | + FloatType | decimal.DecimalTypes | DayTimeInterval | MonthDayNanoInterval } diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_boolean.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_boolean.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_boolean.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_boolean.go index 9bdc0b82..98d27330 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_boolean.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_boolean.go @@ -17,7 +17,7 @@ package arrow import ( - "github.com/apache/arrow/go/v17/arrow/bitutil" + "github.com/apache/arrow-go/v18/arrow/bitutil" ) type booleanTraits struct{} diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_decimal128.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal128.go similarity index 76% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_decimal128.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal128.go index 604c5be3..6e416cd6 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_decimal128.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal128.go @@ -19,8 +19,8 @@ package arrow import ( "unsafe" - "github.com/apache/arrow/go/v17/arrow/decimal128" - "github.com/apache/arrow/go/v17/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/decimal" + "github.com/apache/arrow-go/v18/arrow/endian" ) // Decimal128 traits @@ -28,7 +28,7 @@ var Decimal128Traits decimal128Traits const ( // Decimal128SizeBytes specifies the number of bytes required to store a single decimal128 in memory - Decimal128SizeBytes = int(unsafe.Sizeof(decimal128.Num{})) + Decimal128SizeBytes = int(unsafe.Sizeof(decimal.Decimal128{})) ) type decimal128Traits struct{} @@ -37,7 +37,7 @@ type decimal128Traits struct{} func (decimal128Traits) BytesRequired(n int) int { return Decimal128SizeBytes * n } // PutValue -func (decimal128Traits) PutValue(b []byte, v decimal128.Num) { +func (decimal128Traits) PutValue(b []byte, v decimal.Decimal128) { endian.Native.PutUint64(b[:8], uint64(v.LowBits())) endian.Native.PutUint64(b[8:], uint64(v.HighBits())) } @@ -45,14 +45,14 @@ func (decimal128Traits) PutValue(b []byte, v decimal128.Num) { // CastFromBytes reinterprets the slice b to a slice of type uint16. // // NOTE: len(b) must be a multiple of Uint16SizeBytes. -func (decimal128Traits) CastFromBytes(b []byte) []decimal128.Num { - return GetData[decimal128.Num](b) +func (decimal128Traits) CastFromBytes(b []byte) []decimal.Decimal128 { + return GetData[decimal.Decimal128](b) } // CastToBytes reinterprets the slice b to a slice of bytes. -func (decimal128Traits) CastToBytes(b []decimal128.Num) []byte { +func (decimal128Traits) CastToBytes(b []decimal.Decimal128) []byte { return GetBytes(b) } // Copy copies src to dst. -func (decimal128Traits) Copy(dst, src []decimal128.Num) { copy(dst, src) } +func (decimal128Traits) Copy(dst, src []decimal.Decimal128) { copy(dst, src) } diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_decimal256.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal256.go similarity index 71% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_decimal256.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal256.go index de4d931f..b196c2e7 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_decimal256.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal256.go @@ -19,22 +19,22 @@ package arrow import ( "unsafe" - "github.com/apache/arrow/go/v17/arrow/decimal256" - "github.com/apache/arrow/go/v17/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/decimal" + "github.com/apache/arrow-go/v18/arrow/endian" ) // Decimal256 traits var Decimal256Traits decimal256Traits const ( - Decimal256SizeBytes = int(unsafe.Sizeof(decimal256.Num{})) + Decimal256SizeBytes = int(unsafe.Sizeof(decimal.Decimal256{})) ) type decimal256Traits struct{} func (decimal256Traits) BytesRequired(n int) int { return Decimal256SizeBytes * n } -func (decimal256Traits) PutValue(b []byte, v decimal256.Num) { +func (decimal256Traits) PutValue(b []byte, v decimal.Decimal256) { for i, a := range v.Array() { start := i * 8 endian.Native.PutUint64(b[start:], a) @@ -42,12 +42,12 @@ func (decimal256Traits) PutValue(b []byte, v decimal256.Num) { } // CastFromBytes reinterprets the slice b to a slice of decimal256 -func (decimal256Traits) CastFromBytes(b []byte) []decimal256.Num { - return GetData[decimal256.Num](b) +func (decimal256Traits) CastFromBytes(b []byte) []decimal.Decimal256 { + return GetData[decimal.Decimal256](b) } -func (decimal256Traits) CastToBytes(b []decimal256.Num) []byte { +func (decimal256Traits) CastToBytes(b []decimal.Decimal256) []byte { return GetBytes(b) } -func (decimal256Traits) Copy(dst, src []decimal256.Num) { copy(dst, src) } +func (decimal256Traits) Copy(dst, src []decimal.Decimal256) { copy(dst, src) } diff --git a/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal32.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal32.go new file mode 100644 index 00000000..ebca65f6 --- /dev/null +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal32.go @@ -0,0 +1,57 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.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 arrow + +import ( + "unsafe" + + "github.com/apache/arrow-go/v18/arrow/decimal" + "github.com/apache/arrow-go/v18/arrow/endian" +) + +// Decimal32 traits +var Decimal32Traits decimal32Traits + +const ( + // Decimal32SizeBytes specifies the number of bytes required to store a single decimal32 in memory + Decimal32SizeBytes = int(unsafe.Sizeof(decimal.Decimal32(0))) +) + +type decimal32Traits struct{} + +// BytesRequired returns the number of bytes required to store n elements in memory. +func (decimal32Traits) BytesRequired(n int) int { return Decimal32SizeBytes * n } + +// PutValue +func (decimal32Traits) PutValue(b []byte, v decimal.Decimal32) { + endian.Native.PutUint32(b[:4], uint32(v)) +} + +// CastFromBytes reinterprets the slice b to a slice of type uint16. +// +// NOTE: len(b) must be a multiple of Uint16SizeBytes. +func (decimal32Traits) CastFromBytes(b []byte) []decimal.Decimal32 { + return GetData[decimal.Decimal32](b) +} + +// CastToBytes reinterprets the slice b to a slice of bytes. +func (decimal32Traits) CastToBytes(b []decimal.Decimal32) []byte { + return GetBytes(b) +} + +// Copy copies src to dst. +func (decimal32Traits) Copy(dst, src []decimal.Decimal32) { copy(dst, src) } diff --git a/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal64.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal64.go new file mode 100644 index 00000000..bd07883a --- /dev/null +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_decimal64.go @@ -0,0 +1,57 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.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 arrow + +import ( + "unsafe" + + "github.com/apache/arrow-go/v18/arrow/decimal" + "github.com/apache/arrow-go/v18/arrow/endian" +) + +// Decimal64 traits +var Decimal64Traits decimal64Traits + +const ( + // Decimal64SizeBytes specifies the number of bytes required to store a single decimal64 in memory + Decimal64SizeBytes = int(unsafe.Sizeof(decimal.Decimal64(0))) +) + +type decimal64Traits struct{} + +// BytesRequired returns the number of bytes required to store n elements in memory. +func (decimal64Traits) BytesRequired(n int) int { return Decimal64SizeBytes * n } + +// PutValue +func (decimal64Traits) PutValue(b []byte, v decimal.Decimal64) { + endian.Native.PutUint64(b[:8], uint64(v)) +} + +// CastFromBytes reinterprets the slice b to a slice of type uint16. +// +// NOTE: len(b) must be a multiple of Uint16SizeBytes. +func (decimal64Traits) CastFromBytes(b []byte) []decimal.Decimal64 { + return GetData[decimal.Decimal64](b) +} + +// CastToBytes reinterprets the slice b to a slice of bytes. +func (decimal64Traits) CastToBytes(b []decimal.Decimal64) []byte { + return GetBytes(b) +} + +// Copy copies src to dst. +func (decimal64Traits) Copy(dst, src []decimal.Decimal64) { copy(dst, src) } diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_float16.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_float16.go similarity index 95% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_float16.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_float16.go index 46ab2b8f..aaba28ad 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_float16.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_float16.go @@ -19,8 +19,8 @@ package arrow import ( "unsafe" - "github.com/apache/arrow/go/v17/arrow/endian" - "github.com/apache/arrow/go/v17/arrow/float16" + "github.com/apache/arrow-go/v18/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/float16" ) // Float16 traits diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_interval.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_interval.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_interval.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_interval.go index 48ae7eb3..149683c8 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_interval.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_interval.go @@ -19,8 +19,8 @@ package arrow import ( "unsafe" - "github.com/apache/arrow/go/v17/arrow/endian" - "github.com/apache/arrow/go/v17/arrow/internal/debug" + "github.com/apache/arrow-go/v18/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/internal/debug" ) var ( diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_numeric.gen.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_numeric.gen.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_numeric.gen.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_numeric.gen.go index bf20dc99..e88b61bf 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_numeric.gen.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_numeric.gen.go @@ -22,7 +22,7 @@ import ( "math" "unsafe" - "github.com/apache/arrow/go/v17/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/endian" ) var ( diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_numeric.gen.go.tmpl b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_numeric.gen.go.tmpl similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_numeric.gen.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_numeric.gen.go.tmpl index 9e5c68a2..dd72a5b4 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_numeric.gen.go.tmpl +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_numeric.gen.go.tmpl @@ -20,7 +20,7 @@ import ( "math" "unsafe" - "github.com/apache/arrow/go/v17/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/endian" ) var ( diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_numeric.gen_test.go.tmpl b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_numeric.gen_test.go.tmpl similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_numeric.gen_test.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_numeric.gen_test.go.tmpl index 440f240a..b3796915 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_numeric.gen_test.go.tmpl +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_numeric.gen_test.go.tmpl @@ -20,7 +20,7 @@ import ( "reflect" "testing" - "github.com/apache/arrow/go/v17/arrow" + "github.com/apache/arrow-go/v18/arrow" ) {{- range .In}} diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_timestamp.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_timestamp.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_timestamp.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_timestamp.go index 09ef09d8..d8149c86 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_timestamp.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_timestamp.go @@ -19,7 +19,7 @@ package arrow import ( "unsafe" - "github.com/apache/arrow/go/v17/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/endian" ) var TimestampTraits timestampTraits diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_view.go b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_view.go similarity index 96% rename from vendor/github.com/apache/arrow/go/v17/arrow/type_traits_view.go rename to vendor/github.com/apache/arrow-go/v18/arrow/type_traits_view.go index 36c83f01..7603a323 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/type_traits_view.go +++ b/vendor/github.com/apache/arrow-go/v18/arrow/type_traits_view.go @@ -19,7 +19,7 @@ package arrow import ( "unsafe" - "github.com/apache/arrow/go/v17/arrow/endian" + "github.com/apache/arrow-go/v18/arrow/endian" ) var ViewHeaderTraits viewHeaderTraits diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/unionmode_string.go b/vendor/github.com/apache/arrow-go/v18/arrow/unionmode_string.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/arrow/unionmode_string.go rename to vendor/github.com/apache/arrow-go/v18/arrow/unionmode_string.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/bitutils/bit_block_counter.go b/vendor/github.com/apache/arrow-go/v18/internal/bitutils/bit_block_counter.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/internal/bitutils/bit_block_counter.go rename to vendor/github.com/apache/arrow-go/v18/internal/bitutils/bit_block_counter.go index 677c497c..43b2fbb2 100644 --- a/vendor/github.com/apache/arrow/go/v17/internal/bitutils/bit_block_counter.go +++ b/vendor/github.com/apache/arrow-go/v18/internal/bitutils/bit_block_counter.go @@ -21,8 +21,8 @@ import ( "math/bits" "unsafe" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/internal/utils" ) func loadWord(byt []byte) uint64 { diff --git a/vendor/github.com/apache/arrow/go/v17/internal/bitutils/bit_run_reader.go b/vendor/github.com/apache/arrow-go/v18/internal/bitutils/bit_run_reader.go similarity index 97% rename from vendor/github.com/apache/arrow/go/v17/internal/bitutils/bit_run_reader.go rename to vendor/github.com/apache/arrow-go/v18/internal/bitutils/bit_run_reader.go index aaba0bed..0d83f8fb 100644 --- a/vendor/github.com/apache/arrow/go/v17/internal/bitutils/bit_run_reader.go +++ b/vendor/github.com/apache/arrow-go/v18/internal/bitutils/bit_run_reader.go @@ -22,9 +22,9 @@ import ( "math/bits" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/internal/utils" ) // BitRun represents a run of bits with the same value of length Len diff --git a/vendor/github.com/apache/arrow/go/v17/internal/bitutils/bit_set_run_reader.go b/vendor/github.com/apache/arrow-go/v18/internal/bitutils/bit_set_run_reader.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/internal/bitutils/bit_set_run_reader.go rename to vendor/github.com/apache/arrow-go/v18/internal/bitutils/bit_set_run_reader.go index f84d7d97..d32dec9c 100644 --- a/vendor/github.com/apache/arrow/go/v17/internal/bitutils/bit_set_run_reader.go +++ b/vendor/github.com/apache/arrow-go/v18/internal/bitutils/bit_set_run_reader.go @@ -20,8 +20,8 @@ import ( "encoding/binary" "math/bits" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/internal/utils" ) // IsMultipleOf64 returns whether v is a multiple of 64. diff --git a/vendor/github.com/apache/arrow/go/v17/internal/bitutils/bitmap_generate.go b/vendor/github.com/apache/arrow-go/v18/internal/bitutils/bitmap_generate.go similarity index 98% rename from vendor/github.com/apache/arrow/go/v17/internal/bitutils/bitmap_generate.go rename to vendor/github.com/apache/arrow-go/v18/internal/bitutils/bitmap_generate.go index 1871b957..178751d7 100644 --- a/vendor/github.com/apache/arrow/go/v17/internal/bitutils/bitmap_generate.go +++ b/vendor/github.com/apache/arrow-go/v18/internal/bitutils/bitmap_generate.go @@ -16,7 +16,7 @@ package bitutils -import "github.com/apache/arrow/go/v17/arrow/bitutil" +import "github.com/apache/arrow-go/v18/arrow/bitutil" // GenerateBits writes sequential bits to a bitmap. Bits preceding the // initial start offset are preserved, bits following the bitmap may diff --git a/vendor/github.com/apache/arrow/go/v17/internal/hashing/hash_funcs.go b/vendor/github.com/apache/arrow-go/v18/internal/hashing/hash_funcs.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/hashing/hash_funcs.go rename to vendor/github.com/apache/arrow-go/v18/internal/hashing/hash_funcs.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/hashing/hash_string.go b/vendor/github.com/apache/arrow-go/v18/internal/hashing/hash_string.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/hashing/hash_string.go rename to vendor/github.com/apache/arrow-go/v18/internal/hashing/hash_string.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/hashing/types.tmpldata b/vendor/github.com/apache/arrow-go/v18/internal/hashing/types.tmpldata similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/hashing/types.tmpldata rename to vendor/github.com/apache/arrow-go/v18/internal/hashing/types.tmpldata diff --git a/vendor/github.com/apache/arrow/go/v17/internal/hashing/xxh3_memo_table.gen.go b/vendor/github.com/apache/arrow-go/v18/internal/hashing/xxh3_memo_table.gen.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/internal/hashing/xxh3_memo_table.gen.go rename to vendor/github.com/apache/arrow-go/v18/internal/hashing/xxh3_memo_table.gen.go index 47626d31..e99a4f8f 100644 --- a/vendor/github.com/apache/arrow/go/v17/internal/hashing/xxh3_memo_table.gen.go +++ b/vendor/github.com/apache/arrow-go/v18/internal/hashing/xxh3_memo_table.gen.go @@ -21,9 +21,9 @@ package hashing import ( "math" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/internal/utils" ) type payloadInt8 struct { diff --git a/vendor/github.com/apache/arrow/go/v17/internal/hashing/xxh3_memo_table.gen.go.tmpl b/vendor/github.com/apache/arrow-go/v18/internal/hashing/xxh3_memo_table.gen.go.tmpl similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/internal/hashing/xxh3_memo_table.gen.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/internal/hashing/xxh3_memo_table.gen.go.tmpl index 34fd2524..9ba35c72 100644 --- a/vendor/github.com/apache/arrow/go/v17/internal/hashing/xxh3_memo_table.gen.go.tmpl +++ b/vendor/github.com/apache/arrow-go/v18/internal/hashing/xxh3_memo_table.gen.go.tmpl @@ -17,8 +17,8 @@ package hashing import ( - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/internal/utils" + "github.com/apache/arrow-go/v18/arrow/bitutil" + "github.com/apache/arrow-go/v18/internal/utils" ) {{range .In}} diff --git a/vendor/github.com/apache/arrow/go/v17/internal/hashing/xxh3_memo_table.go b/vendor/github.com/apache/arrow-go/v18/internal/hashing/xxh3_memo_table.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/hashing/xxh3_memo_table.go rename to vendor/github.com/apache/arrow-go/v18/internal/hashing/xxh3_memo_table.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/json/json.go b/vendor/github.com/apache/arrow-go/v18/internal/json/json.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/json/json.go rename to vendor/github.com/apache/arrow-go/v18/internal/json/json.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/json/json_tinygo.go b/vendor/github.com/apache/arrow-go/v18/internal/json/json_tinygo.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/json/json_tinygo.go rename to vendor/github.com/apache/arrow-go/v18/internal/json/json_tinygo.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/Makefile b/vendor/github.com/apache/arrow-go/v18/internal/utils/Makefile similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/Makefile rename to vendor/github.com/apache/arrow-go/v18/internal/utils/Makefile diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/buf_reader.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/buf_reader.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/buf_reader.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/buf_reader.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/endians_default.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/endians_default.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/endians_default.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/endians_default.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/endians_s390x.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/endians_s390x.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/endians_s390x.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/endians_s390x.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/math.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/math.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/math.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/math.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_amd64.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_amd64.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_arm64.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_arm64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_arm64.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_avx2_amd64.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_avx2_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_avx2_amd64.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_avx2_amd64.s b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_avx2_amd64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_avx2_amd64.s rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_avx2_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_neon_arm64.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_neon_arm64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_neon_arm64.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_neon_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_neon_arm64.s b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_neon_arm64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_neon_arm64.s rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_neon_arm64.s diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_noasm.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_noasm.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_noasm.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_noasm.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_ppc64le.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_ppc64le.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_ppc64le.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_ppc64le.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_s390x.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_s390x.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_s390x.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_s390x.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_sse4_amd64.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_sse4_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_sse4_amd64.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_sse4_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_sse4_amd64.s b/vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_sse4_amd64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/min_max_sse4_amd64.s rename to vendor/github.com/apache/arrow-go/v18/internal/utils/min_max_sse4_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/recovery.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/recovery.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/recovery.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/recovery.go diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/extension_builder.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/ref_count.go similarity index 71% rename from vendor/github.com/apache/arrow/go/v17/arrow/array/extension_builder.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/ref_count.go index a71287fa..9b85f75b 100644 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/extension_builder.go +++ b/vendor/github.com/apache/arrow-go/v18/internal/utils/ref_count.go @@ -14,10 +14,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -package array +package utils -// ExtensionBuilderWrapper is an interface that you need to implement in your custom extension type if you want to provide a customer builder as well. -// See example in ./arrow/internal/testing/types/extension_types.go -type ExtensionBuilderWrapper interface { - NewBuilder(bldr *ExtensionBuilder) Builder +import "sync/atomic" + +// NewRefCount creates a new atomic counter set to the specified initial value. +func NewRefCount(initial int64) *atomic.Int64 { + var val atomic.Int64 + val.Store(initial) + return &val } diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints.go.tmpl b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints.go.tmpl similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints.tmpldata b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints.tmpldata similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints.tmpldata rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints.tmpldata diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_amd64.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_amd64.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_amd64.go.tmpl b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_amd64.go.tmpl similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_amd64.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_amd64.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_arm64.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_arm64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_arm64.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_avx2_amd64.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_avx2_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_avx2_amd64.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_avx2_amd64.s b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_avx2_amd64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_avx2_amd64.s rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_avx2_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_def.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_def.go similarity index 99% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_def.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_def.go index 83f0a256..05a9e5b6 100644 --- a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_def.go +++ b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_def.go @@ -19,7 +19,7 @@ package utils import ( "errors" - "github.com/apache/arrow/go/v17/arrow" + "github.com/apache/arrow-go/v18/arrow" ) //go:generate go run ../../arrow/_tools/tmpl -i -data=transpose_ints.tmpldata -d arch=avx2 transpose_ints_simd.go.tmpl=transpose_ints_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_noasm.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_noasm.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_noasm.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_noasm.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_noasm.go.tmpl b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_noasm.go.tmpl similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_noasm.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_noasm.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_ppc64le.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_ppc64le.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_ppc64le.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_ppc64le.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_s390x.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_s390x.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_s390x.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_s390x.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_s390x.go.tmpl b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_s390x.go.tmpl similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_s390x.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_s390x.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_simd.go.tmpl b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_simd.go.tmpl similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_simd.go.tmpl rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_simd.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_sse4_amd64.go b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_sse4_amd64.go similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_sse4_amd64.go rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_sse4_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_sse4_amd64.s b/vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_sse4_amd64.s similarity index 100% rename from vendor/github.com/apache/arrow/go/v17/internal/utils/transpose_ints_sse4_amd64.s rename to vendor/github.com/apache/arrow-go/v18/internal/utils/transpose_ints_sse4_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v17/LICENSE.txt b/vendor/github.com/apache/arrow/go/v17/LICENSE.txt deleted file mode 100644 index 57310329..00000000 --- a/vendor/github.com/apache/arrow/go/v17/LICENSE.txt +++ /dev/null @@ -1,1791 +0,0 @@ - - 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. - --------------------------------------------------------------------------------- - -src/arrow/util (some portions): Apache 2.0, and 3-clause BSD - -Some portions of this module are derived from code in the Chromium project, -copyright (c) Google inc and (c) The Chromium Authors and licensed under the -Apache 2.0 License or the under the 3-clause BSD license: - - Copyright (c) 2013 The Chromium Authors. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - -This project includes code from Daniel Lemire's FrameOfReference project. - -https://github.com/lemire/FrameOfReference/blob/6ccaf9e97160f9a3b299e23a8ef739e711ef0c71/src/bpacking.cpp - -Copyright: 2013 Daniel Lemire -Home page: http://lemire.me/en/ -Project page: https://github.com/lemire/FrameOfReference -License: Apache License Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 - --------------------------------------------------------------------------------- - -This project includes code from the TensorFlow project - -Copyright 2015 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -This project includes code from the NumPy project. - -https://github.com/numpy/numpy/blob/e1f191c46f2eebd6cb892a4bfe14d9dd43a06c4e/numpy/core/src/multiarray/multiarraymodule.c#L2910 - -https://github.com/numpy/numpy/blob/68fd82271b9ea5a9e50d4e761061dfcca851382a/numpy/core/src/multiarray/datetime.c - -Copyright (c) 2005-2017, NumPy Developers. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the NumPy Developers nor the names of any - 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. - --------------------------------------------------------------------------------- - -This project includes code from the Boost project - -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -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, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -This project includes code from the FlatBuffers project - -Copyright 2014 Google Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -This project includes code from the tslib project - -Copyright 2015 Microsoft Corporation. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -This project includes code from the jemalloc project - -https://github.com/jemalloc/jemalloc - -Copyright (C) 2002-2017 Jason Evans . -All rights reserved. -Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved. -Copyright (C) 2009-2017 Facebook, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice(s), - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice(s), - 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 HOLDER(S) ``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(S) 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. --------------------------------------------------------------------------------- - -This project includes code from the Go project, BSD 3-clause license + PATENTS -weak patent termination clause -(https://github.com/golang/go/blob/master/PATENTS). - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - -This project includes code from the hs2client - -https://github.com/cloudera/hs2client - -Copyright 2016 Cloudera Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -The script ci/scripts/util_wait_for_it.sh has the following license - -Copyright (c) 2016 Giles Hall - -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. - --------------------------------------------------------------------------------- - -The script r/configure has the following license (MIT) - -Copyright (c) 2017, Jeroen Ooms and Jim Hester - -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. - --------------------------------------------------------------------------------- - -cpp/src/arrow/util/logging.cc, cpp/src/arrow/util/logging.h and -cpp/src/arrow/util/logging-test.cc are adapted from -Ray Project (https://github.com/ray-project/ray) (Apache 2.0). - -Copyright (c) 2016 Ray Project (https://github.com/ray-project/ray) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- -The files cpp/src/arrow/vendored/datetime/date.h, cpp/src/arrow/vendored/datetime/tz.h, -cpp/src/arrow/vendored/datetime/tz_private.h, cpp/src/arrow/vendored/datetime/ios.h, -cpp/src/arrow/vendored/datetime/ios.mm, -cpp/src/arrow/vendored/datetime/tz.cpp are adapted from -Howard Hinnant's date library (https://github.com/HowardHinnant/date) -It is licensed under MIT license. - -The MIT License (MIT) -Copyright (c) 2015, 2016, 2017 Howard Hinnant -Copyright (c) 2016 Adrian Colomitchi -Copyright (c) 2017 Florian Dang -Copyright (c) 2017 Paul Thompson -Copyright (c) 2018 Tomasz Kamiński - -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. - --------------------------------------------------------------------------------- - -The file cpp/src/arrow/util/utf8.h includes code adapted from the page - https://bjoern.hoehrmann.de/utf-8/decoder/dfa/ -with the following license (MIT) - -Copyright (c) 2008-2009 Bjoern Hoehrmann - -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. - --------------------------------------------------------------------------------- - -The file cpp/src/arrow/vendored/string_view.hpp has the following license - -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -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, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/xxhash/ have the following license -(BSD 2-Clause License) - -xxHash Library -Copyright (c) 2012-2014, Yann Collet -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. - -You can contact the author at : -- xxHash homepage: http://www.xxhash.com -- xxHash source repository : https://github.com/Cyan4973/xxHash - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/double-conversion/ have the following license -(BSD 3-Clause License) - -Copyright 2006-2011, the V8 project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/uriparser/ have the following license -(BSD 3-Clause License) - -uriparser - RFC 3986 URI parsing library - -Copyright (C) 2007, Weijia Song -Copyright (C) 2007, Sebastian Pipping -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - * Neither the name of the 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. - --------------------------------------------------------------------------------- - -The files under dev/tasks/conda-recipes have the following license - -BSD 3-clause license -Copyright (c) 2015-2018, conda-forge -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the copyright holder 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 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. - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/utf8cpp/ have the following license - -Copyright 2006 Nemanja Trifunovic - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -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, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -This project includes code from Apache Kudu. - - * cpp/cmake_modules/CompilerInfo.cmake is based on Kudu's cmake_modules/CompilerInfo.cmake - -Copyright: 2016 The Apache Software Foundation. -Home page: https://kudu.apache.org/ -License: http://www.apache.org/licenses/LICENSE-2.0 - --------------------------------------------------------------------------------- - -This project includes code from Apache Impala (incubating), formerly -Impala. The Impala code and rights were donated to the ASF as part of the -Incubator process after the initial code imports into Apache Parquet. - -Copyright: 2012 Cloudera, Inc. -Copyright: 2016 The Apache Software Foundation. -Home page: http://impala.apache.org/ -License: http://www.apache.org/licenses/LICENSE-2.0 - --------------------------------------------------------------------------------- - -This project includes code from Apache Aurora. - -* dev/release/{release,changelog,release-candidate} are based on the scripts from - Apache Aurora - -Copyright: 2016 The Apache Software Foundation. -Home page: https://aurora.apache.org/ -License: http://www.apache.org/licenses/LICENSE-2.0 - --------------------------------------------------------------------------------- - -This project includes code from the Google styleguide. - -* cpp/build-support/cpplint.py is based on the scripts from the Google styleguide. - -Copyright: 2009 Google Inc. All rights reserved. -Homepage: https://github.com/google/styleguide -License: 3-clause BSD - --------------------------------------------------------------------------------- - -This project includes code from Snappy. - -* cpp/cmake_modules/{SnappyCMakeLists.txt,SnappyConfig.h} are based on code - from Google's Snappy project. - -Copyright: 2009 Google Inc. All rights reserved. -Homepage: https://github.com/google/snappy -License: 3-clause BSD - --------------------------------------------------------------------------------- - -This project includes code from the manylinux project. - -* python/manylinux1/scripts/{build_python.sh,python-tag-abi-tag.py, - requirements.txt} are based on code from the manylinux project. - -Copyright: 2016 manylinux -Homepage: https://github.com/pypa/manylinux -License: The MIT License (MIT) - --------------------------------------------------------------------------------- - -This project includes code from the cymove project: - -* python/pyarrow/includes/common.pxd includes code from the cymove project - -The MIT License (MIT) -Copyright (c) 2019 Omer Ozarslan - -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. - --------------------------------------------------------------------------------- - -The projects includes code from the Ursabot project under the dev/archery -directory. - -License: BSD 2-Clause - -Copyright 2019 RStudio, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. 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. - --------------------------------------------------------------------------------- - -This project include code from CMake. - -* cpp/cmake_modules/FindGTest.cmake is based on code from CMake. - -Copyright: Copyright 2000-2019 Kitware, Inc. and Contributors -Homepage: https://gitlab.kitware.com/cmake/cmake -License: 3-clause BSD - --------------------------------------------------------------------------------- - -This project include code from mingw-w64. - -* cpp/src/arrow/util/cpu-info.cc has a polyfill for mingw-w64 < 5 - -Copyright (c) 2009 - 2013 by the mingw-w64 project -Homepage: https://mingw-w64.org -License: Zope Public License (ZPL) Version 2.1. - ---------------------------------------------------------------------------------- - -This project include code from Google's Asylo project. - -* cpp/src/arrow/result.h is based on status_or.h - -Copyright (c) Copyright 2017 Asylo authors -Homepage: https://asylo.dev/ -License: Apache 2.0 - --------------------------------------------------------------------------------- - -This project includes code from Google's protobuf project - -* cpp/src/arrow/result.h ARROW_ASSIGN_OR_RAISE is based off ASSIGN_OR_RETURN - -Copyright 2008 Google Inc. All rights reserved. -Homepage: https://developers.google.com/protocol-buffers/ -License: - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - --------------------------------------------------------------------------------- - -3rdparty dependency LLVM is statically linked in certain binary distributions. -Additionally some sections of source code have been derived from sources in LLVM -and have been clearly labeled as such. LLVM has the following license: - -============================================================================== -LLVM Release License -============================================================================== -University of Illinois/NCSA -Open Source License - -Copyright (c) 2003-2018 University of Illinois at Urbana-Champaign. -All rights reserved. - -Developed by: - - LLVM Team - - University of Illinois at Urbana-Champaign - - http://llvm.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -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: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. - -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 -CONTRIBUTORS 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 WITH THE -SOFTWARE. - -============================================================================== -Copyrights and Licenses for Third Party Software Distributed with LLVM: -============================================================================== -The LLVM software contains code written by third parties. Such software will -have its own individual LICENSE.TXT file in the directory in which it appears. -This file will describe the copyrights, license, and restrictions which apply -to that code. - -The disclaimer of warranty in the University of Illinois Open Source License -applies to all code in the LLVM Distribution, and nothing in any of the -other licenses gives permission to use the names of the LLVM Team or the -University of Illinois to endorse or promote products derived from this -Software. - -The following pieces of software have additional or alternate copyrights, -licenses, and/or restrictions: - -Program Directory -------- --------- -Google Test llvm/utils/unittest/googletest -OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} -pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} -ARM contributions llvm/lib/Target/ARM/LICENSE.TXT -md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h - --------------------------------------------------------------------------------- - -3rdparty dependency gRPC is statically linked in certain binary -distributions, like the python wheels. gRPC has the following license: - -Copyright 2014 gRPC authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -3rdparty dependency Apache Thrift is statically linked in certain binary -distributions, like the python wheels. Apache Thrift has the following license: - -Apache Thrift -Copyright (C) 2006 - 2019, The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -Licensed under the Apache License, Version 2.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. - --------------------------------------------------------------------------------- - -3rdparty dependency Apache ORC is statically linked in certain binary -distributions, like the python wheels. Apache ORC has the following license: - -Apache ORC -Copyright 2013-2019 The Apache Software Foundation - -This product includes software developed by The Apache Software -Foundation (http://www.apache.org/). - -This product includes software developed by Hewlett-Packard: -(c) Copyright [2014-2015] Hewlett-Packard Development Company, L.P - -Licensed under the Apache License, Version 2.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. - --------------------------------------------------------------------------------- - -3rdparty dependency zstd is statically linked in certain binary -distributions, like the python wheels. ZSTD has the following license: - -BSD License - -For Zstandard software - -Copyright (c) 2016-present, Facebook, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook 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 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. - --------------------------------------------------------------------------------- - -3rdparty dependency lz4 is statically linked in certain binary -distributions, like the python wheels. lz4 has the following license: - -LZ4 Library -Copyright (c) 2011-2016, Yann Collet -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. - --------------------------------------------------------------------------------- - -3rdparty dependency Brotli is statically linked in certain binary -distributions, like the python wheels. Brotli has the following license: - -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. - -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. - --------------------------------------------------------------------------------- - -3rdparty dependency snappy is statically linked in certain binary -distributions, like the python wheels. snappy has the following license: - -Copyright 2011, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -=== - -Some of the benchmark data in testdata/ is licensed differently: - - - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and - is licensed under the Creative Commons Attribution 3.0 license - (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/ - for more information. - - - kppkn.gtb is taken from the Gaviota chess tablebase set, and - is licensed under the MIT License. See - https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1 - for more information. - - - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper - “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA - Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro, - which is licensed under the CC-BY license. See - http://www.ploscompbiol.org/static/license for more ifnormation. - - - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project - Gutenberg. The first three have expired copyrights and are in the public - domain; the latter does not have expired copyright, but is still in the - public domain according to the license information - (http://www.gutenberg.org/ebooks/53). - --------------------------------------------------------------------------------- - -3rdparty dependency gflags is statically linked in certain binary -distributions, like the python wheels. gflags has the following license: - -Copyright (c) 2006, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - -3rdparty dependency glog is statically linked in certain binary -distributions, like the python wheels. glog has the following license: - -Copyright (c) 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -A function gettimeofday in utilities.cc is based on - -http://www.google.com/codesearch/p?hl=en#dR3YEbitojA/COPYING&q=GetSystemTimeAsFileTime%20license:bsd - -The license of this code is: - -Copyright (c) 2003-2008, Jouni Malinen and contributors -All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name(s) of the above-listed copyright holder(s) 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. - --------------------------------------------------------------------------------- - -3rdparty dependency re2 is statically linked in certain binary -distributions, like the python wheels. re2 has the following license: - -Copyright (c) 2009 The RE2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - -3rdparty dependency c-ares is statically linked in certain binary -distributions, like the python wheels. c-ares has the following license: - -# c-ares license - -Copyright (c) 2007 - 2018, Daniel Stenberg with many contributors, see AUTHORS -file. - -Copyright 1998 by the Massachusetts Institute of Technology. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, provided that -the above copyright notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting documentation, and that -the name of M.I.T. not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior permission. -M.I.T. makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - --------------------------------------------------------------------------------- - -3rdparty dependency zlib is redistributed as a dynamically linked shared -library in certain binary distributions, like the python wheels. In the future -this will likely change to static linkage. zlib has the following license: - -zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.11, January 15th, 2017 - - Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - --------------------------------------------------------------------------------- - -3rdparty dependency openssl is redistributed as a dynamically linked shared -library in certain binary distributions, like the python wheels. openssl -preceding version 3 has the following license: - - LICENSE ISSUES - ============== - - The OpenSSL toolkit stays under a double license, i.e. both the conditions of - the OpenSSL License and the original SSLeay license apply to the toolkit. - See below for the actual license texts. - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2019 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. 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. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 OpenSSL PROJECT OR - * ITS 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. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - --------------------------------------------------------------------------------- - -This project includes code from the rtools-backports project. - -* ci/scripts/PKGBUILD and ci/scripts/r_windows_build.sh are based on code - from the rtools-backports project. - -Copyright: Copyright (c) 2013 - 2019, Алексей and Jeroen Ooms. -All rights reserved. -Homepage: https://github.com/r-windows/rtools-backports -License: 3-clause BSD - --------------------------------------------------------------------------------- - -Some code from pandas has been adapted for the pyarrow codebase. pandas is -available under the 3-clause BSD license, which follows: - -pandas license -============== - -Copyright (c) 2011-2012, Lambda Foundry, Inc. and PyData Development Team -All rights reserved. - -Copyright (c) 2008-2011 AQR Capital Management, LLC -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the copyright holder nor the names of any - 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 HOLDER 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. - --------------------------------------------------------------------------------- - -Some bits from DyND, in particular aspects of the build system, have been -adapted from libdynd and dynd-python under the terms of the BSD 2-clause -license - -The BSD 2-Clause License - - Copyright (C) 2011-12, Dynamic NDArray Developers - 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 - 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. - -Dynamic NDArray Developers list: - - * Mark Wiebe - * Continuum Analytics - --------------------------------------------------------------------------------- - -Some source code from Ibis (https://github.com/cloudera/ibis) has been adapted -for PyArrow. Ibis is released under the Apache License, Version 2.0. - --------------------------------------------------------------------------------- - -dev/tasks/homebrew-formulae/apache-arrow.rb has the following license: - -BSD 2-Clause License - -Copyright (c) 2009-present, Homebrew contributors -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. - ----------------------------------------------------------------------- - -cpp/src/arrow/vendored/base64.cpp has the following license - -ZLIB License - -Copyright (C) 2004-2017 René Nyffenegger - -This source code is provided 'as-is', without any express or implied -warranty. In no event will the author be held liable for any damages arising -from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject to -the following restrictions: - -1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - -3. This notice may not be removed or altered from any source distribution. - -René Nyffenegger rene.nyffenegger@adp-gmbh.ch - --------------------------------------------------------------------------------- - -The file cpp/src/arrow/vendored/optional.hpp has the following license - -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -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, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -The file cpp/src/arrow/vendored/musl/strptime.c has the following license - -Copyright © 2005-2020 Rich Felker, et al. - -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/apache/arrow/go/v17/arrow/array/decimal128.go b/vendor/github.com/apache/arrow/go/v17/arrow/array/decimal128.go deleted file mode 100644 index 4578fd40..00000000 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/decimal128.go +++ /dev/null @@ -1,368 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.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 array - -import ( - "bytes" - "fmt" - "math/big" - "reflect" - "strings" - "sync/atomic" - - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/decimal128" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" -) - -// A type which represents an immutable sequence of 128-bit decimal values. -type Decimal128 struct { - array - - values []decimal128.Num -} - -func NewDecimal128Data(data arrow.ArrayData) *Decimal128 { - a := &Decimal128{} - a.refCount = 1 - a.setData(data.(*Data)) - return a -} - -func (a *Decimal128) Value(i int) decimal128.Num { return a.values[i] } - -func (a *Decimal128) ValueStr(i int) string { - if a.IsNull(i) { - return NullValueStr - } - return a.GetOneForMarshal(i).(string) -} - -func (a *Decimal128) Values() []decimal128.Num { return a.values } - -func (a *Decimal128) String() string { - o := new(strings.Builder) - o.WriteString("[") - for i := 0; i < a.Len(); i++ { - if i > 0 { - fmt.Fprintf(o, " ") - } - switch { - case a.IsNull(i): - o.WriteString(NullValueStr) - default: - fmt.Fprintf(o, "%v", a.Value(i)) - } - } - o.WriteString("]") - return o.String() -} - -func (a *Decimal128) setData(data *Data) { - a.array.setData(data) - vals := data.buffers[1] - if vals != nil { - a.values = arrow.Decimal128Traits.CastFromBytes(vals.Bytes()) - beg := a.array.data.offset - end := beg + a.array.data.length - a.values = a.values[beg:end] - } -} -func (a *Decimal128) GetOneForMarshal(i int) interface{} { - if a.IsNull(i) { - return nil - } - typ := a.DataType().(*arrow.Decimal128Type) - n := a.Value(i) - scale := typ.Scale - f := (&big.Float{}).SetInt(n.BigInt()) - if scale < 0 { - f.SetPrec(128).Mul(f, (&big.Float{}).SetInt(decimal128.GetScaleMultiplier(int(-scale)).BigInt())) - } else { - f.SetPrec(128).Quo(f, (&big.Float{}).SetInt(decimal128.GetScaleMultiplier(int(scale)).BigInt())) - } - return f.Text('g', int(typ.Precision)) -} - -// ["1.23", ] -func (a *Decimal128) MarshalJSON() ([]byte, error) { - vals := make([]interface{}, a.Len()) - for i := 0; i < a.Len(); i++ { - vals[i] = a.GetOneForMarshal(i) - } - return json.Marshal(vals) -} - -func arrayEqualDecimal128(left, right *Decimal128) bool { - for i := 0; i < left.Len(); i++ { - if left.IsNull(i) { - continue - } - if left.Value(i) != right.Value(i) { - return false - } - } - return true -} - -type Decimal128Builder struct { - builder - - dtype *arrow.Decimal128Type - data *memory.Buffer - rawData []decimal128.Num -} - -func NewDecimal128Builder(mem memory.Allocator, dtype *arrow.Decimal128Type) *Decimal128Builder { - return &Decimal128Builder{ - builder: builder{refCount: 1, mem: mem}, - dtype: dtype, - } -} - -func (b *Decimal128Builder) Type() arrow.DataType { return b.dtype } - -// Release decreases the reference count by 1. -// When the reference count goes to zero, the memory is freed. -func (b *Decimal128Builder) Release() { - debug.Assert(atomic.LoadInt64(&b.refCount) > 0, "too many releases") - - if atomic.AddInt64(&b.refCount, -1) == 0 { - if b.nullBitmap != nil { - b.nullBitmap.Release() - b.nullBitmap = nil - } - if b.data != nil { - b.data.Release() - b.data = nil - b.rawData = nil - } - } -} - -func (b *Decimal128Builder) Append(v decimal128.Num) { - b.Reserve(1) - b.UnsafeAppend(v) -} - -func (b *Decimal128Builder) UnsafeAppend(v decimal128.Num) { - bitutil.SetBit(b.nullBitmap.Bytes(), b.length) - b.rawData[b.length] = v - b.length++ -} - -func (b *Decimal128Builder) AppendNull() { - b.Reserve(1) - b.UnsafeAppendBoolToBitmap(false) -} - -func (b *Decimal128Builder) AppendNulls(n int) { - for i := 0; i < n; i++ { - b.AppendNull() - } -} - -func (b *Decimal128Builder) AppendEmptyValue() { - b.Append(decimal128.Num{}) -} - -func (b *Decimal128Builder) AppendEmptyValues(n int) { - for i := 0; i < n; i++ { - b.AppendEmptyValue() - } -} - -func (b *Decimal128Builder) UnsafeAppendBoolToBitmap(isValid bool) { - if isValid { - bitutil.SetBit(b.nullBitmap.Bytes(), b.length) - } else { - b.nulls++ - } - b.length++ -} - -// AppendValues will append the values in the v slice. The valid slice determines which values -// in v are valid (not null). The valid slice must either be empty or be equal in length to v. If empty, -// all values in v are appended and considered valid. -func (b *Decimal128Builder) AppendValues(v []decimal128.Num, valid []bool) { - if len(v) != len(valid) && len(valid) != 0 { - panic("len(v) != len(valid) && len(valid) != 0") - } - - if len(v) == 0 { - return - } - - b.Reserve(len(v)) - if len(v) > 0 { - arrow.Decimal128Traits.Copy(b.rawData[b.length:], v) - } - b.builder.unsafeAppendBoolsToBitmap(valid, len(v)) -} - -func (b *Decimal128Builder) init(capacity int) { - b.builder.init(capacity) - - b.data = memory.NewResizableBuffer(b.mem) - bytesN := arrow.Decimal128Traits.BytesRequired(capacity) - b.data.Resize(bytesN) - b.rawData = arrow.Decimal128Traits.CastFromBytes(b.data.Bytes()) -} - -// Reserve ensures there is enough space for appending n elements -// by checking the capacity and calling Resize if necessary. -func (b *Decimal128Builder) Reserve(n int) { - b.builder.reserve(n, b.Resize) -} - -// Resize adjusts the space allocated by b to n elements. If n is greater than b.Cap(), -// additional memory will be allocated. If n is smaller, the allocated memory may reduced. -func (b *Decimal128Builder) Resize(n int) { - nBuilder := n - if n < minBuilderCapacity { - n = minBuilderCapacity - } - - if b.capacity == 0 { - b.init(n) - } else { - b.builder.resize(nBuilder, b.init) - b.data.Resize(arrow.Decimal128Traits.BytesRequired(n)) - b.rawData = arrow.Decimal128Traits.CastFromBytes(b.data.Bytes()) - } -} - -// NewArray creates a Decimal128 array from the memory buffers used by the builder and resets the Decimal128Builder -// so it can be used to build a new array. -func (b *Decimal128Builder) NewArray() arrow.Array { - return b.NewDecimal128Array() -} - -// NewDecimal128Array creates a Decimal128 array from the memory buffers used by the builder and resets the Decimal128Builder -// so it can be used to build a new array. -func (b *Decimal128Builder) NewDecimal128Array() (a *Decimal128) { - data := b.newData() - a = NewDecimal128Data(data) - data.Release() - return -} - -func (b *Decimal128Builder) newData() (data *Data) { - bytesRequired := arrow.Decimal128Traits.BytesRequired(b.length) - if bytesRequired > 0 && bytesRequired < b.data.Len() { - // trim buffers - b.data.Resize(bytesRequired) - } - data = NewData(b.dtype, b.length, []*memory.Buffer{b.nullBitmap, b.data}, nil, b.nulls, 0) - b.reset() - - if b.data != nil { - b.data.Release() - b.data = nil - b.rawData = nil - } - - return -} - -func (b *Decimal128Builder) AppendValueFromString(s string) error { - if s == NullValueStr { - b.AppendNull() - return nil - } - val, err := decimal128.FromString(s, b.dtype.Precision, b.dtype.Scale) - if err != nil { - b.AppendNull() - return err - } - b.Append(val) - return nil -} - -func (b *Decimal128Builder) UnmarshalOne(dec *json.Decoder) error { - t, err := dec.Token() - if err != nil { - return err - } - - switch v := t.(type) { - case float64: - val, err := decimal128.FromFloat64(v, b.dtype.Precision, b.dtype.Scale) - if err != nil { - return err - } - b.Append(val) - case string: - val, err := decimal128.FromString(v, b.dtype.Precision, b.dtype.Scale) - if err != nil { - return err - } - b.Append(val) - case json.Number: - val, err := decimal128.FromString(v.String(), b.dtype.Precision, b.dtype.Scale) - if err != nil { - return err - } - b.Append(val) - case nil: - b.AppendNull() - return nil - default: - return &json.UnmarshalTypeError{ - Value: fmt.Sprint(t), - Type: reflect.TypeOf(decimal128.Num{}), - Offset: dec.InputOffset(), - } - } - - return nil -} - -func (b *Decimal128Builder) Unmarshal(dec *json.Decoder) error { - for dec.More() { - if err := b.UnmarshalOne(dec); err != nil { - return err - } - } - return nil -} - -// UnmarshalJSON will add the unmarshalled values to this builder. -// -// If the values are strings, they will get parsed with big.ParseFloat using -// a rounding mode of big.ToNearestAway currently. -func (b *Decimal128Builder) UnmarshalJSON(data []byte) error { - dec := json.NewDecoder(bytes.NewReader(data)) - t, err := dec.Token() - if err != nil { - return err - } - - if delim, ok := t.(json.Delim); !ok || delim != '[' { - return fmt.Errorf("decimal128 builder must unpack from json array, found %s", delim) - } - - return b.Unmarshal(dec) -} - -var ( - _ arrow.Array = (*Decimal128)(nil) - _ Builder = (*Decimal128Builder)(nil) -) diff --git a/vendor/github.com/apache/arrow/go/v17/arrow/array/decimal256.go b/vendor/github.com/apache/arrow/go/v17/arrow/array/decimal256.go deleted file mode 100644 index bc082638..00000000 --- a/vendor/github.com/apache/arrow/go/v17/arrow/array/decimal256.go +++ /dev/null @@ -1,368 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.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 array - -import ( - "bytes" - "fmt" - "math/big" - "reflect" - "strings" - "sync/atomic" - - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/bitutil" - "github.com/apache/arrow/go/v17/arrow/decimal256" - "github.com/apache/arrow/go/v17/arrow/internal/debug" - "github.com/apache/arrow/go/v17/arrow/memory" - "github.com/apache/arrow/go/v17/internal/json" -) - -// Decimal256 is a type that represents an immutable sequence of 256-bit decimal values. -type Decimal256 struct { - array - - values []decimal256.Num -} - -func NewDecimal256Data(data arrow.ArrayData) *Decimal256 { - a := &Decimal256{} - a.refCount = 1 - a.setData(data.(*Data)) - return a -} - -func (a *Decimal256) Value(i int) decimal256.Num { return a.values[i] } - -func (a *Decimal256) ValueStr(i int) string { - if a.IsNull(i) { - return NullValueStr - } - return a.GetOneForMarshal(i).(string) -} - -func (a *Decimal256) Values() []decimal256.Num { return a.values } - -func (a *Decimal256) String() string { - o := new(strings.Builder) - o.WriteString("[") - for i := 0; i < a.Len(); i++ { - if i > 0 { - fmt.Fprintf(o, " ") - } - switch { - case a.IsNull(i): - o.WriteString(NullValueStr) - default: - fmt.Fprintf(o, "%v", a.Value(i)) - } - } - o.WriteString("]") - return o.String() -} - -func (a *Decimal256) setData(data *Data) { - a.array.setData(data) - vals := data.buffers[1] - if vals != nil { - a.values = arrow.Decimal256Traits.CastFromBytes(vals.Bytes()) - beg := a.array.data.offset - end := beg + a.array.data.length - a.values = a.values[beg:end] - } -} - -func (a *Decimal256) GetOneForMarshal(i int) interface{} { - if a.IsNull(i) { - return nil - } - typ := a.DataType().(*arrow.Decimal256Type) - n := a.Value(i) - scale := typ.Scale - f := (&big.Float{}).SetInt(n.BigInt()) - if scale < 0 { - f.SetPrec(256).Mul(f, (&big.Float{}).SetInt(decimal256.GetScaleMultiplier(int(-scale)).BigInt())) - } else { - f.SetPrec(256).Quo(f, (&big.Float{}).SetInt(decimal256.GetScaleMultiplier(int(scale)).BigInt())) - } - return f.Text('g', int(typ.Precision)) -} - -func (a *Decimal256) MarshalJSON() ([]byte, error) { - vals := make([]interface{}, a.Len()) - for i := 0; i < a.Len(); i++ { - vals[i] = a.GetOneForMarshal(i) - } - return json.Marshal(vals) -} - -func arrayEqualDecimal256(left, right *Decimal256) bool { - for i := 0; i < left.Len(); i++ { - if left.IsNull(i) { - continue - } - if left.Value(i) != right.Value(i) { - return false - } - } - return true -} - -type Decimal256Builder struct { - builder - - dtype *arrow.Decimal256Type - data *memory.Buffer - rawData []decimal256.Num -} - -func NewDecimal256Builder(mem memory.Allocator, dtype *arrow.Decimal256Type) *Decimal256Builder { - return &Decimal256Builder{ - builder: builder{refCount: 1, mem: mem}, - dtype: dtype, - } -} - -// Release decreases the reference count by 1. -// When the reference count goes to zero, the memory is freed. -func (b *Decimal256Builder) Release() { - debug.Assert(atomic.LoadInt64(&b.refCount) > 0, "too many releases") - - if atomic.AddInt64(&b.refCount, -1) == 0 { - if b.nullBitmap != nil { - b.nullBitmap.Release() - b.nullBitmap = nil - } - if b.data != nil { - b.data.Release() - b.data = nil - b.rawData = nil - } - } -} - -func (b *Decimal256Builder) Append(v decimal256.Num) { - b.Reserve(1) - b.UnsafeAppend(v) -} - -func (b *Decimal256Builder) UnsafeAppend(v decimal256.Num) { - bitutil.SetBit(b.nullBitmap.Bytes(), b.length) - b.rawData[b.length] = v - b.length++ -} - -func (b *Decimal256Builder) AppendNull() { - b.Reserve(1) - b.UnsafeAppendBoolToBitmap(false) -} - -func (b *Decimal256Builder) AppendNulls(n int) { - for i := 0; i < n; i++ { - b.AppendNull() - } -} - -func (b *Decimal256Builder) AppendEmptyValue() { - b.Append(decimal256.Num{}) -} - -func (b *Decimal256Builder) AppendEmptyValues(n int) { - for i := 0; i < n; i++ { - b.AppendEmptyValue() - } -} - -func (b *Decimal256Builder) Type() arrow.DataType { return b.dtype } - -func (b *Decimal256Builder) UnsafeAppendBoolToBitmap(isValid bool) { - if isValid { - bitutil.SetBit(b.nullBitmap.Bytes(), b.length) - } else { - b.nulls++ - } - b.length++ -} - -// AppendValues will append the values in the v slice. The valid slice determines which values -// in v are valid (not null). The valid slice must either be empty or be equal in length to v. If empty, -// all values in v are appended and considered valid. -func (b *Decimal256Builder) AppendValues(v []decimal256.Num, valid []bool) { - if len(v) != len(valid) && len(valid) != 0 { - panic("arrow/array: len(v) != len(valid) && len(valid) != 0") - } - - if len(v) == 0 { - return - } - - b.Reserve(len(v)) - if len(v) > 0 { - arrow.Decimal256Traits.Copy(b.rawData[b.length:], v) - } - b.builder.unsafeAppendBoolsToBitmap(valid, len(v)) -} - -func (b *Decimal256Builder) init(capacity int) { - b.builder.init(capacity) - - b.data = memory.NewResizableBuffer(b.mem) - bytesN := arrow.Decimal256Traits.BytesRequired(capacity) - b.data.Resize(bytesN) - b.rawData = arrow.Decimal256Traits.CastFromBytes(b.data.Bytes()) -} - -// Reserve ensures there is enough space for appending n elements -// by checking the capacity and calling Resize if necessary. -func (b *Decimal256Builder) Reserve(n int) { - b.builder.reserve(n, b.Resize) -} - -// Resize adjusts the space allocated by b to n elements. If n is greater than b.Cap(), -// additional memory will be allocated. If n is smaller, the allocated memory may reduced. -func (b *Decimal256Builder) Resize(n int) { - nBuilder := n - if n < minBuilderCapacity { - n = minBuilderCapacity - } - - if b.capacity == 0 { - b.init(n) - } else { - b.builder.resize(nBuilder, b.init) - b.data.Resize(arrow.Decimal256Traits.BytesRequired(n)) - b.rawData = arrow.Decimal256Traits.CastFromBytes(b.data.Bytes()) - } -} - -// NewArray creates a Decimal256 array from the memory buffers used by the builder and resets the Decimal256Builder -// so it can be used to build a new array. -func (b *Decimal256Builder) NewArray() arrow.Array { - return b.NewDecimal256Array() -} - -// NewDecimal256Array creates a Decimal256 array from the memory buffers used by the builder and resets the Decimal256Builder -// so it can be used to build a new array. -func (b *Decimal256Builder) NewDecimal256Array() (a *Decimal256) { - data := b.newData() - a = NewDecimal256Data(data) - data.Release() - return -} - -func (b *Decimal256Builder) newData() (data *Data) { - bytesRequired := arrow.Decimal256Traits.BytesRequired(b.length) - if bytesRequired > 0 && bytesRequired < b.data.Len() { - // trim buffers - b.data.Resize(bytesRequired) - } - data = NewData(b.dtype, b.length, []*memory.Buffer{b.nullBitmap, b.data}, nil, b.nulls, 0) - b.reset() - - if b.data != nil { - b.data.Release() - b.data = nil - b.rawData = nil - } - - return -} - -func (b *Decimal256Builder) AppendValueFromString(s string) error { - if s == NullValueStr { - b.AppendNull() - return nil - } - val, err := decimal256.FromString(s, b.dtype.Precision, b.dtype.Scale) - if err != nil { - b.AppendNull() - return err - } - b.Append(val) - return nil -} - -func (b *Decimal256Builder) UnmarshalOne(dec *json.Decoder) error { - t, err := dec.Token() - if err != nil { - return err - } - - switch v := t.(type) { - case float64: - val, err := decimal256.FromFloat64(v, b.dtype.Precision, b.dtype.Scale) - if err != nil { - return err - } - b.Append(val) - case string: - out, err := decimal256.FromString(v, b.dtype.Precision, b.dtype.Scale) - if err != nil { - return err - } - b.Append(out) - case json.Number: - out, err := decimal256.FromString(v.String(), b.dtype.Precision, b.dtype.Scale) - if err != nil { - return err - } - b.Append(out) - case nil: - b.AppendNull() - return nil - default: - return &json.UnmarshalTypeError{ - Value: fmt.Sprint(t), - Type: reflect.TypeOf(decimal256.Num{}), - Offset: dec.InputOffset(), - } - } - - return nil -} - -func (b *Decimal256Builder) Unmarshal(dec *json.Decoder) error { - for dec.More() { - if err := b.UnmarshalOne(dec); err != nil { - return err - } - } - return nil -} - -// UnmarshalJSON will add the unmarshalled values to this builder. -// -// If the values are strings, they will get parsed with big.ParseFloat using -// a rounding mode of big.ToNearestAway currently. -func (b *Decimal256Builder) UnmarshalJSON(data []byte) error { - dec := json.NewDecoder(bytes.NewReader(data)) - t, err := dec.Token() - if err != nil { - return err - } - - if delim, ok := t.(json.Delim); !ok || delim != '[' { - return fmt.Errorf("arrow/array: decimal256 builder must unpack from json array, found %s", delim) - } - - return b.Unmarshal(dec) -} - -var ( - _ arrow.Array = (*Decimal256)(nil) - _ Builder = (*Decimal256Builder)(nil) -) diff --git a/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/lib.go b/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/lib.go index 6742a929..648e8fb0 100644 --- a/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/lib.go +++ b/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/lib.go @@ -1,6 +1,7 @@ package vec // #cgo CFLAGS: -DSQLITE_CORE +// #cgo linux LDFLAGS: -lm // #include "sqlite-vec.h" // import "C" diff --git a/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/sqlite-vec.c b/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/sqlite-vec.c index 6ba2a23f..d8490cd0 100644 --- a/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/sqlite-vec.c +++ b/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/sqlite-vec.c @@ -1,4 +1,5 @@ #include "sqlite-vec.h" + #include #include #include @@ -7,12 +8,19 @@ #include #include #include -#include #include #include +#ifndef SQLITE_VEC_OMIT_FS +#include +#endif + +#ifndef SQLITE_CORE #include "sqlite3ext.h" SQLITE_EXTENSION_INIT1 +#else +#include "sqlite3.h" +#endif #ifndef UINT32_TYPE #ifdef HAVE_UINT32_T @@ -79,7 +87,8 @@ typedef size_t usize; #define UNUSED_PARAMETER(X) (void)(X) #endif -// sqlite3_vtab_in() was added in SQLite version 3.38 (2022-02-22) https://www.sqlite.org/changes.html#version_3_38_0 +// sqlite3_vtab_in() was added in SQLite version 3.38 (2022-02-22) +// https://www.sqlite.org/changes.html#version_3_38_0 #if SQLITE_VERSION_NUMBER >= 3038000 #define COMPILER_SUPPORTS_VTAB_IN 1 #endif @@ -93,16 +102,22 @@ typedef size_t usize; #endif #ifndef SQLITE_INDEX_CONSTRAINT_LIMIT -#define SQLITE_INDEX_CONSTRAINT_LIMIT 73 +#define SQLITE_INDEX_CONSTRAINT_LIMIT 73 +#endif + +#ifndef SQLITE_INDEX_CONSTRAINT_OFFSET +#define SQLITE_INDEX_CONSTRAINT_OFFSET 74 #endif #define countof(x) (sizeof(x) / sizeof((x)[0])) #define min(a, b) (((a) <= (b)) ? (a) : (b)) enum VectorElementType { + // clang-format off SQLITE_VEC_ELEMENT_TYPE_FLOAT32 = 223 + 0, - SQLITE_VEC_ELEMENT_TYPE_BIT = 223 + 1, - SQLITE_VEC_ELEMENT_TYPE_INT8 = 223 + 2, + SQLITE_VEC_ELEMENT_TYPE_BIT = 223 + 1, + SQLITE_VEC_ELEMENT_TYPE_INT8 = 223 + 2, + // clang-format on }; #ifdef SQLITE_VEC_ENABLE_AVX @@ -505,9 +520,22 @@ static f32 distance_hamming_u8(u8 *a, u8 *b, size_t n) { } #ifdef _MSC_VER +#if !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)) +// From +// https://github.com/ngtcp2/ngtcp2/blob/b64f1e77b5e0d880b93d31f474147fae4a1d17cc/lib/ngtcp2_ringbuf.c, +// line 34-43 +static unsigned int __builtin_popcountl(unsigned int x) { + unsigned int c = 0; + for (; x; ++c) { + x &= x - 1; + } + return c; +} +#else #include #define __builtin_popcountl __popcnt64 #endif +#endif static f32 distance_hamming_u64(u64 *a, u64 *b, size_t n) { int same = 0; @@ -536,7 +564,7 @@ static f32 distance_hamming(const void *a, const void *b, const void *d) { // from SQLite source: // https://github.com/sqlite/sqlite/blob/a509a90958ddb234d1785ed7801880ccb18b497e/src/json.c#L153 -static const char jsonIsSpaceX[] = { +static const char vecJsonIsSpaceX[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -551,7 +579,8 @@ static const char jsonIsSpaceX[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -#define jsonIsspace(x) (jsonIsSpaceX[(unsigned char)x]) + +#define vecJsonIsspace(x) (vecJsonIsSpaceX[(unsigned char)x]) typedef void (*vector_cleanup)(void *p); @@ -696,7 +725,7 @@ static int fvec_from_value(sqlite3_value *value, f32 **vector, // advance leading whitespace to first '[' while (i < source_len) { - if (jsonIsspace(source[i])) { + if (vecJsonIsspace(source[i])) { i++; continue; } @@ -746,7 +775,7 @@ static int fvec_from_value(sqlite3_value *value, f32 **vector, offset += (endptr - ptr); while (offset < source_len) { - if (jsonIsspace(source[offset])) { + if (vecJsonIsspace(source[offset])) { offset++; continue; } @@ -834,7 +863,7 @@ static int int8_vec_from_value(sqlite3_value *value, i8 **vector, // advance leading whitespace to first '[' while (i < source_len) { - if (jsonIsspace(source[i])) { + if (vecJsonIsspace(source[i])) { i++; continue; } @@ -889,7 +918,7 @@ static int int8_vec_from_value(sqlite3_value *value, i8 **vector, offset += (endptr - ptr); while (offset < source_len) { - if (jsonIsspace(source[offset])) { + if (vecJsonIsspace(source[offset])) { offset++; continue; } @@ -1024,6 +1053,7 @@ struct VecNpyFile { }; #define SQLITE_VEC_NPY_FILE_NAME "vec0-npy-file" +#ifndef SQLITE_VEC_OMIT_FS static void vec_npy_file(sqlite3_context *context, int argc, sqlite3_value **argv) { assert(argc == 1); @@ -1042,6 +1072,7 @@ static void vec_npy_file(sqlite3_context *context, int argc, f->pathLength = pathLength; sqlite3_result_pointer(context, f, SQLITE_VEC_NPY_FILE_NAME, sqlite3_free); } +#endif #pragma region scalar functions static void vec_f32(sqlite3_context *context, int argc, sqlite3_value **argv) { @@ -1292,6 +1323,7 @@ char *vec_type_name(enum VectorElementType elementType) { case SQLITE_VEC_ELEMENT_TYPE_BIT: return "bit"; } + return ""; } static void vec_type(sqlite3_context *context, int argc, sqlite3_value **argv) { @@ -1768,6 +1800,7 @@ enum Vec0TokenType { TOKEN_TYPE_DIGIT, TOKEN_TYPE_LBRACKET, TOKEN_TYPE_RBRACKET, + TOKEN_TYPE_PLUS, TOKEN_TYPE_EQ, }; struct Vec0Token { @@ -1795,6 +1828,12 @@ int vec0_token_next(char *start, char *end, struct Vec0Token *out) { if (is_whitespace(curr)) { ptr++; continue; + } else if (curr == '+') { + ptr++; + out->start = ptr; + out->end = ptr; + out->token_type = TOKEN_TYPE_PLUS; + return VEC0_TOKEN_RESULT_SOME; } else if (curr == '[') { ptr++; out->start = ptr; @@ -1902,6 +1941,221 @@ int vec0_parse_table_option(const char *source, int source_length, } return SQLITE_ERROR; } +/** + * @brief Parse an argv[i] entry of a vec0 virtual table definition, and see if + * it's a PARTITION KEY definition. + * + * @param source: argv[i] source string + * @param source_length: length of the source string + * @param out_column_name: If it is a partition key, the output column name. Same lifetime + * as source, points to specific char * + * @param out_column_name_length: Length of out_column_name in bytes + * @param out_column_type: SQLITE_TEXT or SQLITE_INTEGER. + * @return int: SQLITE_EMPTY if not a PK, SQLITE_OK if it is. + */ +int vec0_parse_partition_key_definition(const char *source, int source_length, + char **out_column_name, + int *out_column_name_length, + int *out_column_type) { + struct Vec0Scanner scanner; + struct Vec0Token token; + char *column_name; + int column_name_length; + int column_type; + vec0_scanner_init(&scanner, source, source_length); + + // Check first token is identifier, will be the column name + int rc = vec0_scanner_next(&scanner, &token); + if (rc != VEC0_TOKEN_RESULT_SOME && + token.token_type != TOKEN_TYPE_IDENTIFIER) { + return SQLITE_EMPTY; + } + + column_name = token.start; + column_name_length = token.end - token.start; + + // Check the next token matches "text" or "integer", as column type + rc = vec0_scanner_next(&scanner, &token); + if (rc != VEC0_TOKEN_RESULT_SOME && + token.token_type != TOKEN_TYPE_IDENTIFIER) { + return SQLITE_EMPTY; + } + if (sqlite3_strnicmp(token.start, "text", token.end - token.start) == 0) { + column_type = SQLITE_TEXT; + } else if (sqlite3_strnicmp(token.start, "int", token.end - token.start) == + 0 || + sqlite3_strnicmp(token.start, "integer", + token.end - token.start) == 0) { + column_type = SQLITE_INTEGER; + } else { + return SQLITE_EMPTY; + } + + // Check the next token is identifier and matches "partition" + rc = vec0_scanner_next(&scanner, &token); + if (rc != VEC0_TOKEN_RESULT_SOME && + token.token_type != TOKEN_TYPE_IDENTIFIER) { + return SQLITE_EMPTY; + } + if (sqlite3_strnicmp(token.start, "partition", token.end - token.start) != 0) { + return SQLITE_EMPTY; + } + + // Check the next token is identifier and matches "key" + rc = vec0_scanner_next(&scanner, &token); + if (rc != VEC0_TOKEN_RESULT_SOME && + token.token_type != TOKEN_TYPE_IDENTIFIER) { + return SQLITE_EMPTY; + } + if (sqlite3_strnicmp(token.start, "key", token.end - token.start) != 0) { + return SQLITE_EMPTY; + } + + *out_column_name = column_name; + *out_column_name_length = column_name_length; + *out_column_type = column_type; + + return SQLITE_OK; +} + +/** + * @brief Parse an argv[i] entry of a vec0 virtual table definition, and see if + * it's an auxiliar column definition, ie `+[name] [type]` like `+contents text` + * + * @param source: argv[i] source string + * @param source_length: length of the source string + * @param out_column_name: If it is a partition key, the output column name. Same lifetime + * as source, points to specific char * + * @param out_column_name_length: Length of out_column_name in bytes + * @param out_column_type: SQLITE_TEXT, SQLITE_INTEGER, SQLITE_FLOAT, or SQLITE_BLOB. + * @return int: SQLITE_EMPTY if not an aux column, SQLITE_OK if it is. + */ +int vec0_parse_auxiliary_column_definition(const char *source, int source_length, + char **out_column_name, + int *out_column_name_length, + int *out_column_type) { + struct Vec0Scanner scanner; + struct Vec0Token token; + char *column_name; + int column_name_length; + int column_type; + vec0_scanner_init(&scanner, source, source_length); + + // Check first token is '+', which denotes aux columns + int rc = vec0_scanner_next(&scanner, &token); + if (rc != VEC0_TOKEN_RESULT_SOME || + token.token_type != TOKEN_TYPE_PLUS) { + return SQLITE_EMPTY; + } + + rc = vec0_scanner_next(&scanner, &token); + if (rc != VEC0_TOKEN_RESULT_SOME && + token.token_type != TOKEN_TYPE_IDENTIFIER) { + return SQLITE_EMPTY; + } + + column_name = token.start; + column_name_length = token.end - token.start; + + // Check the next token matches "text" or "integer", as column type + rc = vec0_scanner_next(&scanner, &token); + if (rc != VEC0_TOKEN_RESULT_SOME && + token.token_type != TOKEN_TYPE_IDENTIFIER) { + return SQLITE_EMPTY; + } + if (sqlite3_strnicmp(token.start, "text", token.end - token.start) == 0) { + column_type = SQLITE_TEXT; + } else if (sqlite3_strnicmp(token.start, "int", token.end - token.start) == + 0 || + sqlite3_strnicmp(token.start, "integer", + token.end - token.start) == 0) { + column_type = SQLITE_INTEGER; + } else if (sqlite3_strnicmp(token.start, "float", token.end - token.start) == + 0 || + sqlite3_strnicmp(token.start, "double", + token.end - token.start) == 0) { + column_type = SQLITE_FLOAT; + } else if (sqlite3_strnicmp(token.start, "blob", token.end - token.start) ==0) { + column_type = SQLITE_BLOB; + } else { + return SQLITE_EMPTY; + } + + *out_column_name = column_name; + *out_column_name_length = column_name_length; + *out_column_type = column_type; + + return SQLITE_OK; +} + +typedef enum { + VEC0_METADATA_COLUMN_KIND_BOOLEAN, + VEC0_METADATA_COLUMN_KIND_INTEGER, + VEC0_METADATA_COLUMN_KIND_FLOAT, + VEC0_METADATA_COLUMN_KIND_TEXT, + // future: blob, date, datetime +} vec0_metadata_column_kind; + +/** + * @brief Parse an argv[i] entry of a vec0 virtual table definition, and see if + * it's an metadata column definition, ie `[name] [type]` like `is_released boolean` + * + * @param source: argv[i] source string + * @param source_length: length of the source string + * @param out_column_name: If it is a metadata column, the output column name. Same lifetime + * as source, points to specific char * + * @param out_column_name_length: Length of out_column_name in bytes + * @param out_column_type: one of vec0_metadata_column_kind + * @return int: SQLITE_EMPTY if not an metadata column, SQLITE_OK if it is. + */ +int vec0_parse_metadata_column_definition(const char *source, int source_length, + char **out_column_name, + int *out_column_name_length, + vec0_metadata_column_kind *out_column_type) { + struct Vec0Scanner scanner; + struct Vec0Token token; + char *column_name; + int column_name_length; + vec0_metadata_column_kind column_type; + int rc; + vec0_scanner_init(&scanner, source, source_length); + + rc = vec0_scanner_next(&scanner, &token); + if (rc != VEC0_TOKEN_RESULT_SOME || + token.token_type != TOKEN_TYPE_IDENTIFIER) { + return SQLITE_EMPTY; + } + + column_name = token.start; + column_name_length = token.end - token.start; + + // Check the next token matches a valid metadata type + rc = vec0_scanner_next(&scanner, &token); + if (rc != VEC0_TOKEN_RESULT_SOME || + token.token_type != TOKEN_TYPE_IDENTIFIER) { + return SQLITE_EMPTY; + } + char * t = token.start; + int n = token.end - token.start; + if (sqlite3_strnicmp(t, "boolean", n) == 0 || sqlite3_strnicmp(t, "bool", n) == 0) { + column_type = VEC0_METADATA_COLUMN_KIND_BOOLEAN; + }else if (sqlite3_strnicmp(t, "int64", n) == 0 || sqlite3_strnicmp(t, "integer64", n) == 0 || sqlite3_strnicmp(t, "integer", n) == 0 || sqlite3_strnicmp(t, "int", n) == 0) { + column_type = VEC0_METADATA_COLUMN_KIND_INTEGER; + }else if (sqlite3_strnicmp(t, "float", n) == 0 || sqlite3_strnicmp(t, "double", n) == 0 || sqlite3_strnicmp(t, "float64", n) == 0 || sqlite3_strnicmp(t, "f64", n) == 0) { + column_type = VEC0_METADATA_COLUMN_KIND_FLOAT; + } else if (sqlite3_strnicmp(t, "text", n) == 0) { + column_type = VEC0_METADATA_COLUMN_KIND_TEXT; + } else { + return SQLITE_EMPTY; + } + + *out_column_name = column_name; + *out_column_name_length = column_name_length; + *out_column_type = column_type; + + return SQLITE_OK; +} + /** * @brief Parse an argv[i] entry of a vec0 virtual table definition, and see if * it's a PRIMARY KEY definition. @@ -1914,7 +2168,7 @@ int vec0_parse_table_option(const char *source, int source_length, * @param out_column_type: SQLITE_TEXT or SQLITE_INTEGER. * @return int: SQLITE_EMPTY if not a PK, SQLITE_OK if it is. */ -int parse_primary_key_definition(const char *source, int source_length, +int vec0_parse_primary_key_definition(const char *source, int source_length, char **out_column_name, int *out_column_name_length, int *out_column_type) { @@ -1993,6 +2247,23 @@ struct VectorColumnDefinition { enum Vec0DistanceMetrics distance_metric; }; +struct Vec0PartitionColumnDefinition { + int type; + char * name; + int name_length; +}; + +struct Vec0AuxiliaryColumnDefinition { + int type; + char * name; + int name_length; +}; +struct Vec0MetadataColumnDefinition { + vec0_metadata_column_kind kind; + char * name; + int name_length; +}; + size_t vector_byte_size(enum VectorElementType element_type, size_t dimensions) { switch (element_type) { @@ -2003,6 +2274,7 @@ size_t vector_byte_size(enum VectorElementType element_type, case SQLITE_VEC_ELEMENT_TYPE_BIT: return dimensions / CHAR_BIT; } + return 0; } size_t vector_column_byte_size(struct VectorColumnDefinition column) { @@ -2019,7 +2291,7 @@ size_t vector_column_byte_size(struct VectorColumnDefinition column) { * @return int SQLITE_OK on success, SQLITE_EMPTY is it's not a vector column * definition, SQLITE_ERROR on error. */ -int parse_vector_column(const char *source, int source_length, +int vec0_parse_vector_column(const char *source, int source_length, struct VectorColumnDefinition *outColumn) { // parses a vector column definition like so: // "abc float[123]", "abc_123 bit[1234]", eetc. @@ -2069,7 +2341,7 @@ int parse_vector_column(const char *source, int source_length, // left '[' bracket rc = vec0_scanner_next(&scanner, &token); if (rc != VEC0_TOKEN_RESULT_SOME && token.token_type != TOKEN_TYPE_LBRACKET) { - return SQLITE_ERROR; + return SQLITE_EMPTY; } // digit, for vector dimension length @@ -2633,7 +2905,9 @@ struct vec_npy_each_cursor { // Opened npy file, when reading from a file. // fclose() when complete. +#ifndef SQLITE_VEC_OMIT_FS FILE *file; +#endif // an in-memory buffer containing a portion of the npy array. // Used for faster reading, instead of calling fread a lot. @@ -2841,12 +3115,12 @@ static int vec_npy_eachOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor) { static int vec_npy_eachClose(sqlite3_vtab_cursor *cur) { vec_npy_each_cursor *pCur = (vec_npy_each_cursor *)cur; - if (pCur->file) { #ifndef SQLITE_VEC_OMIT_FS + if (pCur->file) { fclose(pCur->file); -#endif pCur->file = NULL; } +#endif if (pCur->chunksBuffer) { sqlite3_free(pCur->chunksBuffer); pCur->chunksBuffer = NULL; @@ -2897,12 +3171,12 @@ static int vec_npy_eachFilter(sqlite3_vtab_cursor *pVtabCursor, int idxNum, vec_npy_each_cursor *pCur = (vec_npy_each_cursor *)pVtabCursor; - if (pCur->file) { #ifndef SQLITE_VEC_OMIT_FS + if (pCur->file) { fclose(pCur->file); -#endif pCur->file = NULL; } +#endif if (pCur->chunksBuffer) { sqlite3_free(pCur->chunksBuffer); pCur->chunksBuffer = NULL; @@ -2911,9 +3185,8 @@ static int vec_npy_eachFilter(sqlite3_vtab_cursor *pVtabCursor, int idxNum, pCur->vector = NULL; } - struct VecNpyFile *f = NULL; - #ifndef SQLITE_VEC_OMIT_FS + struct VecNpyFile *f = NULL; if ((f = sqlite3_value_pointer(argv[0], SQLITE_VEC_NPY_FILE_NAME))) { FILE *file = fopen(f->path, "r"); if (!file) { @@ -3060,6 +3333,7 @@ static int vec_npy_eachColumn(sqlite3_vtab_cursor *cur, case VEC_NPY_EACH_INPUT_FILE: return vec_npy_eachColumnFile(pCur, context, i); } + return SQLITE_ERROR; } static sqlite3_module vec_npy_eachModule = { @@ -3097,10 +3371,12 @@ static sqlite3_module vec_npy_eachModule = { #pragma region vec0 virtual table #define VEC0_COLUMN_ID 0 -#define VEC0_COLUMN_VECTORN_START 1 +#define VEC0_COLUMN_USERN_START 1 #define VEC0_COLUMN_OFFSET_DISTANCE 1 #define VEC0_COLUMN_OFFSET_K 2 +#define VEC0_SHADOW_INFO_NAME "\"%w\".\"%w_info\"" + #define VEC0_SHADOW_CHUNKS_NAME "\"%w\".\"%w_chunks\"" /// 1) schema, 2) original vtab table name #define VEC0_SHADOW_CHUNKS_CREATE \ @@ -3142,12 +3418,39 @@ static sqlite3_module vec_npy_eachModule = { "vectors BLOB NOT NULL" \ ");" +#define VEC0_SHADOW_AUXILIARY_NAME "\"%w\".\"%w_auxiliary\"" + +#define VEC0_SHADOW_METADATA_N_NAME "\"%w\".\"%w_metadatachunks%02d\"" +#define VEC0_SHADOW_METADATA_TEXT_DATA_NAME "\"%w\".\"%w_metadatatext%02d\"" + #define VEC_INTERAL_ERROR "Internal sqlite-vec error: " #define REPORT_URL "https://github.com/asg017/sqlite-vec/issues/new" typedef struct vec0_vtab vec0_vtab; -#define VEC0_MAX_VECTOR_COLUMNS 16 +#define VEC0_MAX_VECTOR_COLUMNS 16 +#define VEC0_MAX_PARTITION_COLUMNS 4 +#define VEC0_MAX_AUXILIARY_COLUMNS 16 +#define VEC0_MAX_METADATA_COLUMNS 16 + +#define SQLITE_VEC_VEC0_MAX_DIMENSIONS 8192 +#define VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH 16 +#define VEC0_METADATA_TEXT_VIEW_DATA_LENGTH 12 + +typedef enum { + // vector column, ie "contents_embedding float[1024]" + SQLITE_VEC0_USER_COLUMN_KIND_VECTOR = 1, + + // partition key column, ie "user_id integer partition key" + SQLITE_VEC0_USER_COLUMN_KIND_PARTITION = 2, + + // + SQLITE_VEC0_USER_COLUMN_KIND_AUXILIARY = 3, + + // metadata column that can be filtered, ie "genre text" + SQLITE_VEC0_USER_COLUMN_KIND_METADATA = 4, +} vec0_user_column_kind; + struct vec0_vtab { sqlite3_vtab base; @@ -3158,6 +3461,19 @@ struct vec0_vtab { // Will change the schema of the _rowids table, and insert/query logic. int pkIsText; + // number of defined vector columns. + int numVectorColumns; + + // number of defined PARTITION KEY columns. + int numPartitionColumns; + + // number of defined auxiliary columns + int numAuxiliaryColumns; + + // number of defined metadata columns + int numMetadataColumns; + + // Name of the schema the table exists on. // Must be freed with sqlite3_free() char *schemaName; @@ -3174,16 +3490,28 @@ struct vec0_vtab { // Must be freed with sqlite3_free() char *shadowChunksName; + // contains enum vec0_user_column_kind values for up to + // numVectorColumns + numPartitionColumns entries + vec0_user_column_kind user_column_kinds[VEC0_MAX_VECTOR_COLUMNS + VEC0_MAX_PARTITION_COLUMNS + VEC0_MAX_AUXILIARY_COLUMNS + VEC0_MAX_METADATA_COLUMNS]; + + uint8_t user_column_idxs[VEC0_MAX_VECTOR_COLUMNS + VEC0_MAX_PARTITION_COLUMNS + VEC0_MAX_AUXILIARY_COLUMNS + VEC0_MAX_METADATA_COLUMNS]; + + // Name of all the vector chunk shadow tables. // Ex '_vector_chunks00' // Only the first numVectorColumns entries will be available. // The first numVectorColumns entries must be freed with sqlite3_free() char *shadowVectorChunksNames[VEC0_MAX_VECTOR_COLUMNS]; - struct VectorColumnDefinition vector_columns[VEC0_MAX_VECTOR_COLUMNS]; + // Name of all metadata chunk shadow tables, ie `_metadatachunks00` + // Only the first numMetadataColumns entries will be available. + // The first numMetadataColumns entries must be freed with sqlite3_free() + char *shadowMetadataChunksNames[VEC0_MAX_METADATA_COLUMNS]; - // number of defined numVectorColumns columns. - int numVectorColumns; + struct VectorColumnDefinition vector_columns[VEC0_MAX_VECTOR_COLUMNS]; + struct Vec0PartitionColumnDefinition paritition_columns[VEC0_MAX_PARTITION_COLUMNS]; + struct Vec0AuxiliaryColumnDefinition auxiliary_columns[VEC0_MAX_AUXILIARY_COLUMNS]; + struct Vec0MetadataColumnDefinition metadata_columns[VEC0_MAX_METADATA_COLUMNS]; int chunk_size; @@ -3244,6 +3572,11 @@ struct vec0_vtab { sqlite3_stmt *stmtRowidsGetChunkPosition; }; +/** + * @brief Finalize all the sqlite3_stmt members in a vec0_vtab. + * + * @param p vec0_vtab pointer + */ void vec0_free_resources(vec0_vtab *p) { sqlite3_finalize(p->stmtLatestChunk); p->stmtLatestChunk = NULL; @@ -3256,6 +3589,12 @@ void vec0_free_resources(vec0_vtab *p) { sqlite3_finalize(p->stmtRowidsGetChunkPosition); p->stmtRowidsGetChunkPosition = NULL; } + +/** + * @brief Free all memory and sqlite3_stmt members of a vec0_vtab + * + * @param p vec0_vtab pointer + */ void vec0_free(vec0_vtab *p) { vec0_free_resources(p); @@ -3277,34 +3616,120 @@ void vec0_free(vec0_vtab *p) { } } -int vec0_column_distance_idx(vec0_vtab *pVtab) { - return VEC0_COLUMN_VECTORN_START + (pVtab->numVectorColumns - 1) + - VEC0_COLUMN_OFFSET_DISTANCE; -} -int vec0_column_k_idx(vec0_vtab *pVtab) { - return VEC0_COLUMN_VECTORN_START + (pVtab->numVectorColumns - 1) + - VEC0_COLUMN_OFFSET_K; +int vec0_num_defined_user_columns(vec0_vtab *p) { + return p->numVectorColumns + p->numPartitionColumns + p->numAuxiliaryColumns + p->numMetadataColumns; } /** - * Returns 1 if the given column-based index is a valid vector column, - * 0 otherwise. - */ + * @brief Returns the index of the distance hidden column for the given vec0 + * table. + * + * @param p vec0 table + * @return int + */ +int vec0_column_distance_idx(vec0_vtab *p) { + return VEC0_COLUMN_USERN_START + (vec0_num_defined_user_columns(p) - 1) + + VEC0_COLUMN_OFFSET_DISTANCE; +} + +/** + * @brief Returns the index of the k hidden column for the given vec0 table. + * + * @param p vec0 table + * @return int k column index + */ +int vec0_column_k_idx(vec0_vtab *p) { + return VEC0_COLUMN_USERN_START + (vec0_num_defined_user_columns(p) - 1) + + VEC0_COLUMN_OFFSET_K; +} + +/** + * Returns 1 if the given column-based index is a valid vector column, + * 0 otherwise. + */ int vec0_column_idx_is_vector(vec0_vtab *pVtab, int column_idx) { - return column_idx >= VEC0_COLUMN_VECTORN_START && - column_idx <= - (VEC0_COLUMN_VECTORN_START + pVtab->numVectorColumns - 1); + return column_idx >= VEC0_COLUMN_USERN_START && + column_idx <= (VEC0_COLUMN_USERN_START + vec0_num_defined_user_columns(pVtab) - 1) && + pVtab->user_column_kinds[column_idx - VEC0_COLUMN_USERN_START] == SQLITE_VEC0_USER_COLUMN_KIND_VECTOR; } /** - * Returns the vector index of the given vector column index. + * Returns the vector index of the given user column index. * ONLY call if validated with vec0_column_idx_is_vector before */ int vec0_column_idx_to_vector_idx(vec0_vtab *pVtab, int column_idx) { UNUSED_PARAMETER(pVtab); - return column_idx - VEC0_COLUMN_VECTORN_START; + return pVtab->user_column_idxs[column_idx - VEC0_COLUMN_USERN_START]; +} +/** + * Returns 1 if the given column-based index is a "partition key" column, + * 0 otherwise. + */ +int vec0_column_idx_is_partition(vec0_vtab *pVtab, int column_idx) { + return column_idx >= VEC0_COLUMN_USERN_START && + column_idx <= (VEC0_COLUMN_USERN_START + vec0_num_defined_user_columns(pVtab) - 1) && + pVtab->user_column_kinds[column_idx - VEC0_COLUMN_USERN_START] == SQLITE_VEC0_USER_COLUMN_KIND_PARTITION; +} + +/** + * Returns the partition column index of the given user column index. + * ONLY call if validated with vec0_column_idx_is_vector before + */ +int vec0_column_idx_to_partition_idx(vec0_vtab *pVtab, int column_idx) { + UNUSED_PARAMETER(pVtab); + return pVtab->user_column_idxs[column_idx - VEC0_COLUMN_USERN_START]; +} + +/** + * Returns 1 if the given column-based index is a auxiliary column, + * 0 otherwise. + */ +int vec0_column_idx_is_auxiliary(vec0_vtab *pVtab, int column_idx) { + return column_idx >= VEC0_COLUMN_USERN_START && + column_idx <= (VEC0_COLUMN_USERN_START + vec0_num_defined_user_columns(pVtab) - 1) && + pVtab->user_column_kinds[column_idx - VEC0_COLUMN_USERN_START] == SQLITE_VEC0_USER_COLUMN_KIND_AUXILIARY; +} + +/** + * Returns the auxiliary column index of the given user column index. + * ONLY call if validated with vec0_column_idx_to_partition_idx before + */ +int vec0_column_idx_to_auxiliary_idx(vec0_vtab *pVtab, int column_idx) { + UNUSED_PARAMETER(pVtab); + return pVtab->user_column_idxs[column_idx - VEC0_COLUMN_USERN_START]; +} + +/** + * Returns 1 if the given column-based index is a metadata column, + * 0 otherwise. + */ +int vec0_column_idx_is_metadata(vec0_vtab *pVtab, int column_idx) { + return column_idx >= VEC0_COLUMN_USERN_START && + column_idx <= (VEC0_COLUMN_USERN_START + vec0_num_defined_user_columns(pVtab) - 1) && + pVtab->user_column_kinds[column_idx - VEC0_COLUMN_USERN_START] == SQLITE_VEC0_USER_COLUMN_KIND_METADATA; +} + +/** + * Returns the metadata column index of the given user column index. + * ONLY call if validated with vec0_column_idx_is_metadata before + */ +int vec0_column_idx_to_metadata_idx(vec0_vtab *pVtab, int column_idx) { + UNUSED_PARAMETER(pVtab); + return pVtab->user_column_idxs[column_idx - VEC0_COLUMN_USERN_START]; } +/** + * @brief Retrieve the chunk_id, chunk_offset, and possible "id" value + * of a vec0_vtab row with the provided rowid + * + * @param p vec0_vtab + * @param rowid the rowid of the row to query + * @param id output, optional sqlite3_value to provide the id. + * Useful for text PK rows. Must be freed with sqlite3_value_free() + * @param chunk_id output, the chunk_id the row belongs to + * @param chunk_offset output, the offset within the chunk the row belongs to + * @return SQLITE_ROW on success, error code otherwise. SQLITE_EMPTY if row DNE + */ int vec0_get_chunk_position(vec0_vtab *p, i64 rowid, sqlite3_value **id, i64 *chunk_id, i64 *chunk_offset) { int rc; @@ -3330,7 +3755,7 @@ int vec0_get_chunk_position(vec0_vtab *p, i64 rowid, sqlite3_value **id, sqlite3_bind_int64(p->stmtRowidsGetChunkPosition, 1, rowid); rc = sqlite3_step(p->stmtRowidsGetChunkPosition); - // special case: when no results, return SQLITE_EMPTY to convene "that chunk + // special case: when no results, return SQLITE_EMPTY to convey "that chunk // position doesnt exist" if (rc == SQLITE_DONE) { rc = SQLITE_EMPTY; @@ -3523,13 +3948,209 @@ int vec0_get_vector_data(vec0_vtab *pVtab, i64 rowid, int vector_column_idx, return rc; } -int vec0_get_latest_chunk_rowid(vec0_vtab *p, i64 *chunk_rowid) { +/** + * @brief Retrieve the sqlite3_value of the i'th partition value for the given row. + * + * @param pVtab - the vec0_vtab in questions + * @param rowid - rowid of target row + * @param partition_idx - which partition column to retrieve + * @param outValue - output sqlite3_value + * @return int - SQLITE_OK on success, otherwise error code + */ +int vec0_get_partition_value_for_rowid(vec0_vtab *pVtab, i64 rowid, int partition_idx, sqlite3_value ** outValue) { + int rc; + i64 chunk_id; + i64 chunk_offset; + rc = vec0_get_chunk_position(pVtab, rowid, NULL, &chunk_id, &chunk_offset); + if(rc != SQLITE_OK) { + return rc; + } + sqlite3_stmt * stmt = NULL; + char * zSql = sqlite3_mprintf("SELECT partition%02d FROM " VEC0_SHADOW_CHUNKS_NAME " WHERE chunk_id = ?", partition_idx, pVtab->schemaName, pVtab->tableName); + if(!zSql) { + return SQLITE_NOMEM; + } + rc = sqlite3_prepare_v2(pVtab->db, zSql, -1, &stmt, NULL); + sqlite3_free(zSql); + if(rc != SQLITE_OK) { + return rc; + } + sqlite3_bind_int64(stmt, 1, chunk_id); + rc = sqlite3_step(stmt); + if(rc != SQLITE_ROW) { + rc = SQLITE_ERROR; + goto done; + } + *outValue = sqlite3_value_dup(sqlite3_column_value(stmt, 0)); + if(!*outValue) { + rc = SQLITE_NOMEM; + goto done; + } + rc = SQLITE_OK; + + done: + sqlite3_finalize(stmt); + return rc; + +} + +/** + * @brief Get the value of an auxiliary column for the given rowid + * + * @param pVtab vec0_vtab + * @param rowid the rowid of the row to lookup + * @param auxiliary_idx aux index of the column we care about + * @param outValue Output sqlite3_value to store + * @return int SQLITE_OK on success, error code otherwise + */ +int vec0_get_auxiliary_value_for_rowid(vec0_vtab *pVtab, i64 rowid, int auxiliary_idx, sqlite3_value ** outValue) { + int rc; + sqlite3_stmt * stmt = NULL; + char * zSql = sqlite3_mprintf("SELECT value%02d FROM " VEC0_SHADOW_AUXILIARY_NAME " WHERE rowid = ?", auxiliary_idx, pVtab->schemaName, pVtab->tableName); + if(!zSql) { + return SQLITE_NOMEM; + } + rc = sqlite3_prepare_v2(pVtab->db, zSql, -1, &stmt, NULL); + sqlite3_free(zSql); + if(rc != SQLITE_OK) { + return rc; + } + sqlite3_bind_int64(stmt, 1, rowid); + rc = sqlite3_step(stmt); + if(rc != SQLITE_ROW) { + rc = SQLITE_ERROR; + goto done; + } + *outValue = sqlite3_value_dup(sqlite3_column_value(stmt, 0)); + if(!*outValue) { + rc = SQLITE_NOMEM; + goto done; + } + rc = SQLITE_OK; + + done: + sqlite3_finalize(stmt); + return rc; +} + +/** + * @brief Result the given metadata value for the given row and metadata column index. + * Will traverse the metadatachunksNN table with BLOB I/0 for the given rowid. + * + * @param p + * @param rowid + * @param metadata_idx + * @param context + * @return int + */ +int vec0_result_metadata_value_for_rowid(vec0_vtab *p, i64 rowid, int metadata_idx, sqlite3_context * context) { + int rc; + i64 chunk_id; + i64 chunk_offset; + rc = vec0_get_chunk_position(p, rowid, NULL, &chunk_id, &chunk_offset); + if(rc != SQLITE_OK) { + return rc; + } + sqlite3_blob * blobValue; + rc = sqlite3_blob_open(p->db, p->schemaName, p->shadowMetadataChunksNames[metadata_idx], "data", chunk_id, 0, &blobValue); + if(rc != SQLITE_OK) { + return rc; + } + + switch(p->metadata_columns[metadata_idx].kind) { + case VEC0_METADATA_COLUMN_KIND_BOOLEAN: { + u8 block; + rc = sqlite3_blob_read(blobValue, &block, sizeof(block), chunk_offset / CHAR_BIT); + if(rc != SQLITE_OK) { + goto done; + } + int value = block >> ((chunk_offset % CHAR_BIT)) & 1; + sqlite3_result_int(context, value); + break; + } + case VEC0_METADATA_COLUMN_KIND_INTEGER: { + i64 value; + rc = sqlite3_blob_read(blobValue, &value, sizeof(value), chunk_offset * sizeof(i64)); + if(rc != SQLITE_OK) { + goto done; + } + sqlite3_result_int64(context, value); + break; + } + case VEC0_METADATA_COLUMN_KIND_FLOAT: { + double value; + rc = sqlite3_blob_read(blobValue, &value, sizeof(value), chunk_offset * sizeof(double)); + if(rc != SQLITE_OK) { + goto done; + } + sqlite3_result_double(context, value); + break; + } + case VEC0_METADATA_COLUMN_KIND_TEXT: { + u8 view[VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + rc = sqlite3_blob_read(blobValue, &view, VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH, chunk_offset * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH); + if(rc != SQLITE_OK) { + goto done; + } + int length = ((int *)view)[0]; + if(length <= VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + sqlite3_result_text(context, (const char*) (view + 4), length, SQLITE_TRANSIENT); + } + else { + sqlite3_stmt * stmt; + const char * zSql = sqlite3_mprintf("SELECT data FROM " VEC0_SHADOW_METADATA_TEXT_DATA_NAME " WHERE rowid = ?", p->schemaName, p->tableName, metadata_idx); + if(!zSql) { + rc = SQLITE_ERROR; + goto done; + } + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, NULL); + sqlite3_free((void *) zSql); + if(rc != SQLITE_OK) { + goto done; + } + sqlite3_bind_int64(stmt, 1, rowid); + rc = sqlite3_step(stmt); + if(rc != SQLITE_ROW) { + sqlite3_finalize(stmt); + rc = SQLITE_ERROR; + goto done; + } + sqlite3_result_value(context, sqlite3_column_value(stmt, 0)); + sqlite3_finalize(stmt); + rc = SQLITE_OK; + } + break; + } + } + done: + // blobValue is read-only, will not fail on close + sqlite3_blob_close(blobValue); + return rc; + +} + +int vec0_get_latest_chunk_rowid(vec0_vtab *p, i64 *chunk_rowid, sqlite3_value ** partitionKeyValues) { int rc; const char *zSql; // lazy initialize stmtLatestChunk when needed. May be cleared during xSync() if (!p->stmtLatestChunk) { - zSql = sqlite3_mprintf("SELECT max(rowid) FROM " VEC0_SHADOW_CHUNKS_NAME, + if(p->numPartitionColumns > 0) { + sqlite3_str * s = sqlite3_str_new(NULL); + sqlite3_str_appendf(s, "SELECT max(rowid) FROM " VEC0_SHADOW_CHUNKS_NAME " WHERE ", + p->schemaName, p->tableName); + + for(int i = 0; i < p->numPartitionColumns; i++) { + if(i != 0) { + sqlite3_str_appendall(s, " AND "); + } + sqlite3_str_appendf(s, " partition%02d = ? ", i); + } + zSql = sqlite3_str_finish(s); + }else { + zSql = sqlite3_mprintf("SELECT max(rowid) FROM " VEC0_SHADOW_CHUNKS_NAME, p->schemaName, p->tableName); + } + if (!zSql) { rc = SQLITE_NOMEM; goto cleanup; @@ -3544,6 +4165,10 @@ int vec0_get_latest_chunk_rowid(vec0_vtab *p, i64 *chunk_rowid) { } } + for(int i = 0; i < p->numPartitionColumns; i++) { + sqlite3_bind_value(p->stmtLatestChunk, i+1, (partitionKeyValues[i])); + } + rc = sqlite3_step(p->stmtLatestChunk); if (rc != SQLITE_ROW) { // IMP: V31559_15629 @@ -3551,6 +4176,10 @@ int vec0_get_latest_chunk_rowid(vec0_vtab *p, i64 *chunk_rowid) { rc = SQLITE_ERROR; goto cleanup; } + if(sqlite3_column_type(p->stmtLatestChunk, 0) == SQLITE_NULL){ + rc = SQLITE_EMPTY; + goto cleanup; + } *chunk_rowid = sqlite3_column_int64(p->stmtLatestChunk, 0); rc = sqlite3_step(p->stmtLatestChunk); if (rc != SQLITE_DONE) { @@ -3566,6 +4195,7 @@ int vec0_get_latest_chunk_rowid(vec0_vtab *p, i64 *chunk_rowid) { cleanup: if (p->stmtLatestChunk) { sqlite3_reset(p->stmtLatestChunk); + sqlite3_clear_bindings(p->stmtLatestChunk); } return rc; } @@ -3592,7 +4222,7 @@ int vec0_rowids_insert_rowid(vec0_vtab *p, i64 rowid) { } } -#ifdef SQLITE_THREADSAFE +#if SQLITE_THREADSAFE if (sqlite3_mutex_enter) { sqlite3_mutex_enter(sqlite3_db_mutex(p->db)); entered = 1; @@ -3624,7 +4254,7 @@ int vec0_rowids_insert_rowid(vec0_vtab *p, i64 rowid) { sqlite3_clear_bindings(p->stmtRowidsInsertRowid); } -#ifdef SQLITE_THREADSAFE +#if SQLITE_THREADSAFE if (sqlite3_mutex_leave && entered) { sqlite3_mutex_leave(sqlite3_db_mutex(p->db)); } @@ -3654,7 +4284,7 @@ int vec0_rowids_insert_id(vec0_vtab *p, sqlite3_value *idValue, i64 *rowid) { } } -#ifdef SQLITE_THREADSAFE +#if SQLITE_THREADSAFE if (sqlite3_mutex_enter) { sqlite3_mutex_enter(sqlite3_db_mutex(p->db)); entered = 1; @@ -3691,7 +4321,7 @@ int vec0_rowids_insert_id(vec0_vtab *p, sqlite3_value *idValue, i64 *rowid) { sqlite3_clear_bindings(p->stmtRowidsInsertId); } -#ifdef SQLITE_THREADSAFE +#if SQLITE_THREADSAFE if (sqlite3_mutex_leave && entered) { sqlite3_mutex_leave(sqlite3_db_mutex(p->db)); } @@ -3699,6 +4329,20 @@ int vec0_rowids_insert_id(vec0_vtab *p, sqlite3_value *idValue, i64 *rowid) { return rc; } +int vec0_metadata_chunk_size(vec0_metadata_column_kind kind, int chunk_size) { + switch(kind) { + case VEC0_METADATA_COLUMN_KIND_BOOLEAN: + return chunk_size / 8; + case VEC0_METADATA_COLUMN_KIND_INTEGER: + return chunk_size * sizeof(i64); + case VEC0_METADATA_COLUMN_KIND_FLOAT: + return chunk_size * sizeof(double); + case VEC0_METADATA_COLUMN_KIND_TEXT: + return chunk_size * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH; + } + return 0; +} + int vec0_rowids_update_position(vec0_vtab *p, i64 rowid, i64 chunk_rowid, i64 chunk_offset) { int rc = SQLITE_OK; @@ -3724,6 +4368,7 @@ int vec0_rowids_update_position(vec0_vtab *p, i64 rowid, i64 chunk_rowid, sqlite3_bind_int64(p->stmtRowidsUpdatePosition, 1, chunk_rowid); sqlite3_bind_int64(p->stmtRowidsUpdatePosition, 2, chunk_offset); sqlite3_bind_int64(p->stmtRowidsUpdatePosition, 3, rowid); + rc = sqlite3_step(p->stmtRowidsUpdatePosition); if (rc != SQLITE_DONE) { // IMP: V21925_05995 @@ -3754,21 +4399,39 @@ int vec0_rowids_update_position(vec0_vtab *p, i64 rowid, i64 chunk_rowid, * rowid to insert new blank rows into _vector_chunksXX tables. * * @param p: vec0 table to add new chunk - * @param chunk_rowid: Putput pointer, if not NULL, then will be filled with the + * @param paritionKeyValues: Array of partition key valeus for the new chunk, if available + * @param chunk_rowid: Output pointer, if not NULL, then will be filled with the * new chunk rowid. * @return int SQLITE_OK on success, error code otherwise. */ -int vec0_new_chunk(vec0_vtab *p, i64 *chunk_rowid) { +int vec0_new_chunk(vec0_vtab *p, sqlite3_value ** partitionKeyValues, i64 *chunk_rowid) { int rc; char *zSql; sqlite3_stmt *stmt; i64 rowid; // Step 1: Insert a new row in _chunks, capture that new rowid - zSql = sqlite3_mprintf("INSERT INTO " VEC0_SHADOW_CHUNKS_NAME + if(p->numPartitionColumns > 0) { + sqlite3_str * s = sqlite3_str_new(NULL); + sqlite3_str_appendf(s, "INSERT INTO " VEC0_SHADOW_CHUNKS_NAME, p->schemaName, p->tableName); + sqlite3_str_appendall(s, "(size, validity, rowids"); + for(int i = 0; i < p->numPartitionColumns; i++) { + sqlite3_str_appendf(s, ", partition%02d", i); + } + sqlite3_str_appendall(s, ") VALUES (?, ?, ?"); + for(int i = 0; i < p->numPartitionColumns; i++) { + sqlite3_str_appendall(s, ", ?"); + } + sqlite3_str_appendall(s, ")"); + + zSql = sqlite3_str_finish(s); + }else { + zSql = sqlite3_mprintf("INSERT INTO " VEC0_SHADOW_CHUNKS_NAME "(size, validity, rowids) " "VALUES (?, ?, ?);", p->schemaName, p->tableName); + } + if (!zSql) { return SQLITE_NOMEM; } @@ -3779,7 +4442,7 @@ int vec0_new_chunk(vec0_vtab *p, i64 *chunk_rowid) { return rc; } -#ifdef SQLITE_THREADSAFE +#if SQLITE_THREADSAFE if (sqlite3_mutex_enter) { sqlite3_mutex_enter(sqlite3_db_mutex(p->db)); } @@ -3789,10 +4452,14 @@ int vec0_new_chunk(vec0_vtab *p, i64 *chunk_rowid) { sqlite3_bind_zeroblob(stmt, 2, p->chunk_size / CHAR_BIT); // validity bitmap sqlite3_bind_zeroblob(stmt, 3, p->chunk_size * sizeof(i64)); // rowids + for(int i = 0; i < p->numPartitionColumns; i++) { + sqlite3_bind_value(stmt, 4 + i, partitionKeyValues[i]); + } + rc = sqlite3_step(stmt); int failed = rc != SQLITE_DONE; rowid = sqlite3_last_insert_rowid(p->db); -#ifdef SQLITE_THREADSAFE +#if SQLITE_THREADSAFE if (sqlite3_mutex_leave) { sqlite3_mutex_leave(sqlite3_db_mutex(p->db)); } @@ -3805,14 +4472,18 @@ int vec0_new_chunk(vec0_vtab *p, i64 *chunk_rowid) { // Step 2: Create new vector chunks for each vector column, with // that new chunk_rowid. - for (int i = 0; i < p->numVectorColumns; i++) { + for (int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_VECTOR) { + continue; + } + int vector_column_idx = p->user_column_idxs[i]; i64 vectorsSize = - p->chunk_size * vector_column_byte_size(p->vector_columns[i]); + p->chunk_size * vector_column_byte_size(p->vector_columns[vector_column_idx]); zSql = sqlite3_mprintf("INSERT INTO " VEC0_SHADOW_VECTOR_N_NAME "(rowid, vectors)" "VALUES (?, ?)", - p->schemaName, p->tableName, i); + p->schemaName, p->tableName, vector_column_idx); if (!zSql) { return SQLITE_NOMEM; } @@ -3834,6 +4505,38 @@ int vec0_new_chunk(vec0_vtab *p, i64 *chunk_rowid) { } } + // Step 3: Create new metadata chunks for each metadata column + for (int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_METADATA) { + continue; + } + int metadata_column_idx = p->user_column_idxs[i]; + zSql = sqlite3_mprintf("INSERT INTO " VEC0_SHADOW_METADATA_N_NAME + "(rowid, data)" + "VALUES (?, ?)", + p->schemaName, p->tableName, metadata_column_idx); + if (!zSql) { + return SQLITE_NOMEM; + } + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, NULL); + sqlite3_free(zSql); + + if (rc != SQLITE_OK) { + sqlite3_finalize(stmt); + return rc; + } + + sqlite3_bind_int64(stmt, 1, rowid); + sqlite3_bind_zeroblob64(stmt, 2, vec0_metadata_chunk_size(p->metadata_columns[metadata_column_idx].kind, p->chunk_size)); + + rc = sqlite3_step(stmt); + sqlite3_finalize(stmt); + if (rc != SQLITE_DONE) { + return rc; + } + } + + if (chunk_rowid) { *chunk_rowid = rowid; } @@ -3841,19 +4544,6 @@ int vec0_new_chunk(vec0_vtab *p, i64 *chunk_rowid) { return SQLITE_OK; } -// Possible query plans for xBestIndex on vec0 tables. -typedef enum { - // Full scan, every row is queried. - SQLITE_VEC0_QUERYPLAN_FULLSCAN, - // A single row is queried by rowid/id - SQLITE_VEC0_QUERYPLAN_POINT, - // A KNN-style query is made on a specific vector column. - // Requires 1) a MATCH/compatible distance contraint on - // a single vector column, 2) ORDER BY distance, and 3) - // either a 'LIMIT ?' or 'k=?' contraint - SQLITE_VEC0_QUERYPLAN_KNN, -} vec0_query_plan; - struct vec0_query_fullscan_data { sqlite3_stmt *rowids_stmt; i8 done; @@ -3906,6 +4596,14 @@ void vec0_query_point_data_clear(struct vec0_query_point_data *point_data) { } } +typedef enum { + // If any values are updated, please update the ARCHITECTURE.md docs accordingly! + + VEC0_QUERY_PLAN_FULLSCAN = '1', + VEC0_QUERY_PLAN_POINT = '2', + VEC0_QUERY_PLAN_KNN = '3', +} vec0_query_plan; + typedef struct vec0_cursor vec0_cursor; struct vec0_cursor { sqlite3_vtab_cursor base; @@ -3916,6 +4614,24 @@ struct vec0_cursor { struct vec0_query_point_data *point_data; }; +void vec0_cursor_clear(vec0_cursor *pCur) { + if (pCur->fullscan_data) { + vec0_query_fullscan_data_clear(pCur->fullscan_data); + sqlite3_free(pCur->fullscan_data); + pCur->fullscan_data = NULL; + } + if (pCur->knn_data) { + vec0_query_knn_data_clear(pCur->knn_data); + sqlite3_free(pCur->knn_data); + pCur->knn_data = NULL; + } + if (pCur->point_data) { + vec0_query_point_data_clear(pCur->point_data); + sqlite3_free(pCur->point_data); + pCur->point_data = NULL; + } +} + #define VEC_CONSTRUCTOR_ERROR "vec0 constructor error: " static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, sqlite3_vtab **ppVtab, char **pzErr, bool isCreate) { @@ -3934,15 +4650,27 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, // option int chunk_size = -1; int numVectorColumns = 0; + int numPartitionColumns = 0; + int numAuxiliaryColumns = 0; + int numMetadataColumns = 0; + int user_column_idx = 0; // track if a "primary key" column is defined char *pkColumnName = NULL; int pkColumnNameLength; - int pkColumnType; + int pkColumnType = SQLITE_INTEGER; for (int i = 3; i < argc; i++) { - struct VectorColumnDefinition c; - rc = parse_vector_column(argv[i], strlen(argv[i]), &c); + struct VectorColumnDefinition vecColumn; + struct Vec0PartitionColumnDefinition partitionColumn; + struct Vec0AuxiliaryColumnDefinition auxColumn; + struct Vec0MetadataColumnDefinition metadataColumn; + char *cName = NULL; + int cNameLength; + int cType; + + // Scenario #1: Constructor argument is a vector column definition, ie `foo float[1024]` + rc = vec0_parse_vector_column(argv[i], strlen(argv[i]), &vecColumn); if (rc == SQLITE_ERROR) { *pzErr = sqlite3_mprintf( VEC_CONSTRUCTOR_ERROR "could not parse vector column '%s'", argv[i]); @@ -3950,30 +4678,59 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, } if (rc == SQLITE_OK) { if (numVectorColumns >= VEC0_MAX_VECTOR_COLUMNS) { - sqlite3_free(c.name); + sqlite3_free(vecColumn.name); *pzErr = sqlite3_mprintf(VEC_CONSTRUCTOR_ERROR "Too many provided vector columns, maximum %d", VEC0_MAX_VECTOR_COLUMNS); goto error; } - #define SQLITE_VEC_VEC0_MAX_DIMENSIONS 8192 - if(c.dimensions > SQLITE_VEC_VEC0_MAX_DIMENSIONS) { - sqlite3_free(c.name); - *pzErr = sqlite3_mprintf(VEC_CONSTRUCTOR_ERROR - "Dimension on vector column too large, provided %lld, maximum %lld", - (i64) c.dimensions, - SQLITE_VEC_VEC0_MAX_DIMENSIONS); + + if (vecColumn.dimensions > SQLITE_VEC_VEC0_MAX_DIMENSIONS) { + sqlite3_free(vecColumn.name); + *pzErr = sqlite3_mprintf( + VEC_CONSTRUCTOR_ERROR + "Dimension on vector column too large, provided %lld, maximum %lld", + (i64)vecColumn.dimensions, SQLITE_VEC_VEC0_MAX_DIMENSIONS); goto error; } - memcpy(&pNew->vector_columns[numVectorColumns], &c, sizeof(c)); + pNew->user_column_kinds[user_column_idx] = SQLITE_VEC0_USER_COLUMN_KIND_VECTOR; + pNew->user_column_idxs[user_column_idx] = numVectorColumns; + memcpy(&pNew->vector_columns[numVectorColumns], &vecColumn, sizeof(vecColumn)); numVectorColumns++; + user_column_idx++; + continue; } - char *cName = NULL; - int cNameLength; - int cType; - rc = parse_primary_key_definition(argv[i], strlen(argv[i]), &cName, + // Scenario #2: Constructor argument is a partition key column definition, ie `user_id text partition key` + rc = vec0_parse_partition_key_definition(argv[i], strlen(argv[i]), &cName, + &cNameLength, &cType); + if (rc == SQLITE_OK) { + if (numPartitionColumns >= VEC0_MAX_PARTITION_COLUMNS) { + *pzErr = sqlite3_mprintf( + VEC_CONSTRUCTOR_ERROR + "More than %d partition key columns were provided", + VEC0_MAX_PARTITION_COLUMNS); + goto error; + } + partitionColumn.type = cType; + partitionColumn.name_length = cNameLength; + partitionColumn.name = sqlite3_mprintf("%.*s", cNameLength, cName); + if(!partitionColumn.name) { + rc = SQLITE_NOMEM; + goto error; + } + + pNew->user_column_kinds[user_column_idx] = SQLITE_VEC0_USER_COLUMN_KIND_PARTITION; + pNew->user_column_idxs[user_column_idx] = numPartitionColumns; + memcpy(&pNew->paritition_columns[numPartitionColumns], &partitionColumn, sizeof(partitionColumn)); + numPartitionColumns++; + user_column_idx++; + continue; + } + + // Scenario #3: Constructor argument is a primary key column definition, ie `article_id text primary key` + rc = vec0_parse_primary_key_definition(argv[i], strlen(argv[i]), &cName, &cNameLength, &cType); if (rc == SQLITE_OK) { if (pkColumnName) { @@ -3990,18 +4747,74 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, continue; } - char *key; - char *value; - int keyLength, valueLength; - rc = vec0_parse_table_option(argv[i], strlen(argv[i]), &key, &keyLength, - &value, &valueLength); - if (rc == SQLITE_ERROR) { - *pzErr = sqlite3_mprintf( - VEC_CONSTRUCTOR_ERROR "could not parse table option '%s'", argv[i]); - goto error; - } - if (rc == SQLITE_OK) { - if (sqlite3_strnicmp(key, "chunk_size", keyLength) == 0) { + // Scenario #4: Constructor argument is a auxiliary column definition, ie `+contents text` + rc = vec0_parse_auxiliary_column_definition(argv[i], strlen(argv[i]), &cName, + &cNameLength, &cType); + if(rc == SQLITE_OK) { + if (numAuxiliaryColumns >= VEC0_MAX_AUXILIARY_COLUMNS) { + *pzErr = sqlite3_mprintf( + VEC_CONSTRUCTOR_ERROR + "More than %d auxiliary columns were provided", + VEC0_MAX_AUXILIARY_COLUMNS); + goto error; + } + auxColumn.type = cType; + auxColumn.name_length = cNameLength; + auxColumn.name = sqlite3_mprintf("%.*s", cNameLength, cName); + if(!auxColumn.name) { + rc = SQLITE_NOMEM; + goto error; + } + + pNew->user_column_kinds[user_column_idx] = SQLITE_VEC0_USER_COLUMN_KIND_AUXILIARY; + pNew->user_column_idxs[user_column_idx] = numAuxiliaryColumns; + memcpy(&pNew->auxiliary_columns[numAuxiliaryColumns], &auxColumn, sizeof(auxColumn)); + numAuxiliaryColumns++; + user_column_idx++; + continue; + } + + vec0_metadata_column_kind kind; + rc = vec0_parse_metadata_column_definition(argv[i], strlen(argv[i]), &cName, + &cNameLength, &kind); + if(rc == SQLITE_OK) { + if (numMetadataColumns >= VEC0_MAX_METADATA_COLUMNS) { + *pzErr = sqlite3_mprintf( + VEC_CONSTRUCTOR_ERROR + "More than %d metadata columns were provided", + VEC0_MAX_METADATA_COLUMNS); + goto error; + } + metadataColumn.kind = kind; + metadataColumn.name_length = cNameLength; + metadataColumn.name = sqlite3_mprintf("%.*s", cNameLength, cName); + if(!metadataColumn.name) { + rc = SQLITE_NOMEM; + goto error; + } + + pNew->user_column_kinds[user_column_idx] = SQLITE_VEC0_USER_COLUMN_KIND_METADATA; + pNew->user_column_idxs[user_column_idx] = numMetadataColumns; + memcpy(&pNew->metadata_columns[numMetadataColumns], &metadataColumn, sizeof(metadataColumn)); + numMetadataColumns++; + user_column_idx++; + continue; + } + + // Scenario #4: Constructor argument is a table-level option, ie `chunk_size` + + char *key; + char *value; + int keyLength, valueLength; + rc = vec0_parse_table_option(argv[i], strlen(argv[i]), &key, &keyLength, + &value, &valueLength); + if (rc == SQLITE_ERROR) { + *pzErr = sqlite3_mprintf( + VEC_CONSTRUCTOR_ERROR "could not parse table option '%s'", argv[i]); + goto error; + } + if (rc == SQLITE_OK) { + if (sqlite3_strnicmp(key, "chunk_size", keyLength) == 0) { chunk_size = atoi(value); if (chunk_size <= 0) { // IMP: V01931_18769 @@ -4016,10 +4829,10 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, "chunk_size must be divisible by 8"); goto error; } - #define SQLITE_VEC_CHUNK_SIZE_MAX 4096 +#define SQLITE_VEC_CHUNK_SIZE_MAX 4096 if (chunk_size > SQLITE_VEC_CHUNK_SIZE_MAX) { - *pzErr = sqlite3_mprintf(VEC_CONSTRUCTOR_ERROR - "chunk_size too large"); + *pzErr = + sqlite3_mprintf(VEC_CONSTRUCTOR_ERROR "chunk_size too large"); goto error; } } else { @@ -4030,6 +4843,8 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, } continue; } + + // Scenario #5: Unknown constructor argument *pzErr = sqlite3_mprintf(VEC_CONSTRUCTOR_ERROR "Could not parse '%s'", argv[i]); goto error; @@ -4053,10 +4868,38 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, } else { sqlite3_str_appendall(createStr, "rowid, "); } - for (int i = 0; i < numVectorColumns; i++) { - sqlite3_str_appendf(createStr, "\"%.*w\", ", - pNew->vector_columns[i].name_length, - pNew->vector_columns[i].name); + for (int i = 0; i < numVectorColumns + numPartitionColumns + numAuxiliaryColumns + numMetadataColumns; i++) { + switch(pNew->user_column_kinds[i]) { + case SQLITE_VEC0_USER_COLUMN_KIND_VECTOR: { + int vector_idx = pNew->user_column_idxs[i]; + sqlite3_str_appendf(createStr, "\"%.*w\", ", + pNew->vector_columns[vector_idx].name_length, + pNew->vector_columns[vector_idx].name); + break; + } + case SQLITE_VEC0_USER_COLUMN_KIND_PARTITION: { + int partition_idx = pNew->user_column_idxs[i]; + sqlite3_str_appendf(createStr, "\"%.*w\", ", + pNew->paritition_columns[partition_idx].name_length, + pNew->paritition_columns[partition_idx].name); + break; + } + case SQLITE_VEC0_USER_COLUMN_KIND_AUXILIARY: { + int auxiliary_idx = pNew->user_column_idxs[i]; + sqlite3_str_appendf(createStr, "\"%.*w\", ", + pNew->auxiliary_columns[auxiliary_idx].name_length, + pNew->auxiliary_columns[auxiliary_idx].name); + break; + } + case SQLITE_VEC0_USER_COLUMN_KIND_METADATA: { + int metadata_idx = pNew->user_column_idxs[i]; + sqlite3_str_appendf(createStr, "\"%.*w\", ", + pNew->metadata_columns[metadata_idx].name_length, + pNew->metadata_columns[metadata_idx].name); + break; + } + } + } sqlite3_str_appendall(createStr, " distance hidden, k hidden) "); if (pkColumnName) { @@ -4097,9 +4940,10 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, goto error; } pNew->numVectorColumns = numVectorColumns; - if (!pNew->numVectorColumns) { - goto error; - } + pNew->numPartitionColumns = numPartitionColumns; + pNew->numAuxiliaryColumns = numAuxiliaryColumns; + pNew->numMetadataColumns = numMetadataColumns; + for (int i = 0; i < pNew->numVectorColumns; i++) { pNew->shadowVectorChunksNames[i] = sqlite3_mprintf("%s_vector_chunks%02d", tableName, i); @@ -4107,6 +4951,13 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, goto error; } } + for (int i = 0; i < pNew->numMetadataColumns; i++) { + pNew->shadowMetadataChunksNames[i] = + sqlite3_mprintf("%s_metadatachunks%02d", tableName, i); + if (!pNew->shadowMetadataChunksNames[i]) { + goto error; + } + } pNew->chunk_size = chunk_size; // if xCreate, then create the necessary shadow tables @@ -4114,13 +4965,78 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, sqlite3_stmt *stmt; int rc; + char * zCreateInfo = sqlite3_mprintf("CREATE TABLE "VEC0_SHADOW_INFO_NAME " (key text primary key, value any)", pNew->schemaName, pNew->tableName); + if(!zCreateInfo) { + goto error; + } + rc = sqlite3_prepare_v2(db, zCreateInfo, -1, &stmt, NULL); + + sqlite3_free((void *) zCreateInfo); + if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) { + // TODO(IMP) + sqlite3_finalize(stmt); + *pzErr = sqlite3_mprintf("Could not create '_info' shadow table: %s", + sqlite3_errmsg(db)); + goto error; + } + sqlite3_finalize(stmt); + + char * zSeedInfo = sqlite3_mprintf( + "INSERT INTO "VEC0_SHADOW_INFO_NAME "(key, value) VALUES " + "(?1, ?2), (?3, ?4), (?5, ?6), (?7, ?8) ", + pNew->schemaName, pNew->tableName + ); + if(!zSeedInfo) { + goto error; + } + rc = sqlite3_prepare_v2(db, zSeedInfo, -1, &stmt, NULL); + sqlite3_free((void *) zSeedInfo); + if (rc != SQLITE_OK) { + // TODO(IMP) + sqlite3_finalize(stmt); + *pzErr = sqlite3_mprintf("Could not seed '_info' shadow table: %s", + sqlite3_errmsg(db)); + goto error; + } + sqlite3_bind_text(stmt, 1, "CREATE_VERSION", -1, SQLITE_STATIC); + sqlite3_bind_text(stmt, 2, SQLITE_VEC_VERSION, -1, SQLITE_STATIC); + sqlite3_bind_text(stmt, 3, "CREATE_VERSION_MAJOR", -1, SQLITE_STATIC); + sqlite3_bind_int(stmt, 4, SQLITE_VEC_VERSION_MAJOR); + sqlite3_bind_text(stmt, 5, "CREATE_VERSION_MINOR", -1, SQLITE_STATIC); + sqlite3_bind_int(stmt, 6, SQLITE_VEC_VERSION_MINOR); + sqlite3_bind_text(stmt, 7, "CREATE_VERSION_PATCH", -1, SQLITE_STATIC); + sqlite3_bind_int(stmt, 8, SQLITE_VEC_VERSION_PATCH); + + if(sqlite3_step(stmt) != SQLITE_DONE) { + // TODO(IMP) + sqlite3_finalize(stmt); + *pzErr = sqlite3_mprintf("Could not seed '_info' shadow table: %s", + sqlite3_errmsg(db)); + goto error; + } + sqlite3_finalize(stmt); + + + // create the _chunks shadow table - char *zCreateShadowChunks; - zCreateShadowChunks = sqlite3_mprintf(VEC0_SHADOW_CHUNKS_CREATE, + char *zCreateShadowChunks = NULL; + if(pNew->numPartitionColumns) { + sqlite3_str * s = sqlite3_str_new(NULL); + sqlite3_str_appendf(s, "CREATE TABLE " VEC0_SHADOW_CHUNKS_NAME "(", pNew->schemaName, pNew->tableName); + sqlite3_str_appendall(s, "chunk_id INTEGER PRIMARY KEY AUTOINCREMENT," "size INTEGER NOT NULL,"); + sqlite3_str_appendall(s, "sequence_id integer,"); + for(int i = 0; i < pNew->numPartitionColumns;i++) { + sqlite3_str_appendf(s, "partition%02d,", i); + } + sqlite3_str_appendall(s, "validity BLOB NOT NULL, rowids BLOB NOT NULL);"); + zCreateShadowChunks = sqlite3_str_finish(s); + }else { + zCreateShadowChunks = sqlite3_mprintf(VEC0_SHADOW_CHUNKS_CREATE, pNew->schemaName, pNew->tableName); - if (!zCreateShadowChunks) { - goto error; } + if (!zCreateShadowChunks) { + goto error; + } rc = sqlite3_prepare_v2(db, zCreateShadowChunks, -1, &stmt, 0); sqlite3_free((void *)zCreateShadowChunks); if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) { @@ -4175,10 +5091,65 @@ static int vec0_init(sqlite3 *db, void *pAux, int argc, const char *const *argv, sqlite3_finalize(stmt); } - rc = vec0_new_chunk(pNew, NULL); - if (rc != SQLITE_OK) { - *pzErr = sqlite3_mprintf("Could not create create an initial chunk"); - goto error; + for (int i = 0; i < pNew->numMetadataColumns; i++) { + char *zSql = sqlite3_mprintf("CREATE TABLE " VEC0_SHADOW_METADATA_N_NAME "(rowid PRIMARY KEY, data BLOB NOT NULL);", + pNew->schemaName, pNew->tableName, i); + if (!zSql) { + goto error; + } + rc = sqlite3_prepare_v2(db, zSql, -1, &stmt, 0); + sqlite3_free((void *)zSql); + if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) { + sqlite3_finalize(stmt); + *pzErr = sqlite3_mprintf( + "Could not create '_metata_chunks%02d' shadow table: %s", i, + sqlite3_errmsg(db)); + goto error; + } + sqlite3_finalize(stmt); + + if(pNew->metadata_columns[i].kind == VEC0_METADATA_COLUMN_KIND_TEXT) { + char *zSql = sqlite3_mprintf("CREATE TABLE " VEC0_SHADOW_METADATA_TEXT_DATA_NAME "(rowid PRIMARY KEY, data TEXT);", + pNew->schemaName, pNew->tableName, i); + if (!zSql) { + goto error; + } + rc = sqlite3_prepare_v2(db, zSql, -1, &stmt, 0); + sqlite3_free((void *)zSql); + if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) { + sqlite3_finalize(stmt); + *pzErr = sqlite3_mprintf( + "Could not create '_metadatatext%02d' shadow table: %s", i, + sqlite3_errmsg(db)); + goto error; + } + sqlite3_finalize(stmt); + + } + } + + if(pNew->numAuxiliaryColumns > 0) { + sqlite3_stmt * stmt; + sqlite3_str * s = sqlite3_str_new(NULL); + sqlite3_str_appendf(s, "CREATE TABLE " VEC0_SHADOW_AUXILIARY_NAME "( rowid integer PRIMARY KEY ", pNew->schemaName, pNew->tableName); + for(int i = 0; i < pNew->numAuxiliaryColumns; i++) { + sqlite3_str_appendf(s, ", value%02d", i); + } + sqlite3_str_appendall(s, ")"); + char *zSql = sqlite3_str_finish(s); + if(!zSql) { + goto error; + } + rc = sqlite3_prepare_v2(db, zSql, -1, &stmt, NULL); + if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) { + sqlite3_finalize(stmt); + *pzErr = sqlite3_mprintf( + "Could not create auxiliary shadow table: %s", + sqlite3_errmsg(db)); + + goto error; + } + sqlite3_finalize(stmt); } } @@ -4213,9 +5184,10 @@ static int vec0Destroy(sqlite3_vtab *pVtab) { int rc; const char *zSql; + // Free up any sqlite3_stmt, otherwise DROPs on those tables will fail vec0_free_resources(p); - // later: can't evidence-of here, bc always gives "SQL logic error" instead of + // TODO(test) later: can't evidence-of here, bc always gives "SQL logic error" instead of // provided error zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_CHUNKS_NAME, p->schemaName, p->tableName); @@ -4228,6 +5200,17 @@ static int vec0Destroy(sqlite3_vtab *pVtab) { } sqlite3_finalize(stmt); + zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_INFO_NAME, p->schemaName, + p->tableName); + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, 0); + sqlite3_free((void *)zSql); + if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) { + rc = SQLITE_ERROR; + vtab_set_error(pVtab, "could not drop info shadow table"); + goto done; + } + sqlite3_finalize(stmt); + zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_ROWIDS_NAME, p->schemaName, p->tableName); rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, 0); @@ -4249,12 +5232,48 @@ static int vec0Destroy(sqlite3_vtab *pVtab) { } sqlite3_finalize(stmt); } + + if(p->numAuxiliaryColumns > 0) { + zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_AUXILIARY_NAME, p->schemaName, p->tableName); + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, 0); + sqlite3_free((void *)zSql); + if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) { + rc = SQLITE_ERROR; + goto done; + } + sqlite3_finalize(stmt); + } + + + for (int i = 0; i < p->numMetadataColumns; i++) { + zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_METADATA_N_NAME, p->schemaName,p->tableName, i); + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, 0); + sqlite3_free((void *)zSql); + if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) { + rc = SQLITE_ERROR; + goto done; + } + sqlite3_finalize(stmt); + + if(p->metadata_columns[i].kind == VEC0_METADATA_COLUMN_KIND_TEXT) { + zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_METADATA_TEXT_DATA_NAME, p->schemaName,p->tableName, i); + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, 0); + sqlite3_free((void *)zSql); + if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) { + rc = SQLITE_ERROR; + goto done; + } + sqlite3_finalize(stmt); + } + } + stmt = NULL; rc = SQLITE_OK; done: sqlite3_finalize(stmt); vec0_free(p); + // If there was an error if (rc == SQLITE_OK) { sqlite3_free(p); } @@ -4272,34 +5291,47 @@ static int vec0Open(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor) { return SQLITE_OK; } -void vec0CursorClear(vec0_cursor *pCur) { - if (pCur->fullscan_data) { - vec0_query_fullscan_data_clear(pCur->fullscan_data); - sqlite3_free(pCur->fullscan_data); - pCur->fullscan_data = NULL; - } - if (pCur->knn_data) { - vec0_query_knn_data_clear(pCur->knn_data); - sqlite3_free(pCur->knn_data); - pCur->knn_data = NULL; - } - if (pCur->point_data) { - vec0_query_point_data_clear(pCur->point_data); - sqlite3_free(pCur->point_data); - pCur->point_data = NULL; - } -} - static int vec0Close(sqlite3_vtab_cursor *cur) { vec0_cursor *pCur = (vec0_cursor *)cur; - vec0CursorClear(pCur); + vec0_cursor_clear(pCur); sqlite3_free(pCur); return SQLITE_OK; } -#define VEC0_QUERY_PLAN_FULLSCAN "fullscan" -#define VEC0_QUERY_PLAN_POINT "point" -#define VEC0_QUERY_PLAN_KNN "knn" +// All the different type of "values" provided to argv/argc in vec0Filter. +// These enums denote the use and purpose of all of them. +typedef enum { + // If any values are updated, please update the ARCHITECTURE.md docs accordingly! + + VEC0_IDXSTR_KIND_KNN_MATCH = '{', + VEC0_IDXSTR_KIND_KNN_K = '}', + VEC0_IDXSTR_KIND_KNN_ROWID_IN = '[', + VEC0_IDXSTR_KIND_KNN_PARTITON_CONSTRAINT = ']', + VEC0_IDXSTR_KIND_POINT_ID = '!', + VEC0_IDXSTR_KIND_METADATA_CONSTRAINT = '&', +} vec0_idxstr_kind; + +// The different SQLITE_INDEX_CONSTRAINT values that vec0 partition key columns +// support, but as characters that fit nicely in idxstr. +typedef enum { + // If any values are updated, please update the ARCHITECTURE.md docs accordingly! + + VEC0_PARTITION_OPERATOR_EQ = 'a', + VEC0_PARTITION_OPERATOR_GT = 'b', + VEC0_PARTITION_OPERATOR_LE = 'c', + VEC0_PARTITION_OPERATOR_LT = 'd', + VEC0_PARTITION_OPERATOR_GE = 'e', + VEC0_PARTITION_OPERATOR_NE = 'f', +} vec0_partition_operator; +typedef enum { + VEC0_METADATA_OPERATOR_EQ = 'a', + VEC0_METADATA_OPERATOR_GT = 'b', + VEC0_METADATA_OPERATOR_LE = 'c', + VEC0_METADATA_OPERATOR_LT = 'd', + VEC0_METADATA_OPERATOR_GE = 'e', + VEC0_METADATA_OPERATOR_NE = 'f', + VEC0_METADATA_OPERATOR_IN = 'g', +} vec0_metadata_operator; static int vec0BestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *pIdxInfo) { vec0_vtab *p = (vec0_vtab *)pVTab; @@ -4321,19 +5353,20 @@ static int vec0BestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *pIdxInfo) { int iRowidTerm = -1; int iKTerm = -1; int iRowidInTerm = -1; + int hasAuxConstraint = 0; #ifdef SQLITE_VEC_DEBUG - printf("pIdxInfo->nOrderBy=%d\n", pIdxInfo->nOrderBy); + printf("pIdxInfo->nOrderBy=%d, pIdxInfo->nConstraint=%d\n", pIdxInfo->nOrderBy, pIdxInfo->nConstraint); #endif for (int i = 0; i < pIdxInfo->nConstraint; i++) { u8 vtabIn = 0; - #if COMPILER_SUPPORTS_VTAB_IN +#if COMPILER_SUPPORTS_VTAB_IN if (sqlite3_libversion_number() >= 3038000) { vtabIn = sqlite3_vtab_in(pIdxInfo, i, -1); } - #endif +#endif #ifdef SQLITE_VEC_DEBUG printf("xBestIndex [%d] usable=%d iColumn=%d op=%d vtabin=%d\n", i, @@ -4345,6 +5378,10 @@ static int vec0BestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *pIdxInfo) { int iColumn = pIdxInfo->aConstraint[i].iColumn; int op = pIdxInfo->aConstraint[i].op; + + if (op == SQLITE_INDEX_CONSTRAINT_LIMIT) { + iLimitTerm = i; + } if (op == SQLITE_INDEX_CONSTRAINT_MATCH && vec0_column_idx_is_vector(p, iColumn)) { if (iMatchTerm > -1) { @@ -4355,9 +5392,6 @@ static int vec0BestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *pIdxInfo) { iMatchTerm = i; iMatchVectorTerm = vec0_column_idx_to_vector_idx(p, iColumn); } - if (op == SQLITE_INDEX_CONSTRAINT_LIMIT) { - iLimitTerm = i; - } if (op == SQLITE_INDEX_CONSTRAINT_EQ && iColumn == VEC0_COLUMN_ID) { if (vtabIn) { if (iRowidInTerm != -1) { @@ -4374,88 +5408,276 @@ static int vec0BestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *pIdxInfo) { if (op == SQLITE_INDEX_CONSTRAINT_EQ && iColumn == vec0_column_k_idx(p)) { iKTerm = i; } + if( + (op != SQLITE_INDEX_CONSTRAINT_LIMIT && op != SQLITE_INDEX_CONSTRAINT_OFFSET) + && vec0_column_idx_is_auxiliary(p, iColumn)) { + hasAuxConstraint = 1; + } } + + sqlite3_str *idxStr = sqlite3_str_new(NULL); + int rc; + if (iMatchTerm >= 0) { if (iLimitTerm < 0 && iKTerm < 0) { vtab_set_error( pVTab, "A LIMIT or 'k = ?' constraint is required on vec0 knn queries."); - return SQLITE_ERROR; + rc = SQLITE_ERROR; + goto done; } if (iLimitTerm >= 0 && iKTerm >= 0) { vtab_set_error(pVTab, "Only LIMIT or 'k =?' can be provided, not both"); - return SQLITE_ERROR; + rc = SQLITE_ERROR; + goto done; } if (pIdxInfo->nOrderBy) { if (pIdxInfo->nOrderBy > 1) { vtab_set_error(pVTab, "Only a single 'ORDER BY distance' clause is " "allowed on vec0 KNN queries"); - return SQLITE_ERROR; + rc = SQLITE_ERROR; + goto done; } if (pIdxInfo->aOrderBy[0].iColumn != vec0_column_distance_idx(p)) { vtab_set_error(pVTab, "Only a single 'ORDER BY distance' clause is allowed on " "vec0 KNN queries, not on other columns"); - return SQLITE_ERROR; + rc = SQLITE_ERROR; + goto done; } if (pIdxInfo->aOrderBy[0].desc) { vtab_set_error( pVTab, "Only ascending in ORDER BY distance clause is supported, " "DESC is not supported yet."); - return SQLITE_ERROR; + rc = SQLITE_ERROR; + goto done; } } - pIdxInfo->aConstraintUsage[iMatchTerm].argvIndex = 1; + if(hasAuxConstraint) { + // IMP: V25623_09693 + vtab_set_error(pVTab, "An illegal WHERE constraint was provided on a vec0 auxiliary column in a KNN query."); + rc = SQLITE_ERROR; + goto done; + } + + sqlite3_str_appendchar(idxStr, 1, VEC0_QUERY_PLAN_KNN); + + int argvIndex = 1; + pIdxInfo->aConstraintUsage[iMatchTerm].argvIndex = argvIndex++; pIdxInfo->aConstraintUsage[iMatchTerm].omit = 1; + sqlite3_str_appendchar(idxStr, 1, VEC0_IDXSTR_KIND_KNN_MATCH); + sqlite3_str_appendchar(idxStr, 3, '_'); + if (iLimitTerm >= 0) { - pIdxInfo->aConstraintUsage[iLimitTerm].argvIndex = 2; + pIdxInfo->aConstraintUsage[iLimitTerm].argvIndex = argvIndex++; pIdxInfo->aConstraintUsage[iLimitTerm].omit = 1; } else { - pIdxInfo->aConstraintUsage[iKTerm].argvIndex = 2; + pIdxInfo->aConstraintUsage[iKTerm].argvIndex = argvIndex++; pIdxInfo->aConstraintUsage[iKTerm].omit = 1; } + sqlite3_str_appendchar(idxStr, 1, VEC0_IDXSTR_KIND_KNN_K); + sqlite3_str_appendchar(idxStr, 3, '_'); - sqlite3_str *idxStr = sqlite3_str_new(NULL); - sqlite3_str_appendall(idxStr, "knn:"); -#define VEC0_IDX_KNN_ROWID_IN 'I' - - #if COMPILER_SUPPORTS_VTAB_IN +#if COMPILER_SUPPORTS_VTAB_IN if (iRowidInTerm >= 0) { // already validated as >= SQLite 3.38 bc iRowidInTerm is only >= 0 when // vtabIn == 1 sqlite3_vtab_in(pIdxInfo, iRowidInTerm, 1); - sqlite3_str_appendchar(idxStr, VEC0_IDX_KNN_ROWID_IN, 1); - pIdxInfo->aConstraintUsage[iRowidInTerm].argvIndex = 3; + pIdxInfo->aConstraintUsage[iRowidInTerm].argvIndex = argvIndex++; pIdxInfo->aConstraintUsage[iRowidInTerm].omit = 1; + sqlite3_str_appendchar(idxStr, 1, VEC0_IDXSTR_KIND_KNN_ROWID_IN); + sqlite3_str_appendchar(idxStr, 3, '_'); } - #endif +#endif + + for (int i = 0; i < pIdxInfo->nConstraint; i++) { + if (!pIdxInfo->aConstraint[i].usable) + continue; + + int iColumn = pIdxInfo->aConstraint[i].iColumn; + int op = pIdxInfo->aConstraint[i].op; + if(op == SQLITE_INDEX_CONSTRAINT_LIMIT || op == SQLITE_INDEX_CONSTRAINT_OFFSET) { + continue; + } + if(!vec0_column_idx_is_partition(p, iColumn)) { + continue; + } + + int partition_idx = vec0_column_idx_to_partition_idx(p, iColumn); + char value = 0; + + switch(op) { + case SQLITE_INDEX_CONSTRAINT_EQ: { + value = VEC0_PARTITION_OPERATOR_EQ; + break; + } + case SQLITE_INDEX_CONSTRAINT_GT: { + value = VEC0_PARTITION_OPERATOR_GT; + break; + } + case SQLITE_INDEX_CONSTRAINT_LE: { + value = VEC0_PARTITION_OPERATOR_LE; + break; + } + case SQLITE_INDEX_CONSTRAINT_LT: { + value = VEC0_PARTITION_OPERATOR_LT; + break; + } + case SQLITE_INDEX_CONSTRAINT_GE: { + value = VEC0_PARTITION_OPERATOR_GE; + break; + } + case SQLITE_INDEX_CONSTRAINT_NE: { + value = VEC0_PARTITION_OPERATOR_NE; + break; + } + } + + if(value) { + pIdxInfo->aConstraintUsage[i].argvIndex = argvIndex++; + pIdxInfo->aConstraintUsage[i].omit = 1; + sqlite3_str_appendchar(idxStr, 1, VEC0_IDXSTR_KIND_KNN_PARTITON_CONSTRAINT); + sqlite3_str_appendchar(idxStr, 1, 'A' + partition_idx); + sqlite3_str_appendchar(idxStr, 1, value); + sqlite3_str_appendchar(idxStr, 1, '_'); + } + + } + + for (int i = 0; i < pIdxInfo->nConstraint; i++) { + if (!pIdxInfo->aConstraint[i].usable) + continue; + + int iColumn = pIdxInfo->aConstraint[i].iColumn; + int op = pIdxInfo->aConstraint[i].op; + if(op == SQLITE_INDEX_CONSTRAINT_LIMIT || op == SQLITE_INDEX_CONSTRAINT_OFFSET) { + continue; + } + if(!vec0_column_idx_is_metadata(p, iColumn)) { + continue; + } + + int metadata_idx = vec0_column_idx_to_metadata_idx(p, iColumn); + char value = 0; + + switch(op) { + case SQLITE_INDEX_CONSTRAINT_EQ: { + int vtabIn = 0; + #if COMPILER_SUPPORTS_VTAB_IN + if (sqlite3_libversion_number() >= 3038000) { + vtabIn = sqlite3_vtab_in(pIdxInfo, i, -1); + } + if(vtabIn) { + switch(p->metadata_columns[metadata_idx].kind) { + case VEC0_METADATA_COLUMN_KIND_FLOAT: + case VEC0_METADATA_COLUMN_KIND_BOOLEAN: { + // IMP: V15248_32086 + rc = SQLITE_ERROR; + vtab_set_error(pVTab, "'xxx in (...)' is only available on INTEGER or TEXT metadata columns."); + goto done; + break; + } + case VEC0_METADATA_COLUMN_KIND_INTEGER: + case VEC0_METADATA_COLUMN_KIND_TEXT: { + break; + } + } + value = VEC0_METADATA_OPERATOR_IN; + sqlite3_vtab_in(pIdxInfo, i, 1); + }else + #endif + { + value = VEC0_PARTITION_OPERATOR_EQ; + } + break; + } + case SQLITE_INDEX_CONSTRAINT_GT: { + value = VEC0_METADATA_OPERATOR_GT; + break; + } + case SQLITE_INDEX_CONSTRAINT_LE: { + value = VEC0_METADATA_OPERATOR_LE; + break; + } + case SQLITE_INDEX_CONSTRAINT_LT: { + value = VEC0_METADATA_OPERATOR_LT; + break; + } + case SQLITE_INDEX_CONSTRAINT_GE: { + value = VEC0_METADATA_OPERATOR_GE; + break; + } + case SQLITE_INDEX_CONSTRAINT_NE: { + value = VEC0_METADATA_OPERATOR_NE; + break; + } + default: { + // IMP: V16511_00582 + rc = SQLITE_ERROR; + vtab_set_error(pVTab, + "An illegal WHERE constraint was provided on a vec0 metadata column in a KNN query. " + "Only one of EQUALS, GREATER_THAN, LESS_THAN_OR_EQUAL, LESS_THAN, GREATER_THAN_OR_EQUAL, NOT_EQUALS is allowed." + ); + goto done; + } + } + + if(p->metadata_columns[metadata_idx].kind == VEC0_METADATA_COLUMN_KIND_BOOLEAN) { + if(!(value == VEC0_METADATA_OPERATOR_EQ || value == VEC0_METADATA_OPERATOR_NE)) { + // IMP: V10145_26984 + rc = SQLITE_ERROR; + vtab_set_error(pVTab, "ONLY EQUALS (=) or NOT_EQUALS (!=) operators are allowed on boolean metadata columns."); + goto done; + } + } + + pIdxInfo->aConstraintUsage[i].argvIndex = argvIndex++; + pIdxInfo->aConstraintUsage[i].omit = 1; + sqlite3_str_appendchar(idxStr, 1, VEC0_IDXSTR_KIND_METADATA_CONSTRAINT); + sqlite3_str_appendchar(idxStr, 1, 'A' + metadata_idx); + sqlite3_str_appendchar(idxStr, 1, value); + sqlite3_str_appendchar(idxStr, 1, '_'); - pIdxInfo->idxNum = iMatchVectorTerm; - pIdxInfo->idxStr = sqlite3_str_finish(idxStr); - if (!pIdxInfo->idxStr) { - return SQLITE_NOMEM; } - pIdxInfo->needToFreeIdxStr = 1; + + + + pIdxInfo->idxNum = iMatchVectorTerm; pIdxInfo->estimatedCost = 30.0; pIdxInfo->estimatedRows = 10; } else if (iRowidTerm >= 0) { + sqlite3_str_appendchar(idxStr, 1, VEC0_QUERY_PLAN_POINT); pIdxInfo->aConstraintUsage[iRowidTerm].argvIndex = 1; pIdxInfo->aConstraintUsage[iRowidTerm].omit = 1; + sqlite3_str_appendchar(idxStr, 1, VEC0_IDXSTR_KIND_POINT_ID); + sqlite3_str_appendchar(idxStr, 3, '_'); pIdxInfo->idxNum = pIdxInfo->colUsed; - pIdxInfo->idxStr = VEC0_QUERY_PLAN_POINT; - pIdxInfo->needToFreeIdxStr = 0; pIdxInfo->estimatedCost = 10.0; pIdxInfo->estimatedRows = 1; } else { - pIdxInfo->idxStr = VEC0_QUERY_PLAN_FULLSCAN; + sqlite3_str_appendchar(idxStr, 1, VEC0_QUERY_PLAN_FULLSCAN); pIdxInfo->estimatedCost = 3000000.0; pIdxInfo->estimatedRows = 100000; } + pIdxInfo->idxStr = sqlite3_str_finish(idxStr); + idxStr = NULL; + if (!pIdxInfo->idxStr) { + rc = SQLITE_OK; + goto done; + } + pIdxInfo->needToFreeIdxStr = 1; - return SQLITE_OK; + + rc = SQLITE_OK; + + done: + if(idxStr) { + sqlite3_str_finish(idxStr); + } + return rc; } // forward delcaration bc vec0Filter uses it @@ -4574,24 +5796,661 @@ int min_idx(const f32 *distances, i32 n, u8 *candidates, i32 *out, i32 k, *k_used = ik; return SQLITE_OK; } - - for (int i = 0; i < n; i++) { - if (distances[i] <= distances[min_idx] && !bitmap_get(bTaken, i) && - (bitmap_get(candidates, i))) { - min_idx = i; + + for (int i = 0; i < n; i++) { + if (distances[i] <= distances[min_idx] && !bitmap_get(bTaken, i) && + (bitmap_get(candidates, i))) { + min_idx = i; + } + } + + out[ik] = min_idx; + bitmap_set(bTaken, min_idx, 1); + } + *k_used = k; + return SQLITE_OK; +} + +int vec0_get_metadata_text_long_value( + vec0_vtab * p, + sqlite3_stmt ** stmt, + int metadata_idx, + i64 rowid, + int *n, + char ** s) { + int rc; + if(!(*stmt)) { + const char * zSql = sqlite3_mprintf("select data from " VEC0_SHADOW_METADATA_TEXT_DATA_NAME " where rowid = ?", p->schemaName, p->tableName, metadata_idx); + if(!zSql) { + rc = SQLITE_NOMEM; + goto done; + } + rc = sqlite3_prepare_v2(p->db, zSql, -1, stmt, NULL); + sqlite3_free( (void *) zSql); + if(rc != SQLITE_OK) { + goto done; + } + } + + sqlite3_reset(*stmt); + sqlite3_bind_int64(*stmt, 1, rowid); + rc = sqlite3_step(*stmt); + if(rc != SQLITE_ROW) { + rc = SQLITE_ERROR; + goto done; + } + *s = (char *) sqlite3_column_text(*stmt, 0); + *n = sqlite3_column_bytes(*stmt, 0); + rc = SQLITE_OK; + done: + return rc; +} + +/** + * @brief Crete at "iterator" (sqlite3_stmt) of chunks with the given constraints + * + * Any VEC0_IDXSTR_KIND_KNN_PARTITON_CONSTRAINT values in idxStr/argv will be applied + * as WHERE constraints in the underlying stmt SQL, and any consumer of the stmt + * can freely step through the stmt with all constraints satisfied. + * + * @param p - vec0_vtab + * @param idxStr - the xBestIndex/xFilter idxstr containing VEC0_IDXSTR values + * @param argc - number of argv values from xFilter + * @param argv - array of sqlite3_value from xFilter + * @param outStmt - output sqlite3_stmt of chunks with all filters applied + * @return int SQLITE_OK on success, error code otherwise + */ +int vec0_chunks_iter(vec0_vtab * p, const char * idxStr, int argc, sqlite3_value ** argv, sqlite3_stmt** outStmt) { + // always null terminated, enforced by SQLite + int idxStrLength = strlen(idxStr); + // "1" refers to the initial vec0_query_plan char, 4 is the number of chars per "element" + int numValueEntries = (idxStrLength-1) / 4; + assert(argc == numValueEntries); + + int rc; + sqlite3_str * s = sqlite3_str_new(NULL); + sqlite3_str_appendf(s, "select chunk_id, validity, rowids " + " from " VEC0_SHADOW_CHUNKS_NAME, + p->schemaName, p->tableName); + + int appendedWhere = 0; + for(int i = 0; i < numValueEntries; i++) { + int idx = 1 + (i * 4); + char kind = idxStr[idx + 0]; + if(kind != VEC0_IDXSTR_KIND_KNN_PARTITON_CONSTRAINT) { + continue; + } + + int partition_idx = idxStr[idx + 1] - 'A'; + int operator = idxStr[idx + 2]; + // idxStr[idx + 3] is just null, a '_' placeholder + + if(!appendedWhere) { + sqlite3_str_appendall(s, " WHERE "); + appendedWhere = 1; + }else { + sqlite3_str_appendall(s, " AND "); + } + switch(operator) { + case VEC0_PARTITION_OPERATOR_EQ: + sqlite3_str_appendf(s, " partition%02d = ? ", partition_idx); + break; + case VEC0_PARTITION_OPERATOR_GT: + sqlite3_str_appendf(s, " partition%02d > ? ", partition_idx); + break; + case VEC0_PARTITION_OPERATOR_LE: + sqlite3_str_appendf(s, " partition%02d <= ? ", partition_idx); + break; + case VEC0_PARTITION_OPERATOR_LT: + sqlite3_str_appendf(s, " partition%02d < ? ", partition_idx); + break; + case VEC0_PARTITION_OPERATOR_GE: + sqlite3_str_appendf(s, " partition%02d >= ? ", partition_idx); + break; + case VEC0_PARTITION_OPERATOR_NE: + sqlite3_str_appendf(s, " partition%02d != ? ", partition_idx); + break; + default: { + char * zSql = sqlite3_str_finish(s); + sqlite3_free(zSql); + return SQLITE_ERROR; + } + + } + + } + + char *zSql = sqlite3_str_finish(s); + if (!zSql) { + return SQLITE_NOMEM; + } + + rc = sqlite3_prepare_v2(p->db, zSql, -1, outStmt, NULL); + sqlite3_free(zSql); + if(rc != SQLITE_OK) { + return rc; + } + + int n = 1; + for(int i = 0; i < numValueEntries; i++) { + int idx = 1 + (i * 4); + char kind = idxStr[idx + 0]; + if(kind != VEC0_IDXSTR_KIND_KNN_PARTITON_CONSTRAINT) { + continue; + } + sqlite3_bind_value(*outStmt, n++, argv[i]); + } + + return rc; +} + +// a single `xxx in (...)` constraint on a metadata column. TEXT or INTEGER only for now. +struct Vec0MetadataIn{ + // index of argv[i]` the constraint is on + int argv_idx; + // metadata column index of the constraint, derived from idxStr + argv_idx + int metadata_idx; + // array of the copied `(...)` values from sqlite3_vtab_in_first()/sqlite3_vtab_in_next() + struct Array array; +}; + +// Array elements for `xxx in (...)` values for a text column. basically just a string +struct Vec0MetadataInTextEntry { + int n; + char * zString; +}; + + +int vec0_metadata_filter_text(vec0_vtab * p, sqlite3_value * value, const void * buffer, int size, vec0_metadata_operator op, u8* b, int metadata_idx, int chunk_rowid, struct Array * aMetadataIn, int argv_idx) { + int rc; + sqlite3_stmt * stmt = NULL; + i64 * rowids = NULL; + sqlite3_blob * rowidsBlob; + const char * sTarget = (const char *) sqlite3_value_text(value); + int nTarget = sqlite3_value_bytes(value); + + + // TODO(perf): only text metadata news the rowids BLOB. Make it so that + // rowids BLOB is re-used when multiple fitlers on text columns, + // ex "name BETWEEN 'a' and 'b'"" + rc = sqlite3_blob_open(p->db, p->schemaName, p->shadowChunksName, "rowids", chunk_rowid, 0, &rowidsBlob); + if(rc != SQLITE_OK) { + return rc; + } + assert(sqlite3_blob_bytes(rowidsBlob) % sizeof(i64) == 0); + assert((sqlite3_blob_bytes(rowidsBlob) / sizeof(i64)) == size); + + rowids = sqlite3_malloc(sqlite3_blob_bytes(rowidsBlob)); + if(!rowids) { + sqlite3_blob_close(rowidsBlob); + return SQLITE_NOMEM; + } + + rc = sqlite3_blob_read(rowidsBlob, rowids, sqlite3_blob_bytes(rowidsBlob), 0); + if(rc != SQLITE_OK) { + sqlite3_blob_close(rowidsBlob); + return rc; + } + sqlite3_blob_close(rowidsBlob); + + switch(op) { + int nPrefix; + char * sPrefix; + char *sFull; + int nFull; + u8 * view; + case VEC0_METADATA_OPERATOR_EQ: { + for(int i = 0; i < size; i++) { + view = &((u8*) buffer)[i * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + nPrefix = ((int*) view)[0]; + sPrefix = (char *) &view[4]; + + // for EQ the text lengths must match + if(nPrefix != nTarget) { + bitmap_set(b, i, 0); + continue; + } + int cmpPrefix = strncmp(sPrefix, sTarget, min(nPrefix, VEC0_METADATA_TEXT_VIEW_DATA_LENGTH)); + + // for short strings, use the prefix comparison direclty + if(nPrefix <= VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + bitmap_set(b, i, cmpPrefix == 0); + continue; + } + // for EQ on longs strings, the prefix must match + if(cmpPrefix) { + bitmap_set(b, i, 0); + continue; + } + // consult the full string + rc = vec0_get_metadata_text_long_value(p, &stmt, metadata_idx, rowids[i], &nFull, &sFull); + if(rc != SQLITE_OK) { + goto done; + } + if(nPrefix != nFull) { + rc = SQLITE_ERROR; + goto done; + } + bitmap_set(b, i, strncmp(sFull, sTarget, nFull) == 0); + } + break; + } + case VEC0_METADATA_OPERATOR_NE: { + for(int i = 0; i < size; i++) { + view = &((u8*) buffer)[i * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + nPrefix = ((int*) view)[0]; + sPrefix = (char *) &view[4]; + + // for NE if text lengths dont match, it never will + if(nPrefix != nTarget) { + bitmap_set(b, i, 1); + continue; + } + + int cmpPrefix = strncmp(sPrefix, sTarget, min(nPrefix, VEC0_METADATA_TEXT_VIEW_DATA_LENGTH)); + + // for short strings, use the prefix comparison direclty + if(nPrefix <= VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + bitmap_set(b, i, cmpPrefix != 0); + continue; + } + // for NE on longs strings, if prefixes dont match, then long string wont + if(cmpPrefix) { + bitmap_set(b, i, 1); + continue; + } + // consult the full string + rc = vec0_get_metadata_text_long_value(p, &stmt, metadata_idx, rowids[i], &nFull, &sFull); + if(rc != SQLITE_OK) { + goto done; + } + if(nPrefix != nFull) { + rc = SQLITE_ERROR; + goto done; + } + bitmap_set(b, i, strncmp(sFull, sTarget, nFull) != 0); + } + break; + } + case VEC0_METADATA_OPERATOR_GT: { + for(int i = 0; i < size; i++) { + view = &((u8*) buffer)[i * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + nPrefix = ((int*) view)[0]; + sPrefix = (char *) &view[4]; + int cmpPrefix = strncmp(sPrefix, sTarget, min(min(nPrefix, VEC0_METADATA_TEXT_VIEW_DATA_LENGTH), nTarget)); + + if(nPrefix < VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + // if prefix match, check which is longer + if(cmpPrefix == 0) { + bitmap_set(b, i, nPrefix > nTarget); + } + else { + bitmap_set(b, i, cmpPrefix > 0); + } + continue; + } + // TODO(perf): may not need to compare full text in some cases + + rc = vec0_get_metadata_text_long_value(p, &stmt, metadata_idx, rowids[i], &nFull, &sFull); + if(rc != SQLITE_OK) { + goto done; + } + if(nPrefix != nFull) { + rc = SQLITE_ERROR; + goto done; + } + bitmap_set(b, i, strncmp(sFull, sTarget, nFull) > 0); + } + break; + } + case VEC0_METADATA_OPERATOR_GE: { + for(int i = 0; i < size; i++) { + view = &((u8*) buffer)[i * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + nPrefix = ((int*) view)[0]; + sPrefix = (char *) &view[4]; + int cmpPrefix = strncmp(sPrefix, sTarget, min(min(nPrefix, VEC0_METADATA_TEXT_VIEW_DATA_LENGTH), nTarget)); + + if(nPrefix < VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + // if prefix match, check which is longer + if(cmpPrefix == 0) { + bitmap_set(b, i, nPrefix >= nTarget); + } + else { + bitmap_set(b, i, cmpPrefix >= 0); + } + continue; + } + // TODO(perf): may not need to compare full text in some cases + + rc = vec0_get_metadata_text_long_value(p, &stmt, metadata_idx, rowids[i], &nFull, &sFull); + if(rc != SQLITE_OK) { + goto done; + } + if(nPrefix != nFull) { + rc = SQLITE_ERROR; + goto done; + } + bitmap_set(b, i, strncmp(sFull, sTarget, nFull) >= 0); + } + break; + } + case VEC0_METADATA_OPERATOR_LE: { + for(int i = 0; i < size; i++) { + view = &((u8*) buffer)[i * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + nPrefix = ((int*) view)[0]; + sPrefix = (char *) &view[4]; + int cmpPrefix = strncmp(sPrefix, sTarget, min(min(nPrefix, VEC0_METADATA_TEXT_VIEW_DATA_LENGTH), nTarget)); + + if(nPrefix < VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + // if prefix match, check which is longer + if(cmpPrefix == 0) { + bitmap_set(b, i, nPrefix <= nTarget); + } + else { + bitmap_set(b, i, cmpPrefix <= 0); + } + continue; + } + // TODO(perf): may not need to compare full text in some cases + + rc = vec0_get_metadata_text_long_value(p, &stmt, metadata_idx, rowids[i], &nFull, &sFull); + if(rc != SQLITE_OK) { + goto done; + } + if(nPrefix != nFull) { + rc = SQLITE_ERROR; + goto done; + } + bitmap_set(b, i, strncmp(sFull, sTarget, nFull) <= 0); + } + break; + } + case VEC0_METADATA_OPERATOR_LT: { + for(int i = 0; i < size; i++) { + view = &((u8*) buffer)[i * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + nPrefix = ((int*) view)[0]; + sPrefix = (char *) &view[4]; + int cmpPrefix = strncmp(sPrefix, sTarget, min(min(nPrefix, VEC0_METADATA_TEXT_VIEW_DATA_LENGTH), nTarget)); + + if(nPrefix < VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + // if prefix match, check which is longer + if(cmpPrefix == 0) { + bitmap_set(b, i, nPrefix < nTarget); + } + else { + bitmap_set(b, i, cmpPrefix < 0); + } + continue; + } + // TODO(perf): may not need to compare full text in some cases + + rc = vec0_get_metadata_text_long_value(p, &stmt, metadata_idx, rowids[i], &nFull, &sFull); + if(rc != SQLITE_OK) { + goto done; + } + if(nPrefix != nFull) { + rc = SQLITE_ERROR; + goto done; + } + bitmap_set(b, i, strncmp(sFull, sTarget, nFull) < 0); + } + break; + } + + case VEC0_METADATA_OPERATOR_IN: { + size_t metadataInIdx = -1; + for(size_t i = 0; i < aMetadataIn->length; i++) { + struct Vec0MetadataIn * metadataIn = &(((struct Vec0MetadataIn *) aMetadataIn->z)[i]); + if(metadataIn->argv_idx == argv_idx) { + metadataInIdx = i; + break; + } + } + if(metadataInIdx < 0) { + rc = SQLITE_ERROR; + goto done; + } + + struct Vec0MetadataIn * metadataIn = &((struct Vec0MetadataIn *) aMetadataIn->z)[metadataInIdx]; + struct Array * aTarget = &(metadataIn->array); + + + int nPrefix; + char * sPrefix; + char *sFull; + int nFull; + u8 * view; + for(int i = 0; i < size; i++) { + view = &((u8*) buffer)[i * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + nPrefix = ((int*) view)[0]; + sPrefix = (char *) &view[4]; + for(size_t target_idx = 0; target_idx < aTarget->length; target_idx++) { + struct Vec0MetadataInTextEntry * entry = &(((struct Vec0MetadataInTextEntry*)aTarget->z)[target_idx]); + if(entry->n != nPrefix) { + continue; + } + int cmpPrefix = strncmp(sPrefix, entry->zString, min(nPrefix, VEC0_METADATA_TEXT_VIEW_DATA_LENGTH)); + if(nPrefix <= VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + if(cmpPrefix == 0) { + bitmap_set(b, i, 1); + break; + } + continue; + } + if(cmpPrefix) { + continue; + } + + rc = vec0_get_metadata_text_long_value(p, &stmt, metadata_idx, rowids[i], &nFull, &sFull); + if(rc != SQLITE_OK) { + goto done; + } + if(nPrefix != nFull) { + rc = SQLITE_ERROR; + goto done; + } + if(strncmp(sFull, entry->zString, nFull) == 0) { + bitmap_set(b, i, 1); + break; + } + } + } + break; + } + + } + rc = SQLITE_OK; + + done: + sqlite3_finalize(stmt); + sqlite3_free(rowids); + return rc; + +} + +/** + * @brief Fill in bitmap of chunk values, whether or not the values match a metadata constraint + * + * @param p vec0_vtab + * @param metadata_idx index of the metatadata column to perfrom constraints on + * @param value sqlite3_value of the constraints value + * @param blob sqlite3_blob that is already opened on the metdata column's shadow chunk table + * @param chunk_rowid rowid of the chunk to calculate on + * @param b pre-allocated and zero'd out bitmap to write results to + * @param size size of the chunk + * @return int SQLITE_OK on success, error code otherwise + */ +int vec0_set_metadata_filter_bitmap( + vec0_vtab *p, + int metadata_idx, + vec0_metadata_operator op, + sqlite3_value * value, + sqlite3_blob * blob, + i64 chunk_rowid, + u8* b, + int size, + struct Array * aMetadataIn, int argv_idx) { + // TODO: shouldn't this skip in-valid entries from the chunk's validity bitmap? + + int rc; + rc = sqlite3_blob_reopen(blob, chunk_rowid); + if(rc != SQLITE_OK) { + return rc; + } + + vec0_metadata_column_kind kind = p->metadata_columns[metadata_idx].kind; + int szMatch = 0; + int blobSize = sqlite3_blob_bytes(blob); + switch(kind) { + case VEC0_METADATA_COLUMN_KIND_BOOLEAN: { + szMatch = blobSize == size / CHAR_BIT; + break; + } + case VEC0_METADATA_COLUMN_KIND_INTEGER: { + szMatch = blobSize == size * sizeof(i64); + break; + } + case VEC0_METADATA_COLUMN_KIND_FLOAT: { + szMatch = blobSize == size * sizeof(double); + break; + } + case VEC0_METADATA_COLUMN_KIND_TEXT: { + szMatch = blobSize == size * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH; + break; + } + } + if(!szMatch) { + return SQLITE_ERROR; + } + void * buffer = sqlite3_malloc(blobSize); + if(!buffer) { + return SQLITE_NOMEM; + } + rc = sqlite3_blob_read(blob, buffer, blobSize, 0); + if(rc != SQLITE_OK) { + goto done; + } + switch(kind) { + case VEC0_METADATA_COLUMN_KIND_BOOLEAN: { + int target = sqlite3_value_int(value); + if( (target && op == VEC0_METADATA_OPERATOR_EQ) || (!target && op == VEC0_METADATA_OPERATOR_NE)) { + for(int i = 0; i < size; i++) { bitmap_set(b, i, bitmap_get((u8*) buffer, i)); } + } + else { + for(int i = 0; i < size; i++) { bitmap_set(b, i, !bitmap_get((u8*) buffer, i)); } + } + break; + } + case VEC0_METADATA_COLUMN_KIND_INTEGER: { + i64 * array = (i64*) buffer; + i64 target = sqlite3_value_int64(value); + switch(op) { + case VEC0_METADATA_OPERATOR_EQ: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] == target); } + break; + } + case VEC0_METADATA_OPERATOR_GT: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] > target); } + break; + } + case VEC0_METADATA_OPERATOR_LE: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] <= target); } + break; + } + case VEC0_METADATA_OPERATOR_LT: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] < target); } + break; + } + case VEC0_METADATA_OPERATOR_GE: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] >= target); } + break; + } + case VEC0_METADATA_OPERATOR_NE: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] != target); } + break; + } + case VEC0_METADATA_OPERATOR_IN: { + int metadataInIdx = -1; + for(size_t i = 0; i < aMetadataIn->length; i++) { + struct Vec0MetadataIn * metadataIn = &((struct Vec0MetadataIn *) aMetadataIn->z)[i]; + if(metadataIn->argv_idx == argv_idx) { + metadataInIdx = i; + break; + } + } + if(metadataInIdx < 0) { + rc = SQLITE_ERROR; + goto done; + } + struct Vec0MetadataIn * metadataIn = &((struct Vec0MetadataIn *) aMetadataIn->z)[metadataInIdx]; + struct Array * aTarget = &(metadataIn->array); + + for(int i = 0; i < size; i++) { + for(size_t target_idx = 0; target_idx < aTarget->length; target_idx++) { + if( ((i64*)aTarget->z)[target_idx] == array[i]) { + bitmap_set(b, i, 1); + break; + } + } + } + break; + } + } + break; + } + case VEC0_METADATA_COLUMN_KIND_FLOAT: { + double * array = (double*) buffer; + double target = sqlite3_value_double(value); + switch(op) { + case VEC0_METADATA_OPERATOR_EQ: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] == target); } + break; + } + case VEC0_METADATA_OPERATOR_GT: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] > target); } + break; + } + case VEC0_METADATA_OPERATOR_LE: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] <= target); } + break; + } + case VEC0_METADATA_OPERATOR_LT: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] < target); } + break; + } + case VEC0_METADATA_OPERATOR_GE: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] >= target); } + break; + } + case VEC0_METADATA_OPERATOR_NE: { + for(int i = 0; i < size; i++) { bitmap_set(b, i, array[i] != target); } + break; + } + case VEC0_METADATA_OPERATOR_IN: { + // should never be reached + break; + } + } + break; + } + case VEC0_METADATA_COLUMN_KIND_TEXT: { + rc = vec0_metadata_filter_text(p, value, buffer, size, op, b, metadata_idx, chunk_rowid, aMetadataIn, argv_idx); + if(rc != SQLITE_OK) { + goto done; } + break; } - - out[ik] = min_idx; - bitmap_set(bTaken, min_idx, 1); } - *k_used = k; - return SQLITE_OK; + done: + sqlite3_free(buffer); + return rc; } int vec0Filter_knn_chunks_iter(vec0_vtab *p, sqlite3_stmt *stmtChunks, struct VectorColumnDefinition *vector_column, int vectorColumnIdx, struct Array *arrayRowidsIn, + struct Array * aMetadataIn, + const char * idxStr, int argc, sqlite3_value ** argv, void *queryVector, i64 k, i64 **out_topk_rowids, f32 **out_topk_distances, i64 *out_used) { // for each chunk, get top min(k, chunk_size) rowid + distances to query vec. @@ -4615,6 +6474,7 @@ int vec0Filter_knn_chunks_iter(vec0_vtab *p, sqlite3_stmt *stmtChunks, u8 *bTaken = NULL; // memory: chunk_size / 8 i32 *chunk_topk_idxs = NULL; // memory: k * 4 u8 *bmRowids = NULL; // memory: chunk_size / 8 + u8 *bmMetadata = NULL; // memory: chunk_size / 8 // // total: a lot??? // 6 * (k * 4) + (k * 2) + (chunk_size / 8) + (chunk_size * dimensions * 4) @@ -4685,6 +6545,28 @@ int vec0Filter_knn_chunks_iter(vec0_vtab *p, sqlite3_stmt *stmtChunks, goto cleanup; } + sqlite3_blob * metadataBlobs[VEC0_MAX_METADATA_COLUMNS]; + memset(metadataBlobs, 0, sizeof(sqlite3_blob*) * VEC0_MAX_METADATA_COLUMNS); + + bmMetadata = bitmap_new(p->chunk_size); + if(!bmMetadata) { + rc = SQLITE_NOMEM; + goto cleanup; + } + + int idxStrLength = strlen(idxStr); + int numValueEntries = (idxStrLength-1) / 4; + assert(numValueEntries == argc); + int hasMetadataFilters = 0; + for(int i = 0; i < argc; i++) { + int idx = 1 + (i * 4); + char kind = idxStr[idx + 0]; + if(kind == VEC0_IDXSTR_KIND_METADATA_CONSTRAINT) { + hasMetadataFilters = 1; + break; + } + } + while (true) { rc = sqlite3_step(stmtChunks); if (rc == SQLITE_DONE) { @@ -4773,6 +6655,37 @@ int vec0Filter_knn_chunks_iter(vec0_vtab *p, sqlite3_stmt *stmtChunks, bitmap_and_inplace(b, bmRowids, p->chunk_size); } + if(hasMetadataFilters) { + for(int i = 0; i < argc; i++) { + int idx = 1 + (i * 4); + char kind = idxStr[idx + 0]; + if(kind != VEC0_IDXSTR_KIND_METADATA_CONSTRAINT) { + continue; + } + int metadata_idx = idxStr[idx + 1] - 'A'; + int operator = idxStr[idx + 2]; + + if(!metadataBlobs[metadata_idx]) { + rc = sqlite3_blob_open(p->db, p->schemaName, p->shadowMetadataChunksNames[metadata_idx], "data", chunk_id, 0, &metadataBlobs[metadata_idx]); + vtab_set_error(&p->base, "Could not open metadata blob"); + if(rc != SQLITE_OK) { + goto cleanup; + } + } + + bitmap_clear(bmMetadata, p->chunk_size); + rc = vec0_set_metadata_filter_bitmap(p, metadata_idx, operator, argv[i], metadataBlobs[metadata_idx], chunk_id, bmMetadata, p->chunk_size, aMetadataIn, i); + if(rc != SQLITE_OK) { + vtab_set_error(&p->base, "Could not filter metadata fields"); + if(rc != SQLITE_OK) { + goto cleanup; + } + } + bitmap_and_inplace(b, bmMetadata, p->chunk_size); + } + } + + for (int i = 0; i < p->chunk_size; i++) { if (!bitmap_get(b, i)) { continue; @@ -4876,6 +6789,10 @@ int vec0Filter_knn_chunks_iter(vec0_vtab *p, sqlite3_stmt *stmtChunks, sqlite3_free(bmRowids); sqlite3_free(baseVectors); sqlite3_free(chunk_distances); + sqlite3_free(bmMetadata); + for(int i = 0; i < VEC0_MAX_METADATA_COLUMNS; i++) { + sqlite3_blob_close(metadataBlobs[i]); + } // blobVectors is always opened with read-only permissions, so this never // fails. sqlite3_blob_close(blobVectors); @@ -4884,8 +6801,7 @@ int vec0Filter_knn_chunks_iter(vec0_vtab *p, sqlite3_stmt *stmtChunks, int vec0Filter_knn(vec0_cursor *pCur, vec0_vtab *p, int idxNum, const char *idxStr, int argc, sqlite3_value **argv) { - UNUSED_PARAMETER(idxStr); - assert(argc >= 2); + assert(argc == (strlen(idxStr)-1) / 4); int rc; struct vec0_query_knn_data *knn_data; @@ -4905,8 +6821,28 @@ int vec0Filter_knn(vec0_cursor *pCur, vec0_vtab *p, int idxNum, return SQLITE_NOMEM; } memset(knn_data, 0, sizeof(*knn_data)); + // array of `struct Vec0MetadataIn`, IF there are any `xxx in (...)` metadata constraints + struct Array * aMetadataIn = NULL; + + int query_idx =-1; + int k_idx = -1; + int rowid_in_idx = -1; + for(int i = 0; i < argc; i++) { + if(idxStr[1 + (i*4)] == VEC0_IDXSTR_KIND_KNN_MATCH) { + query_idx = i; + } + if(idxStr[1 + (i*4)] == VEC0_IDXSTR_KIND_KNN_K) { + k_idx = i; + } + if(idxStr[1 + (i*4)] == VEC0_IDXSTR_KIND_KNN_ROWID_IN) { + rowid_in_idx = i; + } + } + assert(query_idx >= 0); + assert(k_idx >= 0); - rc = vector_from_value(argv[0], &queryVector, &dimensions, &elementType, + // make sure the query vector matches the vector column (type dimensions etc.) + rc = vector_from_value(argv[query_idx], &queryVector, &dimensions, &elementType, &queryVectorCleanup, &pzError); if (rc != SQLITE_OK) { @@ -4938,17 +6874,19 @@ int vec0Filter_knn(vec0_cursor *pCur, vec0_vtab *p, int idxNum, goto cleanup; } - i64 k = sqlite3_value_int64(argv[1]); + i64 k = sqlite3_value_int64(argv[k_idx]); if (k < 0) { vtab_set_error( &p->base, "k value in knn queries must be greater than or equal to 0."); rc = SQLITE_ERROR; goto cleanup; } - #define SQLITE_VEC_VEC0_K_MAX 4096 - if(k > SQLITE_VEC_VEC0_K_MAX) { +#define SQLITE_VEC_VEC0_K_MAX 4096 + if (k > SQLITE_VEC_VEC0_K_MAX) { vtab_set_error( - &p->base, "k value in knn query too large, provided %lld and the limit is %lld", k, SQLITE_VEC_VEC0_K_MAX); + &p->base, + "k value in knn query too large, provided %lld and the limit is %lld", + k, SQLITE_VEC_VEC0_K_MAX); rc = SQLITE_ERROR; goto cleanup; } @@ -4956,16 +6894,16 @@ int vec0Filter_knn(vec0_cursor *pCur, vec0_vtab *p, int idxNum, if (k == 0) { knn_data->k = 0; pCur->knn_data = knn_data; - pCur->query_plan = SQLITE_VEC0_QUERYPLAN_KNN; + pCur->query_plan = VEC0_QUERY_PLAN_KNN; rc = SQLITE_OK; goto cleanup; } - // handle when a `rowid in (...)` operation was provided - // Array of all the rowids that appear in any `rowid in (...)` constraint. - // NULL if none were provided, which means a "full" scan. - #if COMPILER_SUPPORTS_VTAB_IN - if (argc > 2) { +// handle when a `rowid in (...)` operation was provided +// Array of all the rowids that appear in any `rowid in (...)` constraint. +// NULL if none were provided, which means a "full" scan. +#if COMPILER_SUPPORTS_VTAB_IN + if (rowid_in_idx >= 0) { sqlite3_value *item; int rc; arrayRowidsIn = sqlite3_malloc(sizeof(*arrayRowidsIn)); @@ -4979,8 +6917,8 @@ int vec0Filter_knn(vec0_cursor *pCur, vec0_vtab *p, int idxNum, if (rc != SQLITE_OK) { goto cleanup; } - for (rc = sqlite3_vtab_in_first(argv[2], &item); rc == SQLITE_OK && item; - rc = sqlite3_vtab_in_next(argv[2], &item)) { + for (rc = sqlite3_vtab_in_first(argv[rowid_in_idx], &item); rc == SQLITE_OK && item; + rc = sqlite3_vtab_in_next(argv[rowid_in_idx], &item)) { i64 rowid; if (p->pkIsText) { rc = vec0_rowid_from_id(p, item, &rowid); @@ -5002,18 +6940,98 @@ int vec0Filter_knn(vec0_cursor *pCur, vec0_vtab *p, int idxNum, qsort(arrayRowidsIn->z, arrayRowidsIn->length, arrayRowidsIn->element_size, _cmp); } - #endif +#endif - char *zSql; - zSql = sqlite3_mprintf("select chunk_id, validity, rowids " - " from " VEC0_SHADOW_CHUNKS_NAME, - p->schemaName, p->tableName); - if (!zSql) { - rc = SQLITE_NOMEM; - goto cleanup; + #if COMPILER_SUPPORTS_VTAB_IN + for(int i = 0; i < argc; i++) { + if(!(idxStr[1 + (i*4)] == VEC0_IDXSTR_KIND_METADATA_CONSTRAINT && idxStr[1 + (i*4) + 2] == VEC0_METADATA_OPERATOR_IN)) { + continue; + } + int metadata_idx = idxStr[1 + (i*4) + 1] - 'A'; + if(!aMetadataIn) { + aMetadataIn = sqlite3_malloc(sizeof(*aMetadataIn)); + if(!aMetadataIn) { + rc = SQLITE_NOMEM; + goto cleanup; + } + memset(aMetadataIn, 0, sizeof(*aMetadataIn)); + rc = array_init(aMetadataIn, sizeof(struct Vec0MetadataIn), 8); + if(rc != SQLITE_OK) { + goto cleanup; + } + } + + struct Vec0MetadataIn item; + memset(&item, 0, sizeof(item)); + item.metadata_idx=metadata_idx; + item.argv_idx = i; + + switch(p->metadata_columns[metadata_idx].kind) { + case VEC0_METADATA_COLUMN_KIND_INTEGER: { + rc = array_init(&item.array, sizeof(i64), 16); + if(rc != SQLITE_OK) { + goto cleanup; + } + sqlite3_value *entry; + for (rc = sqlite3_vtab_in_first(argv[i], &entry); rc == SQLITE_OK && entry; rc = sqlite3_vtab_in_next(argv[i], &entry)) { + i64 v = sqlite3_value_int64(entry); + rc = array_append(&item.array, &v); + if (rc != SQLITE_OK) { + goto cleanup; + } + } + + if (rc != SQLITE_DONE) { + vtab_set_error(&p->base, "Error fetching next value in `x in (...)` integer expression"); + goto cleanup; + } + + break; + } + case VEC0_METADATA_COLUMN_KIND_TEXT: { + rc = array_init(&item.array, sizeof(struct Vec0MetadataInTextEntry), 16); + if(rc != SQLITE_OK) { + goto cleanup; + } + sqlite3_value *entry; + for (rc = sqlite3_vtab_in_first(argv[i], &entry); rc == SQLITE_OK && entry; rc = sqlite3_vtab_in_next(argv[i], &entry)) { + const char * s = (const char *) sqlite3_value_text(entry); + int n = sqlite3_value_bytes(entry); + + struct Vec0MetadataInTextEntry entry; + entry.zString = sqlite3_mprintf("%.*s", n, s); + if(!entry.zString) { + rc = SQLITE_NOMEM; + goto cleanup; + } + entry.n = n; + rc = array_append(&item.array, &entry); + if (rc != SQLITE_OK) { + goto cleanup; + } + } + + if (rc != SQLITE_DONE) { + vtab_set_error(&p->base, "Error fetching next value in `x in (...)` text expression"); + goto cleanup; + } + + break; + } + default: { + vtab_set_error(&p->base, "Internal sqlite-vec error"); + goto cleanup; + } + } + + rc = array_append(aMetadataIn, &item); + if(rc != SQLITE_OK) { + goto cleanup; + } } - rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmtChunks, NULL); - sqlite3_free(zSql); + #endif + + rc = vec0_chunks_iter(p, idxStr, argc, argv, &stmtChunks); if (rc != SQLITE_OK) { // IMP: V06942_23781 vtab_set_error(&p->base, "Error preparing stmtChunk: %s", @@ -5025,7 +7043,7 @@ int vec0Filter_knn(vec0_cursor *pCur, vec0_vtab *p, int idxNum, f32 *topk_distances = NULL; i64 k_used = 0; rc = vec0Filter_knn_chunks_iter(p, stmtChunks, vector_column, vectorColumnIdx, - arrayRowidsIn, queryVector, k, &topk_rowids, + arrayRowidsIn, aMetadataIn, idxStr, argc, argv, queryVector, k, &topk_rowids, &topk_distances, &k_used); if (rc != SQLITE_OK) { goto cleanup; @@ -5038,7 +7056,7 @@ int vec0Filter_knn(vec0_cursor *pCur, vec0_vtab *p, int idxNum, knn_data->k_used = k_used; pCur->knn_data = knn_data; - pCur->query_plan = SQLITE_VEC0_QUERYPLAN_KNN; + pCur->query_plan = VEC0_QUERY_PLAN_KNN; rc = SQLITE_OK; cleanup: @@ -5046,6 +7064,21 @@ int vec0Filter_knn(vec0_cursor *pCur, vec0_vtab *p, int idxNum, array_cleanup(arrayRowidsIn); sqlite3_free(arrayRowidsIn); queryVectorCleanup(queryVector); + if(aMetadataIn) { + for(size_t i = 0; i < aMetadataIn->length; i++) { + struct Vec0MetadataIn* item = &((struct Vec0MetadataIn *) aMetadataIn->z)[i]; + for(size_t j = 0; j < item->array.length; j++) { + if(p->metadata_columns[item->metadata_idx].kind == VEC0_METADATA_COLUMN_KIND_TEXT) { + struct Vec0MetadataInTextEntry entry = ((struct Vec0MetadataInTextEntry*)item->array.z)[j]; + sqlite3_free(entry.zString); + } + } + array_cleanup(&item->array); + } + array_cleanup(aMetadataIn); + } + + sqlite3_free(aMetadataIn); return rc; } @@ -5086,7 +7119,7 @@ int vec0Filter_fullscan(vec0_vtab *p, vec0_cursor *pCur) { } fullscan_data->done = rc == SQLITE_DONE; - pCur->query_plan = SQLITE_VEC0_QUERYPLAN_FULLSCAN; + pCur->query_plan = VEC0_QUERY_PLAN_FULLSCAN; pCur->fullscan_data = fullscan_data; return SQLITE_OK; @@ -5135,14 +7168,14 @@ int vec0Filter_point(vec0_cursor *pCur, vec0_vtab *p, int argc, point_data->rowid = rowid; point_data->done = 0; pCur->point_data = point_data; - pCur->query_plan = SQLITE_VEC0_QUERYPLAN_POINT; + pCur->query_plan = VEC0_QUERY_PLAN_POINT; return SQLITE_OK; eof: point_data->rowid = rowid; point_data->done = 1; pCur->point_data = point_data; - pCur->query_plan = SQLITE_VEC0_QUERYPLAN_POINT; + pCur->query_plan = VEC0_QUERY_PLAN_POINT; return SQLITE_OK; error: @@ -5155,31 +7188,46 @@ static int vec0Filter(sqlite3_vtab_cursor *pVtabCursor, int idxNum, const char *idxStr, int argc, sqlite3_value **argv) { vec0_vtab *p = (vec0_vtab *)pVtabCursor->pVtab; vec0_cursor *pCur = (vec0_cursor *)pVtabCursor; - vec0CursorClear(pCur); - if (strcmp(idxStr, VEC0_QUERY_PLAN_FULLSCAN) == 0) { - return vec0Filter_fullscan(p, pCur); - } else if (strncmp(idxStr, "knn:", 4) == 0) { - return vec0Filter_knn(pCur, p, idxNum, idxStr, argc, argv); - } else if (strcmp(idxStr, VEC0_QUERY_PLAN_POINT) == 0) { - return vec0Filter_point(pCur, p, argc, argv); - } else { - vtab_set_error(pVtabCursor->pVtab, "unknown idxStr '%s'", idxStr); + vec0_cursor_clear(pCur); + + int idxStrLength = strlen(idxStr); + if(idxStrLength <= 0) { + return SQLITE_ERROR; + } + if((idxStrLength-1) % 4 != 0) { return SQLITE_ERROR; } + int numValueEntries = (idxStrLength-1) / 4; + if(numValueEntries != argc) { + return SQLITE_ERROR; + } + + char query_plan = idxStr[0]; + switch(query_plan) { + case VEC0_QUERY_PLAN_FULLSCAN: + return vec0Filter_fullscan(p, pCur); + case VEC0_QUERY_PLAN_KNN: + return vec0Filter_knn(pCur, p, idxNum, idxStr, argc, argv); + case VEC0_QUERY_PLAN_POINT: + return vec0Filter_point(pCur, p, argc, argv); + default: + vtab_set_error(pVtabCursor->pVtab, "unknown idxStr '%s'", idxStr); + return SQLITE_ERROR; + } } static int vec0Rowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid) { vec0_cursor *pCur = (vec0_cursor *)cur; switch (pCur->query_plan) { - case SQLITE_VEC0_QUERYPLAN_FULLSCAN: { + case VEC0_QUERY_PLAN_FULLSCAN: { *pRowid = sqlite3_column_int64(pCur->fullscan_data->rowids_stmt, 0); return SQLITE_OK; } - case SQLITE_VEC0_QUERYPLAN_POINT: { + case VEC0_QUERY_PLAN_POINT: { *pRowid = pCur->point_data->rowid; return SQLITE_OK; } - case SQLITE_VEC0_QUERYPLAN_KNN: { + case VEC0_QUERY_PLAN_KNN: { vtab_set_error(cur->pVtab, "Internal sqlite-vec error: expected point query plan in " "vec0Rowid, found %d", @@ -5187,12 +7235,13 @@ static int vec0Rowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid) { return SQLITE_ERROR; } } + return SQLITE_ERROR; } static int vec0Next(sqlite3_vtab_cursor *cur) { vec0_cursor *pCur = (vec0_cursor *)cur; switch (pCur->query_plan) { - case SQLITE_VEC0_QUERYPLAN_FULLSCAN: { + case VEC0_QUERY_PLAN_FULLSCAN: { if (!pCur->fullscan_data) { return SQLITE_ERROR; } @@ -5206,7 +7255,7 @@ static int vec0Next(sqlite3_vtab_cursor *cur) { } return SQLITE_ERROR; } - case SQLITE_VEC0_QUERYPLAN_KNN: { + case VEC0_QUERY_PLAN_KNN: { if (!pCur->knn_data) { return SQLITE_ERROR; } @@ -5214,7 +7263,7 @@ static int vec0Next(sqlite3_vtab_cursor *cur) { pCur->knn_data->current_idx++; return SQLITE_OK; } - case SQLITE_VEC0_QUERYPLAN_POINT: { + case VEC0_QUERY_PLAN_POINT: { if (!pCur->point_data) { return SQLITE_ERROR; } @@ -5228,13 +7277,13 @@ static int vec0Next(sqlite3_vtab_cursor *cur) { static int vec0Eof(sqlite3_vtab_cursor *cur) { vec0_cursor *pCur = (vec0_cursor *)cur; switch (pCur->query_plan) { - case SQLITE_VEC0_QUERYPLAN_FULLSCAN: { + case VEC0_QUERY_PLAN_FULLSCAN: { if (!pCur->fullscan_data) { return 1; } return pCur->fullscan_data->done; } - case SQLITE_VEC0_QUERYPLAN_KNN: { + case VEC0_QUERY_PLAN_KNN: { if (!pCur->knn_data) { return 1; } @@ -5242,13 +7291,14 @@ static int vec0Eof(sqlite3_vtab_cursor *cur) { // (pCur->knn_data->distances[pCur->knn_data->current_idx] == FLT_MAX); return (pCur->knn_data->current_idx >= pCur->knn_data->k_used); } - case SQLITE_VEC0_QUERYPLAN_POINT: { + case VEC0_QUERY_PLAN_POINT: { if (!pCur->point_data) { return 1; } return pCur->point_data->done; } } + return 1; } static int vec0Column_fullscan(vec0_vtab *pVtab, vec0_cursor *pCur, @@ -5261,7 +7311,8 @@ static int vec0Column_fullscan(vec0_vtab *pVtab, vec0_cursor *pCur, i64 rowid = sqlite3_column_int64(pCur->fullscan_data->rowids_stmt, 0); if (i == VEC0_COLUMN_ID) { return vec0_result_id(pVtab, context, rowid); - } else if (vec0_column_idx_is_vector(pVtab, i)) { + } + else if (vec0_column_idx_is_vector(pVtab, i)) { void *v; int sz; int vector_idx = vec0_column_idx_to_vector_idx(pVtab, i); @@ -5273,11 +7324,55 @@ static int vec0Column_fullscan(vec0_vtab *pVtab, vec0_cursor *pCur, sqlite3_result_subtype(context, pVtab->vector_columns[vector_idx].element_type); - } else if (i == vec0_column_distance_idx(pVtab)) { - sqlite3_result_null(context); - } else { + } + else if (i == vec0_column_distance_idx(pVtab)) { sqlite3_result_null(context); } + else if(vec0_column_idx_is_partition(pVtab, i)) { + int partition_idx = vec0_column_idx_to_partition_idx(pVtab, i); + sqlite3_value * v; + int rc = vec0_get_partition_value_for_rowid(pVtab, rowid, partition_idx, &v); + if(rc == SQLITE_OK) { + sqlite3_result_value(context, v); + sqlite3_value_free(v); + }else { + sqlite3_result_error_code(context, rc); + } + } + else if(vec0_column_idx_is_auxiliary(pVtab, i)) { + int auxiliary_idx = vec0_column_idx_to_auxiliary_idx(pVtab, i); + sqlite3_value * v; + int rc = vec0_get_auxiliary_value_for_rowid(pVtab, rowid, auxiliary_idx, &v); + if(rc == SQLITE_OK) { + sqlite3_result_value(context, v); + sqlite3_value_free(v); + }else { + sqlite3_result_error_code(context, rc); + } + } + + else if(vec0_column_idx_is_metadata(pVtab, i)) { + if(sqlite3_vtab_nochange(context)) { + return SQLITE_OK; + } + int metadata_idx = vec0_column_idx_to_metadata_idx(pVtab, i); + int rc = vec0_result_metadata_value_for_rowid(pVtab, rowid, metadata_idx, context); + if(rc != SQLITE_OK) { + // IMP: V15466_32305 + const char * zErr = sqlite3_mprintf( + "Could not extract metadata value for column %.*s at rowid %lld", + pVtab->metadata_columns[metadata_idx].name_length, + pVtab->metadata_columns[metadata_idx].name, rowid + ); + if(zErr) { + sqlite3_result_error(context, zErr, -1); + sqlite3_free((void *) zErr); + }else { + sqlite3_result_error_nomem(context); + } + } + } + return SQLITE_OK; } @@ -5291,11 +7386,11 @@ static int vec0Column_point(vec0_vtab *pVtab, vec0_cursor *pCur, if (i == VEC0_COLUMN_ID) { return vec0_result_id(pVtab, context, pCur->point_data->rowid); } - if (i == vec0_column_distance_idx(pVtab)) { + else if (i == vec0_column_distance_idx(pVtab)) { sqlite3_result_null(context); return SQLITE_OK; } - if (vec0_column_idx_is_vector(pVtab, i)) { + else if (vec0_column_idx_is_vector(pVtab, i)) { if (sqlite3_vtab_nochange(context)) { sqlite3_result_null(context); return SQLITE_OK; @@ -5309,6 +7404,58 @@ static int vec0Column_point(vec0_vtab *pVtab, vec0_cursor *pCur, pVtab->vector_columns[vector_idx].element_type); return SQLITE_OK; } + else if(vec0_column_idx_is_partition(pVtab, i)) { + if(sqlite3_vtab_nochange(context)) { + return SQLITE_OK; + } + int partition_idx = vec0_column_idx_to_partition_idx(pVtab, i); + i64 rowid = pCur->point_data->rowid; + sqlite3_value * v; + int rc = vec0_get_partition_value_for_rowid(pVtab, rowid, partition_idx, &v); + if(rc == SQLITE_OK) { + sqlite3_result_value(context, v); + sqlite3_value_free(v); + }else { + sqlite3_result_error_code(context, rc); + } + } + else if(vec0_column_idx_is_auxiliary(pVtab, i)) { + if(sqlite3_vtab_nochange(context)) { + return SQLITE_OK; + } + i64 rowid = pCur->point_data->rowid; + int auxiliary_idx = vec0_column_idx_to_auxiliary_idx(pVtab, i); + sqlite3_value * v; + int rc = vec0_get_auxiliary_value_for_rowid(pVtab, rowid, auxiliary_idx, &v); + if(rc == SQLITE_OK) { + sqlite3_result_value(context, v); + sqlite3_value_free(v); + }else { + sqlite3_result_error_code(context, rc); + } + } + + else if(vec0_column_idx_is_metadata(pVtab, i)) { + if(sqlite3_vtab_nochange(context)) { + return SQLITE_OK; + } + i64 rowid = pCur->point_data->rowid; + int metadata_idx = vec0_column_idx_to_metadata_idx(pVtab, i); + int rc = vec0_result_metadata_value_for_rowid(pVtab, rowid, metadata_idx, context); + if(rc != SQLITE_OK) { + const char * zErr = sqlite3_mprintf( + "Could not extract metadata value for column %.*s at rowid %lld", + pVtab->metadata_columns[metadata_idx].name_length, + pVtab->metadata_columns[metadata_idx].name, rowid + ); + if(zErr) { + sqlite3_result_error(context, zErr, -1); + sqlite3_free((void *) zErr); + }else { + sqlite3_result_error_nomem(context); + } + } + } return SQLITE_OK; } @@ -5324,12 +7471,12 @@ static int vec0Column_knn(vec0_vtab *pVtab, vec0_cursor *pCur, i64 rowid = pCur->knn_data->rowids[pCur->knn_data->current_idx]; return vec0_result_id(pVtab, context, rowid); } - if (i == vec0_column_distance_idx(pVtab)) { + else if (i == vec0_column_distance_idx(pVtab)) { sqlite3_result_double( context, pCur->knn_data->distances[pCur->knn_data->current_idx]); return SQLITE_OK; } - if (vec0_column_idx_is_vector(pVtab, i)) { + else if (vec0_column_idx_is_vector(pVtab, i)) { void *out; int sz; int vector_idx = vec0_column_idx_to_vector_idx(pVtab, i); @@ -5344,6 +7491,49 @@ static int vec0Column_knn(vec0_vtab *pVtab, vec0_cursor *pCur, pVtab->vector_columns[vector_idx].element_type); return SQLITE_OK; } + else if(vec0_column_idx_is_partition(pVtab, i)) { + int partition_idx = vec0_column_idx_to_partition_idx(pVtab, i); + i64 rowid = pCur->knn_data->rowids[pCur->knn_data->current_idx]; + sqlite3_value * v; + int rc = vec0_get_partition_value_for_rowid(pVtab, rowid, partition_idx, &v); + if(rc == SQLITE_OK) { + sqlite3_result_value(context, v); + sqlite3_value_free(v); + }else { + sqlite3_result_error_code(context, rc); + } + } + else if(vec0_column_idx_is_auxiliary(pVtab, i)) { + int auxiliary_idx = vec0_column_idx_to_auxiliary_idx(pVtab, i); + i64 rowid = pCur->knn_data->rowids[pCur->knn_data->current_idx]; + sqlite3_value * v; + int rc = vec0_get_auxiliary_value_for_rowid(pVtab, rowid, auxiliary_idx, &v); + if(rc == SQLITE_OK) { + sqlite3_result_value(context, v); + sqlite3_value_free(v); + }else { + sqlite3_result_error_code(context, rc); + } + } + + else if(vec0_column_idx_is_metadata(pVtab, i)) { + int metadata_idx = vec0_column_idx_to_metadata_idx(pVtab, i); + i64 rowid = pCur->knn_data->rowids[pCur->knn_data->current_idx]; + int rc = vec0_result_metadata_value_for_rowid(pVtab, rowid, metadata_idx, context); + if(rc != SQLITE_OK) { + const char * zErr = sqlite3_mprintf( + "Could not extract metadata value for column %.*s at rowid %lld", + pVtab->metadata_columns[metadata_idx].name_length, + pVtab->metadata_columns[metadata_idx].name, rowid + ); + if(zErr) { + sqlite3_result_error(context, zErr, -1); + sqlite3_free((void *) zErr); + }else { + sqlite3_result_error_nomem(context); + } + } + } return SQLITE_OK; } @@ -5353,13 +7543,13 @@ static int vec0Column(sqlite3_vtab_cursor *cur, sqlite3_context *context, vec0_cursor *pCur = (vec0_cursor *)cur; vec0_vtab *pVtab = (vec0_vtab *)cur->pVtab; switch (pCur->query_plan) { - case SQLITE_VEC0_QUERYPLAN_FULLSCAN: { + case VEC0_QUERY_PLAN_FULLSCAN: { return vec0Column_fullscan(pVtab, pCur, context, i); } - case SQLITE_VEC0_QUERYPLAN_KNN: { + case VEC0_QUERY_PLAN_KNN: { return vec0Column_knn(pVtab, pCur, context, i); } - case SQLITE_VEC0_QUERYPLAN_POINT: { + case VEC0_QUERY_PLAN_POINT: { return vec0Column_point(pVtab, pCur, context, i); } } @@ -5436,6 +7626,8 @@ int vec0Update_InsertRowidStep(vec0_vtab *p, sqlite3_value *idValue, * no more space in previous chunks. * * @param p: virtual table + * @param partitionKeyValues: array of partition key column values, to constrain + * against any partition key columns. * @param chunk_rowid: Output rowid of the chunk in the _chunks virtual table * that has the avialabiity. * @param chunk_offset: Output the index of the available space insert the @@ -5447,7 +7639,9 @@ int vec0Update_InsertRowidStep(vec0_vtab *p, sqlite3_value *idValue, * @return int SQLITE_OK on success, error code on failure */ int vec0Update_InsertNextAvailableStep( - vec0_vtab *p, i64 *chunk_rowid, i64 *chunk_offset, + vec0_vtab *p, + sqlite3_value ** partitionKeyValues, + i64 *chunk_rowid, i64 *chunk_offset, sqlite3_blob **blobChunksValidity, const unsigned char **bufferChunksValidity) { @@ -5455,7 +7649,10 @@ int vec0Update_InsertNextAvailableStep( i64 validitySize; *chunk_offset = -1; - rc = vec0_get_latest_chunk_rowid(p, chunk_rowid); + rc = vec0_get_latest_chunk_rowid(p, chunk_rowid, partitionKeyValues); + if(rc == SQLITE_EMPTY) { + goto done; + } if (rc != SQLITE_OK) { goto cleanup; } @@ -5518,7 +7715,7 @@ int vec0Update_InsertNextAvailableStep( done: // latest chunk was full, so need to create a new one if (*chunk_offset == -1) { - rc = vec0_new_chunk(p, chunk_rowid); + rc = vec0_new_chunk(p, partitionKeyValues, chunk_rowid); if (rc != SQLITE_OK) { // IMP: V08441_25279 vtab_set_error(&p->base, @@ -5705,53 +7902,207 @@ int vec0Update_InsertWriteFinalStep(vec0_vtab *p, i64 chunk_rowid, } } - // write the new rowid to the rowids column of the _chunks table - rc = sqlite3_blob_open(p->db, p->schemaName, p->shadowChunksName, "rowids", - chunk_rowid, 1, &blobChunksRowids); - if (rc != SQLITE_OK) { - // IMP: V09221_26060 - vtab_set_error(&p->base, - VEC_INTERAL_ERROR "could not open rowids blob on %s.%s.%lld", - p->schemaName, p->shadowChunksName, chunk_rowid); - goto cleanup; - } - i64 expected = p->chunk_size * sizeof(i64); - i64 actual = sqlite3_blob_bytes(blobChunksRowids); - if (expected != actual) { - // IMP: V12779_29618 - vtab_set_error( - &p->base, - VEC_INTERAL_ERROR - "rowids blob size mismatch on %s.%s.%lld. Expected %lld, actual %lld", - p->schemaName, p->shadowChunksName, chunk_rowid, expected, actual); - rc = SQLITE_ERROR; - goto cleanup; + // write the new rowid to the rowids column of the _chunks table + rc = sqlite3_blob_open(p->db, p->schemaName, p->shadowChunksName, "rowids", + chunk_rowid, 1, &blobChunksRowids); + if (rc != SQLITE_OK) { + // IMP: V09221_26060 + vtab_set_error(&p->base, + VEC_INTERAL_ERROR "could not open rowids blob on %s.%s.%lld", + p->schemaName, p->shadowChunksName, chunk_rowid); + goto cleanup; + } + i64 expected = p->chunk_size * sizeof(i64); + i64 actual = sqlite3_blob_bytes(blobChunksRowids); + if (expected != actual) { + // IMP: V12779_29618 + vtab_set_error( + &p->base, + VEC_INTERAL_ERROR + "rowids blob size mismatch on %s.%s.%lld. Expected %lld, actual %lld", + p->schemaName, p->shadowChunksName, chunk_rowid, expected, actual); + rc = SQLITE_ERROR; + goto cleanup; + } + rc = sqlite3_blob_write(blobChunksRowids, &rowid, sizeof(i64), + chunk_offset * sizeof(i64)); + if (rc != SQLITE_OK) { + vtab_set_error( + &p->base, VEC_INTERAL_ERROR "could not write rowids blob on %s.%s.%lld", + p->schemaName, p->shadowChunksName, chunk_rowid); + rc = SQLITE_ERROR; + goto cleanup; + } + + // Now with all the vectors inserted, go back and update the _rowids table + // with the new chunk_rowid/chunk_offset values + rc = vec0_rowids_update_position(p, rowid, chunk_rowid, chunk_offset); + +cleanup: + brc = sqlite3_blob_close(blobChunksRowids); + if ((rc == SQLITE_OK) && (brc != SQLITE_OK)) { + vtab_set_error( + &p->base, VEC_INTERAL_ERROR "could not close rowids blob on %s.%s.%lld", + p->schemaName, p->shadowChunksName, chunk_rowid); + return brc; + } + return rc; +} + +int vec0_write_metadata_value(vec0_vtab *p, int metadata_column_idx, i64 rowid, i64 chunk_id, i64 chunk_offset, sqlite3_value * v, int isupdate) { + int rc; + struct Vec0MetadataColumnDefinition * metadata_column = &p->metadata_columns[metadata_column_idx]; + vec0_metadata_column_kind kind = metadata_column->kind; + + // verify input value matches column type + switch(kind) { + case VEC0_METADATA_COLUMN_KIND_BOOLEAN: { + if(sqlite3_value_type(v) != SQLITE_INTEGER || ((sqlite3_value_int(v) != 0) && (sqlite3_value_int(v) != 1))) { + rc = SQLITE_ERROR; + vtab_set_error(&p->base, "Expected 0 or 1 for BOOLEAN metadata column %.*s", metadata_column->name_length, metadata_column->name); + goto done; + } + break; + } + case VEC0_METADATA_COLUMN_KIND_INTEGER: { + if(sqlite3_value_type(v) != SQLITE_INTEGER) { + rc = SQLITE_ERROR; + vtab_set_error(&p->base, "Expected integer for INTEGER metadata column %.*s, received %s", metadata_column->name_length, metadata_column->name, type_name(sqlite3_value_type(v))); + goto done; + } + break; + } + case VEC0_METADATA_COLUMN_KIND_FLOAT: { + if(sqlite3_value_type(v) != SQLITE_FLOAT) { + rc = SQLITE_ERROR; + vtab_set_error(&p->base, "Expected float for FLOAT metadata column %.*s, received %s", metadata_column->name_length, metadata_column->name, type_name(sqlite3_value_type(v))); + goto done; + } + break; + } + case VEC0_METADATA_COLUMN_KIND_TEXT: { + if(sqlite3_value_type(v) != SQLITE_TEXT) { + rc = SQLITE_ERROR; + vtab_set_error(&p->base, "Expected text for TEXT metadata column %.*s, received %s", metadata_column->name_length, metadata_column->name, type_name(sqlite3_value_type(v))); + goto done; + } + break; + } + } + + sqlite3_blob * blobValue = NULL; + rc = sqlite3_blob_open(p->db, p->schemaName, p->shadowMetadataChunksNames[metadata_column_idx], "data", chunk_id, 1, &blobValue); + if(rc != SQLITE_OK) { + goto done; + } + + switch(kind) { + case VEC0_METADATA_COLUMN_KIND_BOOLEAN: { + u8 block; + int value = sqlite3_value_int(v); + rc = sqlite3_blob_read(blobValue, &block, sizeof(u8), (int) (chunk_offset / CHAR_BIT)); + if(rc != SQLITE_OK) { + goto done; + } + + if (value) { + block |= 1 << (chunk_offset % CHAR_BIT); + } else { + block &= ~(1 << (chunk_offset % CHAR_BIT)); + } + + rc = sqlite3_blob_write(blobValue, &block, sizeof(u8), chunk_offset / CHAR_BIT); + break; + } + case VEC0_METADATA_COLUMN_KIND_INTEGER: { + i64 value = sqlite3_value_int64(v); + rc = sqlite3_blob_write(blobValue, &value, sizeof(value), chunk_offset * sizeof(i64)); + break; + } + case VEC0_METADATA_COLUMN_KIND_FLOAT: { + double value = sqlite3_value_double(v); + rc = sqlite3_blob_write(blobValue, &value, sizeof(value), chunk_offset * sizeof(double)); + break; + } + case VEC0_METADATA_COLUMN_KIND_TEXT: { + int prev_n; + rc = sqlite3_blob_read(blobValue, &prev_n, sizeof(int), chunk_offset * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH); + if(rc != SQLITE_OK) { + goto done; + } + + const char * s = (const char *) sqlite3_value_text(v); + int n = sqlite3_value_bytes(v); + u8 view[VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + memset(view, 0, VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH); + memcpy(view, &n, sizeof(int)); + memcpy(view+4, s, min(n, VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH-4)); + + rc = sqlite3_blob_write(blobValue, &view, VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH, chunk_offset * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH); + if(n > VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + const char * zSql; + + if(isupdate && (prev_n > VEC0_METADATA_TEXT_VIEW_DATA_LENGTH)) { + zSql = sqlite3_mprintf("UPDATE " VEC0_SHADOW_METADATA_TEXT_DATA_NAME " SET data = ?2 WHERE rowid = ?1", p->schemaName, p->tableName, metadata_column_idx); + }else { + zSql = sqlite3_mprintf("INSERT INTO " VEC0_SHADOW_METADATA_TEXT_DATA_NAME " (rowid, data) VALUES (?1, ?2)", p->schemaName, p->tableName, metadata_column_idx); + } + if(!zSql) { + rc = SQLITE_NOMEM; + goto done; + } + sqlite3_stmt * stmt; + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, NULL); + if(rc != SQLITE_OK) { + goto done; + } + sqlite3_bind_int64(stmt, 1, rowid); + sqlite3_bind_text(stmt, 2, s, n, SQLITE_STATIC); + rc = sqlite3_step(stmt); + sqlite3_finalize(stmt); + + if(rc != SQLITE_DONE) { + rc = SQLITE_ERROR; + goto done; + } + } + else if(prev_n > VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + const char * zSql = sqlite3_mprintf("DELETE FROM " VEC0_SHADOW_METADATA_TEXT_DATA_NAME " WHERE rowid = ?", p->schemaName, p->tableName, metadata_column_idx); + if(!zSql) { + rc = SQLITE_NOMEM; + goto done; + } + sqlite3_stmt * stmt; + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, NULL); + if(rc != SQLITE_OK) { + goto done; + } + sqlite3_bind_int64(stmt, 1, rowid); + rc = sqlite3_step(stmt); + sqlite3_finalize(stmt); + + if(rc != SQLITE_DONE) { + rc = SQLITE_ERROR; + goto done; + } + } + break; + } + } + + if(rc != SQLITE_OK) { + } - rc = sqlite3_blob_write(blobChunksRowids, &rowid, sizeof(i64), - chunk_offset * sizeof(i64)); - if (rc != SQLITE_OK) { - vtab_set_error( - &p->base, VEC_INTERAL_ERROR "could not write rowids blob on %s.%s.%lld", - p->schemaName, p->shadowChunksName, chunk_rowid); - rc = SQLITE_ERROR; - goto cleanup; + rc = sqlite3_blob_close(blobValue); + if(rc != SQLITE_OK) { + goto done; } - // Now with all the vectors inserted, go back and update the _rowids table - // with the new chunk_rowid/chunk_offset values - rc = vec0_rowids_update_position(p, rowid, chunk_rowid, chunk_offset); - -cleanup: - brc = sqlite3_blob_close(blobChunksRowids); - if ((rc == SQLITE_OK) && (brc != SQLITE_OK)) { - vtab_set_error( - &p->base, VEC_INTERAL_ERROR "could not close rowids blob on %s.%s.%lld", - p->schemaName, p->shadowChunksName, chunk_rowid); - return brc; - } - return rc; + done: + return rc; } + /** * @brief Handles INSERT INTO operations on a vec0 table. * @@ -5772,6 +8123,8 @@ int vec0Update_Insert(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv, // Array to hold cleanup functions for vectorDatas[] vector_cleanup cleanups[VEC0_MAX_VECTOR_COLUMNS]; + sqlite3_value * partitionKeyValues[VEC0_MAX_PARTITION_COLUMNS]; + // Rowid of the chunk in the _chunks shadow table that the row will be a part // of. i64 chunk_rowid; @@ -5785,26 +8138,54 @@ int vec0Update_Insert(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv, const unsigned char *bufferChunksValidity = NULL; int numReadVectors = 0; + // Read all provided partition key values into partitionKeyValues + for (int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_PARTITION) { + continue; + } + int partition_key_idx = p->user_column_idxs[i]; + partitionKeyValues[partition_key_idx] = argv[2+VEC0_COLUMN_USERN_START + i]; + + int new_value_type = sqlite3_value_type(partitionKeyValues[partition_key_idx]); + if((new_value_type != SQLITE_NULL) && (new_value_type != p->paritition_columns[partition_key_idx].type)) { + // IMP: V11454_28292 + vtab_set_error( + pVTab, + "Parition key type mismatch: The partition key column %.*s has type %s, but %s was provided.", + p->paritition_columns[partition_key_idx].name_length, + p->paritition_columns[partition_key_idx].name, + type_name(p->paritition_columns[partition_key_idx].type), + type_name(new_value_type) + ); + rc = SQLITE_ERROR; + goto cleanup; + } + } + // read all the inserted vectors into vectorDatas, validate their lengths. - for (int i = 0; i < p->numVectorColumns; i++) { - sqlite3_value *valueVector = argv[2 + VEC0_COLUMN_VECTORN_START + i]; + for (int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_VECTOR) { + continue; + } + int vector_column_idx = p->user_column_idxs[i]; + sqlite3_value *valueVector = argv[2 + VEC0_COLUMN_USERN_START + i]; size_t dimensions; char *pzError; enum VectorElementType elementType; - rc = vector_from_value(valueVector, &vectorDatas[i], &dimensions, - &elementType, &cleanups[i], &pzError); + rc = vector_from_value(valueVector, &vectorDatas[vector_column_idx], &dimensions, + &elementType, &cleanups[vector_column_idx], &pzError); if (rc != SQLITE_OK) { // IMP: V06519_23358 vtab_set_error( pVTab, "Inserted vector for the \"%.*s\" column is invalid: %z", - p->vector_columns[i].name_length, p->vector_columns[i].name, pzError); + p->vector_columns[vector_column_idx].name_length, p->vector_columns[vector_column_idx].name, pzError); rc = SQLITE_ERROR; goto cleanup; } numReadVectors++; - if (elementType != p->vector_columns[i].element_type) { + if (elementType != p->vector_columns[vector_column_idx].element_type) { // IMP: V08221_25059 vtab_set_error( pVTab, @@ -5817,14 +8198,14 @@ int vec0Update_Insert(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv, goto cleanup; } - if (dimensions != p->vector_columns[i].dimensions) { + if (dimensions != p->vector_columns[vector_column_idx].dimensions) { // IMP: V01145_17984 vtab_set_error( pVTab, "Dimension mismatch for inserted vector for the \"%.*s\" column. " "Expected %d dimensions but received %d.", - p->vector_columns[i].name_length, p->vector_columns[i].name, - p->vector_columns[i].dimensions, dimensions); + p->vector_columns[vector_column_idx].name_length, p->vector_columns[vector_column_idx].name, + p->vector_columns[vector_column_idx].dimensions, dimensions); rc = SQLITE_ERROR; goto cleanup; } @@ -5855,7 +8236,8 @@ int vec0Update_Insert(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv, // Step #2: Find the next "available" position in the _chunks table for this // row. - rc = vec0Update_InsertNextAvailableStep(p, &chunk_rowid, &chunk_offset, + rc = vec0Update_InsertNextAvailableStep(p, partitionKeyValues, + &chunk_rowid, &chunk_offset, &blobChunksValidity, &bufferChunksValidity); if (rc != SQLITE_OK) { @@ -5871,6 +8253,76 @@ int vec0Update_Insert(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv, goto cleanup; } + if(p->numAuxiliaryColumns > 0) { + sqlite3_stmt *stmt; + sqlite3_str * s = sqlite3_str_new(NULL); + sqlite3_str_appendf(s, "INSERT INTO " VEC0_SHADOW_AUXILIARY_NAME "(rowid ", p->schemaName, p->tableName); + for(int i = 0; i < p->numAuxiliaryColumns; i++) { + sqlite3_str_appendf(s, ", value%02d", i); + } + sqlite3_str_appendall(s, ") VALUES (? "); + for(int i = 0; i < p->numAuxiliaryColumns; i++) { + sqlite3_str_appendall(s, ", ?"); + } + sqlite3_str_appendall(s, ")"); + char * zSql = sqlite3_str_finish(s); + // TODO double check error handling ehre + if(!zSql) { + rc = SQLITE_NOMEM; + goto cleanup; + } + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, NULL); + if(rc != SQLITE_OK) { + goto cleanup; + } + sqlite3_bind_int64(stmt, 1, rowid); + + for (int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_AUXILIARY) { + continue; + } + int auxiliary_key_idx = p->user_column_idxs[i]; + sqlite3_value * v = argv[2+VEC0_COLUMN_USERN_START + i]; + int v_type = sqlite3_value_type(v); + if(v_type != SQLITE_NULL && (v_type != p->auxiliary_columns[auxiliary_key_idx].type)) { + sqlite3_finalize(stmt); + rc = SQLITE_CONSTRAINT; + vtab_set_error( + pVTab, + "Auxiliary column type mismatch: The auxiliary column %.*s has type %s, but %s was provided.", + p->auxiliary_columns[auxiliary_key_idx].name_length, + p->auxiliary_columns[auxiliary_key_idx].name, + type_name(p->auxiliary_columns[auxiliary_key_idx].type), + type_name(v_type) + ); + goto cleanup; + } + // first 1 is for 1-based indexing on sqlite3_bind_*, second 1 is to account for initial rowid parameter + sqlite3_bind_value(stmt, 1 + 1 + auxiliary_key_idx, v); + } + + rc = sqlite3_step(stmt); + if(rc != SQLITE_DONE) { + sqlite3_finalize(stmt); + rc = SQLITE_ERROR; + goto cleanup; + } + sqlite3_finalize(stmt); + } + + + for(int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_METADATA) { + continue; + } + int metadata_idx = p->user_column_idxs[i]; + sqlite3_value *v = argv[2 + VEC0_COLUMN_USERN_START + i]; + rc = vec0_write_metadata_value(p, metadata_idx, rowid, chunk_rowid, chunk_offset, v, 0); + if(rc != SQLITE_OK) { + goto cleanup; + } + } + *pRowid = rowid; rc = SQLITE_OK; @@ -5980,12 +8432,127 @@ int vec0Update_Delete_DeleteRowids(vec0_vtab *p, i64 rowid) { return rc; } -int vec0Update_Delete(sqlite3_vtab *pVTab, sqlite_int64 rowid) { +int vec0Update_Delete_DeleteAux(vec0_vtab *p, i64 rowid) { + int rc; + sqlite3_stmt *stmt = NULL; + + char *zSql = + sqlite3_mprintf("DELETE FROM " VEC0_SHADOW_AUXILIARY_NAME " WHERE rowid = ?", + p->schemaName, p->tableName); + if (!zSql) { + return SQLITE_NOMEM; + } + + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, NULL); + sqlite3_free(zSql); + if (rc != SQLITE_OK) { + goto cleanup; + } + sqlite3_bind_int64(stmt, 1, rowid); + rc = sqlite3_step(stmt); + if (rc != SQLITE_DONE) { + goto cleanup; + } + rc = SQLITE_OK; + +cleanup: + sqlite3_finalize(stmt); + return rc; +} + +int vec0Update_Delete_ClearMetadata(vec0_vtab *p, int metadata_idx, i64 rowid, i64 chunk_id, + u64 chunk_offset) { + int rc; + sqlite3_blob * blobValue; + vec0_metadata_column_kind kind = p->metadata_columns[metadata_idx].kind; + rc = sqlite3_blob_open(p->db, p->schemaName, p->shadowMetadataChunksNames[metadata_idx], "data", chunk_id, 1, &blobValue); + if(rc != SQLITE_OK) { + return rc; + } + + switch(kind) { + case VEC0_METADATA_COLUMN_KIND_BOOLEAN: { + u8 block; + rc = sqlite3_blob_read(blobValue, &block, sizeof(u8), (int) (chunk_offset / CHAR_BIT)); + if(rc != SQLITE_OK) { + goto done; + } + + block &= ~(1 << (chunk_offset % CHAR_BIT)); + rc = sqlite3_blob_write(blobValue, &block, sizeof(u8), chunk_offset / CHAR_BIT); + break; + } + case VEC0_METADATA_COLUMN_KIND_INTEGER: { + i64 v = 0; + rc = sqlite3_blob_write(blobValue, &v, sizeof(v), chunk_offset * sizeof(i64)); + break; + } + case VEC0_METADATA_COLUMN_KIND_FLOAT: { + double v = 0; + rc = sqlite3_blob_write(blobValue, &v, sizeof(v), chunk_offset * sizeof(double)); + break; + } + case VEC0_METADATA_COLUMN_KIND_TEXT: { + int n; + rc = sqlite3_blob_read(blobValue, &n, sizeof(int), chunk_offset * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH); + if(rc != SQLITE_OK) { + goto done; + } + + u8 view[VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH]; + memset(view, 0, VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH); + rc = sqlite3_blob_write(blobValue, &view, sizeof(view), chunk_offset * VEC0_METADATA_TEXT_VIEW_BUFFER_LENGTH); + if(rc != SQLITE_OK) { + goto done; + } + + if(n > VEC0_METADATA_TEXT_VIEW_DATA_LENGTH) { + const char * zSql = sqlite3_mprintf("DELETE FROM " VEC0_SHADOW_METADATA_TEXT_DATA_NAME " WHERE rowid = ?", p->schemaName, p->tableName, metadata_idx); + if(!zSql) { + rc = SQLITE_NOMEM; + goto done; + } + sqlite3_stmt * stmt; + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, NULL); + if(rc != SQLITE_OK) { + goto done; + } + sqlite3_bind_int64(stmt, 1, rowid); + rc = sqlite3_step(stmt); + if(rc != SQLITE_DONE) { + rc = SQLITE_ERROR; + goto done; + } + sqlite3_finalize(stmt); + } + break; + } + } + int rc2; + done: + rc2 = sqlite3_blob_close(blobValue); + if(rc == SQLITE_OK) { + return rc2; + } + return rc; +} + +int vec0Update_Delete(sqlite3_vtab *pVTab, sqlite3_value *idValue) { vec0_vtab *p = (vec0_vtab *)pVTab; int rc; + i64 rowid; i64 chunk_id; i64 chunk_offset; + if (p->pkIsText) { + rc = vec0_rowid_from_id(p, idValue, &rowid); + if (rc != SQLITE_OK) { + return rc; + } + } else { + rowid = sqlite3_value_int64(idValue); + } + // 1. Find chunk position for given rowid // 2. Ensure that validity bit for position is 1, then set to 0 // 3. Zero out rowid in chunks.rowid @@ -6003,9 +8570,11 @@ int vec0Update_Delete(sqlite3_vtab *pVTab, sqlite_int64 rowid) { return rc; } - // 3. zero out rowid in chunks.rowids https://github.com/asg017/sqlite-vec/issues/54 + // 3. zero out rowid in chunks.rowids + // https://github.com/asg017/sqlite-vec/issues/54 - // 4. zero out any data in vector chunks tables https://github.com/asg017/sqlite-vec/issues/54 + // 4. zero out any data in vector chunks tables + // https://github.com/asg017/sqlite-vec/issues/54 // 5. delete from _rowids table rc = vec0Update_Delete_DeleteRowids(p, rowid); @@ -6013,6 +8582,41 @@ int vec0Update_Delete(sqlite3_vtab *pVTab, sqlite_int64 rowid) { return rc; } + // 6. delete any auxiliary rows + if(p->numAuxiliaryColumns > 0) { + rc = vec0Update_Delete_DeleteAux(p, rowid); + if (rc != SQLITE_OK) { + return rc; + } + } + + // 6. delete metadata + for(int i = 0; i < p->numMetadataColumns; i++) { + rc = vec0Update_Delete_ClearMetadata(p, i, rowid, chunk_id, chunk_offset); + } + + return SQLITE_OK; +} + +int vec0Update_UpdateAuxColumn(vec0_vtab *p, int auxiliary_column_idx, sqlite3_value * value, i64 rowid) { + int rc; + sqlite3_stmt *stmt; + const char * zSql = sqlite3_mprintf("UPDATE " VEC0_SHADOW_AUXILIARY_NAME " SET value%02d = ? WHERE rowid = ?", p->schemaName, p->tableName, auxiliary_column_idx); + if(!zSql) { + return SQLITE_NOMEM; + } + rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, NULL); + if(rc != SQLITE_OK) { + return rc; + } + sqlite3_bind_value(stmt, 1, value); + sqlite3_bind_int64(stmt, 2, rowid); + rc = sqlite3_step(stmt); + if(rc != SQLITE_DONE) { + sqlite3_finalize(stmt); + return SQLITE_ERROR; + } + sqlite3_finalize(stmt); return SQLITE_OK; } @@ -6094,25 +8698,90 @@ int vec0Update_UpdateVectorColumn(vec0_vtab *p, i64 chunk_id, i64 chunk_offset, return SQLITE_OK; } -int vec0Update_UpdateOnRowid(sqlite3_vtab *pVTab, int argc, - sqlite3_value **argv) { +int vec0Update_Update(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv) { UNUSED_PARAMETER(argc); vec0_vtab *p = (vec0_vtab *)pVTab; int rc; i64 chunk_id; i64 chunk_offset; - i64 rowid = sqlite3_value_int64(argv[0]); - // 1. get chunk_id and chunk_offset from _rowids + i64 rowid; + if (p->pkIsText) { + const char *a = (const char *)sqlite3_value_text(argv[0]); + const char *b = (const char *)sqlite3_value_text(argv[1]); + // IMP: V08886_25725 + if ((sqlite3_value_bytes(argv[0]) != sqlite3_value_bytes(argv[1])) || + strncmp(a, b, sqlite3_value_bytes(argv[0])) != 0) { + vtab_set_error(pVTab, + "UPDATEs on vec0 primary key values are not allowed."); + return SQLITE_ERROR; + } + rc = vec0_rowid_from_id(p, argv[0], &rowid); + if (rc != SQLITE_OK) { + return rc; + } + } else { + rowid = sqlite3_value_int64(argv[0]); + } + + // 1) get chunk_id and chunk_offset from _rowids rc = vec0_get_chunk_position(p, rowid, NULL, &chunk_id, &chunk_offset); if (rc != SQLITE_OK) { return rc; } - // 2) iterate over all new vectors, update the vectors + // 2) update any partition key values + for (int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_PARTITION) { + continue; + } + sqlite3_value * value = argv[2+VEC0_COLUMN_USERN_START + i]; + if(sqlite3_value_nochange(value)) { + continue; + } + vtab_set_error(pVTab, "UPDATE on partition key columns are not supported yet. "); + return SQLITE_ERROR; + } + + // 3) handle auxiliary column updates + for (int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_AUXILIARY) { + continue; + } + int auxiliary_column_idx = p->user_column_idxs[i]; + sqlite3_value * value = argv[2+VEC0_COLUMN_USERN_START + i]; + if(sqlite3_value_nochange(value)) { + continue; + } + rc = vec0Update_UpdateAuxColumn(p, auxiliary_column_idx, value, rowid); + if(rc != SQLITE_OK) { + return SQLITE_ERROR; + } + } - for (int i = 0; i < p->numVectorColumns; i++) { - sqlite3_value *valueVector = argv[2 + VEC0_COLUMN_VECTORN_START + i]; + // 4) handle metadata column updates + for (int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_METADATA) { + continue; + } + int metadata_column_idx = p->user_column_idxs[i]; + sqlite3_value * value = argv[2+VEC0_COLUMN_USERN_START + i]; + if(sqlite3_value_nochange(value)) { + continue; + } + rc = vec0_write_metadata_value(p, metadata_column_idx, rowid, chunk_id, chunk_offset, value, 1); + if(rc != SQLITE_OK) { + return rc; + } + } + + // 5) iterate over all new vectors, update the vectors + for (int i = 0; i < vec0_num_defined_user_columns(p); i++) { + if(p->user_column_kinds[i] != SQLITE_VEC0_USER_COLUMN_KIND_VECTOR) { + continue; + } + int vector_idx = p->user_column_idxs[i]; + sqlite3_value *valueVector = argv[2 + VEC0_COLUMN_USERN_START + i]; // in vec0Column, we check sqlite3_vtab_nochange() on vector columns. // If the vector column isn't being changed, we return NULL; // That's not great, that means vector columns can never be NULLABLE @@ -6127,7 +8796,7 @@ int vec0Update_UpdateOnRowid(sqlite3_vtab *pVTab, int argc, continue; } - rc = vec0Update_UpdateVectorColumn(p, chunk_id, chunk_offset, i, + rc = vec0Update_UpdateVectorColumn(p, chunk_id, chunk_offset, vector_idx, valueVector); if (rc != SQLITE_OK) { return SQLITE_ERROR; @@ -6141,7 +8810,7 @@ static int vec0Update(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv, sqlite_int64 *pRowid) { // DELETE operation if (argc == 1 && sqlite3_value_type(argv[0]) != SQLITE_NULL) { - return vec0Update_Delete(pVTab, sqlite3_value_int64(argv[0])); + return vec0Update_Delete(pVTab, argv[0]); } // INSERT operation else if (argc > 1 && sqlite3_value_type(argv[0]) == SQLITE_NULL) { @@ -6149,15 +8818,7 @@ static int vec0Update(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv, } // UPDATE operation else if (argc > 1 && sqlite3_value_type(argv[0]) != SQLITE_NULL) { - if ((sqlite3_value_type(argv[0]) == SQLITE_INTEGER) && - (sqlite3_value_type(argv[1]) == SQLITE_INTEGER) && - (sqlite3_value_int64(argv[0]) == sqlite3_value_int64(argv[1]))) { - return vec0Update_UpdateOnRowid(pVTab, argc, argv); - } - - vtab_set_error(pVTab, - "UPDATE operation on rowids with vec0 is not supported."); - return SQLITE_ERROR; + return vec0Update_Update(pVTab, argc, argv); } else { vtab_set_error(pVTab, "Unrecognized xUpdate operation provided for vec0."); return SQLITE_ERROR; @@ -6165,12 +8826,52 @@ static int vec0Update(sqlite3_vtab *pVTab, int argc, sqlite3_value **argv, } static int vec0ShadowName(const char *zName) { - static const char *azName[] = {"rowids", "chunks", "vector_chunks"}; + static const char *azName[] = { + "rowids", "chunks", "auxiliary", "info", + + // Up to VEC0_MAX_METADATA_COLUMNS + // TODO be smarter about this man + "metadatachunks00", + "metadatachunks01", + "metadatachunks02", + "metadatachunks03", + "metadatachunks04", + "metadatachunks05", + "metadatachunks06", + "metadatachunks07", + "metadatachunks08", + "metadatachunks09", + "metadatachunks10", + "metadatachunks11", + "metadatachunks12", + "metadatachunks13", + "metadatachunks14", + "metadatachunks15", + + // Up to + "metadatatext00", + "metadatatext01", + "metadatatext02", + "metadatatext03", + "metadatatext04", + "metadatatext05", + "metadatatext06", + "metadatatext07", + "metadatatext08", + "metadatatext09", + "metadatatext10", + "metadatatext11", + "metadatatext12", + "metadatatext13", + "metadatatext14", + "metadatatext15", + }; for (size_t i = 0; i < sizeof(azName) / sizeof(azName[0]); i++) { if (sqlite3_stricmp(zName, azName[i]) == 0) return 1; } + //for(size_t i = 0; i < )"vector_chunks", "metadatachunks" return 0; } @@ -6522,7 +9223,6 @@ void sbe_query_knn_data_clear(struct sbe_query_knn_data *knn_data) { } } - typedef struct vec_static_blob_entries_cursor vec_static_blob_entries_cursor; struct vec_static_blob_entries_cursor { sqlite3_vtab_cursor base; @@ -6729,7 +9429,6 @@ static int vec_static_blob_entriesFilter(sqlite3_vtab_cursor *pVtabCursor, size_t bsize = (p->blob->nvectors + 7) & ~7; - i32 *topk_rowids = sqlite3_malloc(k * sizeof(i32)); if (!topk_rowids) { // HANDLE https://github.com/asg017/sqlite-vec/issues/55 @@ -6747,14 +9446,14 @@ static int vec_static_blob_entriesFilter(sqlite3_vtab_cursor *pVtabCursor, distances[i] = distance_l2_sqr_float(v, (float *)queryVector, &p->blob->dimensions); } - u8 * candidates = bitmap_new(bsize); + u8 *candidates = bitmap_new(bsize); assert(candidates); - u8 * taken = bitmap_new(bsize); + u8 *taken = bitmap_new(bsize); assert(taken); bitmap_fill(candidates, bsize); - for(size_t i = bsize; i >= p->blob->nvectors; i--) { + for (size_t i = bsize; i >= p->blob->nvectors; i--) { bitmap_set(candidates, i, 0); } i32 k_used = 0; @@ -6783,11 +9482,11 @@ static int vec_static_blob_entriesRowid(sqlite3_vtab_cursor *cur, } case VEC_SBE__QUERYPLAN_KNN: { i32 rowid = ((i32 *)pCur->knn_data->rowids)[pCur->knn_data->current_idx]; - *pRowid = (sqlite3_int64) rowid; + *pRowid = (sqlite3_int64)rowid; return SQLITE_OK; } } - + return SQLITE_ERROR; } static int vec_static_blob_entriesNext(sqlite3_vtab_cursor *cur) { @@ -6802,6 +9501,7 @@ static int vec_static_blob_entriesNext(sqlite3_vtab_cursor *cur) { return SQLITE_OK; } } + return SQLITE_ERROR; } static int vec_static_blob_entriesEof(sqlite3_vtab_cursor *cur) { @@ -6816,6 +9516,7 @@ static int vec_static_blob_entriesEof(sqlite3_vtab_cursor *cur) { return pCur->knn_data->current_idx >= pCur->knn_data->k; } } + return SQLITE_ERROR; } static int vec_static_blob_entriesColumn(sqlite3_vtab_cursor *cur, @@ -6845,7 +9546,8 @@ static int vec_static_blob_entriesColumn(sqlite3_vtab_cursor *cur, sqlite3_result_blob(context, ((unsigned char *)p->blob->p) + (rowid * p->blob->dimensions * sizeof(float)), - p->blob->dimensions * sizeof(float), SQLITE_TRANSIENT); + p->blob->dimensions * sizeof(float), + SQLITE_TRANSIENT); sqlite3_result_subtype(context, p->blob->element_type); break; } @@ -6853,11 +9555,14 @@ static int vec_static_blob_entriesColumn(sqlite3_vtab_cursor *cur, return SQLITE_OK; } } + return SQLITE_ERROR; } static sqlite3_module vec_static_blob_entriesModule = { /* iVersion */ 3, - /* xCreate */ vec_static_blob_entriesCreate, // handle rm? https://github.com/asg017/sqlite-vec/issues/55 + /* xCreate */ + vec_static_blob_entriesCreate, // handle rm? + // https://github.com/asg017/sqlite-vec/issues/55 /* xConnect */ vec_static_blob_entriesConnect, /* xBestIndex */ vec_static_blob_entriesBestIndex, /* xDisconnect */ vec_static_blob_entriesDisconnect, @@ -6906,13 +9611,11 @@ static sqlite3_module vec_static_blob_entriesModule = { "Commit: " SQLITE_VEC_SOURCE "\n" \ "Build flags: " SQLITE_VEC_DEBUG_BUILD - -#ifdef _WIN32 -__declspec(dllexport) -#endif - int sqlite3_vec_init(sqlite3 *db, char **pzErrMsg, - const sqlite3_api_routines *pApi) { +SQLITE_VEC_API int sqlite3_vec_init(sqlite3 *db, char **pzErrMsg, + const sqlite3_api_routines *pApi) { +#ifndef SQLITE_CORE SQLITE_EXTENSION_INIT2(pApi); +#endif int rc = SQLITE_OK; #define DEFAULT_FLAGS (SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC) @@ -6966,7 +9669,6 @@ __declspec(dllexport) // clang-format off {"vec0", &vec0Module, NULL, NULL}, {"vec_each", &vec_eachModule, NULL, NULL}, - {"vec_npy_each", &vec_npy_eachModule, NULL, NULL}, // clang-format on }; @@ -6994,28 +9696,30 @@ __declspec(dllexport) } #ifndef SQLITE_VEC_OMIT_FS -#ifdef _WIN32 -__declspec(dllexport) -#endif - int sqlite3_vec_fs_read_init(sqlite3 *db, char **pzErrMsg, - const sqlite3_api_routines *pApi) { +SQLITE_VEC_API int sqlite3_vec_numpy_init(sqlite3 *db, char **pzErrMsg, + const sqlite3_api_routines *pApi) { UNUSED_PARAMETER(pzErrMsg); +#ifndef SQLITE_CORE SQLITE_EXTENSION_INIT2(pApi); +#endif int rc = SQLITE_OK; rc = sqlite3_create_function_v2(db, "vec_npy_file", 1, SQLITE_RESULT_SUBTYPE, NULL, vec_npy_file, NULL, NULL, NULL); + if(rc != SQLITE_OK) { + return rc; + } + rc = sqlite3_create_module_v2(db, "vec_npy_each", &vec_npy_eachModule, NULL, NULL); return rc; } #endif - -#ifdef _WIN32 -__declspec(dllexport) -#endif - int sqlite3_vec_static_blobs_init(sqlite3 *db, char **pzErrMsg, - const sqlite3_api_routines *pApi) { +SQLITE_VEC_API int +sqlite3_vec_static_blobs_init(sqlite3 *db, char **pzErrMsg, + const sqlite3_api_routines *pApi) { UNUSED_PARAMETER(pzErrMsg); +#ifndef SQLITE_CORE SQLITE_EXTENSION_INIT2(pApi); +#endif int rc = SQLITE_OK; vec_static_blob_data *static_blob_data; @@ -7025,16 +9729,21 @@ __declspec(dllexport) } memset(static_blob_data, 0, sizeof(*static_blob_data)); - rc = sqlite3_create_function_v2(db, "vec_static_blob_from_raw", 4, DEFAULT_FLAGS | SQLITE_SUBTYPE | SQLITE_RESULT_SUBTYPE, - NULL, vec_static_blob_from_raw, NULL, NULL, NULL); - if(rc != SQLITE_OK) return rc; + rc = sqlite3_create_function_v2( + db, "vec_static_blob_from_raw", 4, + DEFAULT_FLAGS | SQLITE_SUBTYPE | SQLITE_RESULT_SUBTYPE, NULL, + vec_static_blob_from_raw, NULL, NULL, NULL); + if (rc != SQLITE_OK) + return rc; rc = sqlite3_create_module_v2(db, "vec_static_blobs", &vec_static_blobsModule, static_blob_data, sqlite3_free); - if(rc != SQLITE_OK) return rc; + if (rc != SQLITE_OK) + return rc; rc = sqlite3_create_module_v2(db, "vec_static_blob_entries", &vec_static_blob_entriesModule, static_blob_data, NULL); - if(rc != SQLITE_OK) return rc; + if (rc != SQLITE_OK) + return rc; return rc; } diff --git a/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/sqlite-vec.h b/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/sqlite-vec.h index ffb7de6a..e9ae7d60 100644 --- a/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/sqlite-vec.h +++ b/vendor/github.com/asg017/sqlite-vec-go-bindings/cgo/sqlite-vec.h @@ -1,29 +1,39 @@ #ifndef SQLITE_VEC_H #define SQLITE_VEC_H +#ifndef SQLITE_CORE #include "sqlite3ext.h" +#else +#include "sqlite3.h" +#endif + +#ifdef SQLITE_VEC_STATIC + #define SQLITE_VEC_API +#else + #ifdef _WIN32 + #define SQLITE_VEC_API __declspec(dllexport) + #else + #define SQLITE_VEC_API + #endif +#endif + +#define SQLITE_VEC_VERSION "v0.1.6" +// TODO rm +#define SQLITE_VEC_DATE "2024-11-20T16:38:29Z+0000" +#define SQLITE_VEC_SOURCE "639fca5739fe056fdc98f3d539c4cd79328d7dc7" + -#define SQLITE_VEC_VERSION "v0.1.1" -#define SQLITE_VEC_DATE "2024-08-06T00:11:41Z+0000" -#define SQLITE_VEC_SOURCE "ad11d46221470449f91c4b51a4e44b4bafe4569b" +#define SQLITE_VEC_VERSION_MAJOR 0 +#define SQLITE_VEC_VERSION_MINOR 1 +#define SQLITE_VEC_VERSION_PATCH 6 #ifdef __cplusplus extern "C" { #endif -#ifdef _WIN32 -__declspec(dllexport) -#endif -int sqlite3_vec_init(sqlite3 *db, char **pzErrMsg, +SQLITE_VEC_API int sqlite3_vec_init(sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi); -#ifdef _WIN32 -__declspec(dllexport) -#endif -int sqlite3_vec_fs_read_init(sqlite3 *db, char **pzErrMsg, - const sqlite3_api_routines *pApi); - - #ifdef __cplusplus } /* end of the 'extern "C"' block */ #endif 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 ba898a1a..f965a510 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.30.3" +const goModuleVersion = "1.32.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go deleted file mode 100644 index 19d6107c..00000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go +++ /dev/null @@ -1,320 +0,0 @@ -// Package metrics implements metrics gathering for SDK development purposes. -// -// This package is designated as private and is intended for use only by the -// AWS client runtime. The exported API therein is not considered stable and -// is subject to breaking changes without notice. -package metrics - -import ( - "context" - "encoding/json" - "fmt" - "sync" - "time" - - "github.com/aws/smithy-go/middleware" -) - -const ( - // ServiceIDKey is the key for the service ID metric. - ServiceIDKey = "ServiceId" - // OperationNameKey is the key for the operation name metric. - OperationNameKey = "OperationName" - // ClientRequestIDKey is the key for the client request ID metric. - ClientRequestIDKey = "ClientRequestId" - // APICallDurationKey is the key for the API call duration metric. - APICallDurationKey = "ApiCallDuration" - // APICallSuccessfulKey is the key for the API call successful metric. - APICallSuccessfulKey = "ApiCallSuccessful" - // MarshallingDurationKey is the key for the marshalling duration metric. - MarshallingDurationKey = "MarshallingDuration" - // InThroughputKey is the key for the input throughput metric. - InThroughputKey = "InThroughput" - // OutThroughputKey is the key for the output throughput metric. - OutThroughputKey = "OutThroughput" - // RetryCountKey is the key for the retry count metric. - RetryCountKey = "RetryCount" - // HTTPStatusCodeKey is the key for the HTTP status code metric. - HTTPStatusCodeKey = "HttpStatusCode" - // AWSExtendedRequestIDKey is the key for the AWS extended request ID metric. - AWSExtendedRequestIDKey = "AwsExtendedRequestId" - // AWSRequestIDKey is the key for the AWS request ID metric. - AWSRequestIDKey = "AwsRequestId" - // BackoffDelayDurationKey is the key for the backoff delay duration metric. - BackoffDelayDurationKey = "BackoffDelayDuration" - // StreamThroughputKey is the key for the stream throughput metric. - StreamThroughputKey = "Throughput" - // ConcurrencyAcquireDurationKey is the key for the concurrency acquire duration metric. - ConcurrencyAcquireDurationKey = "ConcurrencyAcquireDuration" - // PendingConcurrencyAcquiresKey is the key for the pending concurrency acquires metric. - PendingConcurrencyAcquiresKey = "PendingConcurrencyAcquires" - // SigningDurationKey is the key for the signing duration metric. - SigningDurationKey = "SigningDuration" - // UnmarshallingDurationKey is the key for the unmarshalling duration metric. - UnmarshallingDurationKey = "UnmarshallingDuration" - // TimeToFirstByteKey is the key for the time to first byte metric. - TimeToFirstByteKey = "TimeToFirstByte" - // ServiceCallDurationKey is the key for the service call duration metric. - ServiceCallDurationKey = "ServiceCallDuration" - // EndpointResolutionDurationKey is the key for the endpoint resolution duration metric. - EndpointResolutionDurationKey = "EndpointResolutionDuration" - // AttemptNumberKey is the key for the attempt number metric. - AttemptNumberKey = "AttemptNumber" - // MaxConcurrencyKey is the key for the max concurrency metric. - MaxConcurrencyKey = "MaxConcurrency" - // AvailableConcurrencyKey is the key for the available concurrency metric. - AvailableConcurrencyKey = "AvailableConcurrency" -) - -// MetricPublisher provides the interface to provide custom MetricPublishers. -// PostRequestMetrics will be invoked by the MetricCollection middleware to post request. -// PostStreamMetrics will be invoked by ReadCloserWithMetrics to post stream metrics. -type MetricPublisher interface { - PostRequestMetrics(*MetricData) error - PostStreamMetrics(*MetricData) error -} - -// Serializer provides the interface to provide custom Serializers. -// Serialize will transform any input object in its corresponding string representation. -type Serializer interface { - Serialize(obj interface{}) (string, error) -} - -// DefaultSerializer is an implementation of the Serializer interface. -type DefaultSerializer struct{} - -// Serialize uses the default JSON serializer to obtain the string representation of an object. -func (DefaultSerializer) Serialize(obj interface{}) (string, error) { - bytes, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(bytes), nil -} - -type metricContextKey struct{} - -// MetricContext contains fields to store metric-related information. -type MetricContext struct { - connectionCounter *SharedConnectionCounter - publisher MetricPublisher - data *MetricData -} - -// MetricData stores the collected metric data. -type MetricData struct { - RequestStartTime time.Time - RequestEndTime time.Time - APICallDuration time.Duration - SerializeStartTime time.Time - SerializeEndTime time.Time - MarshallingDuration time.Duration - ResolveEndpointStartTime time.Time - ResolveEndpointEndTime time.Time - EndpointResolutionDuration time.Duration - GetIdentityStartTime time.Time - GetIdentityEndTime time.Time - InThroughput float64 - OutThroughput float64 - RetryCount int - Success uint8 - StatusCode int - ClientRequestID string - ServiceID string - OperationName string - PartitionID string - Region string - UserAgent string - RequestContentLength int64 - Stream StreamMetrics - Attempts []AttemptMetrics -} - -// StreamMetrics stores metrics related to streaming data. -type StreamMetrics struct { - ReadDuration time.Duration - ReadBytes int64 - Throughput float64 -} - -// AttemptMetrics stores metrics related to individual attempts. -type AttemptMetrics struct { - ServiceCallStart time.Time - ServiceCallEnd time.Time - ServiceCallDuration time.Duration - FirstByteTime time.Time - TimeToFirstByte time.Duration - ConnRequestedTime time.Time - ConnObtainedTime time.Time - ConcurrencyAcquireDuration time.Duration - SignStartTime time.Time - SignEndTime time.Time - SigningDuration time.Duration - DeserializeStartTime time.Time - DeserializeEndTime time.Time - UnMarshallingDuration time.Duration - RetryDelay time.Duration - ResponseContentLength int64 - StatusCode int - RequestID string - ExtendedRequestID string - HTTPClient string - MaxConcurrency int - PendingConnectionAcquires int - AvailableConcurrency int - ActiveRequests int - ReusedConnection bool -} - -// Data returns the MetricData associated with the MetricContext. -func (mc *MetricContext) Data() *MetricData { - return mc.data -} - -// ConnectionCounter returns the SharedConnectionCounter associated with the MetricContext. -func (mc *MetricContext) ConnectionCounter() *SharedConnectionCounter { - return mc.connectionCounter -} - -// Publisher returns the MetricPublisher associated with the MetricContext. -func (mc *MetricContext) Publisher() MetricPublisher { - return mc.publisher -} - -// ComputeRequestMetrics calculates and populates derived metrics based on the collected data. -func (md *MetricData) ComputeRequestMetrics() { - - for idx := range md.Attempts { - attempt := &md.Attempts[idx] - attempt.ConcurrencyAcquireDuration = attempt.ConnObtainedTime.Sub(attempt.ConnRequestedTime) - attempt.SigningDuration = attempt.SignEndTime.Sub(attempt.SignStartTime) - attempt.UnMarshallingDuration = attempt.DeserializeEndTime.Sub(attempt.DeserializeStartTime) - attempt.TimeToFirstByte = attempt.FirstByteTime.Sub(attempt.ServiceCallStart) - attempt.ServiceCallDuration = attempt.ServiceCallEnd.Sub(attempt.ServiceCallStart) - } - - md.APICallDuration = md.RequestEndTime.Sub(md.RequestStartTime) - md.MarshallingDuration = md.SerializeEndTime.Sub(md.SerializeStartTime) - md.EndpointResolutionDuration = md.ResolveEndpointEndTime.Sub(md.ResolveEndpointStartTime) - - md.RetryCount = len(md.Attempts) - 1 - - latestAttempt, err := md.LatestAttempt() - - if err != nil { - fmt.Printf("error retrieving attempts data due to: %s. Skipping Throughput metrics", err.Error()) - } else { - - md.StatusCode = latestAttempt.StatusCode - - if md.Success == 1 { - if latestAttempt.ResponseContentLength > 0 && latestAttempt.ServiceCallDuration > 0 { - md.InThroughput = float64(latestAttempt.ResponseContentLength) / latestAttempt.ServiceCallDuration.Seconds() - } - if md.RequestContentLength > 0 && latestAttempt.ServiceCallDuration > 0 { - md.OutThroughput = float64(md.RequestContentLength) / latestAttempt.ServiceCallDuration.Seconds() - } - } - } -} - -// LatestAttempt returns the latest attempt metrics. -// It returns an error if no attempts are initialized. -func (md *MetricData) LatestAttempt() (*AttemptMetrics, error) { - if md.Attempts == nil || len(md.Attempts) == 0 { - return nil, fmt.Errorf("no attempts initialized. NewAttempt() should be called first") - } - return &md.Attempts[len(md.Attempts)-1], nil -} - -// NewAttempt initializes new attempt metrics. -func (md *MetricData) NewAttempt() { - if md.Attempts == nil { - md.Attempts = []AttemptMetrics{} - } - md.Attempts = append(md.Attempts, AttemptMetrics{}) -} - -// SharedConnectionCounter is a counter shared across API calls. -type SharedConnectionCounter struct { - mu sync.Mutex - - activeRequests int - pendingConnectionAcquire int -} - -// ActiveRequests returns the count of active requests. -func (cc *SharedConnectionCounter) ActiveRequests() int { - cc.mu.Lock() - defer cc.mu.Unlock() - - return cc.activeRequests -} - -// PendingConnectionAcquire returns the count of pending connection acquires. -func (cc *SharedConnectionCounter) PendingConnectionAcquire() int { - cc.mu.Lock() - defer cc.mu.Unlock() - - return cc.pendingConnectionAcquire -} - -// AddActiveRequest increments the count of active requests. -func (cc *SharedConnectionCounter) AddActiveRequest() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.activeRequests++ -} - -// RemoveActiveRequest decrements the count of active requests. -func (cc *SharedConnectionCounter) RemoveActiveRequest() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.activeRequests-- -} - -// AddPendingConnectionAcquire increments the count of pending connection acquires. -func (cc *SharedConnectionCounter) AddPendingConnectionAcquire() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.pendingConnectionAcquire++ -} - -// RemovePendingConnectionAcquire decrements the count of pending connection acquires. -func (cc *SharedConnectionCounter) RemovePendingConnectionAcquire() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.pendingConnectionAcquire-- -} - -// InitMetricContext initializes the metric context with the provided counter and publisher. -// It returns the updated context. -func InitMetricContext( - ctx context.Context, counter *SharedConnectionCounter, publisher MetricPublisher, -) context.Context { - if middleware.GetStackValue(ctx, metricContextKey{}) == nil { - ctx = middleware.WithStackValue(ctx, metricContextKey{}, &MetricContext{ - connectionCounter: counter, - publisher: publisher, - data: &MetricData{ - Attempts: []AttemptMetrics{}, - Stream: StreamMetrics{}, - }, - }) - } - return ctx -} - -// Context returns the metric context from the given context. -// It returns nil if the metric context is not found. -func Context(ctx context.Context) *MetricContext { - mctx := middleware.GetStackValue(ctx, metricContextKey{}) - if mctx == nil { - return nil - } - return mctx.(*MetricContext) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go index e7d268c3..128b60a7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go @@ -4,6 +4,7 @@ import ( "context" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -45,6 +46,9 @@ func (m *RequestIDRetriever) HandleDeserialize(ctx context.Context, in middlewar if v := resp.Header.Get(h); len(v) != 0 { // set reqID on metadata for successful responses. SetRequestIDMetadata(&metadata, v) + + span, _ := tracing.GetSpan(ctx) + span.SetProperty("aws.request_id", v) break } } 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 ff0bc921..67aaa022 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 @@ -85,6 +85,7 @@ const ( UserAgentFeatureS3ExpressBucket = "J" UserAgentFeatureS3AccessGrants = "K" // not yet implemented UserAgentFeatureGZIPRequestCompression = "L" + UserAgentFeatureProtocolRPCV2CBOR = "M" ) // 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/retry/attempt_metrics.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/attempt_metrics.go new file mode 100644 index 00000000..bfa5bf7d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/attempt_metrics.go @@ -0,0 +1,51 @@ +package retry + +import ( + "context" + + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" +) + +type attemptMetrics struct { + Attempts metrics.Int64Counter + Errors metrics.Int64Counter + + AttemptDuration metrics.Float64Histogram +} + +func newAttemptMetrics(meter metrics.Meter) (*attemptMetrics, error) { + m := &attemptMetrics{} + var err error + + m.Attempts, err = meter.Int64Counter("client.call.attempts", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "{attempt}" + o.Description = "The number of attempts for an individual operation" + }) + if err != nil { + return nil, err + } + m.Errors, err = meter.Int64Counter("client.call.errors", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "{error}" + o.Description = "The number of errors for an operation" + }) + if err != nil { + return nil, err + } + m.AttemptDuration, err = meter.Float64Histogram("client.call.attempt_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes to connect to the service, send the request, and get back HTTP status code and headers (including time queued waiting to be sent)" + }) + if err != nil { + return nil, err + } + + return m, nil +} + +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)) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go index b645fbdf..52d59b04 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go @@ -8,14 +8,16 @@ import ( "strings" "time" - "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" + "github.com/aws/smithy-go" "github.com/aws/aws-sdk-go-v2/aws" awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/internal/sdk" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" smithymiddle "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" "github.com/aws/smithy-go/transport/http" ) @@ -38,6 +40,9 @@ type Attempt struct { // attempts are reached. LogAttempts bool + // A Meter instance for recording retry-related metrics. + OperationMeter metrics.Meter + retryer aws.RetryerV2 requestCloner RequestCloner } @@ -55,6 +60,10 @@ func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optF for _, fn := range optFns { fn(m) } + if m.OperationMeter == nil { + m.OperationMeter = metrics.NopMeterProvider{}.Meter("") + } + return m } @@ -80,6 +89,11 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn maxAttempts := r.retryer.MaxAttempts() releaseRetryToken := nopRelease + retryMetrics, err := newAttemptMetrics(r.OperationMeter) + if err != nil { + return out, metadata, err + } + for { attemptNum++ attemptInput := in @@ -97,7 +111,25 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew) var attemptResult AttemptResult + + attemptCtx, span := tracing.StartSpan(attemptCtx, "Attempt", func(o *tracing.SpanOptions) { + o.Properties.Set("operation.attempt", attemptNum) + }) + retryMetrics.Attempts.Add(ctx, 1, withOperationMetadata(ctx)) + + start := sdk.NowTime() out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next) + elapsed := sdk.NowTime().Sub(start) + + retryMetrics.AttemptDuration.Record(ctx, float64(elapsed)/1e9, withOperationMetadata(ctx)) + if err != nil { + retryMetrics.Errors.Add(ctx, 1, withOperationMetadata(ctx), func(o *metrics.RecordMetricOptions) { + o.Properties.Set("exception.type", errorType(err)) + }) + } + + span.End() + attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata) // AttemptResult Retried states that the attempt was not successful, and @@ -238,13 +270,6 @@ func (r *Attempt) handleAttempt( // that time. Potentially early exist if the sleep is canceled via the // context. retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err) - mctx := metrics.Context(ctx) - if mctx != nil { - attempt, err := mctx.Data().LatestAttempt() - if err != nil { - attempt.RetryDelay = retryDelay - } - } if reqErr != nil { return out, attemptResult, releaseRetryToken, reqErr } @@ -381,3 +406,13 @@ func AddRetryMiddlewares(stack *smithymiddle.Stack, options AddRetryMiddlewaresO } return nil } + +// Determines the value of exception.type for metrics purposes. We prefer an +// API-specific error code, otherwise it's just the Go type for the value. +func errorType(err error) string { + var terr smithy.APIError + if errors.As(err, &terr) { + return terr.ErrorCode() + } + return fmt.Sprintf("%T", err) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go index 71b1a352..734e548b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go @@ -45,7 +45,6 @@ var RequiredSignedHeaders = Rules{ "X-Amz-Grant-Write-Acp": struct{}{}, "X-Amz-Metadata-Directive": struct{}{}, "X-Amz-Mfa": struct{}{}, - "X-Amz-Request-Payer": struct{}{}, "X-Amz-Server-Side-Encryption": struct{}{}, "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{}, "X-Amz-Server-Side-Encryption-Context": struct{}{}, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go index a9db6433..8a46220a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go @@ -15,6 +15,7 @@ import ( internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/internal/sdk" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -161,6 +162,9 @@ func (m *ComputePayloadSHA256) HandleFinalize( return next.HandleFinalize(ctx, in) } + _, span := tracing.StartSpan(ctx, "ComputePayloadSHA256") + defer span.End() + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &HashComputationError{ @@ -186,6 +190,7 @@ func (m *ComputePayloadSHA256) HandleFinalize( ctx = SetPayloadHash(ctx, hex.EncodeToString(hash.Sum(nil))) + span.End() return next.HandleFinalize(ctx, in) } @@ -367,8 +372,9 @@ func GetSignedRequestSignature(r *http.Request) ([]byte, error) { const authHeaderSignatureElem = "Signature=" if auth := r.Header.Get(authorizationHeader); len(auth) != 0 { - ps := strings.Split(auth, ", ") + ps := strings.Split(auth, ",") for _, p := range ps { + p = strings.TrimSpace(p) if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 { sig := p[len(authHeaderSignatureElem):] if len(sig) == 0 { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go index dcd896a9..7ed91d5b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go @@ -394,11 +394,16 @@ func (s *httpSigner) buildCredentialScope() string { func buildQuery(r v4Internal.Rule, header http.Header) (url.Values, http.Header) { query := url.Values{} unsignedHeaders := http.Header{} + + // A list of headers to be converted to lower case to mitigate a limitation from S3 + lowerCaseHeaders := map[string]string{ + "X-Amz-Expected-Bucket-Owner": "x-amz-expected-bucket-owner", // see #2508 + "X-Amz-Request-Payer": "x-amz-request-payer", // see #2764 + } + for k, h := range header { - // literally just this header has this constraint for some stupid reason, - // see #2508 - if k == "X-Amz-Expected-Bucket-Owner" { - k = "x-amz-expected-bucket-owner" + if newKey, ok := lowerCaseHeaders[k]; ok { + k = newKey } if r.IsValid(k) { 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 26d90719..8d7c35a9 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 @@ -1,13 +1,16 @@ package http import ( + "context" "crypto/tls" - "github.com/aws/aws-sdk-go-v2/aws" "net" "net/http" "reflect" "sync" "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/smithy-go/tracing" ) // Defaults for the HTTPTransportBuilder. @@ -179,7 +182,7 @@ func defaultHTTPTransport() *http.Transport { tr := &http.Transport{ Proxy: http.ProxyFromEnvironment, - DialContext: dialer.DialContext, + DialContext: traceDialContext(dialer.DialContext), TLSHandshakeTimeout: DefaultHTTPTransportTLSHandleshakeTimeout, MaxIdleConns: DefaultHTTPTransportMaxIdleConns, MaxIdleConnsPerHost: DefaultHTTPTransportMaxIdleConnsPerHost, @@ -194,6 +197,35 @@ func defaultHTTPTransport() *http.Transport { return tr } +type dialContext func(ctx context.Context, network, addr string) (net.Conn, error) + +func traceDialContext(dc dialContext) dialContext { + return func(ctx context.Context, network, addr string) (net.Conn, error) { + span, _ := tracing.GetSpan(ctx) + span.SetProperty("net.peer.name", addr) + + conn, err := dc(ctx, network, addr) + if err != nil { + return conn, err + } + + raddr := conn.RemoteAddr() + if raddr == nil { + return conn, err + } + + host, port, err := net.SplitHostPort(raddr.String()) + if err != nil { // don't blow up just because we couldn't parse + span.SetProperty("net.peer.addr", raddr.String()) + } else { + span.SetProperty("net.peer.host", host) + span.SetProperty("net.peer.port", port) + } + + return conn, err + } +} + // shallowCopyStruct creates a shallow copy of the passed in source struct, and // returns that copy of the same struct type. func shallowCopyStruct(src interface{}) interface{} { 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 6977bdb7..a4db973e 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,84 @@ +# v1.28.3 (2024-11-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.2 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.1 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.0 (2024-10-16) + +* **Feature**: Adds the LoadOptions hook `WithBaseEndpoint` for setting global endpoint override in-code. + +# v1.27.43 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.42 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.41 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.40 (2024-10-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.39 (2024-09-27) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.38 (2024-09-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.37 (2024-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.36 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.35 (2024-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.34 (2024-09-16) + +* **Bug Fix**: Read `AWS_CONTAINER_CREDENTIALS_FULL_URI` env variable if set when reading a profile with `credential_source`. Also ensure `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI` is always read before it + +# v1.27.33 (2024-09-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.32 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.31 (2024-08-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.30 (2024-08-23) + +* **Bug Fix**: Don't fail credentials unit tests if credentials are found on a file + +# v1.27.29 (2024-08-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.28 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.27.27 (2024-07-18) * **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 a8fe2a2b..932235f9 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.27.27" +const goModuleVersion = "1.28.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go index 5f643977..dc6c7d29 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go @@ -217,6 +217,10 @@ type LoadOptions struct { S3DisableExpressAuth *bool AccountIDEndpointMode aws.AccountIDEndpointMode + + // Service endpoint override. This value is not necessarily final and is + // passed to the service's EndpointResolverV2 for further delegation. + BaseEndpoint string } func (o LoadOptions) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) { @@ -284,6 +288,19 @@ func (o LoadOptions) getAccountIDEndpointMode(ctx context.Context) (aws.AccountI return o.AccountIDEndpointMode, len(o.AccountIDEndpointMode) > 0, nil } +func (o LoadOptions) getBaseEndpoint(context.Context) (string, bool, error) { + return o.BaseEndpoint, o.BaseEndpoint != "", nil +} + +// GetServiceBaseEndpoint satisfies (internal/configsources).ServiceBaseEndpointProvider. +// +// The sdkID value is unused because LoadOptions only supports setting a GLOBAL +// endpoint override. In-code, per-service endpoint overrides are performed via +// functional options in service client space. +func (o LoadOptions) GetServiceBaseEndpoint(context.Context, string) (string, bool, error) { + return o.BaseEndpoint, o.BaseEndpoint != "", nil +} + // WithRegion is a helper function to construct functional options // that sets Region on config's LoadOptions. Setting the region to // an empty string, will result in the region value being ignored. @@ -1139,3 +1156,19 @@ func WithS3DisableExpressAuth(v bool) LoadOptionsFunc { return nil } } + +// WithBaseEndpoint is a helper function to construct functional options that +// sets BaseEndpoint on config's LoadOptions. Empty values have no effect, and +// subsequent calls to this API override previous ones. +// +// This is an in-code setting, therefore, any value set using this hook takes +// precedence over and will override ALL environment and shared config +// directives that set endpoint URLs. Functional options on service clients +// have higher specificity, and functional options that modify the value of +// BaseEndpoint on a client will take precedence over this setting. +func WithBaseEndpoint(v string) LoadOptionsFunc { + return func(o *LoadOptions) error { + o.BaseEndpoint = v + return nil + } +} 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 89368520..7ae252e2 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 @@ -162,12 +162,12 @@ func resolveCredsFromProfile(ctx context.Context, cfg *aws.Config, envConfig *En // Get credentials from CredentialProcess err = processCredentials(ctx, cfg, sharedConfig, configs) - case len(envConfig.ContainerCredentialsEndpoint) != 0: - err = resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs) - case len(envConfig.ContainerCredentialsRelativePath) != 0: err = resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs) + case len(envConfig.ContainerCredentialsEndpoint) != 0: + err = resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs) + default: err = resolveEC2RoleCredentials(ctx, cfg, configs) } @@ -355,10 +355,13 @@ func resolveCredsFromSource(ctx context.Context, cfg *aws.Config, envConfig *Env cfg.Credentials = credentials.StaticCredentialsProvider{Value: envConfig.Credentials} case credSourceECSContainer: - if len(envConfig.ContainerCredentialsRelativePath) == 0 { - return fmt.Errorf("EcsContainer was specified as the credential_source, but 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' was not set") + if len(envConfig.ContainerCredentialsRelativePath) != 0 { + return resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs) + } + if len(envConfig.ContainerCredentialsEndpoint) != 0 { + return resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs) } - return resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs) + return fmt.Errorf("EcsContainer was specified as the credential_source, but neither 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' or AWS_CONTAINER_CREDENTIALS_FULL_URI' was set") default: return fmt.Errorf("credential_source values must be EcsContainer, Ec2InstanceMetadata, or Environment") 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 66b78681..2f0c60fb 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,72 @@ +# v1.17.44 (2024-11-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.43 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.42 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.41 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.40 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.39 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.38 (2024-10-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.37 (2024-09-27) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.36 (2024-09-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.35 (2024-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.34 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.33 (2024-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.32 (2024-09-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.31 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.30 (2024-08-26) + +* **Bug Fix**: Save SSO cached token expiry in UTC to ensure cross-SDK compatibility. + +# v1.17.29 (2024-08-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.28 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.27 (2024-07-18) * **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 aaed530a..5c028a10 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.27" +const goModuleVersion = "1.17.44" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go index 3b97e6dd..46ae2f92 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go @@ -225,7 +225,7 @@ func (r *rfc3339) UnmarshalJSON(bytes []byte) (err error) { } func (r *rfc3339) MarshalJSON() ([]byte, error) { - value := time.Time(*r).Format(time.RFC3339) + value := time.Time(*r).UTC().Format(time.RFC3339) // Use JSON unmarshal to unescape the quoted value making use of JSON's // quoting rules. 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 3584159d..66beafc7 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,36 @@ +# v1.16.19 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.18 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.17 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.16 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.15 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.14 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.13 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.12 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.16.11 (2024-07-10.2) * **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 1cd75606..79b1d7c9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go @@ -3,4 +3,4 @@ package imds // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.16.11" +const goModuleVersion = "1.16.19" 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 3c1d846e..6396f510 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,41 @@ +# v1.3.24 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.23 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.22 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.21 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.20 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.19 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.18 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.17 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.16 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.15 (2024-07-10.2) * **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 7926a49c..56bea7d6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.15" +const goModuleVersion = "1.3.24" 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 7a28569c..a2f06808 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 @@ -9,7 +9,7 @@ "supportsDualStack" : true, "supportsFIPS" : true }, - "regionRegex" : "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", + "regionRegex" : "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", "regions" : { "af-south-1" : { "description" : "Africa (Cape Town)" @@ -44,6 +44,9 @@ "ap-southeast-4" : { "description" : "Asia Pacific (Melbourne)" }, + "ap-southeast-5" : { + "description" : "Asia Pacific (Malaysia)" + }, "aws-global" : { "description" : "AWS Standard global region" }, 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 549df601..7c870b66 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,41 @@ +# v2.6.24 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.23 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.22 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.21 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.20 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.19 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.18 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.17 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.16 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v2.6.15 (2024-07-10.2) * **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 dcb5a4b9..7f46f580 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.6.15" +const goModuleVersion = "2.6.24" 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 c0e54faf..be61098b 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.1 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. + # v1.8.0 (2024-02-13) * **Feature**: Bump minimum Go version to 1.20 per our language support policy. 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 6e0b906c..ef6a3811 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.0" +const goModuleVersion = "1.8.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/CHANGELOG.md index 006c7563..cb5860c3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/CHANGELOG.md @@ -1,3 +1,66 @@ +# v1.27.5 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.27.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.4 (2024-10-03) + +* No change notes available for this release. + +# v1.26.3 (2024-09-27) + +* No change notes available for this release. + +# v1.26.2 (2024-09-25) + +* No change notes available for this release. + +# v1.26.1 (2024-09-23) + +* No change notes available for this release. + +# v1.26.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.9 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.25.8 (2024-09-04) + +* No change notes available for this release. + +# v1.25.7 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.6 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.25.5 (2024-07-10.2) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_client.go index 0a788dce..4d11ef77 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_client.go @@ -4,6 +4,7 @@ package cognitoidentity import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( 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" @@ -30,6 +33,133 @@ import ( const ServiceID = "Cognito Identity" const ServiceAPIVersion = "2014-06-30" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/cognitoidentity") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/cognitoidentity") +} + // Client provides the API client to make operations call for Amazon Cognito // Identity. type Client struct { @@ -57,6 +187,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -89,8 +223,15 @@ 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) { +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() @@ -114,15 +255,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + 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/cognitoidentity") + }) + 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 } @@ -160,7 +342,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o 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{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -238,16 +420,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -435,6 +616,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { 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) } @@ -478,6 +683,7 @@ func addIsPaginatorUserAgent(o *Options) { 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/cognitoidentity") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -541,25 +747,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -575,6 +762,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +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) } @@ -626,3 +825,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_CreateIdentityPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_CreateIdentityPool.go index ba7b8e8e..be4bc018 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_CreateIdentityPool.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_CreateIdentityPool.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateIdentityPoolMiddlewares(stack *middleware.Sta 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 } @@ -223,6 +226,18 @@ func (c *Client) addOperationCreateIdentityPoolMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentities.go index aa059005..eabe61c4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentities.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDeleteIdentitiesMiddlewares(stack *middleware.Stack 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 } @@ -136,6 +139,18 @@ func (c *Client) addOperationDeleteIdentitiesMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentityPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentityPool.go index e023e23f..408e20cf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentityPool.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentityPool.go @@ -90,6 +90,9 @@ func (c *Client) addOperationDeleteIdentityPoolMiddlewares(stack *middleware.Sta 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 } @@ -129,6 +132,18 @@ func (c *Client) addOperationDeleteIdentityPoolMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentity.go index 43064941..58d28683 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentity.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeIdentityMiddlewares(stack *middleware.Stack 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 } @@ -144,6 +147,18 @@ func (c *Client) addOperationDescribeIdentityMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentityPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentityPool.go index 57c43449..ad733efa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentityPool.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentityPool.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeIdentityPoolMiddlewares(stack *middleware.S 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 } @@ -174,6 +177,18 @@ func (c *Client) addOperationDescribeIdentityPoolMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetCredentialsForIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetCredentialsForIdentity.go index cccf4a28..5b1d4c14 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetCredentialsForIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetCredentialsForIdentity.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetCredentialsForIdentityMiddlewares(stack *middlew 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 } @@ -157,6 +160,18 @@ func (c *Client) addOperationGetCredentialsForIdentityMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetId.go index 4d636125..98422483 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetId.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetId.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetIdMiddlewares(stack *middleware.Stack, options O 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 } @@ -151,6 +154,18 @@ func (c *Client) addOperationGetIdMiddlewares(stack *middleware.Stack, options O if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetIdentityPoolRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetIdentityPoolRoles.go index 6244b4ce..f1af38a2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetIdentityPoolRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetIdentityPoolRoles.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetIdentityPoolRolesMiddlewares(stack *middleware.S 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 } @@ -144,6 +147,18 @@ func (c *Client) addOperationGetIdentityPoolRolesMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdToken.go index 607133f8..f0e848ed 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdToken.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetOpenIdTokenMiddlewares(stack *middleware.Stack, 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 } @@ -145,6 +148,18 @@ func (c *Client) addOperationGetOpenIdTokenMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go index d689b711..256bb20d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetOpenIdTokenForDeveloperIdentityMiddlewares(stack 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 } @@ -181,6 +184,18 @@ func (c *Client) addOperationGetOpenIdTokenForDeveloperIdentityMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go index 301bf001..ca6f1e3a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetPrincipalTagAttributeMapMiddlewares(stack *middl 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 } @@ -147,6 +150,18 @@ func (c *Client) addOperationGetPrincipalTagAttributeMapMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentities.go index 76a23fe0..c39abb6f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentities.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListIdentitiesMiddlewares(stack *middleware.Stack, 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationListIdentitiesMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentityPools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentityPools.go index d08aa8fa..d5303b19 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentityPools.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentityPools.go @@ -101,6 +101,9 @@ func (c *Client) addOperationListIdentityPoolsMiddlewares(stack *middleware.Stac 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationListIdentityPoolsMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListTagsForResource.go index 4864429b..b8c7a4a6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListTagsForResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListTagsForResource.go @@ -97,6 +97,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St 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 } @@ -136,6 +139,18 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_LookupDeveloperIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_LookupDeveloperIdentity.go index 10810b29..e46f4b37 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_LookupDeveloperIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_LookupDeveloperIdentity.go @@ -139,6 +139,9 @@ func (c *Client) addOperationLookupDeveloperIdentityMiddlewares(stack *middlewar 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 } @@ -178,6 +181,18 @@ func (c *Client) addOperationLookupDeveloperIdentityMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_MergeDeveloperIdentities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_MergeDeveloperIdentities.go index 6a60dc79..d44c0e0c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_MergeDeveloperIdentities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_MergeDeveloperIdentities.go @@ -127,6 +127,9 @@ func (c *Client) addOperationMergeDeveloperIdentitiesMiddlewares(stack *middlewa 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 } @@ -166,6 +169,18 @@ func (c *Client) addOperationMergeDeveloperIdentitiesMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetIdentityPoolRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetIdentityPoolRoles.go index 3f8edc26..ecbb8752 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetIdentityPoolRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetIdentityPoolRoles.go @@ -105,6 +105,9 @@ func (c *Client) addOperationSetIdentityPoolRolesMiddlewares(stack *middleware.S 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 } @@ -144,6 +147,18 @@ func (c *Client) addOperationSetIdentityPoolRolesMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go index 7cc82309..02d72316 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go @@ -114,6 +114,9 @@ func (c *Client) addOperationSetPrincipalTagAttributeMapMiddlewares(stack *middl 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationSetPrincipalTagAttributeMapMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_TagResource.go index 7290c38a..1d2ba53d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_TagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt 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 } @@ -147,6 +150,18 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go index 603133bd..a66ec711 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUnlinkDeveloperIdentityMiddlewares(stack *middlewar 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationUnlinkDeveloperIdentityMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkIdentity.go index 806fcfc3..b651e0ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkIdentity.go @@ -98,6 +98,9 @@ func (c *Client) addOperationUnlinkIdentityMiddlewares(stack *middleware.Stack, 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 } @@ -137,6 +140,18 @@ func (c *Client) addOperationUnlinkIdentityMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UntagResource.go index 71ccf83d..32d8e8c1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UntagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UntagResource.go @@ -92,6 +92,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o 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 } @@ -131,6 +134,18 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UpdateIdentityPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UpdateIdentityPool.go index b5091108..562a92bb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UpdateIdentityPool.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UpdateIdentityPool.go @@ -171,6 +171,9 @@ func (c *Client) addOperationUpdateIdentityPoolMiddlewares(stack *middleware.Sta 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 } @@ -210,6 +213,18 @@ func (c *Client) addOperationUpdateIdentityPoolMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/auth.go index 9e7ad82f..edc9898e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/auth.go @@ -8,7 +8,9 @@ import ( 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" ) @@ -169,6 +171,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -181,6 +186,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -240,7 +248,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -250,12 +261,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + 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) } @@ -271,6 +290,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -280,6 +300,9 @@ func (*signRequestMiddleware) ID() string { 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) @@ -300,9 +323,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, 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/cognitoidentity/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/deserializers.go index f64a52bd..231ff254 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/deserializers.go @@ -14,6 +14,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" @@ -44,6 +45,10 @@ func (m *awsAwsjson11_deserializeOpCreateIdentityPool) HandleDeserialize(ctx con 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)} @@ -166,6 +171,10 @@ func (m *awsAwsjson11_deserializeOpDeleteIdentities) HandleDeserialize(ctx conte 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)} @@ -279,6 +288,10 @@ func (m *awsAwsjson11_deserializeOpDeleteIdentityPool) HandleDeserialize(ctx con 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)} @@ -376,6 +389,10 @@ func (m *awsAwsjson11_deserializeOpDescribeIdentity) HandleDeserialize(ctx conte 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)} @@ -495,6 +512,10 @@ func (m *awsAwsjson11_deserializeOpDescribeIdentityPool) HandleDeserialize(ctx c 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)} @@ -614,6 +635,10 @@ func (m *awsAwsjson11_deserializeOpGetCredentialsForIdentity) HandleDeserialize( 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)} @@ -742,6 +767,10 @@ func (m *awsAwsjson11_deserializeOpGetId) HandleDeserialize(ctx context.Context, 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)} @@ -870,6 +899,10 @@ func (m *awsAwsjson11_deserializeOpGetIdentityPoolRoles) HandleDeserialize(ctx c 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)} @@ -992,6 +1025,10 @@ func (m *awsAwsjson11_deserializeOpGetOpenIdToken) HandleDeserialize(ctx context 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)} @@ -1117,6 +1154,10 @@ func (m *awsAwsjson11_deserializeOpGetOpenIdTokenForDeveloperIdentity) HandleDes 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)} @@ -1242,6 +1283,10 @@ func (m *awsAwsjson11_deserializeOpGetPrincipalTagAttributeMap) HandleDeserializ 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)} @@ -1361,6 +1406,10 @@ func (m *awsAwsjson11_deserializeOpListIdentities) HandleDeserialize(ctx context 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)} @@ -1480,6 +1529,10 @@ func (m *awsAwsjson11_deserializeOpListIdentityPools) HandleDeserialize(ctx cont 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)} @@ -1599,6 +1652,10 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co 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)} @@ -1718,6 +1775,10 @@ func (m *awsAwsjson11_deserializeOpLookupDeveloperIdentity) HandleDeserialize(ct 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)} @@ -1840,6 +1901,10 @@ func (m *awsAwsjson11_deserializeOpMergeDeveloperIdentities) HandleDeserialize(c 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)} @@ -1962,6 +2027,10 @@ func (m *awsAwsjson11_deserializeOpSetIdentityPoolRoles) HandleDeserialize(ctx c 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)} @@ -2065,6 +2134,10 @@ func (m *awsAwsjson11_deserializeOpSetPrincipalTagAttributeMap) HandleDeserializ 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)} @@ -2184,6 +2257,10 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co 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)} @@ -2303,6 +2380,10 @@ func (m *awsAwsjson11_deserializeOpUnlinkDeveloperIdentity) HandleDeserialize(ct 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)} @@ -2403,6 +2484,10 @@ func (m *awsAwsjson11_deserializeOpUnlinkIdentity) HandleDeserialize(ctx context 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)} @@ -2506,6 +2591,10 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. 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)} @@ -2625,6 +2714,10 @@ func (m *awsAwsjson11_deserializeOpUpdateIdentityPool) HandleDeserialize(ctx con 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)} @@ -3237,7 +3330,7 @@ func awsAwsjson11_deserializeDocumentConcurrentModificationException(v **types.C for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3351,7 +3444,7 @@ func awsAwsjson11_deserializeDocumentDeveloperUserAlreadyRegisteredException(v * for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3427,7 +3520,7 @@ func awsAwsjson11_deserializeDocumentExternalServiceException(v **types.External for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3733,7 +3826,7 @@ func awsAwsjson11_deserializeDocumentInternalErrorException(v **types.InternalEr for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3773,7 +3866,7 @@ func awsAwsjson11_deserializeDocumentInvalidIdentityPoolConfigurationException(v for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3813,7 +3906,7 @@ func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.Invalid for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3853,7 +3946,7 @@ func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExcee for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -4030,7 +4123,7 @@ func awsAwsjson11_deserializeDocumentNotAuthorizedException(v **types.NotAuthori for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -4142,7 +4235,7 @@ func awsAwsjson11_deserializeDocumentResourceConflictException(v **types.Resourc for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -4182,7 +4275,7 @@ func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.Resourc for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -4419,7 +4512,7 @@ func awsAwsjson11_deserializeDocumentTooManyRequestsException(v **types.TooManyR for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/endpoints.go index 68d2fb1c..b2f37449 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/endpoints.go @@ -16,6 +16,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -483,14 +484,13 @@ func (*resolveEndpointV2Middleware) ID() string { 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) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -501,11 +501,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + 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 } @@ -527,5 +532,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/go_module_metadata.go index bf7ef78c..c23e44b5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/go_module_metadata.go @@ -3,4 +3,4 @@ package cognitoidentity // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.25.5" +const goModuleVersion = "1.27.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/internal/endpoints/endpoints.go index c0a11d2f..173af6c0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/options.go index 48767e6e..e06d02b5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/options.go @@ -9,7 +9,9 @@ import ( 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" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // 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 @@ -103,6 +105,9 @@ type Options struct { // 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. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/serializers.go index 8ef11b5d..08d1cb64 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/serializers.go @@ -11,6 +11,7 @@ import ( "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" "path" ) @@ -25,6 +26,10 @@ func (*awsAwsjson11_serializeOpCreateIdentityPool) ID() string { func (m *awsAwsjson11_serializeOpCreateIdentityPool) 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)} @@ -67,6 +72,8 @@ func (m *awsAwsjson11_serializeOpCreateIdentityPool) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -80,6 +87,10 @@ func (*awsAwsjson11_serializeOpDeleteIdentities) ID() string { func (m *awsAwsjson11_serializeOpDeleteIdentities) 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)} @@ -122,6 +133,8 @@ func (m *awsAwsjson11_serializeOpDeleteIdentities) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -135,6 +148,10 @@ func (*awsAwsjson11_serializeOpDeleteIdentityPool) ID() string { func (m *awsAwsjson11_serializeOpDeleteIdentityPool) 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)} @@ -177,6 +194,8 @@ func (m *awsAwsjson11_serializeOpDeleteIdentityPool) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -190,6 +209,10 @@ func (*awsAwsjson11_serializeOpDescribeIdentity) ID() string { func (m *awsAwsjson11_serializeOpDescribeIdentity) 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)} @@ -232,6 +255,8 @@ func (m *awsAwsjson11_serializeOpDescribeIdentity) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -245,6 +270,10 @@ func (*awsAwsjson11_serializeOpDescribeIdentityPool) ID() string { func (m *awsAwsjson11_serializeOpDescribeIdentityPool) 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)} @@ -287,6 +316,8 @@ func (m *awsAwsjson11_serializeOpDescribeIdentityPool) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -300,6 +331,10 @@ func (*awsAwsjson11_serializeOpGetCredentialsForIdentity) ID() string { func (m *awsAwsjson11_serializeOpGetCredentialsForIdentity) 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)} @@ -342,6 +377,8 @@ func (m *awsAwsjson11_serializeOpGetCredentialsForIdentity) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -355,6 +392,10 @@ func (*awsAwsjson11_serializeOpGetId) ID() string { func (m *awsAwsjson11_serializeOpGetId) 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)} @@ -397,6 +438,8 @@ func (m *awsAwsjson11_serializeOpGetId) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -410,6 +453,10 @@ func (*awsAwsjson11_serializeOpGetIdentityPoolRoles) ID() string { func (m *awsAwsjson11_serializeOpGetIdentityPoolRoles) 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)} @@ -452,6 +499,8 @@ func (m *awsAwsjson11_serializeOpGetIdentityPoolRoles) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -465,6 +514,10 @@ func (*awsAwsjson11_serializeOpGetOpenIdToken) ID() string { func (m *awsAwsjson11_serializeOpGetOpenIdToken) 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)} @@ -507,6 +560,8 @@ func (m *awsAwsjson11_serializeOpGetOpenIdToken) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -520,6 +575,10 @@ func (*awsAwsjson11_serializeOpGetOpenIdTokenForDeveloperIdentity) ID() string { func (m *awsAwsjson11_serializeOpGetOpenIdTokenForDeveloperIdentity) 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)} @@ -562,6 +621,8 @@ func (m *awsAwsjson11_serializeOpGetOpenIdTokenForDeveloperIdentity) HandleSeria } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -575,6 +636,10 @@ func (*awsAwsjson11_serializeOpGetPrincipalTagAttributeMap) ID() string { func (m *awsAwsjson11_serializeOpGetPrincipalTagAttributeMap) 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)} @@ -617,6 +682,8 @@ func (m *awsAwsjson11_serializeOpGetPrincipalTagAttributeMap) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -630,6 +697,10 @@ func (*awsAwsjson11_serializeOpListIdentities) ID() string { func (m *awsAwsjson11_serializeOpListIdentities) 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)} @@ -672,6 +743,8 @@ func (m *awsAwsjson11_serializeOpListIdentities) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -685,6 +758,10 @@ func (*awsAwsjson11_serializeOpListIdentityPools) ID() string { func (m *awsAwsjson11_serializeOpListIdentityPools) 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)} @@ -727,6 +804,8 @@ func (m *awsAwsjson11_serializeOpListIdentityPools) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -740,6 +819,10 @@ func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { func (m *awsAwsjson11_serializeOpListTagsForResource) 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)} @@ -782,6 +865,8 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -795,6 +880,10 @@ func (*awsAwsjson11_serializeOpLookupDeveloperIdentity) ID() string { func (m *awsAwsjson11_serializeOpLookupDeveloperIdentity) 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)} @@ -837,6 +926,8 @@ func (m *awsAwsjson11_serializeOpLookupDeveloperIdentity) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -850,6 +941,10 @@ func (*awsAwsjson11_serializeOpMergeDeveloperIdentities) ID() string { func (m *awsAwsjson11_serializeOpMergeDeveloperIdentities) 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)} @@ -892,6 +987,8 @@ func (m *awsAwsjson11_serializeOpMergeDeveloperIdentities) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -905,6 +1002,10 @@ func (*awsAwsjson11_serializeOpSetIdentityPoolRoles) ID() string { func (m *awsAwsjson11_serializeOpSetIdentityPoolRoles) 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)} @@ -947,6 +1048,8 @@ func (m *awsAwsjson11_serializeOpSetIdentityPoolRoles) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -960,6 +1063,10 @@ func (*awsAwsjson11_serializeOpSetPrincipalTagAttributeMap) ID() string { func (m *awsAwsjson11_serializeOpSetPrincipalTagAttributeMap) 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)} @@ -1002,6 +1109,8 @@ func (m *awsAwsjson11_serializeOpSetPrincipalTagAttributeMap) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1015,6 +1124,10 @@ func (*awsAwsjson11_serializeOpTagResource) ID() string { func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1057,6 +1170,8 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1070,6 +1185,10 @@ func (*awsAwsjson11_serializeOpUnlinkDeveloperIdentity) ID() string { func (m *awsAwsjson11_serializeOpUnlinkDeveloperIdentity) 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)} @@ -1112,6 +1231,8 @@ func (m *awsAwsjson11_serializeOpUnlinkDeveloperIdentity) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1125,6 +1246,10 @@ func (*awsAwsjson11_serializeOpUnlinkIdentity) ID() string { func (m *awsAwsjson11_serializeOpUnlinkIdentity) 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)} @@ -1167,6 +1292,8 @@ func (m *awsAwsjson11_serializeOpUnlinkIdentity) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1180,6 +1307,10 @@ func (*awsAwsjson11_serializeOpUntagResource) ID() string { func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1222,6 +1353,8 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1235,6 +1368,10 @@ func (*awsAwsjson11_serializeOpUpdateIdentityPool) ID() string { func (m *awsAwsjson11_serializeOpUpdateIdentityPool) 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)} @@ -1277,6 +1414,8 @@ func (m *awsAwsjson11_serializeOpUpdateIdentityPool) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentCognitoIdentityProvider(v *types.CognitoIdentityProvider, value smithyjson.Value) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md index 7afc5334..71f11595 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md @@ -1,3 +1,63 @@ +# v1.37.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.4 (2024-10-03) + +* No change notes available for this release. + +# v1.36.3 (2024-09-27) + +* No change notes available for this release. + +# v1.36.2 (2024-09-25) + +* No change notes available for this release. + +# v1.36.1 (2024-09-23) + +* No change notes available for this release. + +# v1.36.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.3 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.35.2 (2024-09-04) + +* No change notes available for this release. + +# v1.35.1 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.0 (2024-08-15) + +* **Feature**: Make the LastUsedDate field in the GetAccessKeyLastUsed response optional. This may break customers who only call the API for access keys with a valid LastUsedDate. This fixes a deserialization issue for access keys without a LastUsedDate, because the field was marked as required but could be null. +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.34.3 (2024-07-10.2) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go index 17e2f3a1..9bb1d3bb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go @@ -4,6 +4,7 @@ package iam import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( 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" @@ -30,6 +33,133 @@ import ( const ServiceID = "IAM" const ServiceAPIVersion = "2010-05-08" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/iam") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/iam") +} + // Client provides the API client to make operations call for AWS Identity and // Access Management. type Client struct { @@ -57,6 +187,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -89,8 +223,15 @@ 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) { +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() @@ -114,15 +255,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + 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/iam") + }) + 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 } @@ -160,7 +342,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o 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{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -238,16 +420,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -435,6 +616,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { 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) } @@ -478,6 +683,7 @@ func addIsPaginatorUserAgent(o *Options) { 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/iam") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -541,25 +747,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -575,6 +762,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +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) } @@ -626,3 +825,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go index ab2ac881..d0079c96 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go @@ -98,6 +98,9 @@ func (c *Client) addOperationAddClientIDToOpenIDConnectProviderMiddlewares(stack 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 } @@ -137,6 +140,18 @@ func (c *Client) addOperationAddClientIDToOpenIDConnectProviderMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go index a7e2951d..0b4c3e80 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go @@ -120,6 +120,9 @@ func (c *Client) addOperationAddRoleToInstanceProfileMiddlewares(stack *middlewa 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 } @@ -159,6 +162,18 @@ func (c *Client) addOperationAddRoleToInstanceProfileMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go index 48fa5fe0..5064d138 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationAddUserToGroupMiddlewares(stack *middleware.Stack, 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationAddUserToGroupMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go index ed638d95..5311a28c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAttachGroupPolicyMiddlewares(stack *middleware.Stac 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationAttachGroupPolicyMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go index 4e757327..911d4345 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAttachRolePolicyMiddlewares(stack *middleware.Stack 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 } @@ -160,6 +163,18 @@ func (c *Client) addOperationAttachRolePolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go index 9791f0fb..95a79d0b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAttachUserPolicyMiddlewares(stack *middleware.Stack 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationAttachUserPolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go index ef04c749..0aed4dc5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go @@ -113,6 +113,9 @@ func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, 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 } @@ -152,6 +155,18 @@ func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go index 1d3f96c7..939a1717 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateAccessKeyMiddlewares(stack *middleware.Stack, 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 } @@ -155,6 +158,18 @@ func (c *Client) addOperationCreateAccessKeyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go index f36dd0f4..6befed39 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go @@ -96,6 +96,9 @@ func (c *Client) addOperationCreateAccountAliasMiddlewares(stack *middleware.Sta 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 } @@ -135,6 +138,18 @@ func (c *Client) addOperationCreateAccountAliasMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go index d289c042..b6f1079b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt 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 } @@ -157,6 +160,18 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go index c3b199c1..26b50cff 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. 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 } @@ -174,6 +177,18 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go index 66dbdb03..10228a0a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Sta 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 } @@ -169,6 +172,18 @@ func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go index 59f9a148..dcb772c1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go @@ -37,13 +37,11 @@ import ( // You get all of this information from the OIDC IdP you want to use to access // Amazon Web Services. // -// Amazon Web Services secures communication with some OIDC identity providers -// (IdPs) through our library of trusted root certificate authorities (CAs) instead -// of using a certificate thumbprint to verify your IdP server certificate. In -// these cases, your legacy thumbprint remains in your configuration, but is no -// longer used for validation. These OIDC IdPs include Auth0, GitHub, GitLab, -// Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) -// endpoint. +// Amazon Web Services secures communication with OIDC identity providers (IdPs) +// using our library of trusted root certificate authorities (CAs) to verify the +// JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP relies on a +// certificate that is not signed by one of these trusted CAs, only then we secure +// communication using the thumbprints set in the IdP's configuration. // // The trust for the OIDC provider is derived from the IAM provider that this // operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvideroperation to @@ -197,6 +195,9 @@ func (c *Client) addOperationCreateOpenIDConnectProviderMiddlewares(stack *middl 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 } @@ -236,6 +237,18 @@ func (c *Client) addOperationCreateOpenIDConnectProviderMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go index 79962acd..691c6492 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go @@ -179,6 +179,9 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op 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 } @@ -218,6 +221,18 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go index a4f8aafc..5943f98a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.St 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 } @@ -189,6 +192,18 @@ func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go index 3105cd87..2c0fcf79 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go @@ -199,6 +199,9 @@ func (c *Client) addOperationCreateRoleMiddlewares(stack *middleware.Stack, opti 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 } @@ -238,6 +241,18 @@ func (c *Client) addOperationCreateRoleMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go index b807221a..28dfe334 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateSAMLProviderMiddlewares(stack *middleware.Sta 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 } @@ -189,6 +192,18 @@ func (c *Client) addOperationCreateSAMLProviderMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go index b3d3f154..5d9f5041 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateServiceLinkedRoleMiddlewares(stack *middlewar 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 } @@ -164,6 +167,18 @@ func (c *Client) addOperationCreateServiceLinkedRoleMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go index a5290f0e..3b74e854 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateServiceSpecificCredentialMiddlewares(stack *m 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 } @@ -164,6 +167,18 @@ func (c *Client) addOperationCreateServiceSpecificCredentialMiddlewares(stack *m if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go index 8c40fb89..6c18ad2a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti 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 } @@ -180,6 +183,18 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go index 512e34d7..4f8233b2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateVirtualMFADeviceMiddlewares(stack *middleware 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 } @@ -180,6 +183,18 @@ func (c *Client) addOperationCreateVirtualMFADeviceMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go index 390dc81e..4e0a893d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeactivateMFADeviceMiddlewares(stack *middleware.St 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 } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeactivateMFADeviceMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go index 0441f5be..9722f399 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAccessKeyMiddlewares(stack *middleware.Stack, 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 } @@ -147,6 +150,18 @@ func (c *Client) addOperationDeleteAccessKeyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go index d84bc422..5de74902 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Sta 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 } @@ -136,6 +139,18 @@ func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go index 3095a5ac..498c8830 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go @@ -81,6 +81,9 @@ func (c *Client) addOperationDeleteAccountPasswordPolicyMiddlewares(stack *middl 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 } @@ -117,6 +120,18 @@ func (c *Client) addOperationDeleteAccountPasswordPolicyMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go index a1dde6d6..e133fbc5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go @@ -93,6 +93,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt 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 } @@ -132,6 +135,18 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go index 746693c4..d38f19b3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteGroupPolicyMiddlewares(stack *middleware.Stac 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 } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeleteGroupPolicyMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go index fc18e6b9..09d97470 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. 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 } @@ -141,6 +144,18 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go index d1061e58..aabc6c08 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Sta 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 } @@ -143,6 +146,18 @@ func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go index 38c6dc8c..0daf8d87 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDeleteOpenIDConnectProviderMiddlewares(stack *middl 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 } @@ -134,6 +137,18 @@ func (c *Client) addOperationDeleteOpenIDConnectProviderMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go index 4a9cf7fc..5c0aa800 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op 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 } @@ -151,6 +154,18 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go index a136ef86..04767686 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.St 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go index cae15f3c..c8d2320b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteRoleMiddlewares(stack *middleware.Stack, opti 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 } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeleteRoleMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go index 7f172b1c..89d06318 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go @@ -93,6 +93,9 @@ func (c *Client) addOperationDeleteRolePermissionsBoundaryMiddlewares(stack *mid 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 } @@ -132,6 +135,18 @@ func (c *Client) addOperationDeleteRolePermissionsBoundaryMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go index 85fdf9e1..267a3fb7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteRolePolicyMiddlewares(stack *middleware.Stack 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 } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeleteRolePolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go index d76a0218..8ad85a5c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDeleteSAMLProviderMiddlewares(stack *middleware.Sta 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 } @@ -134,6 +137,18 @@ func (c *Client) addOperationDeleteSAMLProviderMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go index 08f4f66c..7c4f9aa2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteSSHPublicKeyMiddlewares(stack *middleware.Sta 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationDeleteSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go index b576da97..bd008955 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteServerCertificateMiddlewares(stack *middlewar 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationDeleteServerCertificateMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go index 6ce0f1a0..e4cac12c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteServiceLinkedRoleMiddlewares(stack *middlewar 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 } @@ -151,6 +154,18 @@ func (c *Client) addOperationDeleteServiceLinkedRoleMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go index 5e8ede90..75fc1a7c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteServiceSpecificCredentialMiddlewares(stack *m 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationDeleteServiceSpecificCredentialMiddlewares(stack *m if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go index 3a0f71a7..cd673808 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteSigningCertificateMiddlewares(stack *middlewa 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationDeleteSigningCertificateMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go index 753e9a8a..98fd67e1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti 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 } @@ -154,6 +157,18 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go index c5a082c2..f00eb363 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go @@ -91,6 +91,9 @@ func (c *Client) addOperationDeleteUserPermissionsBoundaryMiddlewares(stack *mid 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 } @@ -130,6 +133,18 @@ func (c *Client) addOperationDeleteUserPermissionsBoundaryMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go index 4adfc7d5..ba27de19 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteUserPolicyMiddlewares(stack *middleware.Stack 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 } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeleteUserPolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go index 1298b29f..e1becfbe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go @@ -96,6 +96,9 @@ func (c *Client) addOperationDeleteVirtualMFADeviceMiddlewares(stack *middleware 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 } @@ -135,6 +138,18 @@ func (c *Client) addOperationDeleteVirtualMFADeviceMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go index 5d2456b2..6f5d9f01 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDetachGroupPolicyMiddlewares(stack *middleware.Stac 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationDetachGroupPolicyMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go index 1450d982..32521226 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDetachRolePolicyMiddlewares(stack *middleware.Stack 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationDetachRolePolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go index 067db8a4..f627c045 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDetachUserPolicyMiddlewares(stack *middleware.Stack 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationDetachUserPolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go index 20054bc4..34916c2f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go @@ -136,6 +136,9 @@ func (c *Client) addOperationEnableMFADeviceMiddlewares(stack *middleware.Stack, 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 } @@ -175,6 +178,18 @@ func (c *Client) addOperationEnableMFADeviceMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go index 96296dc3..30e21089 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go @@ -93,6 +93,9 @@ func (c *Client) addOperationGenerateCredentialReportMiddlewares(stack *middlewa 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 } @@ -129,6 +132,18 @@ func (c *Client) addOperationGenerateCredentialReportMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go index 6b3ce12f..b9c2b930 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go @@ -213,6 +213,9 @@ func (c *Client) addOperationGenerateOrganizationsAccessReportMiddlewares(stack 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 } @@ -252,6 +255,18 @@ func (c *Client) addOperationGenerateOrganizationsAccessReportMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go index 9dec730a..1be261c2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGenerateServiceLastAccessedDetailsMiddlewares(stack 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 } @@ -201,6 +204,18 @@ func (c *Client) addOperationGenerateServiceLastAccessedDetailsMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go index e39438c4..748c5f28 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetAccessKeyLastUsedMiddlewares(stack *middleware.S 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 } @@ -143,6 +146,18 @@ func (c *Client) addOperationGetAccessKeyLastUsedMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go index c55c15ca..2162fdb8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi 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 } @@ -184,6 +187,18 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go index effb8723..aa50f44c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go @@ -93,6 +93,9 @@ func (c *Client) addOperationGetAccountPasswordPolicyMiddlewares(stack *middlewa 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 } @@ -129,6 +132,18 @@ func (c *Client) addOperationGetAccountPasswordPolicyMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go index 3ea71697..f37d86ae 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go @@ -91,6 +91,9 @@ func (c *Client) addOperationGetAccountSummaryMiddlewares(stack *middleware.Stac 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 } @@ -127,6 +130,18 @@ func (c *Client) addOperationGetAccountSummaryMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go index 7dc7c485..a506e938 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetContextKeysForCustomPolicyMiddlewares(stack *mid 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 } @@ -156,6 +159,18 @@ func (c *Client) addOperationGetContextKeysForCustomPolicyMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go index 5d47169d..10cd3ff5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetContextKeysForPrincipalPolicyMiddlewares(stack * 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 } @@ -175,6 +178,18 @@ func (c *Client) addOperationGetContextKeysForPrincipalPolicyMiddlewares(stack * if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go index abf7df46..d75d50dc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go @@ -99,6 +99,9 @@ func (c *Client) addOperationGetCredentialReportMiddlewares(stack *middleware.St 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 } @@ -135,6 +138,18 @@ func (c *Client) addOperationGetCredentialReportMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go index ab844d00..f10ee89c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option 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 } @@ -175,6 +178,18 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go index fd01808e..3a3db540 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetGroupPolicyMiddlewares(stack *middleware.Stack, 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 } @@ -179,6 +182,18 @@ func (c *Client) addOperationGetGroupPolicyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go index 618689e8..0793563b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go index a67e9852..51d78685 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, 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 } @@ -151,6 +154,18 @@ func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go index 45d77234..92e62934 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetMFADeviceMiddlewares(stack *middleware.Stack, op 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationGetMFADeviceMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go index 4f5cf748..aca71da5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetOpenIDConnectProviderMiddlewares(stack *middlewa 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 } @@ -160,6 +163,18 @@ func (c *Client) addOperationGetOpenIDConnectProviderMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go index 60e6b989..adc980b5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go @@ -180,6 +180,9 @@ func (c *Client) addOperationGetOrganizationsAccessReportMiddlewares(stack *midd 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 } @@ -219,6 +222,18 @@ func (c *Client) addOperationGetOrganizationsAccessReportMiddlewares(stack *midd if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go index 97bb0a52..19d1f11d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio 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 } @@ -155,6 +158,18 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go index a61c2803..e8ca347e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack 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 } @@ -169,6 +172,18 @@ func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go index 6d2312d7..e498e924 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options 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 } @@ -155,6 +158,18 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go index d3cd2878..9830349b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetRolePolicyMiddlewares(stack *middleware.Stack, o 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 } @@ -182,6 +185,18 @@ func (c *Client) addOperationGetRolePolicyMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go index 08fa99e4..78aab000 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetSAMLProviderMiddlewares(stack *middleware.Stack, 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 } @@ -156,6 +159,18 @@ func (c *Client) addOperationGetSAMLProviderMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go index 7bc9673d..f9c1cb88 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetSSHPublicKeyMiddlewares(stack *middleware.Stack, 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 } @@ -161,6 +164,18 @@ func (c *Client) addOperationGetSSHPublicKeyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go index 22cb7b8c..583841ba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetServerCertificateMiddlewares(stack *middleware.S 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 } @@ -145,6 +148,18 @@ func (c *Client) addOperationGetServerCertificateMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go index f16423db..da2b5e1c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go @@ -203,6 +203,9 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsMiddlewares(stack *mid 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 } @@ -242,6 +245,18 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go index 3fa77e9e..22266fa2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go @@ -188,6 +188,9 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsWithEntitiesMiddleware 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 } @@ -227,6 +230,18 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsWithEntitiesMiddleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go index 59a4503c..0bb8fd48 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetServiceLinkedRoleDeletionStatusMiddlewares(stack 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationGetServiceLinkedRoleDeletionStatusMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go index f4d8b712..daa4ca38 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options 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 } @@ -164,6 +167,18 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go index 05d46d64..387888a1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetUserPolicyMiddlewares(stack *middleware.Stack, o 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 } @@ -179,6 +182,18 @@ func (c *Client) addOperationGetUserPolicyMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go index 5b5f619a..de39bf7c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, 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 } @@ -179,6 +182,18 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go index af5c0d42..a65d49f2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go @@ -12,9 +12,9 @@ import ( // Lists the account alias associated with the Amazon Web Services account (Note: // you can have only one). For information about using an Amazon Web Services -// account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the Amazon Web Services Sign-In User Guide. +// account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the IAM User Guide. // -// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html +// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/IAM/latest/UserGuide/console_account-alias.html#CreateAccountAlias func (c *Client) ListAccountAliases(ctx context.Context, params *ListAccountAliasesInput, optFns ...func(*Options)) (*ListAccountAliasesOutput, error) { if params == nil { params = &ListAccountAliasesInput{} @@ -122,6 +122,9 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta 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 } @@ -158,6 +161,18 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go index 1be507e5..fe9de8b7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew 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 } @@ -190,6 +193,18 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go index ed7f5a5f..f767a16d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa 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 } @@ -190,6 +193,18 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go index b71e0341..46cfe418 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa 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 } @@ -190,6 +193,18 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go index 17a4bac7..0844ac67 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go @@ -169,6 +169,9 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. 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 } @@ -208,6 +211,18 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go index 1949a118..5513f487 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac 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 } @@ -184,6 +187,18 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go index 74bfed37..13be88a6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti 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 } @@ -170,6 +173,18 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go index 50d27022..7aa47cf8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac 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 } @@ -170,6 +173,18 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go index 8f20f6b1..bf2efc83 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar 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 } @@ -173,6 +176,18 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go index 939b1a13..257da599 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S 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 } @@ -179,6 +182,18 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go index 83237faf..7815e547 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl 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 } @@ -174,6 +177,18 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go index 3807505d..bdac50b8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac 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 } @@ -174,6 +177,18 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go index 7a4ed1ea..74b5b61c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, 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 } @@ -169,6 +172,18 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go index 2deb644f..acad2e84 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid 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 } @@ -178,6 +181,18 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go index 54fc8650..bc88dac5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go @@ -93,6 +93,9 @@ func (c *Client) addOperationListOpenIDConnectProvidersMiddlewares(stack *middle 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 } @@ -129,6 +132,18 @@ func (c *Client) addOperationListOpenIDConnectProvidersMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go index 10b13b1e..9c406147 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go @@ -171,6 +171,9 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op 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 } @@ -207,6 +210,18 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go index 4fd6f3ac..b7b5a8f2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go @@ -159,6 +159,9 @@ func (c *Client) addOperationListPoliciesGrantingServiceAccessMiddlewares(stack 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 } @@ -198,6 +201,18 @@ func (c *Client) addOperationListPoliciesGrantingServiceAccessMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go index c1f0a559..ddbfc061 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, 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 } @@ -173,6 +176,18 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go index f4f5ef14..943983f5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta 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 } @@ -175,6 +178,18 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go index 15a17eb9..1af13281 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack 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 } @@ -178,6 +181,18 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go index e24e37eb..f91e0394 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op 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 } @@ -173,6 +176,18 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go index 6aea245c..9d3fc4a9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio 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 } @@ -186,6 +189,18 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go index 4bc8b0de..8c677d3f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S 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 } @@ -178,6 +181,18 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go index 6fa3322a..acd4d43b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go @@ -95,6 +95,9 @@ func (c *Client) addOperationListSAMLProvidersMiddlewares(stack *middleware.Stac 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 } @@ -131,6 +134,18 @@ func (c *Client) addOperationListSAMLProvidersMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go index 5fbd400a..c9a60947 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac 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 } @@ -174,6 +177,18 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go index fd09b36a..4683f396 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew 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 } @@ -179,6 +182,18 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go index 76fec0e1..638d0167 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware 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 } @@ -182,6 +185,18 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go index 74d617e0..d48c3c41 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListServiceSpecificCredentialsMiddlewares(stack *mi 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationListServiceSpecificCredentialsMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go index b5ae2b21..95a54552 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar 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 } @@ -174,6 +177,18 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go index 11b7db9b..3f633c2d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack 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 } @@ -177,6 +180,18 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go index 7dc9c05e..a402c64d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op 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 } @@ -173,6 +176,18 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go index f6366f94..d4a29cf8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio 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 } @@ -182,6 +185,18 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go index 299fafff..2e27beef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. 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 } @@ -170,6 +173,18 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go index 2f1e8c59..76011d29 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go @@ -145,6 +145,9 @@ func (c *Client) addOperationPutGroupPolicyMiddlewares(stack *middleware.Stack, 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 } @@ -184,6 +187,18 @@ func (c *Client) addOperationPutGroupPolicyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go index a6065574..7535a37c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutRolePermissionsBoundaryMiddlewares(stack *middle 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 } @@ -155,6 +158,18 @@ func (c *Client) addOperationPutRolePermissionsBoundaryMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go index 7977a8f7..b81b5b4d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go @@ -154,6 +154,9 @@ func (c *Client) addOperationPutRolePolicyMiddlewares(stack *middleware.Stack, o 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 } @@ -193,6 +196,18 @@ func (c *Client) addOperationPutRolePolicyMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go index b076030b..b90d153f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go @@ -114,6 +114,9 @@ func (c *Client) addOperationPutUserPermissionsBoundaryMiddlewares(stack *middle 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationPutUserPermissionsBoundaryMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go index eb2e1376..fcd23509 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go @@ -145,6 +145,9 @@ func (c *Client) addOperationPutUserPolicyMiddlewares(stack *middleware.Stack, o 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 } @@ -184,6 +187,18 @@ func (c *Client) addOperationPutUserPolicyMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go index 71975b0a..c045b504 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares( 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares( if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go index 02ee3aa9..ee73f618 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRemoveRoleFromInstanceProfileMiddlewares(stack *mid 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationRemoveRoleFromInstanceProfileMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go index 0640669b..ae4a5d5d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRemoveUserFromGroupMiddlewares(stack *middleware.St 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationRemoveUserFromGroupMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go index 85f0710e..7e58651a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go @@ -114,6 +114,9 @@ func (c *Client) addOperationResetServiceSpecificCredentialMiddlewares(stack *mi 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationResetServiceSpecificCredentialMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go index bd53a03b..d9616307 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go @@ -123,6 +123,9 @@ func (c *Client) addOperationResyncMFADeviceMiddlewares(stack *middleware.Stack, 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 } @@ -162,6 +165,18 @@ func (c *Client) addOperationResyncMFADeviceMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go index 5aa954a9..408879a9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go @@ -109,6 +109,9 @@ func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middlewar 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go index e0ffc10e..999933e8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSetSecurityTokenServicePreferencesMiddlewares(stack 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 } @@ -155,6 +158,18 @@ func (c *Client) addOperationSetSecurityTokenServicePreferencesMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go index dc49d9b1..532d40f3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go @@ -322,6 +322,9 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S 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 } @@ -361,6 +364,18 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go index af3a3fe6..13b95b4e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go @@ -347,6 +347,9 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar 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 } @@ -386,6 +389,18 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go index d191802e..9eded37a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTagInstanceProfileMiddlewares(stack *middleware.Sta 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 } @@ -163,6 +166,18 @@ func (c *Client) addOperationTagInstanceProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go index 9a41c683..44ce7fea 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagMFADeviceMiddlewares(stack *middleware.Stack, op 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 } @@ -165,6 +168,18 @@ func (c *Client) addOperationTagMFADeviceMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go index 6a98eaf4..15f7a20a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagOpenIDConnectProviderMiddlewares(stack *middlewa 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 } @@ -165,6 +168,18 @@ func (c *Client) addOperationTagOpenIDConnectProviderMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go index 5a012efe..3b13ad9a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTagPolicyMiddlewares(stack *middleware.Stack, optio 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 } @@ -163,6 +166,18 @@ func (c *Client) addOperationTagPolicyMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go index 6ed2bacc..fc89f5ad 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go @@ -132,6 +132,9 @@ func (c *Client) addOperationTagRoleMiddlewares(stack *middleware.Stack, options 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 } @@ -171,6 +174,18 @@ func (c *Client) addOperationTagRoleMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go index 797d4af1..fd16e689 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagSAMLProviderMiddlewares(stack *middleware.Stack, 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 } @@ -165,6 +168,18 @@ func (c *Client) addOperationTagSAMLProviderMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go index c23d2347..9b993e46 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go @@ -133,6 +133,9 @@ func (c *Client) addOperationTagServerCertificateMiddlewares(stack *middleware.S 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 } @@ -172,6 +175,18 @@ func (c *Client) addOperationTagServerCertificateMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go index a7286044..6f99ac6a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go @@ -131,6 +131,9 @@ func (c *Client) addOperationTagUserMiddlewares(stack *middleware.Stack, options 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 } @@ -170,6 +173,18 @@ func (c *Client) addOperationTagUserMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go index 37e60957..947da742 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUntagInstanceProfileMiddlewares(stack *middleware.S 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationUntagInstanceProfileMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go index 1c69ae33..5bdfcf47 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go @@ -102,6 +102,9 @@ func (c *Client) addOperationUntagMFADeviceMiddlewares(stack *middleware.Stack, 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 } @@ -141,6 +144,18 @@ func (c *Client) addOperationUntagMFADeviceMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go index 4797c501..66d67cbe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go @@ -103,6 +103,9 @@ func (c *Client) addOperationUntagOpenIDConnectProviderMiddlewares(stack *middle 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationUntagOpenIDConnectProviderMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go index 5e2f2252..9197933c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUntagPolicyMiddlewares(stack *middleware.Stack, opt 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationUntagPolicyMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go index ce486e00..3d5a54aa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUntagRoleMiddlewares(stack *middleware.Stack, optio 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationUntagRoleMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go index bbd0d11e..bc82fa51 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go @@ -103,6 +103,9 @@ func (c *Client) addOperationUntagSAMLProviderMiddlewares(stack *middleware.Stac 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationUntagSAMLProviderMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go index f0b2edcf..49070c83 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagServerCertificateMiddlewares(stack *middleware 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationUntagServerCertificateMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go index 718b9d30..24d47ca6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUntagUserMiddlewares(stack *middleware.Stack, optio 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationUntagUserMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go index 20bab543..9b4ce807 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateAccessKeyMiddlewares(stack *middleware.Stack, 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 } @@ -161,6 +164,18 @@ func (c *Client) addOperationUpdateAccessKeyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go index b386b6ea..d501b71c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go @@ -175,6 +175,9 @@ func (c *Client) addOperationUpdateAccountPasswordPolicyMiddlewares(stack *middl 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 } @@ -211,6 +214,18 @@ func (c *Client) addOperationUpdateAccountPasswordPolicyMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go index d02c0d85..26fe6cd3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateAssumeRolePolicyMiddlewares(stack *middleware 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 } @@ -159,6 +162,18 @@ func (c *Client) addOperationUpdateAssumeRolePolicyMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go index a5ca9f0b..c11cf78a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt 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 } @@ -163,6 +166,18 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go index 406fa0a4..b2de7ba0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Sta 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 } @@ -163,6 +166,18 @@ func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go index 2b34f750..b8087b02 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go @@ -21,13 +21,11 @@ import ( // does change, any attempt to assume an IAM role that specifies the OIDC provider // as a principal fails until the certificate thumbprint is updated. // -// Amazon Web Services secures communication with some OIDC identity providers -// (IdPs) through our library of trusted root certificate authorities (CAs) instead -// of using a certificate thumbprint to verify your IdP server certificate. In -// these cases, your legacy thumbprint remains in your configuration, but is no -// longer used for validation. These OIDC IdPs include Auth0, GitHub, GitLab, -// Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) -// endpoint. +// Amazon Web Services secures communication with OIDC identity providers (IdPs) +// using our library of trusted root certificate authorities (CAs) to verify the +// JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP relies on a +// certificate that is not signed by one of these trusted CAs, only then we secure +// communication using the thumbprints set in the IdP's configuration. // // Trust for the OIDC provider is derived from the provider certificate and is // validated by the thumbprint. Therefore, it is best to limit access to the @@ -120,6 +118,9 @@ func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(st 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 } @@ -159,6 +160,18 @@ func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(st if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go index ce439ad0..85c5ee1c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, opti 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 } @@ -149,6 +152,18 @@ func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go index afff26bb..9837bbc8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go @@ -99,6 +99,9 @@ func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware. 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 } @@ -138,6 +141,18 @@ func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go index a7e71354..757d8992 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Sta 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go index eee0fd49..0523f336 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Sta 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 } @@ -159,6 +162,18 @@ func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go index 587c2332..5d4b55fc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middlewar 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 } @@ -174,6 +177,18 @@ func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go index 251aa831..dfafeebe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *m 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 } @@ -150,6 +153,18 @@ func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *m if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go index 7f670417..5019ce6b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middlewa 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 } @@ -156,6 +159,18 @@ func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go index fc494f2f..2c59d59e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti 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 } @@ -164,6 +167,18 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go index f15c7265..47827508 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Sta 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 } @@ -165,6 +168,18 @@ func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go index c3a9eb09..ea45b952 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go @@ -221,6 +221,9 @@ func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middlewar 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 } @@ -260,6 +263,18 @@ func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go index db7f07b5..a22a48f8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middlewa 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 } @@ -179,6 +182,18 @@ func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go index 27aaba12..e9442c05 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go @@ -8,7 +8,9 @@ import ( 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" ) @@ -145,6 +147,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -157,6 +162,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -216,7 +224,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -226,12 +237,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + 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) } @@ -247,6 +266,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -256,6 +276,9 @@ func (*signRequestMiddleware) ID() string { 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) @@ -276,9 +299,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, 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/iam/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go index 4f310b77..7532c0e1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go @@ -17,6 +17,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" @@ -48,6 +49,10 @@ func (m *awsAwsquery_deserializeOpAddClientIDToOpenIDConnectProvider) HandleDese 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)} @@ -130,6 +135,10 @@ func (m *awsAwsquery_deserializeOpAddRoleToInstanceProfile) HandleDeserialize(ct 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)} @@ -215,6 +224,10 @@ func (m *awsAwsquery_deserializeOpAddUserToGroup) HandleDeserialize(ctx context. 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)} @@ -294,6 +307,10 @@ func (m *awsAwsquery_deserializeOpAttachGroupPolicy) HandleDeserialize(ctx conte 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)} @@ -379,6 +396,10 @@ func (m *awsAwsquery_deserializeOpAttachRolePolicy) HandleDeserialize(ctx contex 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)} @@ -467,6 +488,10 @@ func (m *awsAwsquery_deserializeOpAttachUserPolicy) HandleDeserialize(ctx contex 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)} @@ -552,6 +577,10 @@ func (m *awsAwsquery_deserializeOpChangePassword) HandleDeserialize(ctx context. 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)} @@ -640,6 +669,10 @@ func (m *awsAwsquery_deserializeOpCreateAccessKey) HandleDeserialize(ctx context 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)} @@ -754,6 +787,10 @@ func (m *awsAwsquery_deserializeOpCreateAccountAlias) HandleDeserialize(ctx cont 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)} @@ -836,6 +873,10 @@ func (m *awsAwsquery_deserializeOpCreateGroup) HandleDeserialize(ctx context.Con 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)} @@ -953,6 +994,10 @@ func (m *awsAwsquery_deserializeOpCreateInstanceProfile) HandleDeserialize(ctx c 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)} @@ -1073,6 +1118,10 @@ func (m *awsAwsquery_deserializeOpCreateLoginProfile) HandleDeserialize(ctx cont 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)} @@ -1193,6 +1242,10 @@ func (m *awsAwsquery_deserializeOpCreateOpenIDConnectProvider) HandleDeserialize 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)} @@ -1316,6 +1369,10 @@ func (m *awsAwsquery_deserializeOpCreatePolicy) HandleDeserialize(ctx context.Co 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)} @@ -1439,6 +1496,10 @@ func (m *awsAwsquery_deserializeOpCreatePolicyVersion) HandleDeserialize(ctx con 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)} @@ -1559,6 +1620,10 @@ func (m *awsAwsquery_deserializeOpCreateRole) HandleDeserialize(ctx context.Cont 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)} @@ -1682,6 +1747,10 @@ func (m *awsAwsquery_deserializeOpCreateSAMLProvider) HandleDeserialize(ctx cont 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)} @@ -1802,6 +1871,10 @@ func (m *awsAwsquery_deserializeOpCreateServiceLinkedRole) HandleDeserialize(ctx 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)} @@ -1919,6 +1992,10 @@ func (m *awsAwsquery_deserializeOpCreateServiceSpecificCredential) HandleDeseria 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)} @@ -2033,6 +2110,10 @@ func (m *awsAwsquery_deserializeOpCreateUser) HandleDeserialize(ctx context.Cont 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)} @@ -2156,6 +2237,10 @@ func (m *awsAwsquery_deserializeOpCreateVirtualMFADevice) HandleDeserialize(ctx 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)} @@ -2276,6 +2361,10 @@ func (m *awsAwsquery_deserializeOpDeactivateMFADevice) HandleDeserialize(ctx con 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)} @@ -2361,6 +2450,10 @@ func (m *awsAwsquery_deserializeOpDeleteAccessKey) HandleDeserialize(ctx context 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)} @@ -2440,6 +2533,10 @@ func (m *awsAwsquery_deserializeOpDeleteAccountAlias) HandleDeserialize(ctx cont 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)} @@ -2522,6 +2619,10 @@ func (m *awsAwsquery_deserializeOpDeleteAccountPasswordPolicy) HandleDeserialize 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)} @@ -2601,6 +2702,10 @@ func (m *awsAwsquery_deserializeOpDeleteGroup) HandleDeserialize(ctx context.Con 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)} @@ -2683,6 +2788,10 @@ func (m *awsAwsquery_deserializeOpDeleteGroupPolicy) HandleDeserialize(ctx conte 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)} @@ -2762,6 +2871,10 @@ func (m *awsAwsquery_deserializeOpDeleteInstanceProfile) HandleDeserialize(ctx c 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)} @@ -2844,6 +2957,10 @@ func (m *awsAwsquery_deserializeOpDeleteLoginProfile) HandleDeserialize(ctx cont 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)} @@ -2926,6 +3043,10 @@ func (m *awsAwsquery_deserializeOpDeleteOpenIDConnectProvider) HandleDeserialize 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)} @@ -3005,6 +3126,10 @@ func (m *awsAwsquery_deserializeOpDeletePolicy) HandleDeserialize(ctx context.Co 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)} @@ -3090,6 +3215,10 @@ func (m *awsAwsquery_deserializeOpDeletePolicyVersion) HandleDeserialize(ctx con 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)} @@ -3175,6 +3304,10 @@ func (m *awsAwsquery_deserializeOpDeleteRole) HandleDeserialize(ctx context.Cont 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)} @@ -3263,6 +3396,10 @@ func (m *awsAwsquery_deserializeOpDeleteRolePermissionsBoundary) HandleDeseriali 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)} @@ -3342,6 +3479,10 @@ func (m *awsAwsquery_deserializeOpDeleteRolePolicy) HandleDeserialize(ctx contex 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)} @@ -3424,6 +3565,10 @@ func (m *awsAwsquery_deserializeOpDeleteSAMLProvider) HandleDeserialize(ctx cont 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)} @@ -3506,6 +3651,10 @@ func (m *awsAwsquery_deserializeOpDeleteServerCertificate) HandleDeserialize(ctx 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)} @@ -3588,6 +3737,10 @@ func (m *awsAwsquery_deserializeOpDeleteServiceLinkedRole) HandleDeserialize(ctx 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)} @@ -3702,6 +3855,10 @@ func (m *awsAwsquery_deserializeOpDeleteServiceSpecificCredential) HandleDeseria 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)} @@ -3775,6 +3932,10 @@ func (m *awsAwsquery_deserializeOpDeleteSigningCertificate) HandleDeserialize(ct 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)} @@ -3857,6 +4018,10 @@ func (m *awsAwsquery_deserializeOpDeleteSSHPublicKey) HandleDeserialize(ctx cont 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)} @@ -3930,6 +4095,10 @@ func (m *awsAwsquery_deserializeOpDeleteUser) HandleDeserialize(ctx context.Cont 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)} @@ -4015,6 +4184,10 @@ func (m *awsAwsquery_deserializeOpDeleteUserPermissionsBoundary) HandleDeseriali 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)} @@ -4091,6 +4264,10 @@ func (m *awsAwsquery_deserializeOpDeleteUserPolicy) HandleDeserialize(ctx contex 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)} @@ -4170,6 +4347,10 @@ func (m *awsAwsquery_deserializeOpDeleteVirtualMFADevice) HandleDeserialize(ctx 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)} @@ -4255,6 +4436,10 @@ func (m *awsAwsquery_deserializeOpDetachGroupPolicy) HandleDeserialize(ctx conte 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)} @@ -4337,6 +4522,10 @@ func (m *awsAwsquery_deserializeOpDetachRolePolicy) HandleDeserialize(ctx contex 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)} @@ -4422,6 +4611,10 @@ func (m *awsAwsquery_deserializeOpDetachUserPolicy) HandleDeserialize(ctx contex 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)} @@ -4504,6 +4697,10 @@ func (m *awsAwsquery_deserializeOpEnableMFADevice) HandleDeserialize(ctx context 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)} @@ -4595,6 +4792,10 @@ func (m *awsAwsquery_deserializeOpGenerateCredentialReport) HandleDeserialize(ct 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)} @@ -4706,6 +4907,10 @@ func (m *awsAwsquery_deserializeOpGenerateOrganizationsAccessReport) HandleDeser 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)} @@ -4814,6 +5019,10 @@ func (m *awsAwsquery_deserializeOpGenerateServiceLastAccessedDetails) HandleDese 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)} @@ -4925,6 +5134,10 @@ func (m *awsAwsquery_deserializeOpGetAccessKeyLastUsed) HandleDeserialize(ctx co 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)} @@ -5030,6 +5243,10 @@ func (m *awsAwsquery_deserializeOpGetAccountAuthorizationDetails) HandleDeserial 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)} @@ -5138,6 +5355,10 @@ func (m *awsAwsquery_deserializeOpGetAccountPasswordPolicy) HandleDeserialize(ct 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)} @@ -5249,6 +5470,10 @@ func (m *awsAwsquery_deserializeOpGetAccountSummary) HandleDeserialize(ctx conte 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)} @@ -5357,6 +5582,10 @@ func (m *awsAwsquery_deserializeOpGetContextKeysForCustomPolicy) HandleDeseriali 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)} @@ -5465,6 +5694,10 @@ func (m *awsAwsquery_deserializeOpGetContextKeysForPrincipalPolicy) HandleDeseri 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)} @@ -5576,6 +5809,10 @@ func (m *awsAwsquery_deserializeOpGetCredentialReport) HandleDeserialize(ctx con 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)} @@ -5693,6 +5930,10 @@ func (m *awsAwsquery_deserializeOpGetGroup) HandleDeserialize(ctx context.Contex 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)} @@ -5804,6 +6045,10 @@ func (m *awsAwsquery_deserializeOpGetGroupPolicy) HandleDeserialize(ctx context. 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)} @@ -5915,6 +6160,10 @@ func (m *awsAwsquery_deserializeOpGetInstanceProfile) HandleDeserialize(ctx cont 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)} @@ -6026,6 +6275,10 @@ func (m *awsAwsquery_deserializeOpGetLoginProfile) HandleDeserialize(ctx context 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)} @@ -6137,6 +6390,10 @@ func (m *awsAwsquery_deserializeOpGetMFADevice) HandleDeserialize(ctx context.Co 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)} @@ -6248,6 +6505,10 @@ func (m *awsAwsquery_deserializeOpGetOpenIDConnectProvider) HandleDeserialize(ct 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)} @@ -6362,6 +6623,10 @@ func (m *awsAwsquery_deserializeOpGetOrganizationsAccessReport) HandleDeserializ 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)} @@ -6470,6 +6735,10 @@ func (m *awsAwsquery_deserializeOpGetPolicy) HandleDeserialize(ctx context.Conte 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)} @@ -6584,6 +6853,10 @@ func (m *awsAwsquery_deserializeOpGetPolicyVersion) HandleDeserialize(ctx contex 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)} @@ -6698,6 +6971,10 @@ func (m *awsAwsquery_deserializeOpGetRole) HandleDeserialize(ctx context.Context 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)} @@ -6809,6 +7086,10 @@ func (m *awsAwsquery_deserializeOpGetRolePolicy) HandleDeserialize(ctx context.C 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)} @@ -6920,6 +7201,10 @@ func (m *awsAwsquery_deserializeOpGetSAMLProvider) HandleDeserialize(ctx context 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)} @@ -7034,6 +7319,10 @@ func (m *awsAwsquery_deserializeOpGetServerCertificate) HandleDeserialize(ctx co 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)} @@ -7145,6 +7434,10 @@ func (m *awsAwsquery_deserializeOpGetServiceLastAccessedDetails) HandleDeseriali 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)} @@ -7256,6 +7549,10 @@ func (m *awsAwsquery_deserializeOpGetServiceLastAccessedDetailsWithEntities) Han 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)} @@ -7367,6 +7664,10 @@ func (m *awsAwsquery_deserializeOpGetServiceLinkedRoleDeletionStatus) HandleDese 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)} @@ -7481,6 +7782,10 @@ func (m *awsAwsquery_deserializeOpGetSSHPublicKey) HandleDeserialize(ctx context 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)} @@ -7592,6 +7897,10 @@ func (m *awsAwsquery_deserializeOpGetUser) HandleDeserialize(ctx context.Context 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)} @@ -7703,6 +8012,10 @@ func (m *awsAwsquery_deserializeOpGetUserPolicy) HandleDeserialize(ctx context.C 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)} @@ -7814,6 +8127,10 @@ func (m *awsAwsquery_deserializeOpListAccessKeys) HandleDeserialize(ctx context. 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)} @@ -7925,6 +8242,10 @@ func (m *awsAwsquery_deserializeOpListAccountAliases) HandleDeserialize(ctx cont 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)} @@ -8033,6 +8354,10 @@ func (m *awsAwsquery_deserializeOpListAttachedGroupPolicies) HandleDeserialize(c 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)} @@ -8147,6 +8472,10 @@ func (m *awsAwsquery_deserializeOpListAttachedRolePolicies) HandleDeserialize(ct 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)} @@ -8261,6 +8590,10 @@ func (m *awsAwsquery_deserializeOpListAttachedUserPolicies) HandleDeserialize(ct 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)} @@ -8375,6 +8708,10 @@ func (m *awsAwsquery_deserializeOpListEntitiesForPolicy) HandleDeserialize(ctx c 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)} @@ -8489,6 +8826,10 @@ func (m *awsAwsquery_deserializeOpListGroupPolicies) HandleDeserialize(ctx conte 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)} @@ -8600,6 +8941,10 @@ func (m *awsAwsquery_deserializeOpListGroups) HandleDeserialize(ctx context.Cont 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)} @@ -8708,6 +9053,10 @@ func (m *awsAwsquery_deserializeOpListGroupsForUser) HandleDeserialize(ctx conte 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)} @@ -8819,6 +9168,10 @@ func (m *awsAwsquery_deserializeOpListInstanceProfiles) HandleDeserialize(ctx co 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)} @@ -8927,6 +9280,10 @@ func (m *awsAwsquery_deserializeOpListInstanceProfilesForRole) HandleDeserialize 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)} @@ -9038,6 +9395,10 @@ func (m *awsAwsquery_deserializeOpListInstanceProfileTags) HandleDeserialize(ctx 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)} @@ -9149,6 +9510,10 @@ func (m *awsAwsquery_deserializeOpListMFADevices) HandleDeserialize(ctx context. 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)} @@ -9260,6 +9625,10 @@ func (m *awsAwsquery_deserializeOpListMFADeviceTags) HandleDeserialize(ctx conte 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)} @@ -9374,6 +9743,10 @@ func (m *awsAwsquery_deserializeOpListOpenIDConnectProviders) HandleDeserialize( 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)} @@ -9482,6 +9855,10 @@ func (m *awsAwsquery_deserializeOpListOpenIDConnectProviderTags) HandleDeseriali 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)} @@ -9596,6 +9973,10 @@ func (m *awsAwsquery_deserializeOpListPolicies) HandleDeserialize(ctx context.Co 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)} @@ -9704,6 +10085,10 @@ func (m *awsAwsquery_deserializeOpListPoliciesGrantingServiceAccess) HandleDeser 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)} @@ -9815,6 +10200,10 @@ func (m *awsAwsquery_deserializeOpListPolicyTags) HandleDeserialize(ctx context. 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)} @@ -9929,6 +10318,10 @@ func (m *awsAwsquery_deserializeOpListPolicyVersions) HandleDeserialize(ctx cont 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)} @@ -10043,6 +10436,10 @@ func (m *awsAwsquery_deserializeOpListRolePolicies) HandleDeserialize(ctx contex 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)} @@ -10154,6 +10551,10 @@ func (m *awsAwsquery_deserializeOpListRoles) HandleDeserialize(ctx context.Conte 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)} @@ -10262,6 +10663,10 @@ func (m *awsAwsquery_deserializeOpListRoleTags) HandleDeserialize(ctx context.Co 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)} @@ -10373,6 +10778,10 @@ func (m *awsAwsquery_deserializeOpListSAMLProviders) HandleDeserialize(ctx conte 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)} @@ -10481,6 +10890,10 @@ func (m *awsAwsquery_deserializeOpListSAMLProviderTags) HandleDeserialize(ctx co 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)} @@ -10595,6 +11008,10 @@ func (m *awsAwsquery_deserializeOpListServerCertificates) HandleDeserialize(ctx 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)} @@ -10703,6 +11120,10 @@ func (m *awsAwsquery_deserializeOpListServerCertificateTags) HandleDeserialize(c 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)} @@ -10814,6 +11235,10 @@ func (m *awsAwsquery_deserializeOpListServiceSpecificCredentials) HandleDeserial 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)} @@ -10925,6 +11350,10 @@ func (m *awsAwsquery_deserializeOpListSigningCertificates) HandleDeserialize(ctx 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)} @@ -11036,6 +11465,10 @@ func (m *awsAwsquery_deserializeOpListSSHPublicKeys) HandleDeserialize(ctx conte 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)} @@ -11144,6 +11577,10 @@ func (m *awsAwsquery_deserializeOpListUserPolicies) HandleDeserialize(ctx contex 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)} @@ -11255,6 +11692,10 @@ func (m *awsAwsquery_deserializeOpListUsers) HandleDeserialize(ctx context.Conte 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)} @@ -11363,6 +11804,10 @@ func (m *awsAwsquery_deserializeOpListUserTags) HandleDeserialize(ctx context.Co 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)} @@ -11474,6 +11919,10 @@ func (m *awsAwsquery_deserializeOpListVirtualMFADevices) HandleDeserialize(ctx c 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)} @@ -11579,6 +12028,10 @@ func (m *awsAwsquery_deserializeOpPutGroupPolicy) HandleDeserialize(ctx context. 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)} @@ -11661,6 +12114,10 @@ func (m *awsAwsquery_deserializeOpPutRolePermissionsBoundary) HandleDeserialize( 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)} @@ -11746,6 +12203,10 @@ func (m *awsAwsquery_deserializeOpPutRolePolicy) HandleDeserialize(ctx context.C 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)} @@ -11831,6 +12292,10 @@ func (m *awsAwsquery_deserializeOpPutUserPermissionsBoundary) HandleDeserialize( 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)} @@ -11913,6 +12378,10 @@ func (m *awsAwsquery_deserializeOpPutUserPolicy) HandleDeserialize(ctx context.C 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)} @@ -11995,6 +12464,10 @@ func (m *awsAwsquery_deserializeOpRemoveClientIDFromOpenIDConnectProvider) Handl 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)} @@ -12074,6 +12547,10 @@ func (m *awsAwsquery_deserializeOpRemoveRoleFromInstanceProfile) HandleDeseriali 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)} @@ -12156,6 +12633,10 @@ func (m *awsAwsquery_deserializeOpRemoveUserFromGroup) HandleDeserialize(ctx con 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)} @@ -12235,6 +12716,10 @@ func (m *awsAwsquery_deserializeOpResetServiceSpecificCredential) HandleDeserial 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)} @@ -12343,6 +12828,10 @@ func (m *awsAwsquery_deserializeOpResyncMFADevice) HandleDeserialize(ctx context 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)} @@ -12428,6 +12917,10 @@ func (m *awsAwsquery_deserializeOpSetDefaultPolicyVersion) HandleDeserialize(ctx 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)} @@ -12510,6 +13003,10 @@ func (m *awsAwsquery_deserializeOpSetSecurityTokenServicePreferences) HandleDese 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)} @@ -12583,6 +13080,10 @@ func (m *awsAwsquery_deserializeOpSimulateCustomPolicy) HandleDeserialize(ctx co 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)} @@ -12694,6 +13195,10 @@ func (m *awsAwsquery_deserializeOpSimulatePrincipalPolicy) HandleDeserialize(ctx 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)} @@ -12808,6 +13313,10 @@ func (m *awsAwsquery_deserializeOpTagInstanceProfile) HandleDeserialize(ctx cont 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)} @@ -12893,6 +13402,10 @@ func (m *awsAwsquery_deserializeOpTagMFADevice) HandleDeserialize(ctx context.Co 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)} @@ -12978,6 +13491,10 @@ func (m *awsAwsquery_deserializeOpTagOpenIDConnectProvider) HandleDeserialize(ct 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)} @@ -13063,6 +13580,10 @@ func (m *awsAwsquery_deserializeOpTagPolicy) HandleDeserialize(ctx context.Conte 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)} @@ -13148,6 +13669,10 @@ func (m *awsAwsquery_deserializeOpTagRole) HandleDeserialize(ctx context.Context 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)} @@ -13233,6 +13758,10 @@ func (m *awsAwsquery_deserializeOpTagSAMLProvider) HandleDeserialize(ctx context 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)} @@ -13318,6 +13847,10 @@ func (m *awsAwsquery_deserializeOpTagServerCertificate) HandleDeserialize(ctx co 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)} @@ -13403,6 +13936,10 @@ func (m *awsAwsquery_deserializeOpTagUser) HandleDeserialize(ctx context.Context 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)} @@ -13488,6 +14025,10 @@ func (m *awsAwsquery_deserializeOpUntagInstanceProfile) HandleDeserialize(ctx co 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)} @@ -13570,6 +14111,10 @@ func (m *awsAwsquery_deserializeOpUntagMFADevice) HandleDeserialize(ctx context. 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)} @@ -13652,6 +14197,10 @@ func (m *awsAwsquery_deserializeOpUntagOpenIDConnectProvider) HandleDeserialize( 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)} @@ -13734,6 +14283,10 @@ func (m *awsAwsquery_deserializeOpUntagPolicy) HandleDeserialize(ctx context.Con 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)} @@ -13816,6 +14369,10 @@ func (m *awsAwsquery_deserializeOpUntagRole) HandleDeserialize(ctx context.Conte 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)} @@ -13895,6 +14452,10 @@ func (m *awsAwsquery_deserializeOpUntagSAMLProvider) HandleDeserialize(ctx conte 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)} @@ -13977,6 +14538,10 @@ func (m *awsAwsquery_deserializeOpUntagServerCertificate) HandleDeserialize(ctx 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)} @@ -14059,6 +14624,10 @@ func (m *awsAwsquery_deserializeOpUntagUser) HandleDeserialize(ctx context.Conte 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)} @@ -14138,6 +14707,10 @@ func (m *awsAwsquery_deserializeOpUpdateAccessKey) HandleDeserialize(ctx context 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)} @@ -14217,6 +14790,10 @@ func (m *awsAwsquery_deserializeOpUpdateAccountPasswordPolicy) HandleDeserialize 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)} @@ -14299,6 +14876,10 @@ func (m *awsAwsquery_deserializeOpUpdateAssumeRolePolicy) HandleDeserialize(ctx 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)} @@ -14384,6 +14965,10 @@ func (m *awsAwsquery_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Con 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)} @@ -14466,6 +15051,10 @@ func (m *awsAwsquery_deserializeOpUpdateLoginProfile) HandleDeserialize(ctx cont 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)} @@ -14551,6 +15140,10 @@ func (m *awsAwsquery_deserializeOpUpdateOpenIDConnectProviderThumbprint) HandleD 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)} @@ -14630,6 +15223,10 @@ func (m *awsAwsquery_deserializeOpUpdateRole) HandleDeserialize(ctx context.Cont 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)} @@ -14744,6 +15341,10 @@ func (m *awsAwsquery_deserializeOpUpdateRoleDescription) HandleDeserialize(ctx c 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)} @@ -14858,6 +15459,10 @@ func (m *awsAwsquery_deserializeOpUpdateSAMLProvider) HandleDeserialize(ctx cont 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)} @@ -14975,6 +15580,10 @@ func (m *awsAwsquery_deserializeOpUpdateServerCertificate) HandleDeserialize(ctx 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)} @@ -15057,6 +15666,10 @@ func (m *awsAwsquery_deserializeOpUpdateServiceSpecificCredential) HandleDeseria 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)} @@ -15130,6 +15743,10 @@ func (m *awsAwsquery_deserializeOpUpdateSigningCertificate) HandleDeserialize(ct 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)} @@ -15209,6 +15826,10 @@ func (m *awsAwsquery_deserializeOpUpdateSSHPublicKey) HandleDeserialize(ctx cont 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)} @@ -15282,6 +15903,10 @@ func (m *awsAwsquery_deserializeOpUpdateUser) HandleDeserialize(ctx context.Cont 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)} @@ -15370,6 +15995,10 @@ func (m *awsAwsquery_deserializeOpUploadServerCertificate) HandleDeserialize(ctx 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)} @@ -15496,6 +16125,10 @@ func (m *awsAwsquery_deserializeOpUploadSigningCertificate) HandleDeserialize(ct 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)} @@ -15625,6 +16258,10 @@ func (m *awsAwsquery_deserializeOpUploadSSHPublicKey) HandleDeserialize(ctx cont 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)} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go index 3c0775b8..16261bbb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go @@ -17,6 +17,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -790,14 +791,13 @@ func (*resolveEndpointV2Middleware) ID() string { 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) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -808,11 +808,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + 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 } @@ -834,5 +839,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go index 28ed0701..51e61f7c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go @@ -3,4 +3,4 @@ package iam // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.34.3" +const goModuleVersion = "1.37.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go index 88ab704b..73d5e4e0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go index e4abdd7c..3b022169 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go @@ -9,7 +9,9 @@ import ( 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" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // 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 @@ -103,6 +105,9 @@ type Options struct { // 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. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go index fecaa9de..14902486 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go @@ -11,6 +11,7 @@ import ( smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -25,6 +26,10 @@ func (*awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) 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)} @@ -76,6 +81,8 @@ func (m *awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -89,6 +96,10 @@ func (*awsAwsquery_serializeOpAddRoleToInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpAddRoleToInstanceProfile) 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)} @@ -140,6 +151,8 @@ func (m *awsAwsquery_serializeOpAddRoleToInstanceProfile) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -153,6 +166,10 @@ func (*awsAwsquery_serializeOpAddUserToGroup) ID() string { func (m *awsAwsquery_serializeOpAddUserToGroup) 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)} @@ -204,6 +221,8 @@ func (m *awsAwsquery_serializeOpAddUserToGroup) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -217,6 +236,10 @@ func (*awsAwsquery_serializeOpAttachGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpAttachGroupPolicy) 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)} @@ -268,6 +291,8 @@ func (m *awsAwsquery_serializeOpAttachGroupPolicy) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -281,6 +306,10 @@ func (*awsAwsquery_serializeOpAttachRolePolicy) ID() string { func (m *awsAwsquery_serializeOpAttachRolePolicy) 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)} @@ -332,6 +361,8 @@ func (m *awsAwsquery_serializeOpAttachRolePolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -345,6 +376,10 @@ func (*awsAwsquery_serializeOpAttachUserPolicy) ID() string { func (m *awsAwsquery_serializeOpAttachUserPolicy) 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)} @@ -396,6 +431,8 @@ func (m *awsAwsquery_serializeOpAttachUserPolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -409,6 +446,10 @@ func (*awsAwsquery_serializeOpChangePassword) ID() string { func (m *awsAwsquery_serializeOpChangePassword) 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)} @@ -460,6 +501,8 @@ func (m *awsAwsquery_serializeOpChangePassword) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -473,6 +516,10 @@ func (*awsAwsquery_serializeOpCreateAccessKey) ID() string { func (m *awsAwsquery_serializeOpCreateAccessKey) 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)} @@ -524,6 +571,8 @@ func (m *awsAwsquery_serializeOpCreateAccessKey) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -537,6 +586,10 @@ func (*awsAwsquery_serializeOpCreateAccountAlias) ID() string { func (m *awsAwsquery_serializeOpCreateAccountAlias) 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)} @@ -588,6 +641,8 @@ func (m *awsAwsquery_serializeOpCreateAccountAlias) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -601,6 +656,10 @@ func (*awsAwsquery_serializeOpCreateGroup) ID() string { func (m *awsAwsquery_serializeOpCreateGroup) 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)} @@ -652,6 +711,8 @@ func (m *awsAwsquery_serializeOpCreateGroup) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -665,6 +726,10 @@ func (*awsAwsquery_serializeOpCreateInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpCreateInstanceProfile) 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)} @@ -716,6 +781,8 @@ func (m *awsAwsquery_serializeOpCreateInstanceProfile) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -729,6 +796,10 @@ func (*awsAwsquery_serializeOpCreateLoginProfile) ID() string { func (m *awsAwsquery_serializeOpCreateLoginProfile) 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)} @@ -780,6 +851,8 @@ func (m *awsAwsquery_serializeOpCreateLoginProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -793,6 +866,10 @@ func (*awsAwsquery_serializeOpCreateOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpCreateOpenIDConnectProvider) 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)} @@ -844,6 +921,8 @@ func (m *awsAwsquery_serializeOpCreateOpenIDConnectProvider) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -857,6 +936,10 @@ func (*awsAwsquery_serializeOpCreatePolicy) ID() string { func (m *awsAwsquery_serializeOpCreatePolicy) 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)} @@ -908,6 +991,8 @@ func (m *awsAwsquery_serializeOpCreatePolicy) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -921,6 +1006,10 @@ func (*awsAwsquery_serializeOpCreatePolicyVersion) ID() string { func (m *awsAwsquery_serializeOpCreatePolicyVersion) 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)} @@ -972,6 +1061,8 @@ func (m *awsAwsquery_serializeOpCreatePolicyVersion) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -985,6 +1076,10 @@ func (*awsAwsquery_serializeOpCreateRole) ID() string { func (m *awsAwsquery_serializeOpCreateRole) 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)} @@ -1036,6 +1131,8 @@ func (m *awsAwsquery_serializeOpCreateRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1049,6 +1146,10 @@ func (*awsAwsquery_serializeOpCreateSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpCreateSAMLProvider) 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)} @@ -1100,6 +1201,8 @@ func (m *awsAwsquery_serializeOpCreateSAMLProvider) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1113,6 +1216,10 @@ func (*awsAwsquery_serializeOpCreateServiceLinkedRole) ID() string { func (m *awsAwsquery_serializeOpCreateServiceLinkedRole) 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)} @@ -1164,6 +1271,8 @@ func (m *awsAwsquery_serializeOpCreateServiceLinkedRole) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1177,6 +1286,10 @@ func (*awsAwsquery_serializeOpCreateServiceSpecificCredential) ID() string { func (m *awsAwsquery_serializeOpCreateServiceSpecificCredential) 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)} @@ -1228,6 +1341,8 @@ func (m *awsAwsquery_serializeOpCreateServiceSpecificCredential) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1241,6 +1356,10 @@ func (*awsAwsquery_serializeOpCreateUser) ID() string { func (m *awsAwsquery_serializeOpCreateUser) 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)} @@ -1292,6 +1411,8 @@ func (m *awsAwsquery_serializeOpCreateUser) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1305,6 +1426,10 @@ func (*awsAwsquery_serializeOpCreateVirtualMFADevice) ID() string { func (m *awsAwsquery_serializeOpCreateVirtualMFADevice) 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)} @@ -1356,6 +1481,8 @@ func (m *awsAwsquery_serializeOpCreateVirtualMFADevice) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1369,6 +1496,10 @@ func (*awsAwsquery_serializeOpDeactivateMFADevice) ID() string { func (m *awsAwsquery_serializeOpDeactivateMFADevice) 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)} @@ -1420,6 +1551,8 @@ func (m *awsAwsquery_serializeOpDeactivateMFADevice) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1433,6 +1566,10 @@ func (*awsAwsquery_serializeOpDeleteAccessKey) ID() string { func (m *awsAwsquery_serializeOpDeleteAccessKey) 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)} @@ -1484,6 +1621,8 @@ func (m *awsAwsquery_serializeOpDeleteAccessKey) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1497,6 +1636,10 @@ func (*awsAwsquery_serializeOpDeleteAccountAlias) ID() string { func (m *awsAwsquery_serializeOpDeleteAccountAlias) 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)} @@ -1548,6 +1691,8 @@ func (m *awsAwsquery_serializeOpDeleteAccountAlias) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1561,6 +1706,10 @@ func (*awsAwsquery_serializeOpDeleteAccountPasswordPolicy) ID() string { func (m *awsAwsquery_serializeOpDeleteAccountPasswordPolicy) 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)} @@ -1608,6 +1757,8 @@ func (m *awsAwsquery_serializeOpDeleteAccountPasswordPolicy) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1621,6 +1772,10 @@ func (*awsAwsquery_serializeOpDeleteGroup) ID() string { func (m *awsAwsquery_serializeOpDeleteGroup) 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)} @@ -1672,6 +1827,8 @@ func (m *awsAwsquery_serializeOpDeleteGroup) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1685,6 +1842,10 @@ func (*awsAwsquery_serializeOpDeleteGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpDeleteGroupPolicy) 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)} @@ -1736,6 +1897,8 @@ func (m *awsAwsquery_serializeOpDeleteGroupPolicy) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1749,6 +1912,10 @@ func (*awsAwsquery_serializeOpDeleteInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpDeleteInstanceProfile) 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)} @@ -1800,6 +1967,8 @@ func (m *awsAwsquery_serializeOpDeleteInstanceProfile) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1813,6 +1982,10 @@ func (*awsAwsquery_serializeOpDeleteLoginProfile) ID() string { func (m *awsAwsquery_serializeOpDeleteLoginProfile) 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)} @@ -1864,6 +2037,8 @@ func (m *awsAwsquery_serializeOpDeleteLoginProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1877,6 +2052,10 @@ func (*awsAwsquery_serializeOpDeleteOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpDeleteOpenIDConnectProvider) 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)} @@ -1928,6 +2107,8 @@ func (m *awsAwsquery_serializeOpDeleteOpenIDConnectProvider) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1941,6 +2122,10 @@ func (*awsAwsquery_serializeOpDeletePolicy) ID() string { func (m *awsAwsquery_serializeOpDeletePolicy) 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)} @@ -1992,6 +2177,8 @@ func (m *awsAwsquery_serializeOpDeletePolicy) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2005,6 +2192,10 @@ func (*awsAwsquery_serializeOpDeletePolicyVersion) ID() string { func (m *awsAwsquery_serializeOpDeletePolicyVersion) 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)} @@ -2056,6 +2247,8 @@ func (m *awsAwsquery_serializeOpDeletePolicyVersion) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2069,6 +2262,10 @@ func (*awsAwsquery_serializeOpDeleteRole) ID() string { func (m *awsAwsquery_serializeOpDeleteRole) 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)} @@ -2120,6 +2317,8 @@ func (m *awsAwsquery_serializeOpDeleteRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2133,6 +2332,10 @@ func (*awsAwsquery_serializeOpDeleteRolePermissionsBoundary) ID() string { func (m *awsAwsquery_serializeOpDeleteRolePermissionsBoundary) 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)} @@ -2184,6 +2387,8 @@ func (m *awsAwsquery_serializeOpDeleteRolePermissionsBoundary) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2197,6 +2402,10 @@ func (*awsAwsquery_serializeOpDeleteRolePolicy) ID() string { func (m *awsAwsquery_serializeOpDeleteRolePolicy) 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)} @@ -2248,6 +2457,8 @@ func (m *awsAwsquery_serializeOpDeleteRolePolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2261,6 +2472,10 @@ func (*awsAwsquery_serializeOpDeleteSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpDeleteSAMLProvider) 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)} @@ -2312,6 +2527,8 @@ func (m *awsAwsquery_serializeOpDeleteSAMLProvider) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2325,6 +2542,10 @@ func (*awsAwsquery_serializeOpDeleteServerCertificate) ID() string { func (m *awsAwsquery_serializeOpDeleteServerCertificate) 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)} @@ -2376,6 +2597,8 @@ func (m *awsAwsquery_serializeOpDeleteServerCertificate) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2389,6 +2612,10 @@ func (*awsAwsquery_serializeOpDeleteServiceLinkedRole) ID() string { func (m *awsAwsquery_serializeOpDeleteServiceLinkedRole) 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)} @@ -2440,6 +2667,8 @@ func (m *awsAwsquery_serializeOpDeleteServiceLinkedRole) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2453,6 +2682,10 @@ func (*awsAwsquery_serializeOpDeleteServiceSpecificCredential) ID() string { func (m *awsAwsquery_serializeOpDeleteServiceSpecificCredential) 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)} @@ -2504,6 +2737,8 @@ func (m *awsAwsquery_serializeOpDeleteServiceSpecificCredential) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2517,6 +2752,10 @@ func (*awsAwsquery_serializeOpDeleteSigningCertificate) ID() string { func (m *awsAwsquery_serializeOpDeleteSigningCertificate) 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)} @@ -2568,6 +2807,8 @@ func (m *awsAwsquery_serializeOpDeleteSigningCertificate) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2581,6 +2822,10 @@ func (*awsAwsquery_serializeOpDeleteSSHPublicKey) ID() string { func (m *awsAwsquery_serializeOpDeleteSSHPublicKey) 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)} @@ -2632,6 +2877,8 @@ func (m *awsAwsquery_serializeOpDeleteSSHPublicKey) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2645,6 +2892,10 @@ func (*awsAwsquery_serializeOpDeleteUser) ID() string { func (m *awsAwsquery_serializeOpDeleteUser) 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)} @@ -2696,6 +2947,8 @@ func (m *awsAwsquery_serializeOpDeleteUser) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2709,6 +2962,10 @@ func (*awsAwsquery_serializeOpDeleteUserPermissionsBoundary) ID() string { func (m *awsAwsquery_serializeOpDeleteUserPermissionsBoundary) 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)} @@ -2760,6 +3017,8 @@ func (m *awsAwsquery_serializeOpDeleteUserPermissionsBoundary) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2773,6 +3032,10 @@ func (*awsAwsquery_serializeOpDeleteUserPolicy) ID() string { func (m *awsAwsquery_serializeOpDeleteUserPolicy) 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)} @@ -2824,6 +3087,8 @@ func (m *awsAwsquery_serializeOpDeleteUserPolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2837,6 +3102,10 @@ func (*awsAwsquery_serializeOpDeleteVirtualMFADevice) ID() string { func (m *awsAwsquery_serializeOpDeleteVirtualMFADevice) 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)} @@ -2888,6 +3157,8 @@ func (m *awsAwsquery_serializeOpDeleteVirtualMFADevice) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2901,6 +3172,10 @@ func (*awsAwsquery_serializeOpDetachGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpDetachGroupPolicy) 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)} @@ -2952,6 +3227,8 @@ func (m *awsAwsquery_serializeOpDetachGroupPolicy) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2965,6 +3242,10 @@ func (*awsAwsquery_serializeOpDetachRolePolicy) ID() string { func (m *awsAwsquery_serializeOpDetachRolePolicy) 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)} @@ -3016,6 +3297,8 @@ func (m *awsAwsquery_serializeOpDetachRolePolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3029,6 +3312,10 @@ func (*awsAwsquery_serializeOpDetachUserPolicy) ID() string { func (m *awsAwsquery_serializeOpDetachUserPolicy) 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)} @@ -3080,6 +3367,8 @@ func (m *awsAwsquery_serializeOpDetachUserPolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3093,6 +3382,10 @@ func (*awsAwsquery_serializeOpEnableMFADevice) ID() string { func (m *awsAwsquery_serializeOpEnableMFADevice) 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)} @@ -3144,6 +3437,8 @@ func (m *awsAwsquery_serializeOpEnableMFADevice) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3157,6 +3452,10 @@ func (*awsAwsquery_serializeOpGenerateCredentialReport) ID() string { func (m *awsAwsquery_serializeOpGenerateCredentialReport) 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)} @@ -3204,6 +3503,8 @@ func (m *awsAwsquery_serializeOpGenerateCredentialReport) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3217,6 +3518,10 @@ func (*awsAwsquery_serializeOpGenerateOrganizationsAccessReport) ID() string { func (m *awsAwsquery_serializeOpGenerateOrganizationsAccessReport) 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)} @@ -3268,6 +3573,8 @@ func (m *awsAwsquery_serializeOpGenerateOrganizationsAccessReport) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3281,6 +3588,10 @@ func (*awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) ID() string { func (m *awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) 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)} @@ -3332,6 +3643,8 @@ func (m *awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3345,6 +3658,10 @@ func (*awsAwsquery_serializeOpGetAccessKeyLastUsed) ID() string { func (m *awsAwsquery_serializeOpGetAccessKeyLastUsed) 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)} @@ -3396,6 +3713,8 @@ func (m *awsAwsquery_serializeOpGetAccessKeyLastUsed) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3409,6 +3728,10 @@ func (*awsAwsquery_serializeOpGetAccountAuthorizationDetails) ID() string { func (m *awsAwsquery_serializeOpGetAccountAuthorizationDetails) 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)} @@ -3460,6 +3783,8 @@ func (m *awsAwsquery_serializeOpGetAccountAuthorizationDetails) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3473,6 +3798,10 @@ func (*awsAwsquery_serializeOpGetAccountPasswordPolicy) ID() string { func (m *awsAwsquery_serializeOpGetAccountPasswordPolicy) 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)} @@ -3520,6 +3849,8 @@ func (m *awsAwsquery_serializeOpGetAccountPasswordPolicy) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3533,6 +3864,10 @@ func (*awsAwsquery_serializeOpGetAccountSummary) ID() string { func (m *awsAwsquery_serializeOpGetAccountSummary) 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)} @@ -3580,6 +3915,8 @@ func (m *awsAwsquery_serializeOpGetAccountSummary) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3593,6 +3930,10 @@ func (*awsAwsquery_serializeOpGetContextKeysForCustomPolicy) ID() string { func (m *awsAwsquery_serializeOpGetContextKeysForCustomPolicy) 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)} @@ -3644,6 +3985,8 @@ func (m *awsAwsquery_serializeOpGetContextKeysForCustomPolicy) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3657,6 +4000,10 @@ func (*awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) ID() string { func (m *awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) 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)} @@ -3708,6 +4055,8 @@ func (m *awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) HandleSerializ } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3721,6 +4070,10 @@ func (*awsAwsquery_serializeOpGetCredentialReport) ID() string { func (m *awsAwsquery_serializeOpGetCredentialReport) 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)} @@ -3768,6 +4121,8 @@ func (m *awsAwsquery_serializeOpGetCredentialReport) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3781,6 +4136,10 @@ func (*awsAwsquery_serializeOpGetGroup) ID() string { func (m *awsAwsquery_serializeOpGetGroup) 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)} @@ -3832,6 +4191,8 @@ func (m *awsAwsquery_serializeOpGetGroup) HandleSerialize(ctx context.Context, i } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3845,6 +4206,10 @@ func (*awsAwsquery_serializeOpGetGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpGetGroupPolicy) 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)} @@ -3896,6 +4261,8 @@ func (m *awsAwsquery_serializeOpGetGroupPolicy) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3909,6 +4276,10 @@ func (*awsAwsquery_serializeOpGetInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpGetInstanceProfile) 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)} @@ -3960,6 +4331,8 @@ func (m *awsAwsquery_serializeOpGetInstanceProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3973,6 +4346,10 @@ func (*awsAwsquery_serializeOpGetLoginProfile) ID() string { func (m *awsAwsquery_serializeOpGetLoginProfile) 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)} @@ -4024,6 +4401,8 @@ func (m *awsAwsquery_serializeOpGetLoginProfile) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4037,6 +4416,10 @@ func (*awsAwsquery_serializeOpGetMFADevice) ID() string { func (m *awsAwsquery_serializeOpGetMFADevice) 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)} @@ -4088,6 +4471,8 @@ func (m *awsAwsquery_serializeOpGetMFADevice) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4101,6 +4486,10 @@ func (*awsAwsquery_serializeOpGetOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpGetOpenIDConnectProvider) 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)} @@ -4152,6 +4541,8 @@ func (m *awsAwsquery_serializeOpGetOpenIDConnectProvider) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4165,6 +4556,10 @@ func (*awsAwsquery_serializeOpGetOrganizationsAccessReport) ID() string { func (m *awsAwsquery_serializeOpGetOrganizationsAccessReport) 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)} @@ -4216,6 +4611,8 @@ func (m *awsAwsquery_serializeOpGetOrganizationsAccessReport) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4229,6 +4626,10 @@ func (*awsAwsquery_serializeOpGetPolicy) ID() string { func (m *awsAwsquery_serializeOpGetPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4280,6 +4681,8 @@ func (m *awsAwsquery_serializeOpGetPolicy) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4293,6 +4696,10 @@ func (*awsAwsquery_serializeOpGetPolicyVersion) ID() string { func (m *awsAwsquery_serializeOpGetPolicyVersion) 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)} @@ -4344,6 +4751,8 @@ func (m *awsAwsquery_serializeOpGetPolicyVersion) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4357,6 +4766,10 @@ func (*awsAwsquery_serializeOpGetRole) ID() string { func (m *awsAwsquery_serializeOpGetRole) 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)} @@ -4408,6 +4821,8 @@ func (m *awsAwsquery_serializeOpGetRole) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4421,6 +4836,10 @@ func (*awsAwsquery_serializeOpGetRolePolicy) ID() string { func (m *awsAwsquery_serializeOpGetRolePolicy) 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)} @@ -4472,6 +4891,8 @@ func (m *awsAwsquery_serializeOpGetRolePolicy) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4485,6 +4906,10 @@ func (*awsAwsquery_serializeOpGetSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpGetSAMLProvider) 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)} @@ -4536,6 +4961,8 @@ func (m *awsAwsquery_serializeOpGetSAMLProvider) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4549,6 +4976,10 @@ func (*awsAwsquery_serializeOpGetServerCertificate) ID() string { func (m *awsAwsquery_serializeOpGetServerCertificate) 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)} @@ -4600,6 +5031,8 @@ func (m *awsAwsquery_serializeOpGetServerCertificate) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4613,6 +5046,10 @@ func (*awsAwsquery_serializeOpGetServiceLastAccessedDetails) ID() string { func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetails) 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)} @@ -4664,6 +5101,8 @@ func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetails) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4677,6 +5116,10 @@ func (*awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) ID() st func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) 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)} @@ -4728,6 +5171,8 @@ func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) Handl } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4741,6 +5186,10 @@ func (*awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) ID() string { func (m *awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) 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)} @@ -4792,6 +5241,8 @@ func (m *awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4805,6 +5256,10 @@ func (*awsAwsquery_serializeOpGetSSHPublicKey) ID() string { func (m *awsAwsquery_serializeOpGetSSHPublicKey) 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)} @@ -4856,6 +5311,8 @@ func (m *awsAwsquery_serializeOpGetSSHPublicKey) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4869,6 +5326,10 @@ func (*awsAwsquery_serializeOpGetUser) ID() string { func (m *awsAwsquery_serializeOpGetUser) 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)} @@ -4920,6 +5381,8 @@ func (m *awsAwsquery_serializeOpGetUser) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4933,6 +5396,10 @@ func (*awsAwsquery_serializeOpGetUserPolicy) ID() string { func (m *awsAwsquery_serializeOpGetUserPolicy) 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)} @@ -4984,6 +5451,8 @@ func (m *awsAwsquery_serializeOpGetUserPolicy) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4997,6 +5466,10 @@ func (*awsAwsquery_serializeOpListAccessKeys) ID() string { func (m *awsAwsquery_serializeOpListAccessKeys) 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)} @@ -5048,6 +5521,8 @@ func (m *awsAwsquery_serializeOpListAccessKeys) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5061,6 +5536,10 @@ func (*awsAwsquery_serializeOpListAccountAliases) ID() string { func (m *awsAwsquery_serializeOpListAccountAliases) 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)} @@ -5112,6 +5591,8 @@ func (m *awsAwsquery_serializeOpListAccountAliases) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5125,6 +5606,10 @@ func (*awsAwsquery_serializeOpListAttachedGroupPolicies) ID() string { func (m *awsAwsquery_serializeOpListAttachedGroupPolicies) 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)} @@ -5176,6 +5661,8 @@ func (m *awsAwsquery_serializeOpListAttachedGroupPolicies) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5189,6 +5676,10 @@ func (*awsAwsquery_serializeOpListAttachedRolePolicies) ID() string { func (m *awsAwsquery_serializeOpListAttachedRolePolicies) 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)} @@ -5240,6 +5731,8 @@ func (m *awsAwsquery_serializeOpListAttachedRolePolicies) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5253,6 +5746,10 @@ func (*awsAwsquery_serializeOpListAttachedUserPolicies) ID() string { func (m *awsAwsquery_serializeOpListAttachedUserPolicies) 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)} @@ -5304,6 +5801,8 @@ func (m *awsAwsquery_serializeOpListAttachedUserPolicies) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5317,6 +5816,10 @@ func (*awsAwsquery_serializeOpListEntitiesForPolicy) ID() string { func (m *awsAwsquery_serializeOpListEntitiesForPolicy) 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)} @@ -5368,6 +5871,8 @@ func (m *awsAwsquery_serializeOpListEntitiesForPolicy) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5381,6 +5886,10 @@ func (*awsAwsquery_serializeOpListGroupPolicies) ID() string { func (m *awsAwsquery_serializeOpListGroupPolicies) 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)} @@ -5432,6 +5941,8 @@ func (m *awsAwsquery_serializeOpListGroupPolicies) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5445,6 +5956,10 @@ func (*awsAwsquery_serializeOpListGroups) ID() string { func (m *awsAwsquery_serializeOpListGroups) 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)} @@ -5496,6 +6011,8 @@ func (m *awsAwsquery_serializeOpListGroups) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5509,6 +6026,10 @@ func (*awsAwsquery_serializeOpListGroupsForUser) ID() string { func (m *awsAwsquery_serializeOpListGroupsForUser) 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)} @@ -5560,6 +6081,8 @@ func (m *awsAwsquery_serializeOpListGroupsForUser) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5573,6 +6096,10 @@ func (*awsAwsquery_serializeOpListInstanceProfiles) ID() string { func (m *awsAwsquery_serializeOpListInstanceProfiles) 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)} @@ -5624,6 +6151,8 @@ func (m *awsAwsquery_serializeOpListInstanceProfiles) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5637,6 +6166,10 @@ func (*awsAwsquery_serializeOpListInstanceProfilesForRole) ID() string { func (m *awsAwsquery_serializeOpListInstanceProfilesForRole) 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)} @@ -5688,6 +6221,8 @@ func (m *awsAwsquery_serializeOpListInstanceProfilesForRole) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5701,6 +6236,10 @@ func (*awsAwsquery_serializeOpListInstanceProfileTags) ID() string { func (m *awsAwsquery_serializeOpListInstanceProfileTags) 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)} @@ -5752,6 +6291,8 @@ func (m *awsAwsquery_serializeOpListInstanceProfileTags) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5765,6 +6306,10 @@ func (*awsAwsquery_serializeOpListMFADevices) ID() string { func (m *awsAwsquery_serializeOpListMFADevices) 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)} @@ -5816,6 +6361,8 @@ func (m *awsAwsquery_serializeOpListMFADevices) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5829,6 +6376,10 @@ func (*awsAwsquery_serializeOpListMFADeviceTags) ID() string { func (m *awsAwsquery_serializeOpListMFADeviceTags) 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)} @@ -5880,6 +6431,8 @@ func (m *awsAwsquery_serializeOpListMFADeviceTags) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5893,6 +6446,10 @@ func (*awsAwsquery_serializeOpListOpenIDConnectProviders) ID() string { func (m *awsAwsquery_serializeOpListOpenIDConnectProviders) 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)} @@ -5940,6 +6497,8 @@ func (m *awsAwsquery_serializeOpListOpenIDConnectProviders) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5953,6 +6512,10 @@ func (*awsAwsquery_serializeOpListOpenIDConnectProviderTags) ID() string { func (m *awsAwsquery_serializeOpListOpenIDConnectProviderTags) 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)} @@ -6004,6 +6567,8 @@ func (m *awsAwsquery_serializeOpListOpenIDConnectProviderTags) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6017,6 +6582,10 @@ func (*awsAwsquery_serializeOpListPolicies) ID() string { func (m *awsAwsquery_serializeOpListPolicies) 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)} @@ -6068,6 +6637,8 @@ func (m *awsAwsquery_serializeOpListPolicies) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6081,6 +6652,10 @@ func (*awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) ID() string { func (m *awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) 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)} @@ -6132,6 +6707,8 @@ func (m *awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6145,6 +6722,10 @@ func (*awsAwsquery_serializeOpListPolicyTags) ID() string { func (m *awsAwsquery_serializeOpListPolicyTags) 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)} @@ -6196,6 +6777,8 @@ func (m *awsAwsquery_serializeOpListPolicyTags) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6209,6 +6792,10 @@ func (*awsAwsquery_serializeOpListPolicyVersions) ID() string { func (m *awsAwsquery_serializeOpListPolicyVersions) 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)} @@ -6260,6 +6847,8 @@ func (m *awsAwsquery_serializeOpListPolicyVersions) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6273,6 +6862,10 @@ func (*awsAwsquery_serializeOpListRolePolicies) ID() string { func (m *awsAwsquery_serializeOpListRolePolicies) 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)} @@ -6324,6 +6917,8 @@ func (m *awsAwsquery_serializeOpListRolePolicies) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6337,6 +6932,10 @@ func (*awsAwsquery_serializeOpListRoles) ID() string { func (m *awsAwsquery_serializeOpListRoles) 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)} @@ -6388,6 +6987,8 @@ func (m *awsAwsquery_serializeOpListRoles) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6401,6 +7002,10 @@ func (*awsAwsquery_serializeOpListRoleTags) ID() string { func (m *awsAwsquery_serializeOpListRoleTags) 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)} @@ -6452,6 +7057,8 @@ func (m *awsAwsquery_serializeOpListRoleTags) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6465,6 +7072,10 @@ func (*awsAwsquery_serializeOpListSAMLProviders) ID() string { func (m *awsAwsquery_serializeOpListSAMLProviders) 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)} @@ -6512,6 +7123,8 @@ func (m *awsAwsquery_serializeOpListSAMLProviders) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6525,6 +7138,10 @@ func (*awsAwsquery_serializeOpListSAMLProviderTags) ID() string { func (m *awsAwsquery_serializeOpListSAMLProviderTags) 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)} @@ -6576,6 +7193,8 @@ func (m *awsAwsquery_serializeOpListSAMLProviderTags) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6589,6 +7208,10 @@ func (*awsAwsquery_serializeOpListServerCertificates) ID() string { func (m *awsAwsquery_serializeOpListServerCertificates) 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)} @@ -6640,6 +7263,8 @@ func (m *awsAwsquery_serializeOpListServerCertificates) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6653,6 +7278,10 @@ func (*awsAwsquery_serializeOpListServerCertificateTags) ID() string { func (m *awsAwsquery_serializeOpListServerCertificateTags) 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)} @@ -6704,6 +7333,8 @@ func (m *awsAwsquery_serializeOpListServerCertificateTags) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6717,6 +7348,10 @@ func (*awsAwsquery_serializeOpListServiceSpecificCredentials) ID() string { func (m *awsAwsquery_serializeOpListServiceSpecificCredentials) 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)} @@ -6768,6 +7403,8 @@ func (m *awsAwsquery_serializeOpListServiceSpecificCredentials) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6781,6 +7418,10 @@ func (*awsAwsquery_serializeOpListSigningCertificates) ID() string { func (m *awsAwsquery_serializeOpListSigningCertificates) 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)} @@ -6832,6 +7473,8 @@ func (m *awsAwsquery_serializeOpListSigningCertificates) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6845,6 +7488,10 @@ func (*awsAwsquery_serializeOpListSSHPublicKeys) ID() string { func (m *awsAwsquery_serializeOpListSSHPublicKeys) 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)} @@ -6896,6 +7543,8 @@ func (m *awsAwsquery_serializeOpListSSHPublicKeys) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6909,6 +7558,10 @@ func (*awsAwsquery_serializeOpListUserPolicies) ID() string { func (m *awsAwsquery_serializeOpListUserPolicies) 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)} @@ -6960,6 +7613,8 @@ func (m *awsAwsquery_serializeOpListUserPolicies) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6973,6 +7628,10 @@ func (*awsAwsquery_serializeOpListUsers) ID() string { func (m *awsAwsquery_serializeOpListUsers) 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)} @@ -7024,6 +7683,8 @@ func (m *awsAwsquery_serializeOpListUsers) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7037,6 +7698,10 @@ func (*awsAwsquery_serializeOpListUserTags) ID() string { func (m *awsAwsquery_serializeOpListUserTags) 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)} @@ -7088,6 +7753,8 @@ func (m *awsAwsquery_serializeOpListUserTags) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7101,6 +7768,10 @@ func (*awsAwsquery_serializeOpListVirtualMFADevices) ID() string { func (m *awsAwsquery_serializeOpListVirtualMFADevices) 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)} @@ -7152,6 +7823,8 @@ func (m *awsAwsquery_serializeOpListVirtualMFADevices) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7165,6 +7838,10 @@ func (*awsAwsquery_serializeOpPutGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpPutGroupPolicy) 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)} @@ -7216,6 +7893,8 @@ func (m *awsAwsquery_serializeOpPutGroupPolicy) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7229,6 +7908,10 @@ func (*awsAwsquery_serializeOpPutRolePermissionsBoundary) ID() string { func (m *awsAwsquery_serializeOpPutRolePermissionsBoundary) 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)} @@ -7280,6 +7963,8 @@ func (m *awsAwsquery_serializeOpPutRolePermissionsBoundary) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7293,6 +7978,10 @@ func (*awsAwsquery_serializeOpPutRolePolicy) ID() string { func (m *awsAwsquery_serializeOpPutRolePolicy) 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)} @@ -7344,6 +8033,8 @@ func (m *awsAwsquery_serializeOpPutRolePolicy) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7357,6 +8048,10 @@ func (*awsAwsquery_serializeOpPutUserPermissionsBoundary) ID() string { func (m *awsAwsquery_serializeOpPutUserPermissionsBoundary) 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)} @@ -7408,6 +8103,8 @@ func (m *awsAwsquery_serializeOpPutUserPermissionsBoundary) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7421,6 +8118,10 @@ func (*awsAwsquery_serializeOpPutUserPolicy) ID() string { func (m *awsAwsquery_serializeOpPutUserPolicy) 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)} @@ -7472,6 +8173,8 @@ func (m *awsAwsquery_serializeOpPutUserPolicy) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7485,6 +8188,10 @@ func (*awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) ID() stri func (m *awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) 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)} @@ -7536,6 +8243,8 @@ func (m *awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) HandleS } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7549,6 +8258,10 @@ func (*awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) 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)} @@ -7600,6 +8313,8 @@ func (m *awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7613,6 +8328,10 @@ func (*awsAwsquery_serializeOpRemoveUserFromGroup) ID() string { func (m *awsAwsquery_serializeOpRemoveUserFromGroup) 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)} @@ -7664,6 +8383,8 @@ func (m *awsAwsquery_serializeOpRemoveUserFromGroup) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7677,6 +8398,10 @@ func (*awsAwsquery_serializeOpResetServiceSpecificCredential) ID() string { func (m *awsAwsquery_serializeOpResetServiceSpecificCredential) 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)} @@ -7728,6 +8453,8 @@ func (m *awsAwsquery_serializeOpResetServiceSpecificCredential) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7741,6 +8468,10 @@ func (*awsAwsquery_serializeOpResyncMFADevice) ID() string { func (m *awsAwsquery_serializeOpResyncMFADevice) 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)} @@ -7792,6 +8523,8 @@ func (m *awsAwsquery_serializeOpResyncMFADevice) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7805,6 +8538,10 @@ func (*awsAwsquery_serializeOpSetDefaultPolicyVersion) ID() string { func (m *awsAwsquery_serializeOpSetDefaultPolicyVersion) 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)} @@ -7856,6 +8593,8 @@ func (m *awsAwsquery_serializeOpSetDefaultPolicyVersion) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7869,6 +8608,10 @@ func (*awsAwsquery_serializeOpSetSecurityTokenServicePreferences) ID() string { func (m *awsAwsquery_serializeOpSetSecurityTokenServicePreferences) 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)} @@ -7920,6 +8663,8 @@ func (m *awsAwsquery_serializeOpSetSecurityTokenServicePreferences) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7933,6 +8678,10 @@ func (*awsAwsquery_serializeOpSimulateCustomPolicy) ID() string { func (m *awsAwsquery_serializeOpSimulateCustomPolicy) 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)} @@ -7984,6 +8733,8 @@ func (m *awsAwsquery_serializeOpSimulateCustomPolicy) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7997,6 +8748,10 @@ func (*awsAwsquery_serializeOpSimulatePrincipalPolicy) ID() string { func (m *awsAwsquery_serializeOpSimulatePrincipalPolicy) 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)} @@ -8048,6 +8803,8 @@ func (m *awsAwsquery_serializeOpSimulatePrincipalPolicy) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8061,6 +8818,10 @@ func (*awsAwsquery_serializeOpTagInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpTagInstanceProfile) 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)} @@ -8112,6 +8873,8 @@ func (m *awsAwsquery_serializeOpTagInstanceProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8125,6 +8888,10 @@ func (*awsAwsquery_serializeOpTagMFADevice) ID() string { func (m *awsAwsquery_serializeOpTagMFADevice) 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)} @@ -8176,6 +8943,8 @@ func (m *awsAwsquery_serializeOpTagMFADevice) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8189,6 +8958,10 @@ func (*awsAwsquery_serializeOpTagOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpTagOpenIDConnectProvider) 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)} @@ -8240,6 +9013,8 @@ func (m *awsAwsquery_serializeOpTagOpenIDConnectProvider) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8253,6 +9028,10 @@ func (*awsAwsquery_serializeOpTagPolicy) ID() string { func (m *awsAwsquery_serializeOpTagPolicy) 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)} @@ -8304,6 +9083,8 @@ func (m *awsAwsquery_serializeOpTagPolicy) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8317,6 +9098,10 @@ func (*awsAwsquery_serializeOpTagRole) ID() string { func (m *awsAwsquery_serializeOpTagRole) 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)} @@ -8368,6 +9153,8 @@ func (m *awsAwsquery_serializeOpTagRole) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8381,6 +9168,10 @@ func (*awsAwsquery_serializeOpTagSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpTagSAMLProvider) 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)} @@ -8432,6 +9223,8 @@ func (m *awsAwsquery_serializeOpTagSAMLProvider) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8445,6 +9238,10 @@ func (*awsAwsquery_serializeOpTagServerCertificate) ID() string { func (m *awsAwsquery_serializeOpTagServerCertificate) 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)} @@ -8496,6 +9293,8 @@ func (m *awsAwsquery_serializeOpTagServerCertificate) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8509,6 +9308,10 @@ func (*awsAwsquery_serializeOpTagUser) ID() string { func (m *awsAwsquery_serializeOpTagUser) 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)} @@ -8560,6 +9363,8 @@ func (m *awsAwsquery_serializeOpTagUser) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8573,6 +9378,10 @@ func (*awsAwsquery_serializeOpUntagInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpUntagInstanceProfile) 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)} @@ -8624,6 +9433,8 @@ func (m *awsAwsquery_serializeOpUntagInstanceProfile) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8637,6 +9448,10 @@ func (*awsAwsquery_serializeOpUntagMFADevice) ID() string { func (m *awsAwsquery_serializeOpUntagMFADevice) 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)} @@ -8688,6 +9503,8 @@ func (m *awsAwsquery_serializeOpUntagMFADevice) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8701,6 +9518,10 @@ func (*awsAwsquery_serializeOpUntagOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpUntagOpenIDConnectProvider) 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)} @@ -8752,6 +9573,8 @@ func (m *awsAwsquery_serializeOpUntagOpenIDConnectProvider) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8765,6 +9588,10 @@ func (*awsAwsquery_serializeOpUntagPolicy) ID() string { func (m *awsAwsquery_serializeOpUntagPolicy) 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)} @@ -8816,6 +9643,8 @@ func (m *awsAwsquery_serializeOpUntagPolicy) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8829,6 +9658,10 @@ func (*awsAwsquery_serializeOpUntagRole) ID() string { func (m *awsAwsquery_serializeOpUntagRole) 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)} @@ -8880,6 +9713,8 @@ func (m *awsAwsquery_serializeOpUntagRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8893,6 +9728,10 @@ func (*awsAwsquery_serializeOpUntagSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpUntagSAMLProvider) 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)} @@ -8944,6 +9783,8 @@ func (m *awsAwsquery_serializeOpUntagSAMLProvider) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8957,6 +9798,10 @@ func (*awsAwsquery_serializeOpUntagServerCertificate) ID() string { func (m *awsAwsquery_serializeOpUntagServerCertificate) 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)} @@ -9008,6 +9853,8 @@ func (m *awsAwsquery_serializeOpUntagServerCertificate) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9021,6 +9868,10 @@ func (*awsAwsquery_serializeOpUntagUser) ID() string { func (m *awsAwsquery_serializeOpUntagUser) 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)} @@ -9072,6 +9923,8 @@ func (m *awsAwsquery_serializeOpUntagUser) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9085,6 +9938,10 @@ func (*awsAwsquery_serializeOpUpdateAccessKey) ID() string { func (m *awsAwsquery_serializeOpUpdateAccessKey) 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)} @@ -9136,6 +9993,8 @@ func (m *awsAwsquery_serializeOpUpdateAccessKey) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9149,6 +10008,10 @@ func (*awsAwsquery_serializeOpUpdateAccountPasswordPolicy) ID() string { func (m *awsAwsquery_serializeOpUpdateAccountPasswordPolicy) 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)} @@ -9200,6 +10063,8 @@ func (m *awsAwsquery_serializeOpUpdateAccountPasswordPolicy) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9213,6 +10078,10 @@ func (*awsAwsquery_serializeOpUpdateAssumeRolePolicy) ID() string { func (m *awsAwsquery_serializeOpUpdateAssumeRolePolicy) 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)} @@ -9264,6 +10133,8 @@ func (m *awsAwsquery_serializeOpUpdateAssumeRolePolicy) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9277,6 +10148,10 @@ func (*awsAwsquery_serializeOpUpdateGroup) ID() string { func (m *awsAwsquery_serializeOpUpdateGroup) 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)} @@ -9328,6 +10203,8 @@ func (m *awsAwsquery_serializeOpUpdateGroup) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9341,6 +10218,10 @@ func (*awsAwsquery_serializeOpUpdateLoginProfile) ID() string { func (m *awsAwsquery_serializeOpUpdateLoginProfile) 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)} @@ -9392,6 +10273,8 @@ func (m *awsAwsquery_serializeOpUpdateLoginProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9405,6 +10288,10 @@ func (*awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) ID() string func (m *awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) 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)} @@ -9456,6 +10343,8 @@ func (m *awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) HandleSer } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9469,6 +10358,10 @@ func (*awsAwsquery_serializeOpUpdateRole) ID() string { func (m *awsAwsquery_serializeOpUpdateRole) 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)} @@ -9520,6 +10413,8 @@ func (m *awsAwsquery_serializeOpUpdateRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9533,6 +10428,10 @@ func (*awsAwsquery_serializeOpUpdateRoleDescription) ID() string { func (m *awsAwsquery_serializeOpUpdateRoleDescription) 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)} @@ -9584,6 +10483,8 @@ func (m *awsAwsquery_serializeOpUpdateRoleDescription) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9597,6 +10498,10 @@ func (*awsAwsquery_serializeOpUpdateSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpUpdateSAMLProvider) 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)} @@ -9648,6 +10553,8 @@ func (m *awsAwsquery_serializeOpUpdateSAMLProvider) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9661,6 +10568,10 @@ func (*awsAwsquery_serializeOpUpdateServerCertificate) ID() string { func (m *awsAwsquery_serializeOpUpdateServerCertificate) 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)} @@ -9712,6 +10623,8 @@ func (m *awsAwsquery_serializeOpUpdateServerCertificate) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9725,6 +10638,10 @@ func (*awsAwsquery_serializeOpUpdateServiceSpecificCredential) ID() string { func (m *awsAwsquery_serializeOpUpdateServiceSpecificCredential) 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)} @@ -9776,6 +10693,8 @@ func (m *awsAwsquery_serializeOpUpdateServiceSpecificCredential) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9789,6 +10708,10 @@ func (*awsAwsquery_serializeOpUpdateSigningCertificate) ID() string { func (m *awsAwsquery_serializeOpUpdateSigningCertificate) 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)} @@ -9840,6 +10763,8 @@ func (m *awsAwsquery_serializeOpUpdateSigningCertificate) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9853,6 +10778,10 @@ func (*awsAwsquery_serializeOpUpdateSSHPublicKey) ID() string { func (m *awsAwsquery_serializeOpUpdateSSHPublicKey) 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)} @@ -9904,6 +10833,8 @@ func (m *awsAwsquery_serializeOpUpdateSSHPublicKey) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9917,6 +10848,10 @@ func (*awsAwsquery_serializeOpUpdateUser) ID() string { func (m *awsAwsquery_serializeOpUpdateUser) 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)} @@ -9968,6 +10903,8 @@ func (m *awsAwsquery_serializeOpUpdateUser) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9981,6 +10918,10 @@ func (*awsAwsquery_serializeOpUploadServerCertificate) ID() string { func (m *awsAwsquery_serializeOpUploadServerCertificate) 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)} @@ -10032,6 +10973,8 @@ func (m *awsAwsquery_serializeOpUploadServerCertificate) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -10045,6 +10988,10 @@ func (*awsAwsquery_serializeOpUploadSigningCertificate) ID() string { func (m *awsAwsquery_serializeOpUploadSigningCertificate) 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)} @@ -10096,6 +11043,8 @@ func (m *awsAwsquery_serializeOpUploadSigningCertificate) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -10109,6 +11058,10 @@ func (*awsAwsquery_serializeOpUploadSSHPublicKey) ID() string { func (m *awsAwsquery_serializeOpUploadSSHPublicKey) 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)} @@ -10160,6 +11113,8 @@ func (m *awsAwsquery_serializeOpUploadSSHPublicKey) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsquery_serializeDocumentActionNameListType(v []string, value query.Value) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go index a3f8b4ec..e3798d88 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go @@ -113,21 +113,6 @@ type AccessKey struct { // This data type is used as a response element in the GetAccessKeyLastUsed operation. type AccessKeyLastUsed struct { - // The date and time, in [ISO 8601 date-time format], when the access key was most recently used. This field - // is null in the following situations: - // - // - The user does not have an access key. - // - // - An access key exists but has not been used since IAM began tracking this - // information. - // - // - There is no sign-in data associated with the user. - // - // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 - // - // This member is required. - LastUsedDate *time.Time - // The Amazon Web Services Region where this access key was most recently used. // The value for this field is "N/A" in the following situations: // @@ -159,6 +144,19 @@ type AccessKeyLastUsed struct { // This member is required. ServiceName *string + // The date and time, in [ISO 8601 date-time format], when the access key was most recently used. This field + // is null in the following situations: + // + // - The user does not have an access key. + // + // - An access key exists but has not been used since IAM began tracking this + // information. + // + // - There is no sign-in data associated with the user. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 + LastUsedDate *time.Time + noSmithyDocumentSerde } 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 2c9b1d6d..8ab28d3a 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,19 @@ +# v1.12.1 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. + +# v1.12.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. + +# v1.11.5 (2024-09-20) + +* No change notes available for this release. + +# v1.11.4 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. + # v1.11.3 (2024-06-28) * No change notes available for this release. 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 b59fb2af..1514acbe 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.11.3" +const goModuleVersion = "1.12.1" 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 c03183e1..8b667bc0 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,42 @@ +# v1.12.5 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.20 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.19 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.18 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.11.17 (2024-07-10.2) * **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 a21b0479..20e16af7 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.11.17" +const goModuleVersion = "1.12.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md index 6c02a088..11c8c745 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md @@ -1,3 +1,71 @@ +# v1.55.5 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.55.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.4 (2024-10-03) + +* No change notes available for this release. + +# v1.54.3 (2024-09-27) + +* No change notes available for this release. + +# v1.54.2 (2024-09-25) + +* No change notes available for this release. + +# v1.54.1 (2024-09-23) + +* No change notes available for this release. + +# v1.54.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.0 (2024-09-17) + +* **Feature**: Support for additional levels of cross-account, cross-Region organizational units in Automation. Various documentation updates. +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.52.8 (2024-09-04) + +* No change notes available for this release. + +# v1.52.7 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.6 (2024-08-22) + +* No change notes available for this release. + +# v1.52.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.52.4 (2024-08-09) * **Documentation**: Systems Manager doc-only updates for August 2024. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go index 353d5b07..2a772485 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go @@ -5,6 +5,7 @@ package ssm import ( "context" cryptorand "crypto/rand" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -20,8 +21,10 @@ import ( 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" smithyrand "github.com/aws/smithy-go/rand" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -32,6 +35,133 @@ import ( const ServiceID = "SSM" const ServiceAPIVersion = "2014-11-06" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/ssm") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/ssm") +} + // Client provides the API client to make operations call for Amazon Simple // Systems Manager (SSM). type Client struct { @@ -61,6 +191,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -93,8 +227,15 @@ 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) { +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() @@ -118,15 +259,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + 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/ssm") + }) + 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 } @@ -164,7 +346,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o 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{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -242,16 +424,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -439,6 +620,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { 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) } @@ -489,6 +694,7 @@ func resolveIdempotencyTokenProvider(o *Options) { 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/ssm") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -552,25 +758,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -586,6 +773,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) @@ -642,3 +841,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go index 0754fc27..1f0ee208 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go @@ -160,6 +160,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac 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 } @@ -199,6 +202,18 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go index 65a471be..5e030e98 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAssociateOpsItemRelatedItemMiddlewares(stack *middl 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 } @@ -155,6 +158,18 @@ func (c *Client) addOperationAssociateOpsItemRelatedItemMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go index 007417b6..c1fa3f10 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go @@ -95,6 +95,9 @@ func (c *Client) addOperationCancelCommandMiddlewares(stack *middleware.Stack, o 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 } @@ -134,6 +137,18 @@ func (c *Client) addOperationCancelCommandMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go index 08c93497..6d8277a4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go @@ -92,6 +92,9 @@ func (c *Client) addOperationCancelMaintenanceWindowExecutionMiddlewares(stack * 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 } @@ -131,6 +134,18 @@ func (c *Client) addOperationCancelMaintenanceWindowExecutionMiddlewares(stack * if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go index 8df00eb1..751cd093 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go @@ -18,14 +18,14 @@ import ( // it possible to manage them using Systems Manager capabilities. You use the // activation code and ID when installing SSM Agent on machines in your hybrid // environment. For more information about requirements for managing on-premises -// machines using Systems Manager, see [Setting up Amazon Web Services Systems Manager for hybrid and multicloud environments]in the Amazon Web Services Systems Manager +// machines using Systems Manager, see [Using Amazon Web Services Systems Manager in hybrid and multicloud environments]in the Amazon Web Services Systems Manager // User Guide. // // Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and // on-premises servers and VMs that are configured for Systems Manager are all // called managed nodes. // -// [Setting up Amazon Web Services Systems Manager for hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html +// [Using Amazon Web Services Systems Manager in hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-hybrid-multicloud.html func (c *Client) CreateActivation(ctx context.Context, params *CreateActivationInput, optFns ...func(*Options)) (*CreateActivationOutput, error) { if params == nil { params = &CreateActivationInput{} @@ -46,13 +46,13 @@ type CreateActivationInput struct { // The name of the Identity and Access Management (IAM) role that you want to // assign to the managed node. This IAM role must provide AssumeRole permissions // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com - // . For more information, see [Create an IAM service role for a hybrid and multicloud environment]in the Amazon Web Services Systems Manager User + // . For more information, see [Create the IAM service role required for Systems Manager in a hybrid and multicloud environments]in the Amazon Web Services Systems Manager User // Guide. // // You can't specify an IAM service-linked role for this parameter. You must // create a unique role. // - // [Create an IAM service role for a hybrid and multicloud environment]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html + // [Create the IAM service role required for Systems Manager in a hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html // // This member is required. IamRole *string @@ -71,7 +71,7 @@ type CreateActivationInput struct { Description *string // The date by which this activation request should expire, in timestamp format, - // such as "2021-07-07T00:00:00". You can specify a date up to 30 days in advance. + // such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. // If you don't provide an expiration date, the activation code expires in 24 // hours. ExpirationDate *time.Time @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateActivationMiddlewares(stack *middleware.Stack 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 } @@ -208,6 +211,18 @@ func (c *Client) addOperationCreateActivationMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go index 7ceb3a53..22b5ef21 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go @@ -215,10 +215,10 @@ type CreateAssociationInput struct { // Amazon Web Services resource groups, all managed nodes in an Amazon Web Services // account, or individual managed node IDs. You can target all managed nodes in an // Amazon Web Services account by specifying the InstanceIds key with a value of * - // . For more information about choosing targets for an association, see [About targets and rate controls in State Manager associations]in the + // . For more information about choosing targets for an association, see [Understanding targets and rate controls in State Manager associations]in the // Amazon Web Services Systems Manager User Guide. // - // [About targets and rate controls in State Manager associations]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html + // [Understanding targets and rate controls in State Manager associations]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html Targets []types.Target noSmithyDocumentSerde @@ -278,6 +278,9 @@ func (c *Client) addOperationCreateAssociationMiddlewares(stack *middleware.Stac 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 } @@ -317,6 +320,18 @@ func (c *Client) addOperationCreateAssociationMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go index d2732024..f3fa657f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go @@ -102,6 +102,9 @@ func (c *Client) addOperationCreateAssociationBatchMiddlewares(stack *middleware 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 } @@ -141,6 +144,18 @@ func (c *Client) addOperationCreateAssociationBatchMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go index 3278ea09..c7ec58bb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go @@ -17,7 +17,7 @@ import ( // schemas, features, and syntax, see [Amazon Web Services Systems Manager Documents]in the Amazon Web Services Systems Manager // User Guide. // -// [Amazon Web Services Systems Manager Documents]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html +// [Amazon Web Services Systems Manager Documents]: https://docs.aws.amazon.com/systems-manager/latest/userguide/documents.html func (c *Client) CreateDocument(ctx context.Context, params *CreateDocumentInput, optFns ...func(*Options)) (*CreateDocumentOutput, error) { if params == nil { params = &CreateDocumentInput{} @@ -189,6 +189,9 @@ func (c *Client) addOperationCreateDocumentMiddlewares(stack *middleware.Stack, 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 } @@ -228,6 +231,18 @@ func (c *Client) addOperationCreateDocumentMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go index fc560cb7..112ac244 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateMaintenanceWindowMiddlewares(stack *middlewar 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 } @@ -222,6 +225,18 @@ func (c *Client) addOperationCreateMaintenanceWindowMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go index 9232382c..1688d254 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go @@ -218,6 +218,9 @@ func (c *Client) addOperationCreateOpsItemMiddlewares(stack *middleware.Stack, o 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 } @@ -257,6 +260,18 @@ func (c *Client) addOperationCreateOpsItemMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go index 60eebb0f..491531b6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateOpsMetadataMiddlewares(stack *middleware.Stac 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationCreateOpsMetadataMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go index 88cd48a4..f2f8b510 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go @@ -43,9 +43,9 @@ type CreatePatchBaselineInput struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html ApprovedPatches []string // Defines the compliance level for approved patches. When an approved patch is @@ -74,9 +74,9 @@ type CreatePatchBaselineInput struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html RejectedPatches []string // The action for Patch Manager to take on patches included in the RejectedPackages @@ -176,6 +176,9 @@ func (c *Client) addOperationCreatePatchBaselineMiddlewares(stack *middleware.St 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 } @@ -218,6 +221,18 @@ func (c *Client) addOperationCreatePatchBaselineMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go index 02075741..24cbc5d9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go @@ -18,7 +18,7 @@ import ( // You can configure Systems Manager Inventory to use the SyncToDestination type // to synchronize Inventory data from multiple Amazon Web Services Regions to a // single Amazon Simple Storage Service (Amazon S3) bucket. For more information, -// see [Configuring resource data sync for Inventory]in the Amazon Web Services Systems Manager User Guide. +// see [Creatinga a resource data sync for Inventory]in the Amazon Web Services Systems Manager User Guide. // // You can configure Systems Manager Explorer to use the SyncFromSource type to // synchronize operational work items (OpsItems) and operational data (OpsData) @@ -38,7 +38,7 @@ import ( // policy. // // [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]: https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html -// [Configuring resource data sync for Inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html +// [Creatinga a resource data sync for Inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-create-resource-data-sync.html func (c *Client) CreateResourceDataSync(ctx context.Context, params *CreateResourceDataSyncInput, optFns ...func(*Options)) (*CreateResourceDataSyncOutput, error) { if params == nil { params = &CreateResourceDataSyncInput{} @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateResourceDataSyncMiddlewares(stack *middleware 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 } @@ -170,6 +173,18 @@ func (c *Client) addOperationCreateResourceDataSyncMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go index 9f5bc17e..d8456d8e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go @@ -89,6 +89,9 @@ func (c *Client) addOperationDeleteActivationMiddlewares(stack *middleware.Stack 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 } @@ -128,6 +131,18 @@ func (c *Client) addOperationDeleteActivationMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go index ce9dcb77..b7040856 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteAssociationMiddlewares(stack *middleware.Stac 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationDeleteAssociationMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go index abf07ac0..2352e414 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteDocumentMiddlewares(stack *middleware.Stack, 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 } @@ -143,6 +146,18 @@ func (c *Client) addOperationDeleteDocumentMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go index 0545461d..894b2f37 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go @@ -71,10 +71,10 @@ type DeleteInventoryOutput struct { // begin other operations. DeletionId *string - // A summary of the delete operation. For more information about this summary, see [Understanding the delete inventory summary] + // A summary of the delete operation. For more information about this summary, see [Deleting custom inventory] // in the Amazon Web Services Systems Manager User Guide. // - // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary + // [Deleting custom inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory-summary DeletionSummary *types.InventoryDeletionSummary // The name of the inventory data type specified in the request. @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteInventoryMiddlewares(stack *middleware.Stack, 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 } @@ -171,6 +174,18 @@ func (c *Client) addOperationDeleteInventoryMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go index c1bbb360..3a75ab96 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go @@ -90,6 +90,9 @@ func (c *Client) addOperationDeleteMaintenanceWindowMiddlewares(stack *middlewar 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 } @@ -129,6 +132,18 @@ func (c *Client) addOperationDeleteMaintenanceWindowMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go index c3dd4e48..b5432602 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteOpsItemMiddlewares(stack *middleware.Stack, o 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationDeleteOpsItemMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go index a5e6ddb6..aa383980 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go @@ -86,6 +86,9 @@ func (c *Client) addOperationDeleteOpsMetadataMiddlewares(stack *middleware.Stac 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 } @@ -125,6 +128,18 @@ func (c *Client) addOperationDeleteOpsMetadataMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go index fe44e608..f7bdfed7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go @@ -90,6 +90,9 @@ func (c *Client) addOperationDeleteParameterMiddlewares(stack *middleware.Stack, 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 } @@ -129,6 +132,18 @@ func (c *Client) addOperationDeleteParameterMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go index a974699e..78029e10 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go @@ -99,6 +99,9 @@ func (c *Client) addOperationDeleteParametersMiddlewares(stack *middleware.Stack 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 } @@ -138,6 +141,18 @@ func (c *Client) addOperationDeleteParametersMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go index 6c90be6a..e83d4233 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go @@ -90,6 +90,9 @@ func (c *Client) addOperationDeletePatchBaselineMiddlewares(stack *middleware.St 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 } @@ -129,6 +132,18 @@ func (c *Client) addOperationDeletePatchBaselineMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go index 0dae2049..9cfcb802 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go @@ -91,6 +91,9 @@ func (c *Client) addOperationDeleteResourceDataSyncMiddlewares(stack *middleware 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 } @@ -130,6 +133,18 @@ func (c *Client) addOperationDeleteResourceDataSyncMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go index d3b64d13..1cbf9a4a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S 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 } @@ -150,6 +153,18 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go index c48e2d59..887c6f8b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go @@ -89,6 +89,9 @@ func (c *Client) addOperationDeregisterManagedInstanceMiddlewares(stack *middlew 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 } @@ -128,6 +131,18 @@ func (c *Client) addOperationDeregisterManagedInstanceMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go index fee065bc..344f8481 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go @@ -98,6 +98,9 @@ func (c *Client) addOperationDeregisterPatchBaselineForPatchGroupMiddlewares(sta 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 } @@ -137,6 +140,18 @@ func (c *Client) addOperationDeregisterPatchBaselineForPatchGroupMiddlewares(sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go index aba811b3..9a0871a4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeregisterTargetFromMaintenanceWindowMiddlewares(st 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationDeregisterTargetFromMaintenanceWindowMiddlewares(st if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go index ea0491df..ecb2e27a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go @@ -98,6 +98,9 @@ func (c *Client) addOperationDeregisterTaskFromMaintenanceWindowMiddlewares(stac 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 } @@ -137,6 +140,18 @@ func (c *Client) addOperationDeregisterTaskFromMaintenanceWindowMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go index 68aa66f9..bfb22b18 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeActivationsMiddlewares(stack *middleware.St 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 } @@ -139,6 +142,18 @@ func (c *Client) addOperationDescribeActivationsMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go index a0437f5d..bba1d325 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeAssociationMiddlewares(stack *middleware.St 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 } @@ -139,6 +142,18 @@ func (c *Client) addOperationDescribeAssociationMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go index 57cce65f..d3b2ac11 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeAssociationExecutionTargetsMiddlewares(stac 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 } @@ -156,6 +159,18 @@ func (c *Client) addOperationDescribeAssociationExecutionTargetsMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go index fa90d072..61db22e9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeAssociationExecutionsMiddlewares(stack *mid 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 } @@ -150,6 +153,18 @@ func (c *Client) addOperationDescribeAssociationExecutionsMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go index 4a868c84..b4e642df 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDescribeAutomationExecutionsMiddlewares(stack *midd 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 } @@ -141,6 +144,18 @@ func (c *Client) addOperationDescribeAutomationExecutionsMiddlewares(stack *midd if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go index 758e0687..627b8fc3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeAutomationStepExecutionsMiddlewares(stack * 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 } @@ -152,6 +155,18 @@ func (c *Client) addOperationDescribeAutomationStepExecutionsMiddlewares(stack * if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go index f376e8f7..99c67b05 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go @@ -190,6 +190,9 @@ func (c *Client) addOperationDescribeAvailablePatchesMiddlewares(stack *middlewa 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 } @@ -226,6 +229,18 @@ func (c *Client) addOperationDescribeAvailablePatchesMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go index 0ab1102a..3e5ac0e5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDescribeDocumentMiddlewares(stack *middleware.Stack 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationDescribeDocumentMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go index 310ee796..2bd6927f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeDocumentPermissionMiddlewares(stack *middle 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 } @@ -155,6 +158,18 @@ func (c *Client) addOperationDescribeDocumentPermissionMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go index 2a6a6209..935f3618 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeEffectiveInstanceAssociationsMiddlewares(st 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationDescribeEffectiveInstanceAssociationsMiddlewares(st if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go index ed7d8e8c..8216e63f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go index 64bc7d41..b6503241 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeInstanceAssociationsStatusMiddlewares(stack 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationDescribeInstanceAssociationsStatusMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go index 1449c1a1..dccb0cdf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeInstanceInformationMiddlewares(stack *middl 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 } @@ -164,6 +167,18 @@ func (c *Client) addOperationDescribeInstanceInformationMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go index 7ef05275..002a4135 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeInstancePatchStatesMiddlewares(stack *middl 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationDescribeInstancePatchStatesMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go index 9a56eff0..f778f765 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares 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 } @@ -152,6 +155,18 @@ func (c *Client) addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go index d78eed39..d59192cd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go @@ -55,10 +55,10 @@ type DescribeInstancePatchesInput struct { // // Sample values: Installed | InstalledOther | InstalledPendingReboot // - // For lists of all State values, see [Understanding patch compliance state values]in the Amazon Web Services Systems Manager + // For lists of all State values, see [Patch compliance state values]in the Amazon Web Services Systems Manager // User Guide. // - // [Understanding patch compliance state values]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html + // [Patch compliance state values]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html Filters []types.PatchOrchestratorFilter // The maximum number of patches to return (per page). @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeInstancePatchesMiddlewares(stack *middlewar 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 } @@ -182,6 +185,18 @@ func (c *Client) addOperationDescribeInstancePatchesMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go index e80e3ad4..56eb5988 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeInstancePropertiesMiddlewares(stack *middle 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 } @@ -144,6 +147,18 @@ func (c *Client) addOperationDescribeInstancePropertiesMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go index 4cb60741..b452e12b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDescribeInventoryDeletionsMiddlewares(stack *middle 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 } @@ -137,6 +140,18 @@ func (c *Client) addOperationDescribeInventoryDeletionsMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go index 23bb89a1..0f4b5f18 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMi 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 } @@ -154,6 +157,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go index 444b7cfd..e297a5e9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares( 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares( if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go index 98026b19..2f8ae374 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go @@ -43,7 +43,7 @@ type DescribeMaintenanceWindowExecutionsInput struct { // // - Values. An array of strings, each between 1 and 256 characters. Supported // values are date/time strings in a valid ISO 8601 date/time format, such as - // 2021-11-04T05:00:00Z . + // 2024-11-04T05:00:00Z . Filters []types.MaintenanceWindowFilter // The maximum number of items to return for this call. The call also returns a @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionsMiddlewares(stac 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 } @@ -154,6 +157,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionsMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go index c67391b8..bb77a9fe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowScheduleMiddlewares(stack 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 } @@ -150,6 +153,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowScheduleMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go index 1aaadaff..2eaf5d85 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowTargetsMiddlewares(stack * 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 } @@ -147,6 +150,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowTargetsMiddlewares(stack * if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go index 86d67a6c..4c2fe953 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowTasksMiddlewares(stack *mi 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 } @@ -151,6 +154,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowTasksMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go index 260dee64..6ad9dc9c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowsMiddlewares(stack *middle 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 } @@ -139,6 +142,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowsMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go index f4a15215..185721e4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowsForTargetMiddlewares(stac 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 } @@ -150,6 +153,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowsForTargetMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go index c92a985e..6d31e091 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDescribeOpsItemsMiddlewares(stack *middleware.Stack 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 } @@ -213,6 +216,18 @@ func (c *Client) addOperationDescribeOpsItemsMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go index 748e58cd..8dc70929 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Sta 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 } @@ -173,6 +176,18 @@ func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go index ad769dea..9349b8cb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribePatchBaselinesMiddlewares(stack *middleware 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 } @@ -150,6 +153,18 @@ func (c *Client) addOperationDescribePatchBaselinesMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go index abd4706b..9f1955e8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribePatchGroupStateMiddlewares(stack *middlewar 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 } @@ -183,6 +186,18 @@ func (c *Client) addOperationDescribePatchGroupStateMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go index d126259a..4ac4b69d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribePatchGroupsMiddlewares(stack *middleware.St 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 } @@ -151,6 +154,18 @@ func (c *Client) addOperationDescribePatchGroupsMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go index 0c549b2b..b3ff5d2c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribePatchPropertiesMiddlewares(stack *middlewar 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 } @@ -181,6 +184,18 @@ func (c *Client) addOperationDescribePatchPropertiesMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go index e5aaea27..cfad5f42 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeSessionsMiddlewares(stack *middleware.Stack 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationDescribeSessionsMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go index 67f2fc91..b59d069d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDisassociateOpsItemRelatedItemMiddlewares(stack *mi 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 } @@ -134,6 +137,18 @@ func (c *Client) addOperationDisassociateOpsItemRelatedItemMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go index f8d6ece6..54e23280 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go @@ -93,6 +93,9 @@ func (c *Client) addOperationGetAutomationExecutionMiddlewares(stack *middleware 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 } @@ -132,6 +135,18 @@ func (c *Client) addOperationGetAutomationExecutionMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go index 34a448ac..e9f3c106 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetCalendarStateMiddlewares(stack *middleware.Stack 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 } @@ -168,6 +171,18 @@ func (c *Client) addOperationGetCalendarStateMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go index 21db09f6..338e1833 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go @@ -246,6 +246,9 @@ func (c *Client) addOperationGetCommandInvocationMiddlewares(stack *middleware.S 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 } @@ -285,6 +288,18 @@ func (c *Client) addOperationGetCommandInvocationMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go index 2b49373b..63f33b09 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go @@ -95,6 +95,9 @@ func (c *Client) addOperationGetConnectionStatusMiddlewares(stack *middleware.St 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 } @@ -134,6 +137,18 @@ func (c *Client) addOperationGetConnectionStatusMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go index f5bec971..5aaf401f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go @@ -97,6 +97,9 @@ func (c *Client) addOperationGetDefaultPatchBaselineMiddlewares(stack *middlewar 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 } @@ -133,6 +136,18 @@ func (c *Client) addOperationGetDefaultPatchBaselineMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go index f8be1863..2fec2c19 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetDeployablePatchSnapshotForInstanceMiddlewares(st 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 } @@ -160,6 +163,18 @@ func (c *Client) addOperationGetDeployablePatchSnapshotForInstanceMiddlewares(st if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go index 5aaccce3..66560efd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetDocumentMiddlewares(stack *middleware.Stack, opt 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 } @@ -197,6 +200,18 @@ func (c *Client) addOperationGetDocumentMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go index dd638485..bf351010 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetInventoryMiddlewares(stack *middleware.Stack, op 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 } @@ -151,6 +154,18 @@ func (c *Client) addOperationGetInventoryMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go index decc8d82..4ce7b2a3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetInventorySchemaMiddlewares(stack *middleware.Sta 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationGetInventorySchemaMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go index 40b95da3..c5119e7f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetMaintenanceWindowMiddlewares(stack *middleware.S 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 } @@ -185,6 +188,18 @@ func (c *Client) addOperationGetMaintenanceWindowMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go index 6ccd9d49..3a38404a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionMiddlewares(stack *mid 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go index 22251704..944a4561 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskMiddlewares(stack 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 } @@ -194,6 +197,18 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go index 0c34b8df..daf268f9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskInvocationMiddlewa 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 } @@ -178,6 +181,18 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskInvocationMiddlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go index 3fa362d8..65a3eba4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go @@ -108,10 +108,10 @@ type GetMaintenanceWindowTaskOutput struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets where the task should run. @@ -192,6 +192,9 @@ func (c *Client) addOperationGetMaintenanceWindowTaskMiddlewares(stack *middlewa 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 } @@ -231,6 +234,18 @@ func (c *Client) addOperationGetMaintenanceWindowTaskMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go index 9346575d..212a72ae 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetOpsItemMiddlewares(stack *middleware.Stack, opti 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 } @@ -143,6 +146,18 @@ func (c *Client) addOperationGetOpsItemMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go index fc8b40e2..66c9fdf1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetOpsMetadataMiddlewares(stack *middleware.Stack, 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 } @@ -144,6 +147,18 @@ func (c *Client) addOperationGetOpsMetadataMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go index f56cf1ed..a8531ace 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetOpsSummaryMiddlewares(stack *middleware.Stack, o 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationGetOpsSummaryMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go index a804b8c4..c46b3489 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go @@ -40,7 +40,7 @@ type GetParameterInput struct { // For more information about shared parameters, see [Working with shared parameters] in the Amazon Web Services // Systems Manager User Guide. // - // [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sharing.html + // [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html // // This member is required. Name *string @@ -106,6 +106,9 @@ func (c *Client) addOperationGetParameterMiddlewares(stack *middleware.Stack, op 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 } @@ -145,6 +148,18 @@ func (c *Client) addOperationGetParameterMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go index 2b5d21ac..842336d7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetParameterHistoryMiddlewares(stack *middleware.St 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 } @@ -153,6 +156,18 @@ func (c *Client) addOperationGetParameterHistoryMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go index 7e80d395..ba6af1a5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetParametersMiddlewares(stack *middleware.Stack, o 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 } @@ -154,6 +157,18 @@ func (c *Client) addOperationGetParametersMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go index 41a696ea..2c244d25 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetParametersByPathMiddlewares(stack *middleware.St 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 } @@ -174,6 +177,18 @@ func (c *Client) addOperationGetParametersByPathMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go index db9aa891..0d8b304d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetPatchBaselineMiddlewares(stack *middleware.Stack 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 } @@ -186,6 +189,18 @@ func (c *Client) addOperationGetPatchBaselineMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go index 714558fe..1c3150bb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetPatchBaselineForPatchGroupMiddlewares(stack *mid 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationGetPatchBaselineForPatchGroupMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go index fbc6b9ba..05729d1c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St 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 } @@ -141,6 +144,18 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go index 8c3c089d..990d3667 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetServiceSettingMiddlewares(stack *middleware.Stac 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 } @@ -164,6 +167,18 @@ func (c *Client) addOperationGetServiceSettingMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go index 9d607263..d52c242c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go @@ -138,6 +138,9 @@ func (c *Client) addOperationLabelParameterVersionMiddlewares(stack *middleware. 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 } @@ -177,6 +180,18 @@ func (c *Client) addOperationLabelParameterVersionMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go index 7bf48c76..8e3345a4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go @@ -103,6 +103,9 @@ func (c *Client) addOperationListAssociationVersionsMiddlewares(stack *middlewar 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationListAssociationVersionsMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go index 3559fd62..dc3cb704 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go index d9bf154d..bca54e6d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListCommandInvocationsMiddlewares(stack *middleware 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 } @@ -156,6 +159,18 @@ func (c *Client) addOperationListCommandInvocationsMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go index ea706cdf..b70024a9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListCommandsMiddlewares(stack *middleware.Stack, op 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 } @@ -151,6 +154,18 @@ func (c *Client) addOperationListCommandsMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go index 022faa0f..45fa2515 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListComplianceItemsMiddlewares(stack *middleware.St 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationListComplianceItemsMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go index 53461251..1641dde0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListComplianceSummariesMiddlewares(stack *middlewar 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 } @@ -143,6 +146,18 @@ func (c *Client) addOperationListComplianceSummariesMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go index 8e39e176..2ce37a3b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListDocumentMetadataHistoryMiddlewares(stack *middl 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 } @@ -162,6 +165,18 @@ func (c *Client) addOperationListDocumentMetadataHistoryMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go index 3695f896..118bb7c5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go @@ -103,6 +103,9 @@ func (c *Client) addOperationListDocumentVersionsMiddlewares(stack *middleware.S 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationListDocumentVersionsMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go index 7403a56b..eef11813 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDocumentsMiddlewares(stack *middleware.Stack, o 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 } @@ -154,6 +157,18 @@ func (c *Client) addOperationListDocumentsMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go index 179fa0e3..c767af47 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListInventoryEntriesMiddlewares(stack *middleware.S 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 } @@ -162,6 +165,18 @@ func (c *Client) addOperationListInventoryEntriesMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go index 4f1f5f4c..6724558f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go @@ -103,6 +103,9 @@ func (c *Client) addOperationListOpsItemEventsMiddlewares(stack *middleware.Stac 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationListOpsItemEventsMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go index f8b18250..f4616199 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListOpsItemRelatedItemsMiddlewares(stack *middlewar 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 } @@ -145,6 +148,18 @@ func (c *Client) addOperationListOpsItemRelatedItemsMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go index ef37d10f..6cbd29ec 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go @@ -102,6 +102,9 @@ func (c *Client) addOperationListOpsMetadataMiddlewares(stack *middleware.Stack, 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 } @@ -141,6 +144,18 @@ func (c *Client) addOperationListOpsMetadataMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go index e64abd80..1aecf620 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go @@ -104,6 +104,9 @@ func (c *Client) addOperationListResourceComplianceSummariesMiddlewares(stack *m 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationListResourceComplianceSummariesMiddlewares(stack *m if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go index e8d39c7f..85a3a967 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListResourceDataSyncMiddlewares(stack *middleware.S 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationListResourceDataSyncMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go index 64219d3f..e1eeb2f8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go @@ -98,6 +98,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St 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 } @@ -137,6 +140,18 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go index 97875a83..8bcf8324 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go @@ -109,6 +109,9 @@ func (c *Client) addOperationModifyDocumentPermissionMiddlewares(stack *middlewa 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 } @@ -148,6 +151,18 @@ func (c *Client) addOperationModifyDocumentPermissionMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go index 93af0ff8..0ca0d570 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go @@ -171,6 +171,9 @@ func (c *Client) addOperationPutComplianceItemsMiddlewares(stack *middleware.Sta 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 } @@ -210,6 +213,18 @@ func (c *Client) addOperationPutComplianceItemsMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go index 27de1458..f70bc99f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go @@ -98,6 +98,9 @@ func (c *Client) addOperationPutInventoryMiddlewares(stack *middleware.Stack, op 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 } @@ -137,6 +140,18 @@ func (c *Client) addOperationPutInventoryMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go index f177ccda..727fa40a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go @@ -324,6 +324,9 @@ func (c *Client) addOperationPutParameterMiddlewares(stack *middleware.Stack, op 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 } @@ -363,6 +366,18 @@ func (c *Client) addOperationPutParameterMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go index c17418d7..f2884540 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go @@ -147,6 +147,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac 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 } @@ -186,6 +189,18 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go index 26a52540..2ceeefdb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go @@ -96,6 +96,9 @@ func (c *Client) addOperationRegisterDefaultPatchBaselineMiddlewares(stack *midd 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 } @@ -135,6 +138,18 @@ func (c *Client) addOperationRegisterDefaultPatchBaselineMiddlewares(stack *midd if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go index 8a05d1dd..ab7a19a9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go @@ -98,6 +98,9 @@ func (c *Client) addOperationRegisterPatchBaselineForPatchGroupMiddlewares(stack 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 } @@ -137,6 +140,18 @@ func (c *Client) addOperationRegisterPatchBaselineForPatchGroupMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go index a8da8273..42ac2ac4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go @@ -153,6 +153,9 @@ func (c *Client) addOperationRegisterTargetWithMaintenanceWindowMiddlewares(stac 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 } @@ -195,6 +198,18 @@ func (c *Client) addOperationRegisterTargetWithMaintenanceWindowMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go index 26646224..9b072923 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go @@ -126,10 +126,10 @@ type RegisterTaskWithMaintenanceWindowInput struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets (either managed nodes or maintenance window targets). @@ -220,6 +220,9 @@ func (c *Client) addOperationRegisterTaskWithMaintenanceWindowMiddlewares(stack 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 } @@ -262,6 +265,18 @@ func (c *Client) addOperationRegisterTaskWithMaintenanceWindowMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go index a8b9b636..3b2e71e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go @@ -122,6 +122,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware 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 } @@ -161,6 +164,18 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go index a9cb0abc..eefc0c1f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go @@ -126,6 +126,9 @@ func (c *Client) addOperationResetServiceSettingMiddlewares(stack *middleware.St 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 } @@ -165,6 +168,18 @@ func (c *Client) addOperationResetServiceSettingMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go index 63e15da0..a771e941 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go @@ -115,6 +115,9 @@ func (c *Client) addOperationResumeSessionMiddlewares(stack *middleware.Stack, o 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 } @@ -154,6 +157,18 @@ func (c *Client) addOperationResumeSessionMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go index 91fb9eb5..797d3dea 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go @@ -113,6 +113,9 @@ func (c *Client) addOperationSendAutomationSignalMiddlewares(stack *middleware.S 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 } @@ -152,6 +155,18 @@ func (c *Client) addOperationSendAutomationSignalMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go index 34e55b35..493de7b2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go @@ -217,6 +217,9 @@ func (c *Client) addOperationSendCommandMiddlewares(stack *middleware.Stack, opt 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 } @@ -256,6 +259,18 @@ func (c *Client) addOperationSendCommandMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go index e9ff2fe4..0dbe2dd0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go @@ -87,6 +87,9 @@ func (c *Client) addOperationStartAssociationsOnceMiddlewares(stack *middleware. 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 } @@ -126,6 +129,18 @@ func (c *Client) addOperationStartAssociationsOnceMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go index a52c348f..cfbb6624 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go @@ -52,6 +52,9 @@ type StartAutomationExecutionInput struct { // The maximum number of targets allowed to run this task in parallel. You can // specify a number, such as 10, or a percentage, such as 10%. The default value is // 10 . + // + // If both this parameter and the TargetLocation:TargetsMaxConcurrency are + // supplied, TargetLocation:TargetsMaxConcurrency takes precedence. MaxConcurrency *string // The number of errors that are allowed before the system stops running the @@ -68,6 +71,9 @@ type StartAutomationExecutionInput struct { // are allowed to complete, but some of these executions may fail as well. If you // need to ensure that there won't be more than max-errors failed executions, set // max-concurrency to 1 so the executions proceed one at a time. + // + // If this parameter and the TargetLocation:TargetsMaxErrors parameter are both + // supplied, TargetLocation:TargetsMaxErrors takes precedence. MaxErrors *string // The execution mode of the automation. Valid modes include the following: Auto @@ -94,12 +100,16 @@ type StartAutomationExecutionInput struct { // A location is a combination of Amazon Web Services Regions and/or Amazon Web // Services accounts where you want to run the automation. Use this operation to // start an automation in multiple Amazon Web Services Regions and multiple Amazon - // Web Services accounts. For more information, see [Running Automation workflows in multiple Amazon Web Services Regions and Amazon Web Services accounts]in the Amazon Web Services + // Web Services accounts. For more information, see [Running automations in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services // Systems Manager User Guide. // - // [Running Automation workflows in multiple Amazon Web Services Regions and Amazon Web Services accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html + // [Running automations in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html TargetLocations []types.TargetLocation + // Specify a publicly accessible URL for a file that contains the TargetLocations + // body. Currently, only files in presigned Amazon S3 buckets are supported. + TargetLocationsURL *string + // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]string @@ -110,6 +120,9 @@ type StartAutomationExecutionInput struct { // A key-value mapping to target resources. Required if you specify // TargetParameterName. + // + // If both this parameter and the TargetLocation:Targets parameter are supplied, + // TargetLocation:Targets takes precedence. Targets []types.Target noSmithyDocumentSerde @@ -169,6 +182,9 @@ func (c *Client) addOperationStartAutomationExecutionMiddlewares(stack *middlewa 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 } @@ -208,6 +224,18 @@ func (c *Client) addOperationStartAutomationExecutionMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go index 1d265a3f..ae23acbe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go @@ -160,6 +160,9 @@ func (c *Client) addOperationStartChangeRequestExecutionMiddlewares(stack *middl 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 } @@ -199,6 +202,18 @@ func (c *Client) addOperationStartChangeRequestExecutionMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go index 9a1bb575..268e15f5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartSessionMiddlewares(stack *middleware.Stack, op 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 } @@ -182,6 +185,18 @@ func (c *Client) addOperationStartSessionMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go index b0118079..cd6098fc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go @@ -91,6 +91,9 @@ func (c *Client) addOperationStopAutomationExecutionMiddlewares(stack *middlewar 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 } @@ -130,6 +133,18 @@ func (c *Client) addOperationStopAutomationExecutionMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go index d2ed650e..8ad81efe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go @@ -92,6 +92,9 @@ func (c *Client) addOperationTerminateSessionMiddlewares(stack *middleware.Stack 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 } @@ -131,6 +134,18 @@ func (c *Client) addOperationTerminateSessionMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go index 405a1f72..251661ed 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUnlabelParameterVersionMiddlewares(stack *middlewar 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationUnlabelParameterVersionMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go index a4fbdc13..80b17c90 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go @@ -283,6 +283,9 @@ func (c *Client) addOperationUpdateAssociationMiddlewares(stack *middleware.Stac 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 } @@ -322,6 +325,18 @@ func (c *Client) addOperationUpdateAssociationMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go index 569a5a10..51a4f46e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUpdateAssociationStatusMiddlewares(stack *middlewar 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 } @@ -145,6 +148,18 @@ func (c *Client) addOperationUpdateAssociationStatusMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go index 321462cb..4d8e32b2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateDocumentMiddlewares(stack *middleware.Stack, 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 } @@ -165,6 +168,18 @@ func (c *Client) addOperationUpdateDocumentMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go index 6a5ecad6..1844006e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUpdateDocumentDefaultVersionMiddlewares(stack *midd 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationUpdateDocumentDefaultVersionMiddlewares(stack *midd if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go index cfc70f1f..5871080e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go @@ -96,6 +96,9 @@ func (c *Client) addOperationUpdateDocumentMetadataMiddlewares(stack *middleware 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 } @@ -135,6 +138,18 @@ func (c *Client) addOperationUpdateDocumentMetadataMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go index 102e5b88..80ae8e57 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go @@ -202,6 +202,9 @@ func (c *Client) addOperationUpdateMaintenanceWindowMiddlewares(stack *middlewar 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 } @@ -241,6 +244,18 @@ func (c *Client) addOperationUpdateMaintenanceWindowMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go index d83324b9..c9f13515 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateMaintenanceWindowTargetMiddlewares(stack *mid 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 } @@ -183,6 +186,18 @@ func (c *Client) addOperationUpdateMaintenanceWindowTargetMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go index ba53633d..85dff67e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go @@ -158,10 +158,10 @@ type UpdateMaintenanceWindowTaskInput struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets (either managed nodes or tags) to modify. Managed nodes are @@ -253,10 +253,10 @@ type UpdateMaintenanceWindowTaskOutput struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The updated target values. @@ -331,6 +331,9 @@ func (c *Client) addOperationUpdateMaintenanceWindowTaskMiddlewares(stack *middl 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 } @@ -370,6 +373,18 @@ func (c *Client) addOperationUpdateMaintenanceWindowTaskMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go index ce31afdd..cf39cd18 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go @@ -34,13 +34,13 @@ type UpdateManagedInstanceRoleInput struct { // The name of the Identity and Access Management (IAM) role that you want to // assign to the managed node. This IAM role must provide AssumeRole permissions // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com - // . For more information, see [Create an IAM service role for a hybrid and multicloud environment]in the Amazon Web Services Systems Manager User + // . For more information, see [Create the IAM service role required for Systems Manager in hybrid and multicloud environments]in the Amazon Web Services Systems Manager User // Guide. // // You can't specify an IAM service-linked role for this parameter. You must // create a unique role. // - // [Create an IAM service role for a hybrid and multicloud environment]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html + // [Create the IAM service role required for Systems Manager in hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html // // This member is required. IamRole *string @@ -103,6 +103,9 @@ func (c *Client) addOperationUpdateManagedInstanceRoleMiddlewares(stack *middlew 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 } @@ -142,6 +145,18 @@ func (c *Client) addOperationUpdateManagedInstanceRoleMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go index ace113bb..6d8c4904 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go @@ -117,8 +117,8 @@ type UpdateOpsItemInput struct { // Specify a new severity for an OpsItem. Severity *string - // The OpsItem status. Status can be Open , In Progress , or Resolved . For more - // information, see [Editing OpsItem details]in the Amazon Web Services Systems Manager User Guide. + // The OpsItem status. For more information, see [Editing OpsItem details] in the Amazon Web Services + // Systems Manager User Guide. // // [Editing OpsItem details]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html Status types.OpsItemStatus @@ -180,6 +180,9 @@ func (c *Client) addOperationUpdateOpsItemMiddlewares(stack *middleware.Stack, o 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 } @@ -219,6 +222,18 @@ func (c *Client) addOperationUpdateOpsItemMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go index d95de8b6..d42ead98 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go @@ -98,6 +98,9 @@ func (c *Client) addOperationUpdateOpsMetadataMiddlewares(stack *middleware.Stac 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 } @@ -137,6 +140,18 @@ func (c *Client) addOperationUpdateOpsMetadataMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go index f97a9b45..b6aa8359 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go @@ -45,9 +45,9 @@ type UpdatePatchBaselineInput struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html ApprovedPatches []string // Assigns a new compliance severity level to an existing patch baseline. @@ -70,9 +70,9 @@ type UpdatePatchBaselineInput struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html RejectedPatches []string // The action for Patch Manager to take on patches included in the RejectedPackages @@ -209,6 +209,9 @@ func (c *Client) addOperationUpdatePatchBaselineMiddlewares(stack *middleware.St 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 } @@ -248,6 +251,18 @@ func (c *Client) addOperationUpdatePatchBaselineMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go index 5a6d08a6..0ace9afd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdateResourceDataSyncMiddlewares(stack *middleware 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 } @@ -144,6 +147,18 @@ func (c *Client) addOperationUpdateResourceDataSyncMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go index fd860e7a..80cc9f9c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateServiceSettingMiddlewares(stack *middleware.S 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 } @@ -191,6 +194,18 @@ func (c *Client) addOperationUpdateServiceSettingMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go index 22cb7c4b..b081fc3c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go @@ -8,7 +8,9 @@ import ( 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" ) @@ -145,6 +147,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -157,6 +162,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -216,7 +224,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -226,12 +237,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + 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) } @@ -247,6 +266,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -256,6 +276,9 @@ func (*signRequestMiddleware) ID() string { 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) @@ -276,9 +299,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, 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/ssm/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go index 96009460..33b33e32 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go @@ -15,6 +15,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" @@ -44,6 +45,10 @@ func (m *awsAwsjson11_deserializeOpAddTagsToResource) HandleDeserialize(ctx cont 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)} @@ -163,6 +168,10 @@ func (m *awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem) HandleDeserializ 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)} @@ -285,6 +294,10 @@ func (m *awsAwsjson11_deserializeOpCancelCommand) HandleDeserialize(ctx context. 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)} @@ -401,6 +414,10 @@ func (m *awsAwsjson11_deserializeOpCancelMaintenanceWindowExecution) HandleDeser 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)} @@ -511,6 +528,10 @@ func (m *awsAwsjson11_deserializeOpCreateActivation) HandleDeserialize(ctx conte 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)} @@ -621,6 +642,10 @@ func (m *awsAwsjson11_deserializeOpCreateAssociation) HandleDeserialize(ctx cont 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)} @@ -764,6 +789,10 @@ func (m *awsAwsjson11_deserializeOpCreateAssociationBatch) HandleDeserialize(ctx 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)} @@ -904,6 +933,10 @@ func (m *awsAwsjson11_deserializeOpCreateDocument) HandleDeserialize(ctx context 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)} @@ -1026,6 +1059,10 @@ func (m *awsAwsjson11_deserializeOpCreateMaintenanceWindow) HandleDeserialize(ct 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)} @@ -1139,6 +1176,10 @@ func (m *awsAwsjson11_deserializeOpCreateOpsItem) HandleDeserialize(ctx context. 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)} @@ -1258,6 +1299,10 @@ func (m *awsAwsjson11_deserializeOpCreateOpsMetadata) HandleDeserialize(ctx cont 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)} @@ -1377,6 +1422,10 @@ func (m *awsAwsjson11_deserializeOpCreatePatchBaseline) HandleDeserialize(ctx co 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)} @@ -1490,6 +1539,10 @@ func (m *awsAwsjson11_deserializeOpCreateResourceDataSync) HandleDeserialize(ctx 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)} @@ -1606,6 +1659,10 @@ func (m *awsAwsjson11_deserializeOpDeleteActivation) HandleDeserialize(ctx conte 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)} @@ -1722,6 +1779,10 @@ func (m *awsAwsjson11_deserializeOpDeleteAssociation) HandleDeserialize(ctx cont 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)} @@ -1841,6 +1902,10 @@ func (m *awsAwsjson11_deserializeOpDeleteDocument) HandleDeserialize(ctx context 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)} @@ -1957,6 +2022,10 @@ func (m *awsAwsjson11_deserializeOpDeleteInventory) HandleDeserialize(ctx contex 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)} @@ -2076,6 +2145,10 @@ func (m *awsAwsjson11_deserializeOpDeleteMaintenanceWindow) HandleDeserialize(ct 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)} @@ -2183,6 +2256,10 @@ func (m *awsAwsjson11_deserializeOpDeleteOpsItem) HandleDeserialize(ctx context. 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)} @@ -2293,6 +2370,10 @@ func (m *awsAwsjson11_deserializeOpDeleteOpsMetadata) HandleDeserialize(ctx cont 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)} @@ -2406,6 +2487,10 @@ func (m *awsAwsjson11_deserializeOpDeleteParameter) HandleDeserialize(ctx contex 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)} @@ -2516,6 +2601,10 @@ func (m *awsAwsjson11_deserializeOpDeleteParameters) HandleDeserialize(ctx conte 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)} @@ -2623,6 +2712,10 @@ func (m *awsAwsjson11_deserializeOpDeletePatchBaseline) HandleDeserialize(ctx co 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)} @@ -2733,6 +2826,10 @@ func (m *awsAwsjson11_deserializeOpDeleteResourceDataSync) HandleDeserialize(ctx 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)} @@ -2846,6 +2943,10 @@ func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx c 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)} @@ -2968,6 +3069,10 @@ func (m *awsAwsjson11_deserializeOpDeregisterManagedInstance) HandleDeserialize( 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)} @@ -3078,6 +3183,10 @@ func (m *awsAwsjson11_deserializeOpDeregisterPatchBaselineForPatchGroup) HandleD 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)} @@ -3188,6 +3297,10 @@ func (m *awsAwsjson11_deserializeOpDeregisterTargetFromMaintenanceWindow) Handle 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)} @@ -3301,6 +3414,10 @@ func (m *awsAwsjson11_deserializeOpDeregisterTaskFromMaintenanceWindow) HandleDe 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)} @@ -3411,6 +3528,10 @@ func (m *awsAwsjson11_deserializeOpDescribeActivations) HandleDeserialize(ctx co 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)} @@ -3524,6 +3645,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAssociation) HandleDeserialize(ctx co 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)} @@ -3643,6 +3768,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAssociationExecutions) HandleDeserial 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)} @@ -3756,6 +3885,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAssociationExecutionTargets) HandleDe 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)} @@ -3872,6 +4005,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAutomationExecutions) HandleDeseriali 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)} @@ -3988,6 +4125,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAutomationStepExecutions) HandleDeser 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)} @@ -4107,6 +4248,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAvailablePatches) HandleDeserialize(c 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)} @@ -4214,6 +4359,10 @@ func (m *awsAwsjson11_deserializeOpDescribeDocument) HandleDeserialize(ctx conte 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)} @@ -4327,6 +4476,10 @@ func (m *awsAwsjson11_deserializeOpDescribeDocumentPermission) HandleDeserialize 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)} @@ -4446,6 +4599,10 @@ func (m *awsAwsjson11_deserializeOpDescribeEffectiveInstanceAssociations) Handle 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)} @@ -4559,6 +4716,10 @@ func (m *awsAwsjson11_deserializeOpDescribeEffectivePatchesForPatchBaseline) Han 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)} @@ -4675,6 +4836,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstanceAssociationsStatus) HandleDes 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)} @@ -4788,6 +4953,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstanceInformation) HandleDeserializ 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)} @@ -4907,6 +5076,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstancePatches) HandleDeserialize(ct 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)} @@ -5023,6 +5196,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstancePatchStates) HandleDeserializ 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)} @@ -5133,6 +5310,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstancePatchStatesForPatchGroup) Han 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)} @@ -5246,6 +5427,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstanceProperties) HandleDeserialize 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)} @@ -5371,6 +5556,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInventoryDeletions) HandleDeserialize 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)} @@ -5484,6 +5673,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) HandleDe 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)} @@ -5591,6 +5784,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocat 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)} @@ -5701,6 +5898,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) Hand 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)} @@ -5811,6 +6012,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindows) HandleDeserialize 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)} @@ -5918,6 +6123,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) HandleDese 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)} @@ -6028,6 +6237,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) HandleDe 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)} @@ -6135,6 +6348,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) HandleDeser 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)} @@ -6245,6 +6462,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) HandleDeseria 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)} @@ -6355,6 +6576,10 @@ func (m *awsAwsjson11_deserializeOpDescribeOpsItems) HandleDeserialize(ctx conte 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)} @@ -6462,6 +6687,10 @@ func (m *awsAwsjson11_deserializeOpDescribeParameters) HandleDeserialize(ctx con 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)} @@ -6581,6 +6810,10 @@ func (m *awsAwsjson11_deserializeOpDescribePatchBaselines) HandleDeserialize(ctx 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)} @@ -6688,6 +6921,10 @@ func (m *awsAwsjson11_deserializeOpDescribePatchGroups) HandleDeserialize(ctx co 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)} @@ -6795,6 +7032,10 @@ func (m *awsAwsjson11_deserializeOpDescribePatchGroupState) HandleDeserialize(ct 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)} @@ -6905,6 +7146,10 @@ func (m *awsAwsjson11_deserializeOpDescribePatchProperties) HandleDeserialize(ct 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)} @@ -7012,6 +7257,10 @@ func (m *awsAwsjson11_deserializeOpDescribeSessions) HandleDeserialize(ctx conte 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)} @@ -7125,6 +7374,10 @@ func (m *awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) HandleDeseria 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)} @@ -7244,6 +7497,10 @@ func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx 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)} @@ -7354,6 +7611,10 @@ func (m *awsAwsjson11_deserializeOpGetCalendarState) HandleDeserialize(ctx conte 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)} @@ -7470,6 +7731,10 @@ func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx c 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)} @@ -7589,6 +7854,10 @@ func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx co 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)} @@ -7696,6 +7965,10 @@ func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) HandleDeserialize(ct 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)} @@ -7803,6 +8076,10 @@ func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) Handle 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)} @@ -7916,6 +8193,10 @@ func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Co 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)} @@ -8029,6 +8310,10 @@ func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.C 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)} @@ -8154,6 +8439,10 @@ func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx con 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)} @@ -8267,6 +8556,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx c 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)} @@ -8377,6 +8670,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserial 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)} @@ -8487,6 +8784,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDese 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)} @@ -8597,6 +8898,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) 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)} @@ -8707,6 +9012,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(c 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)} @@ -8817,6 +9126,10 @@ func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Con 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)} @@ -8930,6 +9243,10 @@ func (m *awsAwsjson11_deserializeOpGetOpsMetadata) HandleDeserialize(ctx context 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)} @@ -9043,6 +9360,10 @@ func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context. 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)} @@ -9165,6 +9486,10 @@ func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.C 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)} @@ -9281,6 +9606,10 @@ func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx co 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)} @@ -9397,6 +9726,10 @@ func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context. 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)} @@ -9507,6 +9840,10 @@ func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx co 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)} @@ -9629,6 +9966,10 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx conte 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)} @@ -9742,6 +10083,10 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserial 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)} @@ -9849,6 +10194,10 @@ func (m *awsAwsjson11_deserializeOpGetResourcePolicies) HandleDeserialize(ctx co 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)} @@ -9962,6 +10311,10 @@ func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx cont 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)} @@ -10072,6 +10425,10 @@ func (m *awsAwsjson11_deserializeOpLabelParameterVersion) HandleDeserialize(ctx 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)} @@ -10191,6 +10548,10 @@ func (m *awsAwsjson11_deserializeOpListAssociations) HandleDeserialize(ctx conte 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)} @@ -10301,6 +10662,10 @@ func (m *awsAwsjson11_deserializeOpListAssociationVersions) HandleDeserialize(ct 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)} @@ -10414,6 +10779,10 @@ func (m *awsAwsjson11_deserializeOpListCommandInvocations) HandleDeserialize(ctx 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)} @@ -10533,6 +10902,10 @@ func (m *awsAwsjson11_deserializeOpListCommands) HandleDeserialize(ctx context.C 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)} @@ -10652,6 +11025,10 @@ func (m *awsAwsjson11_deserializeOpListComplianceItems) HandleDeserialize(ctx co 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)} @@ -10771,6 +11148,10 @@ func (m *awsAwsjson11_deserializeOpListComplianceSummaries) HandleDeserialize(ct 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)} @@ -10884,6 +11265,10 @@ func (m *awsAwsjson11_deserializeOpListDocumentMetadataHistory) HandleDeserializ 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)} @@ -11000,6 +11385,10 @@ func (m *awsAwsjson11_deserializeOpListDocuments) HandleDeserialize(ctx context. 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)} @@ -11113,6 +11502,10 @@ func (m *awsAwsjson11_deserializeOpListDocumentVersions) HandleDeserialize(ctx c 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)} @@ -11226,6 +11619,10 @@ func (m *awsAwsjson11_deserializeOpListInventoryEntries) HandleDeserialize(ctx c 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)} @@ -11345,6 +11742,10 @@ func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx cont 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)} @@ -11461,6 +11862,10 @@ func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ct 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)} @@ -11571,6 +11976,10 @@ func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx contex 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)} @@ -11681,6 +12090,10 @@ func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeseri 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)} @@ -11794,6 +12207,10 @@ func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx c 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)} @@ -11907,6 +12324,10 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co 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)} @@ -12020,6 +12441,10 @@ func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(c 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)} @@ -12139,6 +12564,10 @@ func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx con 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)} @@ -12264,6 +12693,10 @@ func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.C 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)} @@ -12404,6 +12837,10 @@ func (m *awsAwsjson11_deserializeOpPutParameter) HandleDeserialize(ctx context.C 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)} @@ -12553,6 +12990,10 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont 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)} @@ -12678,6 +13119,10 @@ func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeseriali 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)} @@ -12791,6 +13236,10 @@ func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDes 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)} @@ -12910,6 +13359,10 @@ func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDe 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)} @@ -13026,6 +13479,10 @@ func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDese 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)} @@ -13145,6 +13602,10 @@ func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) HandleDeserialize(ctx 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)} @@ -13261,6 +13722,10 @@ func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx co 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)} @@ -13374,6 +13839,10 @@ func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context. 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)} @@ -13484,6 +13953,10 @@ func (m *awsAwsjson11_deserializeOpSendAutomationSignal) HandleDeserialize(ctx c 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)} @@ -13600,6 +14073,10 @@ func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Co 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)} @@ -13737,6 +14214,10 @@ func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx 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)} @@ -13847,6 +14328,10 @@ func (m *awsAwsjson11_deserializeOpStartAutomationExecution) HandleDeserialize(c 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)} @@ -13972,6 +14457,10 @@ func (m *awsAwsjson11_deserializeOpStartChangeRequestExecution) HandleDeserializ 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)} @@ -14097,6 +14586,10 @@ func (m *awsAwsjson11_deserializeOpStartSession) HandleDeserialize(ctx context.C 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)} @@ -14210,6 +14703,10 @@ func (m *awsAwsjson11_deserializeOpStopAutomationExecution) HandleDeserialize(ct 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)} @@ -14323,6 +14820,10 @@ func (m *awsAwsjson11_deserializeOpTerminateSession) HandleDeserialize(ctx conte 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)} @@ -14430,6 +14931,10 @@ func (m *awsAwsjson11_deserializeOpUnlabelParameterVersion) HandleDeserialize(ct 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)} @@ -14546,6 +15051,10 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociation) HandleDeserialize(ctx cont 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)} @@ -14689,6 +15198,10 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociationStatus) HandleDeserialize(ct 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)} @@ -14811,6 +15324,10 @@ func (m *awsAwsjson11_deserializeOpUpdateDocument) HandleDeserialize(ctx context 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)} @@ -14945,6 +15462,10 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) HandleDeseriali 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)} @@ -15061,6 +15582,10 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentMetadata) HandleDeserialize(ctx 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)} @@ -15177,6 +15702,10 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindow) HandleDeserialize(ct 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)} @@ -15287,6 +15816,10 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget) HandleDeserial 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)} @@ -15397,6 +15930,10 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) HandleDeserializ 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)} @@ -15507,6 +16044,10 @@ func (m *awsAwsjson11_deserializeOpUpdateManagedInstanceRole) HandleDeserialize( 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)} @@ -15617,6 +16158,10 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsItem) HandleDeserialize(ctx context. 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)} @@ -15742,6 +16287,10 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsMetadata) HandleDeserialize(ctx cont 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)} @@ -15861,6 +16410,10 @@ func (m *awsAwsjson11_deserializeOpUpdatePatchBaseline) HandleDeserialize(ctx co 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)} @@ -15971,6 +16524,10 @@ func (m *awsAwsjson11_deserializeOpUpdateResourceDataSync) HandleDeserialize(ctx 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)} @@ -16087,6 +16644,10 @@ func (m *awsAwsjson11_deserializeOpUpdateServiceSetting) HandleDeserialize(ctx c 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)} @@ -21392,7 +21953,7 @@ func awsAwsjson11_deserializeDocumentAlreadyExistsException(v **types.AlreadyExi for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -21967,7 +22528,7 @@ func awsAwsjson11_deserializeDocumentAssociationDoesNotExist(v **types.Associati for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -22134,7 +22695,7 @@ func awsAwsjson11_deserializeDocumentAssociationExecutionDoesNotExist(v **types. for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -22792,7 +23353,7 @@ func awsAwsjson11_deserializeDocumentAssociationVersionLimitExceeded(v **types.A for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -23054,7 +23615,7 @@ func awsAwsjson11_deserializeDocumentAutomationDefinitionNotApprovedException(v for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -23094,7 +23655,7 @@ func awsAwsjson11_deserializeDocumentAutomationDefinitionNotFoundException(v **t for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -23134,7 +23695,7 @@ func awsAwsjson11_deserializeDocumentAutomationDefinitionVersionNotFoundExceptio for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -23424,6 +23985,15 @@ func awsAwsjson11_deserializeDocumentAutomationExecution(v **types.AutomationExe return err } + case "TargetLocationsURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetLocationsURL to be of type string, got %T instead", value) + } + sv.TargetLocationsURL = ptr.String(jtv) + } + case "TargetMaps": if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { return err @@ -23484,7 +24054,7 @@ func awsAwsjson11_deserializeDocumentAutomationExecutionLimitExceededException(v for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -23763,6 +24333,15 @@ func awsAwsjson11_deserializeDocumentAutomationExecutionMetadata(v **types.Autom sv.Target = ptr.String(jtv) } + case "TargetLocationsURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetLocationsURL to be of type string, got %T instead", value) + } + sv.TargetLocationsURL = ptr.String(jtv) + } + case "TargetMaps": if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { return err @@ -23852,7 +24431,7 @@ func awsAwsjson11_deserializeDocumentAutomationExecutionNotFoundException(v **ty for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -23962,7 +24541,7 @@ func awsAwsjson11_deserializeDocumentAutomationStepNotFoundException(v **types.A for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -25182,7 +25761,7 @@ func awsAwsjson11_deserializeDocumentComplianceTypeCountLimitExceededException(v for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -25462,7 +26041,7 @@ func awsAwsjson11_deserializeDocumentCustomSchemaCountLimitExceededException(v * for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -25502,7 +26081,7 @@ func awsAwsjson11_deserializeDocumentDocumentAlreadyExists(v **types.DocumentAlr for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -26071,7 +26650,7 @@ func awsAwsjson11_deserializeDocumentDocumentLimitExceeded(v **types.DocumentLim for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -26248,7 +26827,7 @@ func awsAwsjson11_deserializeDocumentDocumentPermissionLimit(v **types.DocumentP for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -26720,7 +27299,7 @@ func awsAwsjson11_deserializeDocumentDocumentVersionLimitExceeded(v **types.Docu for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -26794,7 +27373,7 @@ func awsAwsjson11_deserializeDocumentDoesNotExistException(v **types.DoesNotExis for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -26834,7 +27413,7 @@ func awsAwsjson11_deserializeDocumentDuplicateDocumentContent(v **types.Duplicat for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -26874,7 +27453,7 @@ func awsAwsjson11_deserializeDocumentDuplicateDocumentVersionName(v **types.Dupl for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -26998,6 +27577,42 @@ func awsAwsjson11_deserializeDocumentEffectivePatchList(v *[]types.EffectivePatc return nil } +func awsAwsjson11_deserializeDocumentExcludeAccounts(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExcludeAccount to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentFailedCreateAssociation(v **types.FailedCreateAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -27162,7 +27777,7 @@ func awsAwsjson11_deserializeDocumentFeatureNotAvailableException(v **types.Feat for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -27294,7 +27909,7 @@ func awsAwsjson11_deserializeDocumentHierarchyLevelLimitExceededException(v **ty for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -27334,7 +27949,7 @@ func awsAwsjson11_deserializeDocumentHierarchyTypeMismatchException(v **types.Hi for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -27374,7 +27989,7 @@ func awsAwsjson11_deserializeDocumentIdempotentParameterMismatch(v **types.Idemp for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -27414,7 +28029,7 @@ func awsAwsjson11_deserializeDocumentIncompatiblePolicyException(v **types.Incom for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -28894,7 +29509,7 @@ func awsAwsjson11_deserializeDocumentInternalServerError(v **types.InternalServe for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -28934,7 +29549,7 @@ func awsAwsjson11_deserializeDocumentInvalidActivation(v **types.InvalidActivati for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -28974,7 +29589,7 @@ func awsAwsjson11_deserializeDocumentInvalidActivationId(v **types.InvalidActiva for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29014,7 +29629,7 @@ func awsAwsjson11_deserializeDocumentInvalidAggregatorException(v **types.Invali for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29054,7 +29669,7 @@ func awsAwsjson11_deserializeDocumentInvalidAllowedPatternException(v **types.In for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29094,7 +29709,7 @@ func awsAwsjson11_deserializeDocumentInvalidAssociation(v **types.InvalidAssocia for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29134,7 +29749,7 @@ func awsAwsjson11_deserializeDocumentInvalidAssociationVersion(v **types.Invalid for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29174,7 +29789,7 @@ func awsAwsjson11_deserializeDocumentInvalidAutomationExecutionParametersExcepti for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29214,7 +29829,7 @@ func awsAwsjson11_deserializeDocumentInvalidAutomationSignalException(v **types. for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29254,7 +29869,7 @@ func awsAwsjson11_deserializeDocumentInvalidAutomationStatusUpdateException(v ** for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29325,7 +29940,7 @@ func awsAwsjson11_deserializeDocumentInvalidDeleteInventoryParametersException(v for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29365,7 +29980,7 @@ func awsAwsjson11_deserializeDocumentInvalidDeletionIdException(v **types.Invali for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29405,7 +30020,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocument(v **types.InvalidDocument, for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29445,7 +30060,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentContent(v **types.InvalidDoc for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29485,7 +30100,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentOperation(v **types.InvalidD for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29525,7 +30140,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentSchemaVersion(v **types.Inva for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29565,7 +30180,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentType(v **types.InvalidDocume for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29605,7 +30220,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentVersion(v **types.InvalidDoc for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29645,7 +30260,7 @@ func awsAwsjson11_deserializeDocumentInvalidFilter(v **types.InvalidFilter, valu for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29716,7 +30331,7 @@ func awsAwsjson11_deserializeDocumentInvalidFilterOption(v **types.InvalidFilter for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29756,7 +30371,7 @@ func awsAwsjson11_deserializeDocumentInvalidFilterValue(v **types.InvalidFilterV for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29796,7 +30411,7 @@ func awsAwsjson11_deserializeDocumentInvalidInstanceId(v **types.InvalidInstance for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29836,7 +30451,7 @@ func awsAwsjson11_deserializeDocumentInvalidInstanceInformationFilterValue(v **t for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29876,7 +30491,7 @@ func awsAwsjson11_deserializeDocumentInvalidInstancePropertyFilterValue(v **type for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29916,7 +30531,7 @@ func awsAwsjson11_deserializeDocumentInvalidInventoryGroupException(v **types.In for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29956,7 +30571,7 @@ func awsAwsjson11_deserializeDocumentInvalidInventoryItemContextException(v **ty for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29996,7 +30611,7 @@ func awsAwsjson11_deserializeDocumentInvalidInventoryRequestException(v **types. for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30036,7 +30651,7 @@ func awsAwsjson11_deserializeDocumentInvalidItemContentException(v **types.Inval for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30085,7 +30700,7 @@ func awsAwsjson11_deserializeDocumentInvalidKeyId(v **types.InvalidKeyId, value for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30125,7 +30740,7 @@ func awsAwsjson11_deserializeDocumentInvalidNextToken(v **types.InvalidNextToken for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30165,7 +30780,7 @@ func awsAwsjson11_deserializeDocumentInvalidNotificationConfig(v **types.Invalid for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30205,7 +30820,7 @@ func awsAwsjson11_deserializeDocumentInvalidOptionException(v **types.InvalidOpt for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30307,7 +30922,7 @@ func awsAwsjson11_deserializeDocumentInvalidParameters(v **types.InvalidParamete for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30347,7 +30962,7 @@ func awsAwsjson11_deserializeDocumentInvalidPermissionType(v **types.InvalidPerm for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30418,7 +31033,7 @@ func awsAwsjson11_deserializeDocumentInvalidPolicyAttributeException(v **types.I for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30458,7 +31073,7 @@ func awsAwsjson11_deserializeDocumentInvalidPolicyTypeException(v **types.Invali for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30560,7 +31175,7 @@ func awsAwsjson11_deserializeDocumentInvalidResultAttributeException(v **types.I for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30600,7 +31215,7 @@ func awsAwsjson11_deserializeDocumentInvalidRole(v **types.InvalidRole, value in for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30640,7 +31255,7 @@ func awsAwsjson11_deserializeDocumentInvalidSchedule(v **types.InvalidSchedule, for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30680,7 +31295,7 @@ func awsAwsjson11_deserializeDocumentInvalidTag(v **types.InvalidTag, value inte for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30720,7 +31335,7 @@ func awsAwsjson11_deserializeDocumentInvalidTarget(v **types.InvalidTarget, valu for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30760,7 +31375,7 @@ func awsAwsjson11_deserializeDocumentInvalidTargetMaps(v **types.InvalidTargetMa for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30800,7 +31415,7 @@ func awsAwsjson11_deserializeDocumentInvalidTypeNameException(v **types.InvalidT for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -30840,7 +31455,7 @@ func awsAwsjson11_deserializeDocumentInvalidUpdate(v **types.InvalidUpdate, valu for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -31645,7 +32260,7 @@ func awsAwsjson11_deserializeDocumentItemContentMismatchException(v **types.Item for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -31694,7 +32309,7 @@ func awsAwsjson11_deserializeDocumentItemSizeLimitExceededException(v **types.It for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -33366,7 +33981,7 @@ func awsAwsjson11_deserializeDocumentMalformedResourcePolicyDocumentException(v for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -33406,7 +34021,7 @@ func awsAwsjson11_deserializeDocumentMaxDocumentSizeExceeded(v **types.MaxDocume for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -34186,7 +34801,7 @@ func awsAwsjson11_deserializeDocumentOpsItemAccessDeniedException(v **types.OpsI for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -34226,7 +34841,7 @@ func awsAwsjson11_deserializeDocumentOpsItemAlreadyExistsException(v **types.Ops for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -34275,7 +34890,7 @@ func awsAwsjson11_deserializeDocumentOpsItemConflictException(v **types.OpsItemC for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -34535,7 +35150,7 @@ func awsAwsjson11_deserializeDocumentOpsItemInvalidParameterException(v **types. for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -34602,7 +35217,7 @@ func awsAwsjson11_deserializeDocumentOpsItemLimitExceededException(v **types.Ops sv.LimitType = ptr.String(jtv) } - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -34647,7 +35262,7 @@ func awsAwsjson11_deserializeDocumentOpsItemNotFoundException(v **types.OpsItemN for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -34832,7 +35447,7 @@ func awsAwsjson11_deserializeDocumentOpsItemRelatedItemAlreadyExistsException(v for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -34890,7 +35505,7 @@ func awsAwsjson11_deserializeDocumentOpsItemRelatedItemAssociationNotFoundExcept for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -35432,7 +36047,7 @@ func awsAwsjson11_deserializeDocumentOpsMetadataAlreadyExistsException(v **types for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -35472,7 +36087,7 @@ func awsAwsjson11_deserializeDocumentOpsMetadataInvalidArgumentException(v **typ for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -35512,7 +36127,7 @@ func awsAwsjson11_deserializeDocumentOpsMetadataKeyLimitExceededException(v **ty for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -35552,7 +36167,7 @@ func awsAwsjson11_deserializeDocumentOpsMetadataLimitExceededException(v **types for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -35626,7 +36241,7 @@ func awsAwsjson11_deserializeDocumentOpsMetadataNotFoundException(v **types.OpsM for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -35666,7 +36281,7 @@ func awsAwsjson11_deserializeDocumentOpsMetadataTooManyUpdatesException(v **type for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -35878,7 +36493,7 @@ func awsAwsjson11_deserializeDocumentParameterAlreadyExists(v **types.ParameterA for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -36197,7 +36812,7 @@ func awsAwsjson11_deserializeDocumentParameterLimitExceeded(v **types.ParameterL for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -36271,7 +36886,7 @@ func awsAwsjson11_deserializeDocumentParameterMaxVersionLimitExceeded(v **types. for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -36527,7 +37142,7 @@ func awsAwsjson11_deserializeDocumentParameterNotFound(v **types.ParameterNotFou for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -36567,7 +37182,7 @@ func awsAwsjson11_deserializeDocumentParameterPatternMismatchException(v **types for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -36711,7 +37326,7 @@ func awsAwsjson11_deserializeDocumentParameterVersionLabelLimitExceeded(v **type for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -36751,7 +37366,7 @@ func awsAwsjson11_deserializeDocumentParameterVersionNotFound(v **types.Paramete for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -38236,7 +38851,7 @@ func awsAwsjson11_deserializeDocumentPoliciesLimitExceededException(v **types.Po for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -38737,7 +39352,7 @@ func awsAwsjson11_deserializeDocumentResourceDataSyncConflictException(v **types for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -38777,7 +39392,7 @@ func awsAwsjson11_deserializeDocumentResourceDataSyncCountExceededException(v ** for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -38857,7 +39472,7 @@ func awsAwsjson11_deserializeDocumentResourceDataSyncInvalidConfigurationExcepti for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -39072,7 +39687,7 @@ func awsAwsjson11_deserializeDocumentResourceDataSyncNotFoundException(v **types for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -39398,7 +40013,7 @@ func awsAwsjson11_deserializeDocumentResourceInUseException(v **types.ResourceIn for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -39438,7 +40053,7 @@ func awsAwsjson11_deserializeDocumentResourceLimitExceededException(v **types.Re for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -39478,7 +40093,7 @@ func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.Resourc for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -39518,7 +40133,7 @@ func awsAwsjson11_deserializeDocumentResourcePolicyConflictException(v **types.R for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -39558,7 +40173,7 @@ func awsAwsjson11_deserializeDocumentResourcePolicyInvalidParameterException(v * for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -39625,7 +40240,7 @@ func awsAwsjson11_deserializeDocumentResourcePolicyLimitExceededException(v **ty sv.LimitType = ptr.String(jtv) } - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -39665,7 +40280,7 @@ func awsAwsjson11_deserializeDocumentResourcePolicyNotFoundException(v **types.R for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -40252,7 +40867,7 @@ func awsAwsjson11_deserializeDocumentServiceSettingNotFound(v **types.ServiceSet for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -40922,7 +41537,7 @@ func awsAwsjson11_deserializeDocumentSubTypeCountLimitExceededException(v **type for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41090,7 +41705,7 @@ func awsAwsjson11_deserializeDocumentTargetInUseException(v **types.TargetInUseE for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41135,6 +41750,11 @@ func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, va return err } + case "ExcludeAccounts": + if err := awsAwsjson11_deserializeDocumentExcludeAccounts(&sv.ExcludeAccounts, value); err != nil { + return err + } + case "ExecutionRoleName": if value != nil { jtv, ok := value.(string) @@ -41144,6 +41764,15 @@ func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, va sv.ExecutionRoleName = ptr.String(jtv) } + case "IncludeChildOrganizationUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildOrganizationUnits = jtv + } + case "Regions": if err := awsAwsjson11_deserializeDocumentRegions(&sv.Regions, value); err != nil { return err @@ -41172,6 +41801,29 @@ func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, va sv.TargetLocationMaxErrors = ptr.String(jtv) } + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TargetsMaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.TargetsMaxConcurrency = ptr.String(jtv) + } + + case "TargetsMaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.TargetsMaxErrors = ptr.String(jtv) + } + default: _, _ = key, value @@ -41339,7 +41991,7 @@ func awsAwsjson11_deserializeDocumentTargetNotConnected(v **types.TargetNotConne for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41516,7 +42168,7 @@ func awsAwsjson11_deserializeDocumentTooManyUpdates(v **types.TooManyUpdates, va for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41556,7 +42208,7 @@ func awsAwsjson11_deserializeDocumentTotalSizeLimitExceededException(v **types.T for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41596,7 +42248,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedCalendarException(v **types.Unsu for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41636,7 +42288,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedFeatureRequiredException(v **typ for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41676,7 +42328,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedInventoryItemContextException(v for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41725,7 +42377,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedInventorySchemaVersionException( for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41765,7 +42417,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedOperatingSystem(v **types.Unsupp for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41805,7 +42457,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedParameterType(v **types.Unsuppor for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -41845,7 +42497,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedPlatformType(v **types.Unsupport for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go index 71564d76..0fd09f7f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go @@ -16,6 +16,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -502,14 +503,13 @@ func (*resolveEndpointV2Middleware) ID() string { 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) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -520,11 +520,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + 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 } @@ -546,5 +551,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go index c9a0c5c5..21704ad1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go @@ -3,4 +3,4 @@ package ssm // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.52.4" +const goModuleVersion = "1.55.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go index 88f63256..dc18288a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go index ff77c5f0..5974a427 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go @@ -9,7 +9,9 @@ import ( 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" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -73,6 +72,9 @@ type Options struct { // 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 @@ -107,6 +109,9 @@ type Options struct { // 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. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go index e5adf5a2..eef889df 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -26,6 +27,10 @@ func (*awsAwsjson11_serializeOpAddTagsToResource) ID() string { func (m *awsAwsjson11_serializeOpAddTagsToResource) 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)} @@ -68,6 +73,8 @@ func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -81,6 +88,10 @@ func (*awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) ID() string { func (m *awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) 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)} @@ -123,6 +134,8 @@ func (m *awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -136,6 +149,10 @@ func (*awsAwsjson11_serializeOpCancelCommand) ID() string { func (m *awsAwsjson11_serializeOpCancelCommand) 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)} @@ -178,6 +195,8 @@ func (m *awsAwsjson11_serializeOpCancelCommand) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -191,6 +210,10 @@ func (*awsAwsjson11_serializeOpCancelMaintenanceWindowExecution) ID() string { func (m *awsAwsjson11_serializeOpCancelMaintenanceWindowExecution) 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)} @@ -233,6 +256,8 @@ func (m *awsAwsjson11_serializeOpCancelMaintenanceWindowExecution) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -246,6 +271,10 @@ func (*awsAwsjson11_serializeOpCreateActivation) ID() string { func (m *awsAwsjson11_serializeOpCreateActivation) 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)} @@ -288,6 +317,8 @@ func (m *awsAwsjson11_serializeOpCreateActivation) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -301,6 +332,10 @@ func (*awsAwsjson11_serializeOpCreateAssociation) ID() string { func (m *awsAwsjson11_serializeOpCreateAssociation) 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)} @@ -343,6 +378,8 @@ func (m *awsAwsjson11_serializeOpCreateAssociation) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -356,6 +393,10 @@ func (*awsAwsjson11_serializeOpCreateAssociationBatch) ID() string { func (m *awsAwsjson11_serializeOpCreateAssociationBatch) 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)} @@ -398,6 +439,8 @@ func (m *awsAwsjson11_serializeOpCreateAssociationBatch) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -411,6 +454,10 @@ func (*awsAwsjson11_serializeOpCreateDocument) ID() string { func (m *awsAwsjson11_serializeOpCreateDocument) 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)} @@ -453,6 +500,8 @@ func (m *awsAwsjson11_serializeOpCreateDocument) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -466,6 +515,10 @@ func (*awsAwsjson11_serializeOpCreateMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpCreateMaintenanceWindow) 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)} @@ -508,6 +561,8 @@ func (m *awsAwsjson11_serializeOpCreateMaintenanceWindow) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -521,6 +576,10 @@ func (*awsAwsjson11_serializeOpCreateOpsItem) ID() string { func (m *awsAwsjson11_serializeOpCreateOpsItem) 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)} @@ -563,6 +622,8 @@ func (m *awsAwsjson11_serializeOpCreateOpsItem) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -576,6 +637,10 @@ func (*awsAwsjson11_serializeOpCreateOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpCreateOpsMetadata) 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)} @@ -618,6 +683,8 @@ func (m *awsAwsjson11_serializeOpCreateOpsMetadata) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -631,6 +698,10 @@ func (*awsAwsjson11_serializeOpCreatePatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpCreatePatchBaseline) 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)} @@ -673,6 +744,8 @@ func (m *awsAwsjson11_serializeOpCreatePatchBaseline) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -686,6 +759,10 @@ func (*awsAwsjson11_serializeOpCreateResourceDataSync) ID() string { func (m *awsAwsjson11_serializeOpCreateResourceDataSync) 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)} @@ -728,6 +805,8 @@ func (m *awsAwsjson11_serializeOpCreateResourceDataSync) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -741,6 +820,10 @@ func (*awsAwsjson11_serializeOpDeleteActivation) ID() string { func (m *awsAwsjson11_serializeOpDeleteActivation) 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)} @@ -783,6 +866,8 @@ func (m *awsAwsjson11_serializeOpDeleteActivation) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -796,6 +881,10 @@ func (*awsAwsjson11_serializeOpDeleteAssociation) ID() string { func (m *awsAwsjson11_serializeOpDeleteAssociation) 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)} @@ -838,6 +927,8 @@ func (m *awsAwsjson11_serializeOpDeleteAssociation) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -851,6 +942,10 @@ func (*awsAwsjson11_serializeOpDeleteDocument) ID() string { func (m *awsAwsjson11_serializeOpDeleteDocument) 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)} @@ -893,6 +988,8 @@ func (m *awsAwsjson11_serializeOpDeleteDocument) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -906,6 +1003,10 @@ func (*awsAwsjson11_serializeOpDeleteInventory) ID() string { func (m *awsAwsjson11_serializeOpDeleteInventory) 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)} @@ -948,6 +1049,8 @@ func (m *awsAwsjson11_serializeOpDeleteInventory) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -961,6 +1064,10 @@ func (*awsAwsjson11_serializeOpDeleteMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpDeleteMaintenanceWindow) 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)} @@ -1003,6 +1110,8 @@ func (m *awsAwsjson11_serializeOpDeleteMaintenanceWindow) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1016,6 +1125,10 @@ func (*awsAwsjson11_serializeOpDeleteOpsItem) ID() string { func (m *awsAwsjson11_serializeOpDeleteOpsItem) 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)} @@ -1058,6 +1171,8 @@ func (m *awsAwsjson11_serializeOpDeleteOpsItem) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1071,6 +1186,10 @@ func (*awsAwsjson11_serializeOpDeleteOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpDeleteOpsMetadata) 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)} @@ -1113,6 +1232,8 @@ func (m *awsAwsjson11_serializeOpDeleteOpsMetadata) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1126,6 +1247,10 @@ func (*awsAwsjson11_serializeOpDeleteParameter) ID() string { func (m *awsAwsjson11_serializeOpDeleteParameter) 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)} @@ -1168,6 +1293,8 @@ func (m *awsAwsjson11_serializeOpDeleteParameter) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1181,6 +1308,10 @@ func (*awsAwsjson11_serializeOpDeleteParameters) ID() string { func (m *awsAwsjson11_serializeOpDeleteParameters) 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)} @@ -1223,6 +1354,8 @@ func (m *awsAwsjson11_serializeOpDeleteParameters) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1236,6 +1369,10 @@ func (*awsAwsjson11_serializeOpDeletePatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpDeletePatchBaseline) 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)} @@ -1278,6 +1415,8 @@ func (m *awsAwsjson11_serializeOpDeletePatchBaseline) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1291,6 +1430,10 @@ func (*awsAwsjson11_serializeOpDeleteResourceDataSync) ID() string { func (m *awsAwsjson11_serializeOpDeleteResourceDataSync) 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)} @@ -1333,6 +1476,8 @@ func (m *awsAwsjson11_serializeOpDeleteResourceDataSync) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1346,6 +1491,10 @@ func (*awsAwsjson11_serializeOpDeleteResourcePolicy) ID() string { func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) 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)} @@ -1388,6 +1537,8 @@ func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1401,6 +1552,10 @@ func (*awsAwsjson11_serializeOpDeregisterManagedInstance) ID() string { func (m *awsAwsjson11_serializeOpDeregisterManagedInstance) 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)} @@ -1443,6 +1598,8 @@ func (m *awsAwsjson11_serializeOpDeregisterManagedInstance) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1456,6 +1613,10 @@ func (*awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup) ID() string func (m *awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup) 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)} @@ -1498,6 +1659,8 @@ func (m *awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup) HandleSer } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1511,6 +1674,10 @@ func (*awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow) ID() strin func (m *awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow) 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)} @@ -1553,6 +1720,8 @@ func (m *awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow) HandleSe } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1566,6 +1735,10 @@ func (*awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow) ID() string func (m *awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow) 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)} @@ -1608,6 +1781,8 @@ func (m *awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1621,6 +1796,10 @@ func (*awsAwsjson11_serializeOpDescribeActivations) ID() string { func (m *awsAwsjson11_serializeOpDescribeActivations) 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)} @@ -1663,6 +1842,8 @@ func (m *awsAwsjson11_serializeOpDescribeActivations) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1676,6 +1857,10 @@ func (*awsAwsjson11_serializeOpDescribeAssociation) ID() string { func (m *awsAwsjson11_serializeOpDescribeAssociation) 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)} @@ -1718,6 +1903,8 @@ func (m *awsAwsjson11_serializeOpDescribeAssociation) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1731,6 +1918,10 @@ func (*awsAwsjson11_serializeOpDescribeAssociationExecutions) ID() string { func (m *awsAwsjson11_serializeOpDescribeAssociationExecutions) 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)} @@ -1773,6 +1964,8 @@ func (m *awsAwsjson11_serializeOpDescribeAssociationExecutions) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1786,6 +1979,10 @@ func (*awsAwsjson11_serializeOpDescribeAssociationExecutionTargets) ID() string func (m *awsAwsjson11_serializeOpDescribeAssociationExecutionTargets) 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)} @@ -1828,6 +2025,8 @@ func (m *awsAwsjson11_serializeOpDescribeAssociationExecutionTargets) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1841,6 +2040,10 @@ func (*awsAwsjson11_serializeOpDescribeAutomationExecutions) ID() string { func (m *awsAwsjson11_serializeOpDescribeAutomationExecutions) 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)} @@ -1883,6 +2086,8 @@ func (m *awsAwsjson11_serializeOpDescribeAutomationExecutions) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1896,6 +2101,10 @@ func (*awsAwsjson11_serializeOpDescribeAutomationStepExecutions) ID() string { func (m *awsAwsjson11_serializeOpDescribeAutomationStepExecutions) 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)} @@ -1938,6 +2147,8 @@ func (m *awsAwsjson11_serializeOpDescribeAutomationStepExecutions) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1951,6 +2162,10 @@ func (*awsAwsjson11_serializeOpDescribeAvailablePatches) ID() string { func (m *awsAwsjson11_serializeOpDescribeAvailablePatches) 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)} @@ -1993,6 +2208,8 @@ func (m *awsAwsjson11_serializeOpDescribeAvailablePatches) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2006,6 +2223,10 @@ func (*awsAwsjson11_serializeOpDescribeDocument) ID() string { func (m *awsAwsjson11_serializeOpDescribeDocument) 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)} @@ -2048,6 +2269,8 @@ func (m *awsAwsjson11_serializeOpDescribeDocument) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2061,6 +2284,10 @@ func (*awsAwsjson11_serializeOpDescribeDocumentPermission) ID() string { func (m *awsAwsjson11_serializeOpDescribeDocumentPermission) 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)} @@ -2103,6 +2330,8 @@ func (m *awsAwsjson11_serializeOpDescribeDocumentPermission) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2116,6 +2345,10 @@ func (*awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations) ID() strin func (m *awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations) 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)} @@ -2158,6 +2391,8 @@ func (m *awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations) HandleSe } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2171,6 +2406,10 @@ func (*awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline) ID() st func (m *awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline) 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)} @@ -2213,6 +2452,8 @@ func (m *awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline) Handl } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2226,6 +2467,10 @@ func (*awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus) 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)} @@ -2268,6 +2513,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus) HandleSeria } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2281,6 +2528,10 @@ func (*awsAwsjson11_serializeOpDescribeInstanceInformation) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstanceInformation) 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)} @@ -2323,6 +2574,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstanceInformation) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2336,6 +2589,10 @@ func (*awsAwsjson11_serializeOpDescribeInstancePatches) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstancePatches) 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)} @@ -2378,6 +2635,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatches) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2391,6 +2650,10 @@ func (*awsAwsjson11_serializeOpDescribeInstancePatchStates) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstancePatchStates) 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)} @@ -2433,6 +2696,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatchStates) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2446,6 +2711,10 @@ func (*awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) ID() st func (m *awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) 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)} @@ -2488,6 +2757,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) Handl } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2501,6 +2772,10 @@ func (*awsAwsjson11_serializeOpDescribeInstanceProperties) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstanceProperties) 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)} @@ -2543,6 +2818,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstanceProperties) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2556,6 +2833,10 @@ func (*awsAwsjson11_serializeOpDescribeInventoryDeletions) ID() string { func (m *awsAwsjson11_serializeOpDescribeInventoryDeletions) 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)} @@ -2598,6 +2879,8 @@ func (m *awsAwsjson11_serializeOpDescribeInventoryDeletions) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2611,6 +2894,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions) ID() string func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions) 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)} @@ -2653,6 +2940,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2666,6 +2955,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocations func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocations) 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)} @@ -2708,6 +3001,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocatio } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2721,6 +3016,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks) ID() str func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks) 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)} @@ -2763,6 +3062,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks) Handle } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2776,6 +3077,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindows) ID() string { func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindows) 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)} @@ -2818,6 +3123,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindows) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2831,6 +3138,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule) ID() string { func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule) 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)} @@ -2873,6 +3184,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2886,6 +3199,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget) ID() string func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget) 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)} @@ -2928,6 +3245,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2941,6 +3260,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets) ID() string { func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets) 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)} @@ -2983,6 +3306,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2996,6 +3321,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks) ID() string { func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks) 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)} @@ -3038,6 +3367,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3051,6 +3382,10 @@ func (*awsAwsjson11_serializeOpDescribeOpsItems) ID() string { func (m *awsAwsjson11_serializeOpDescribeOpsItems) 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)} @@ -3093,6 +3428,8 @@ func (m *awsAwsjson11_serializeOpDescribeOpsItems) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3106,6 +3443,10 @@ func (*awsAwsjson11_serializeOpDescribeParameters) ID() string { func (m *awsAwsjson11_serializeOpDescribeParameters) 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)} @@ -3148,6 +3489,8 @@ func (m *awsAwsjson11_serializeOpDescribeParameters) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3161,6 +3504,10 @@ func (*awsAwsjson11_serializeOpDescribePatchBaselines) ID() string { func (m *awsAwsjson11_serializeOpDescribePatchBaselines) 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)} @@ -3203,6 +3550,8 @@ func (m *awsAwsjson11_serializeOpDescribePatchBaselines) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3216,6 +3565,10 @@ func (*awsAwsjson11_serializeOpDescribePatchGroups) ID() string { func (m *awsAwsjson11_serializeOpDescribePatchGroups) 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)} @@ -3258,6 +3611,8 @@ func (m *awsAwsjson11_serializeOpDescribePatchGroups) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3271,6 +3626,10 @@ func (*awsAwsjson11_serializeOpDescribePatchGroupState) ID() string { func (m *awsAwsjson11_serializeOpDescribePatchGroupState) 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)} @@ -3313,6 +3672,8 @@ func (m *awsAwsjson11_serializeOpDescribePatchGroupState) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3326,6 +3687,10 @@ func (*awsAwsjson11_serializeOpDescribePatchProperties) ID() string { func (m *awsAwsjson11_serializeOpDescribePatchProperties) 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)} @@ -3368,6 +3733,8 @@ func (m *awsAwsjson11_serializeOpDescribePatchProperties) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3381,6 +3748,10 @@ func (*awsAwsjson11_serializeOpDescribeSessions) ID() string { func (m *awsAwsjson11_serializeOpDescribeSessions) 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)} @@ -3423,6 +3794,8 @@ func (m *awsAwsjson11_serializeOpDescribeSessions) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3436,6 +3809,10 @@ func (*awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) ID() string { func (m *awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) 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)} @@ -3478,6 +3855,8 @@ func (m *awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3491,6 +3870,10 @@ func (*awsAwsjson11_serializeOpGetAutomationExecution) ID() string { func (m *awsAwsjson11_serializeOpGetAutomationExecution) 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)} @@ -3533,6 +3916,8 @@ func (m *awsAwsjson11_serializeOpGetAutomationExecution) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3546,6 +3931,10 @@ func (*awsAwsjson11_serializeOpGetCalendarState) ID() string { func (m *awsAwsjson11_serializeOpGetCalendarState) 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)} @@ -3588,6 +3977,8 @@ func (m *awsAwsjson11_serializeOpGetCalendarState) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3601,6 +3992,10 @@ func (*awsAwsjson11_serializeOpGetCommandInvocation) ID() string { func (m *awsAwsjson11_serializeOpGetCommandInvocation) 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)} @@ -3643,6 +4038,8 @@ func (m *awsAwsjson11_serializeOpGetCommandInvocation) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3656,6 +4053,10 @@ func (*awsAwsjson11_serializeOpGetConnectionStatus) ID() string { func (m *awsAwsjson11_serializeOpGetConnectionStatus) 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)} @@ -3698,6 +4099,8 @@ func (m *awsAwsjson11_serializeOpGetConnectionStatus) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3711,6 +4114,10 @@ func (*awsAwsjson11_serializeOpGetDefaultPatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpGetDefaultPatchBaseline) 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)} @@ -3753,6 +4160,8 @@ func (m *awsAwsjson11_serializeOpGetDefaultPatchBaseline) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3766,6 +4175,10 @@ func (*awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance) ID() strin func (m *awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance) 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)} @@ -3808,6 +4221,8 @@ func (m *awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance) HandleSe } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3821,6 +4236,10 @@ func (*awsAwsjson11_serializeOpGetDocument) ID() string { func (m *awsAwsjson11_serializeOpGetDocument) 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)} @@ -3863,6 +4282,8 @@ func (m *awsAwsjson11_serializeOpGetDocument) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3876,6 +4297,10 @@ func (*awsAwsjson11_serializeOpGetInventory) ID() string { func (m *awsAwsjson11_serializeOpGetInventory) 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)} @@ -3918,6 +4343,8 @@ func (m *awsAwsjson11_serializeOpGetInventory) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3931,6 +4358,10 @@ func (*awsAwsjson11_serializeOpGetInventorySchema) ID() string { func (m *awsAwsjson11_serializeOpGetInventorySchema) 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)} @@ -3973,6 +4404,8 @@ func (m *awsAwsjson11_serializeOpGetInventorySchema) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3986,6 +4419,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpGetMaintenanceWindow) 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)} @@ -4028,6 +4465,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindow) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4041,6 +4480,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindowExecution) ID() string { func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecution) 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)} @@ -4083,6 +4526,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecution) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4096,6 +4541,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask) ID() string { func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask) 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)} @@ -4138,6 +4587,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4151,6 +4602,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation) ID() func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation) 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)} @@ -4193,6 +4648,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation) Ha } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4206,6 +4663,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindowTask) ID() string { func (m *awsAwsjson11_serializeOpGetMaintenanceWindowTask) 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)} @@ -4248,6 +4709,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowTask) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4261,6 +4724,10 @@ func (*awsAwsjson11_serializeOpGetOpsItem) ID() string { func (m *awsAwsjson11_serializeOpGetOpsItem) 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)} @@ -4303,6 +4770,8 @@ func (m *awsAwsjson11_serializeOpGetOpsItem) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4316,6 +4785,10 @@ func (*awsAwsjson11_serializeOpGetOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpGetOpsMetadata) 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)} @@ -4358,6 +4831,8 @@ func (m *awsAwsjson11_serializeOpGetOpsMetadata) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4371,6 +4846,10 @@ func (*awsAwsjson11_serializeOpGetOpsSummary) ID() string { func (m *awsAwsjson11_serializeOpGetOpsSummary) 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)} @@ -4413,6 +4892,8 @@ func (m *awsAwsjson11_serializeOpGetOpsSummary) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4426,6 +4907,10 @@ func (*awsAwsjson11_serializeOpGetParameter) ID() string { func (m *awsAwsjson11_serializeOpGetParameter) 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)} @@ -4468,6 +4953,8 @@ func (m *awsAwsjson11_serializeOpGetParameter) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4481,6 +4968,10 @@ func (*awsAwsjson11_serializeOpGetParameterHistory) ID() string { func (m *awsAwsjson11_serializeOpGetParameterHistory) 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)} @@ -4523,6 +5014,8 @@ func (m *awsAwsjson11_serializeOpGetParameterHistory) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4536,6 +5029,10 @@ func (*awsAwsjson11_serializeOpGetParameters) ID() string { func (m *awsAwsjson11_serializeOpGetParameters) 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)} @@ -4578,6 +5075,8 @@ func (m *awsAwsjson11_serializeOpGetParameters) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4591,6 +5090,10 @@ func (*awsAwsjson11_serializeOpGetParametersByPath) ID() string { func (m *awsAwsjson11_serializeOpGetParametersByPath) 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)} @@ -4633,6 +5136,8 @@ func (m *awsAwsjson11_serializeOpGetParametersByPath) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4646,6 +5151,10 @@ func (*awsAwsjson11_serializeOpGetPatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpGetPatchBaseline) 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)} @@ -4688,6 +5197,8 @@ func (m *awsAwsjson11_serializeOpGetPatchBaseline) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4701,6 +5212,10 @@ func (*awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) ID() string { func (m *awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) 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)} @@ -4743,6 +5258,8 @@ func (m *awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4756,6 +5273,10 @@ func (*awsAwsjson11_serializeOpGetResourcePolicies) ID() string { func (m *awsAwsjson11_serializeOpGetResourcePolicies) 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)} @@ -4798,6 +5319,8 @@ func (m *awsAwsjson11_serializeOpGetResourcePolicies) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4811,6 +5334,10 @@ func (*awsAwsjson11_serializeOpGetServiceSetting) ID() string { func (m *awsAwsjson11_serializeOpGetServiceSetting) 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)} @@ -4853,6 +5380,8 @@ func (m *awsAwsjson11_serializeOpGetServiceSetting) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4866,6 +5395,10 @@ func (*awsAwsjson11_serializeOpLabelParameterVersion) ID() string { func (m *awsAwsjson11_serializeOpLabelParameterVersion) 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)} @@ -4908,6 +5441,8 @@ func (m *awsAwsjson11_serializeOpLabelParameterVersion) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4921,6 +5456,10 @@ func (*awsAwsjson11_serializeOpListAssociations) ID() string { func (m *awsAwsjson11_serializeOpListAssociations) 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)} @@ -4963,6 +5502,8 @@ func (m *awsAwsjson11_serializeOpListAssociations) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4976,6 +5517,10 @@ func (*awsAwsjson11_serializeOpListAssociationVersions) ID() string { func (m *awsAwsjson11_serializeOpListAssociationVersions) 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)} @@ -5018,6 +5563,8 @@ func (m *awsAwsjson11_serializeOpListAssociationVersions) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5031,6 +5578,10 @@ func (*awsAwsjson11_serializeOpListCommandInvocations) ID() string { func (m *awsAwsjson11_serializeOpListCommandInvocations) 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)} @@ -5073,6 +5624,8 @@ func (m *awsAwsjson11_serializeOpListCommandInvocations) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5086,6 +5639,10 @@ func (*awsAwsjson11_serializeOpListCommands) ID() string { func (m *awsAwsjson11_serializeOpListCommands) 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)} @@ -5128,6 +5685,8 @@ func (m *awsAwsjson11_serializeOpListCommands) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5141,6 +5700,10 @@ func (*awsAwsjson11_serializeOpListComplianceItems) ID() string { func (m *awsAwsjson11_serializeOpListComplianceItems) 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)} @@ -5183,6 +5746,8 @@ func (m *awsAwsjson11_serializeOpListComplianceItems) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5196,6 +5761,10 @@ func (*awsAwsjson11_serializeOpListComplianceSummaries) ID() string { func (m *awsAwsjson11_serializeOpListComplianceSummaries) 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)} @@ -5238,6 +5807,8 @@ func (m *awsAwsjson11_serializeOpListComplianceSummaries) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5251,6 +5822,10 @@ func (*awsAwsjson11_serializeOpListDocumentMetadataHistory) ID() string { func (m *awsAwsjson11_serializeOpListDocumentMetadataHistory) 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)} @@ -5293,6 +5868,8 @@ func (m *awsAwsjson11_serializeOpListDocumentMetadataHistory) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5306,6 +5883,10 @@ func (*awsAwsjson11_serializeOpListDocuments) ID() string { func (m *awsAwsjson11_serializeOpListDocuments) 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)} @@ -5348,6 +5929,8 @@ func (m *awsAwsjson11_serializeOpListDocuments) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5361,6 +5944,10 @@ func (*awsAwsjson11_serializeOpListDocumentVersions) ID() string { func (m *awsAwsjson11_serializeOpListDocumentVersions) 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)} @@ -5403,6 +5990,8 @@ func (m *awsAwsjson11_serializeOpListDocumentVersions) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5416,6 +6005,10 @@ func (*awsAwsjson11_serializeOpListInventoryEntries) ID() string { func (m *awsAwsjson11_serializeOpListInventoryEntries) 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)} @@ -5458,6 +6051,8 @@ func (m *awsAwsjson11_serializeOpListInventoryEntries) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5471,6 +6066,10 @@ func (*awsAwsjson11_serializeOpListOpsItemEvents) ID() string { func (m *awsAwsjson11_serializeOpListOpsItemEvents) 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)} @@ -5513,6 +6112,8 @@ func (m *awsAwsjson11_serializeOpListOpsItemEvents) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5526,6 +6127,10 @@ func (*awsAwsjson11_serializeOpListOpsItemRelatedItems) ID() string { func (m *awsAwsjson11_serializeOpListOpsItemRelatedItems) 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)} @@ -5568,6 +6173,8 @@ func (m *awsAwsjson11_serializeOpListOpsItemRelatedItems) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5581,6 +6188,10 @@ func (*awsAwsjson11_serializeOpListOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpListOpsMetadata) 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)} @@ -5623,6 +6234,8 @@ func (m *awsAwsjson11_serializeOpListOpsMetadata) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5636,6 +6249,10 @@ func (*awsAwsjson11_serializeOpListResourceComplianceSummaries) ID() string { func (m *awsAwsjson11_serializeOpListResourceComplianceSummaries) 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)} @@ -5678,6 +6295,8 @@ func (m *awsAwsjson11_serializeOpListResourceComplianceSummaries) HandleSerializ } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5691,6 +6310,10 @@ func (*awsAwsjson11_serializeOpListResourceDataSync) ID() string { func (m *awsAwsjson11_serializeOpListResourceDataSync) 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)} @@ -5733,6 +6356,8 @@ func (m *awsAwsjson11_serializeOpListResourceDataSync) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5746,6 +6371,10 @@ func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { func (m *awsAwsjson11_serializeOpListTagsForResource) 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)} @@ -5788,6 +6417,8 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5801,6 +6432,10 @@ func (*awsAwsjson11_serializeOpModifyDocumentPermission) ID() string { func (m *awsAwsjson11_serializeOpModifyDocumentPermission) 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)} @@ -5843,6 +6478,8 @@ func (m *awsAwsjson11_serializeOpModifyDocumentPermission) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5856,6 +6493,10 @@ func (*awsAwsjson11_serializeOpPutComplianceItems) ID() string { func (m *awsAwsjson11_serializeOpPutComplianceItems) 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)} @@ -5898,6 +6539,8 @@ func (m *awsAwsjson11_serializeOpPutComplianceItems) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5911,6 +6554,10 @@ func (*awsAwsjson11_serializeOpPutInventory) ID() string { func (m *awsAwsjson11_serializeOpPutInventory) 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)} @@ -5953,6 +6600,8 @@ func (m *awsAwsjson11_serializeOpPutInventory) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5966,6 +6615,10 @@ func (*awsAwsjson11_serializeOpPutParameter) ID() string { func (m *awsAwsjson11_serializeOpPutParameter) 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)} @@ -6008,6 +6661,8 @@ func (m *awsAwsjson11_serializeOpPutParameter) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6021,6 +6676,10 @@ func (*awsAwsjson11_serializeOpPutResourcePolicy) ID() string { func (m *awsAwsjson11_serializeOpPutResourcePolicy) 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)} @@ -6063,6 +6722,8 @@ func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6076,6 +6737,10 @@ func (*awsAwsjson11_serializeOpRegisterDefaultPatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpRegisterDefaultPatchBaseline) 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)} @@ -6118,6 +6783,8 @@ func (m *awsAwsjson11_serializeOpRegisterDefaultPatchBaseline) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6131,6 +6798,10 @@ func (*awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup) ID() string { func (m *awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup) 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)} @@ -6173,6 +6844,8 @@ func (m *awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup) HandleSeria } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6186,6 +6859,10 @@ func (*awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow) ID() string func (m *awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow) 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)} @@ -6228,6 +6905,8 @@ func (m *awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6241,6 +6920,10 @@ func (*awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow) 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)} @@ -6283,6 +6966,8 @@ func (m *awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6296,6 +6981,10 @@ func (*awsAwsjson11_serializeOpRemoveTagsFromResource) ID() string { func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) 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)} @@ -6338,6 +7027,8 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6351,6 +7042,10 @@ func (*awsAwsjson11_serializeOpResetServiceSetting) ID() string { func (m *awsAwsjson11_serializeOpResetServiceSetting) 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)} @@ -6393,6 +7088,8 @@ func (m *awsAwsjson11_serializeOpResetServiceSetting) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6406,6 +7103,10 @@ func (*awsAwsjson11_serializeOpResumeSession) ID() string { func (m *awsAwsjson11_serializeOpResumeSession) 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)} @@ -6448,6 +7149,8 @@ func (m *awsAwsjson11_serializeOpResumeSession) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6461,6 +7164,10 @@ func (*awsAwsjson11_serializeOpSendAutomationSignal) ID() string { func (m *awsAwsjson11_serializeOpSendAutomationSignal) 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)} @@ -6503,6 +7210,8 @@ func (m *awsAwsjson11_serializeOpSendAutomationSignal) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6516,6 +7225,10 @@ func (*awsAwsjson11_serializeOpSendCommand) ID() string { func (m *awsAwsjson11_serializeOpSendCommand) 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)} @@ -6558,6 +7271,8 @@ func (m *awsAwsjson11_serializeOpSendCommand) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6571,6 +7286,10 @@ func (*awsAwsjson11_serializeOpStartAssociationsOnce) ID() string { func (m *awsAwsjson11_serializeOpStartAssociationsOnce) 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)} @@ -6613,6 +7332,8 @@ func (m *awsAwsjson11_serializeOpStartAssociationsOnce) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6626,6 +7347,10 @@ func (*awsAwsjson11_serializeOpStartAutomationExecution) ID() string { func (m *awsAwsjson11_serializeOpStartAutomationExecution) 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)} @@ -6668,6 +7393,8 @@ func (m *awsAwsjson11_serializeOpStartAutomationExecution) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6681,6 +7408,10 @@ func (*awsAwsjson11_serializeOpStartChangeRequestExecution) ID() string { func (m *awsAwsjson11_serializeOpStartChangeRequestExecution) 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)} @@ -6723,6 +7454,8 @@ func (m *awsAwsjson11_serializeOpStartChangeRequestExecution) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6736,6 +7469,10 @@ func (*awsAwsjson11_serializeOpStartSession) ID() string { func (m *awsAwsjson11_serializeOpStartSession) 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)} @@ -6778,6 +7515,8 @@ func (m *awsAwsjson11_serializeOpStartSession) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6791,6 +7530,10 @@ func (*awsAwsjson11_serializeOpStopAutomationExecution) ID() string { func (m *awsAwsjson11_serializeOpStopAutomationExecution) 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)} @@ -6833,6 +7576,8 @@ func (m *awsAwsjson11_serializeOpStopAutomationExecution) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6846,6 +7591,10 @@ func (*awsAwsjson11_serializeOpTerminateSession) ID() string { func (m *awsAwsjson11_serializeOpTerminateSession) 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)} @@ -6888,6 +7637,8 @@ func (m *awsAwsjson11_serializeOpTerminateSession) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6901,6 +7652,10 @@ func (*awsAwsjson11_serializeOpUnlabelParameterVersion) ID() string { func (m *awsAwsjson11_serializeOpUnlabelParameterVersion) 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)} @@ -6943,6 +7698,8 @@ func (m *awsAwsjson11_serializeOpUnlabelParameterVersion) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6956,6 +7713,10 @@ func (*awsAwsjson11_serializeOpUpdateAssociation) ID() string { func (m *awsAwsjson11_serializeOpUpdateAssociation) 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)} @@ -6998,6 +7759,8 @@ func (m *awsAwsjson11_serializeOpUpdateAssociation) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7011,6 +7774,10 @@ func (*awsAwsjson11_serializeOpUpdateAssociationStatus) ID() string { func (m *awsAwsjson11_serializeOpUpdateAssociationStatus) 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)} @@ -7053,6 +7820,8 @@ func (m *awsAwsjson11_serializeOpUpdateAssociationStatus) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7066,6 +7835,10 @@ func (*awsAwsjson11_serializeOpUpdateDocument) ID() string { func (m *awsAwsjson11_serializeOpUpdateDocument) 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)} @@ -7108,6 +7881,8 @@ func (m *awsAwsjson11_serializeOpUpdateDocument) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7121,6 +7896,10 @@ func (*awsAwsjson11_serializeOpUpdateDocumentDefaultVersion) ID() string { func (m *awsAwsjson11_serializeOpUpdateDocumentDefaultVersion) 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)} @@ -7163,6 +7942,8 @@ func (m *awsAwsjson11_serializeOpUpdateDocumentDefaultVersion) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7176,6 +7957,10 @@ func (*awsAwsjson11_serializeOpUpdateDocumentMetadata) ID() string { func (m *awsAwsjson11_serializeOpUpdateDocumentMetadata) 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)} @@ -7218,6 +8003,8 @@ func (m *awsAwsjson11_serializeOpUpdateDocumentMetadata) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7231,6 +8018,10 @@ func (*awsAwsjson11_serializeOpUpdateMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindow) 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)} @@ -7273,6 +8064,8 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindow) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7286,6 +8079,10 @@ func (*awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget) ID() string { func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget) 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)} @@ -7328,6 +8125,8 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7341,6 +8140,10 @@ func (*awsAwsjson11_serializeOpUpdateMaintenanceWindowTask) ID() string { func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTask) 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)} @@ -7383,6 +8186,8 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTask) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7396,6 +8201,10 @@ func (*awsAwsjson11_serializeOpUpdateManagedInstanceRole) ID() string { func (m *awsAwsjson11_serializeOpUpdateManagedInstanceRole) 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)} @@ -7438,6 +8247,8 @@ func (m *awsAwsjson11_serializeOpUpdateManagedInstanceRole) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7451,6 +8262,10 @@ func (*awsAwsjson11_serializeOpUpdateOpsItem) ID() string { func (m *awsAwsjson11_serializeOpUpdateOpsItem) 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)} @@ -7493,6 +8308,8 @@ func (m *awsAwsjson11_serializeOpUpdateOpsItem) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7506,6 +8323,10 @@ func (*awsAwsjson11_serializeOpUpdateOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpUpdateOpsMetadata) 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)} @@ -7548,6 +8369,8 @@ func (m *awsAwsjson11_serializeOpUpdateOpsMetadata) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7561,6 +8384,10 @@ func (*awsAwsjson11_serializeOpUpdatePatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpUpdatePatchBaseline) 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)} @@ -7603,6 +8430,8 @@ func (m *awsAwsjson11_serializeOpUpdatePatchBaseline) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7616,6 +8445,10 @@ func (*awsAwsjson11_serializeOpUpdateResourceDataSync) ID() string { func (m *awsAwsjson11_serializeOpUpdateResourceDataSync) 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)} @@ -7658,6 +8491,8 @@ func (m *awsAwsjson11_serializeOpUpdateResourceDataSync) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7671,6 +8506,10 @@ func (*awsAwsjson11_serializeOpUpdateServiceSetting) ID() string { func (m *awsAwsjson11_serializeOpUpdateServiceSetting) 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)} @@ -7713,6 +8552,8 @@ func (m *awsAwsjson11_serializeOpUpdateServiceSetting) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentAccountIdList(v []string, value smithyjson.Value) error { @@ -8630,6 +9471,17 @@ func awsAwsjson11_serializeDocumentDocumentReviews(v *types.DocumentReviews, val return nil } +func awsAwsjson11_serializeDocumentExcludeAccounts(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson11_serializeDocumentInstanceAssociationOutputLocation(v *types.InstanceAssociationOutputLocation, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10670,11 +11522,23 @@ func awsAwsjson11_serializeDocumentTargetLocation(v *types.TargetLocation, value } } + if v.ExcludeAccounts != nil { + ok := object.Key("ExcludeAccounts") + if err := awsAwsjson11_serializeDocumentExcludeAccounts(v.ExcludeAccounts, ok); err != nil { + return err + } + } + if v.ExecutionRoleName != nil { ok := object.Key("ExecutionRoleName") ok.String(*v.ExecutionRoleName) } + if v.IncludeChildOrganizationUnits { + ok := object.Key("IncludeChildOrganizationUnits") + ok.Boolean(v.IncludeChildOrganizationUnits) + } + if v.Regions != nil { ok := object.Key("Regions") if err := awsAwsjson11_serializeDocumentRegions(v.Regions, ok); err != nil { @@ -10699,6 +11563,23 @@ func awsAwsjson11_serializeDocumentTargetLocation(v *types.TargetLocation, value ok.String(*v.TargetLocationMaxErrors) } + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.TargetsMaxConcurrency != nil { + ok := object.Key("TargetsMaxConcurrency") + ok.String(*v.TargetsMaxConcurrency) + } + + if v.TargetsMaxErrors != nil { + ok := object.Key("TargetsMaxErrors") + ok.String(*v.TargetsMaxErrors) + } + return nil } @@ -14216,6 +15097,11 @@ func awsAwsjson11_serializeOpDocumentStartAutomationExecutionInput(v *StartAutom } } + if v.TargetLocationsURL != nil { + ok := object.Key("TargetLocationsURL") + ok.String(*v.TargetLocationsURL) + } + if v.TargetMaps != nil { ok := object.Key("TargetMaps") if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go index f7d8d80f..77c2c194 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go @@ -3383,11 +3383,11 @@ func (e *TargetInUseException) ErrorCode() string { func (e *TargetInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified target managed node for the session isn't fully configured for -// use with Session Manager. For more information, see [Getting started with Session Manager]in the Amazon Web Services +// use with Session Manager. For more information, see [Setting up Session Manager]in the Amazon Web Services // Systems Manager User Guide. This error is also returned if you attempt to start // a session on a managed node that is located in a different account or Region // -// [Getting started with Session Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html +// [Setting up Session Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html type TargetNotConnected struct { Message *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go index 7da3ad4c..bec5f3e1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go @@ -635,11 +635,11 @@ type AttachmentsSource struct { // // - For the key SourceUrl, the value is an S3 bucket location. For example: // - // "Values": [ "s3://doc-example-bucket/my-folder" ] + // "Values": [ "s3://amzn-s3-demo-bucket/my-prefix" ] // // - For the key S3FileUrl, the value is a file in an S3 bucket. For example: // - // "Values": [ "s3://doc-example-bucket/my-folder/my-file.py" ] + // "Values": [ "s3://amzn-s3-demo-bucket/my-prefix/my-file.py" ] // // - For the key AttachmentReference, the value is constructed from the name of // another SSM document in your account, a version number of that document, and a @@ -763,6 +763,10 @@ type AutomationExecution struct { // accounts where you want to run the Automation. TargetLocations []TargetLocation + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported + TargetLocationsURL *string + // The specified key-value mapping of document parameters to target resources. TargetMaps []map[string][]string @@ -820,10 +824,10 @@ type AutomationExecutionMetadata struct { // Use this filter with DescribeAutomationExecutions. Specify either Local or CrossAccount. CrossAccount is an // Automation that runs in multiple Amazon Web Services Regions and Amazon Web - // Services accounts. For more information, see [Running Automation workflows in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services Systems + // Services accounts. For more information, see [Running automations in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services Systems // Manager User Guide. // - // [Running Automation workflows in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html + // [Running automations in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html AutomationType AutomationType // The name of the Change Manager change request. @@ -892,6 +896,10 @@ type AutomationExecutionMetadata struct { // The list of execution outputs as defined in the Automation runbook. Target *string + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported + TargetLocationsURL *string + // The specified key-value mapping of document parameters to target resources. TargetMaps []map[string][]string @@ -916,9 +924,9 @@ type BaselineOverride struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html ApprovedPatches []string // Defines the compliance level for approved patches. When an approved patch is @@ -940,9 +948,9 @@ type BaselineOverride struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html RejectedPatches []string // The action for Patch Manager to take on patches included in the RejectedPackages @@ -1143,11 +1151,11 @@ type CommandFilter struct { // The filter value. Valid values for each filter key are as follows: // // - InvokedAfter: Specify a timestamp to limit your results. For example, - // specify 2021-07-07T00:00:00Z to see a list of command executions occurring + // specify 2024-07-07T00:00:00Z to see a list of command executions occurring // July 7, 2021, and later. // // - InvokedBefore: Specify a timestamp to limit your results. For example, - // specify 2021-07-07T00:00:00Z to see a list of command executions from before + // specify 2024-07-07T00:00:00Z to see a list of command executions from before // July 7, 2021. // // - Status: Specify a valid command status to see a list of all command @@ -1358,11 +1366,11 @@ type CommandPlugin struct { // This was requested when issuing the command. For example, in the following // response: // - // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript + // amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript // - // doc-example-bucket is the name of the S3 bucket; + // amzn-s3-demo-bucket is the name of the S3 bucket; // - // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; + // my-prefix is the name of the S3 prefix; // // i-02573cafcfEXAMPLE is the managed node ID; // @@ -1373,11 +1381,11 @@ type CommandPlugin struct { // executions should be stored. This was requested when issuing the command. For // example, in the following response: // - // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript + // amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript // - // doc-example-bucket is the name of the S3 bucket; + // amzn-s3-demo-bucket is the name of the S3 bucket; // - // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; + // my-prefix is the name of the S3 prefix; // // i-02573cafcfEXAMPLE is the managed node ID; // @@ -2433,13 +2441,13 @@ type InstanceInformation struct { // (VM) when it is activated as a Systems Manager managed node. The name is // specified as the DefaultInstanceName property using the CreateActivation command. It is applied // to the managed node by specifying the Activation Code and Activation ID when you - // install SSM Agent on the node, as explained in [Install SSM Agent for a hybrid and multicloud environment (Linux)]and [Install SSM Agent for a hybrid and multicloud environment (Windows)]. To retrieve the Name tag + // install SSM Agent on the node, as explained in [How to install SSM Agent on hybrid Linux nodes]and [How to install SSM Agent on hybrid Windows Server nodes]. To retrieve the Name tag // of an EC2 instance, use the Amazon EC2 DescribeInstances operation. For // information, see [DescribeInstances]in the Amazon EC2 API Reference or [describe-instances] in the Amazon Web Services // CLI Command Reference. // - // [Install SSM Agent for a hybrid and multicloud environment (Windows)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-win.html - // [Install SSM Agent for a hybrid and multicloud environment (Linux)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-linux.html + // [How to install SSM Agent on hybrid Linux nodes]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-linux.html + // [How to install SSM Agent on hybrid Windows Server nodes]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-windows.html // [DescribeInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html // [describe-instances]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html Name *string @@ -2589,11 +2597,10 @@ type InstancePatchState struct { // AWS-RunPatchBaseline , overrides the patches specified by the default patch // baseline. // - // For more information about the InstallOverrideList parameter, see [About the AWS-RunPatchBaseline SSM document] - // AWS-RunPatchBaseline SSM document in the Amazon Web Services Systems Manager - // User Guide. + // For more information about the InstallOverrideList parameter, see [SSM Command document for patching: AWS-RunPatchBaseline] + // AWS-RunPatchBaseline in the Amazon Web Services Systems Manager User Guide. // - // [About the AWS-RunPatchBaseline SSM document]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html + // [SSM Command document for patching: AWS-RunPatchBaseline]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html InstallOverrideList *string // The number of patches from the patch baseline that are installed on the managed @@ -2873,7 +2880,7 @@ type InventoryDeletionStatusItem struct { // Information about the delete operation. For more information about this // summary, see [Understanding the delete inventory summary]in the Amazon Web Services Systems Manager User Guide. // - // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete + // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory DeletionSummary *InventoryDeletionSummary // The status of the operation. Possible values are InProgress and Complete. @@ -2943,7 +2950,7 @@ type InventoryFilter struct { // The Exists filter must be used with aggregators. For more information, see [Aggregating inventory data] in // the Amazon Web Services Systems Manager User Guide. // - // [Aggregating inventory data]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-aggregate.html + // [Aggregating inventory data]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-aggregate.html Type InventoryQueryOperatorType noSmithyDocumentSerde @@ -3450,10 +3457,10 @@ type MaintenanceWindowRunCommandParameters struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // If this time is reached and the command hasn't already started running, it @@ -3593,10 +3600,10 @@ type MaintenanceWindowTask struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets (either managed nodes or tags). Managed nodes are specified using @@ -3897,8 +3904,8 @@ type OpsItem struct { // resource is a subset of source. Source *string - // The OpsItem status. Status can be Open , In Progress , or Resolved . For more - // information, see [Editing OpsItem details]in the Amazon Web Services Systems Manager User Guide. + // The OpsItem status. For more information, see [Editing OpsItem details] in the Amazon Web Services + // Systems Manager User Guide. // // [Editing OpsItem details]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html Status OpsItemStatus @@ -4140,7 +4147,7 @@ type OpsItemSummary struct { // The impacted Amazon Web Services resource. Source *string - // The OpsItem status. Status can be Open , In Progress , or Resolved . + // The OpsItem status. Status OpsItemStatus // A short heading that describes the nature of the OpsItem and the impacted @@ -4605,7 +4612,7 @@ type PatchComplianceData struct { // For descriptions of each patch state, see [About patch compliance] in the Amazon Web Services Systems // Manager User Guide. // - // [About patch compliance]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch + // [About patch compliance]: https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-monitor-patch // // This member is required. State PatchComplianceDataState @@ -4719,21 +4726,37 @@ type PatchRule struct { // that the patch is marked as approved in the patch baseline. For example, a value // of 7 means that patches are approved seven days after they are released. // - // This parameter is marked as not required, but your request must include a value + // This parameter is marked as Required: No , but your request must include a value // for either ApproveAfterDays or ApproveUntilDate . // // Not supported for Debian Server or Ubuntu Server. + // + // Use caution when setting this value for Windows Server patch baselines. Because + // patch updates that are replaced by later updates are removed, setting too broad + // a value for this parameter can result in crucial patches not being installed. + // For more information, see the Windows Server tab in the topic [How security patches are selected]in the Amazon Web + // Services Systems Manager User Guide. + // + // [How security patches are selected]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-selecting-patches.html ApproveAfterDays *int32 // The cutoff date for auto approval of released patches. Any patches released on // or before this date are installed automatically. // - // Enter dates in the format YYYY-MM-DD . For example, 2021-12-31 . + // Enter dates in the format YYYY-MM-DD . For example, 2024-12-31 . // - // This parameter is marked as not required, but your request must include a value + // This parameter is marked as Required: No , but your request must include a value // for either ApproveUntilDate or ApproveAfterDays . // // Not supported for Debian Server or Ubuntu Server. + // + // Use caution when setting this value for Windows Server patch baselines. Because + // patch updates that are replaced by later updates are removed, setting too broad + // a value for this parameter can result in crucial patches not being installed. + // For more information, see the Windows Server tab in the topic [How security patches are selected]in the Amazon Web + // Services Systems Manager User Guide. + // + // [How security patches are selected]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-selecting-patches.html ApproveUntilDate *string // A compliance severity level for all approved patches in a patch baseline. @@ -5339,12 +5362,12 @@ type SessionFilter struct { // The filter value. Valid values for each filter key are as follows: // // - InvokedAfter: Specify a timestamp to limit your results. For example, - // specify 2018-08-29T00:00:00Z to see sessions that started August 29, 2018, and + // specify 2024-08-29T00:00:00Z to see sessions that started August 29, 2024, and // later. // // - InvokedBefore: Specify a timestamp to limit your results. For example, - // specify 2018-08-29T00:00:00Z to see sessions that started before August 29, - // 2018. + // specify 2024-08-29T00:00:00Z to see sessions that started before August 29, + // 2024. // // - Target: Specify a managed node to which session connections have been made. // @@ -5628,10 +5651,18 @@ type TargetLocation struct { // The Amazon Web Services accounts targeted by the current Automation execution. Accounts []string + // Amazon Web Services accounts or organizational units to exclude as expanded + // targets. + ExcludeAccounts []string + // The Automation execution role used by the currently running Automation. If not // specified, the default value is AWS-SystemsManager-AutomationExecutionRole . ExecutionRoleName *string + // Indicates whether to include child organizational units (OUs) that are children + // of the targeted OUs. The default is false . + IncludeChildOrganizationUnits bool + // The Amazon Web Services Regions targeted by the current Automation execution. Regions []string @@ -5647,6 +5678,24 @@ type TargetLocation struct { // additional Automation executions for the currently running Automation. TargetLocationMaxErrors *string + // A list of key-value mappings to target resources. If you specify values for + // this data type, you must also specify a value for TargetParameterName . + // + // This Targets parameter takes precedence over the + // StartAutomationExecution:Targets parameter if both are supplied. + Targets []Target + + // The maximum number of targets allowed to run this task in parallel. This + // TargetsMaxConcurrency takes precedence over the + // StartAutomationExecution:MaxConcurrency parameter if both are supplied. + TargetsMaxConcurrency *string + + // The maximum number of errors that are allowed before the system stops running + // the automation on additional targets. This TargetsMaxErrors parameter takes + // precedence over the StartAutomationExecution:MaxErrors parameter if both are + // supplied. + TargetsMaxErrors *string + noSmithyDocumentSerde } 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 03f870f4..a62058e5 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,66 @@ +# v1.24.5 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.24.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.4 (2024-10-03) + +* No change notes available for this release. + +# v1.23.3 (2024-09-27) + +* No change notes available for this release. + +# v1.23.2 (2024-09-25) + +* No change notes available for this release. + +# v1.23.1 (2024-09-23) + +* No change notes available for this release. + +# v1.23.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.8 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.22.7 (2024-09-04) + +* No change notes available for this release. + +# v1.22.6 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.22.4 (2024-07-18) * 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 a06c6e73..644ee1e0 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 @@ -4,6 +4,7 @@ package sso import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( 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" @@ -30,6 +33,133 @@ import ( const ServiceID = "SSO" const ServiceAPIVersion = "2019-06-10" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sso") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/sso") +} + // Client provides the API client to make operations call for AWS Single Sign-On. type Client struct { options Options @@ -56,6 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -88,8 +222,15 @@ 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) { +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() @@ -113,15 +254,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + 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/sso") + }) + 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 } @@ -159,7 +341,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o 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{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -237,16 +419,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -434,6 +615,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { 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) } @@ -477,6 +682,7 @@ func addIsPaginatorUserAgent(o *Options) { 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/sso") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -540,25 +746,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -574,6 +761,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +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) } @@ -625,3 +824,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go index 5ce00b49..a6560202 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 @@ -102,6 +102,9 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta 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 } @@ -141,6 +144,18 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 f20e3acb..315526ef 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 @@ -107,6 +107,9 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack 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 } @@ -146,6 +149,18 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 391b567d..d867b78a 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 @@ -106,6 +106,9 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op 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 } @@ -145,6 +148,18 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 456e4a37..434b4308 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 @@ -101,6 +101,9 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options 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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 a93a77cd..366963b4 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 @@ -8,7 +8,9 @@ import ( 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" ) @@ -169,6 +171,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -181,6 +186,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -240,7 +248,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -250,12 +261,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + 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) } @@ -271,6 +290,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -280,6 +300,9 @@ func (*signRequestMiddleware) ID() string { 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) @@ -300,9 +323,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, 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/sso/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go index d6297fa6..ec23c36f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go @@ -14,6 +14,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" @@ -44,6 +45,10 @@ func (m *awsRestjson1_deserializeOpGetRoleCredentials) HandleDeserialize(ctx con 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)} @@ -83,6 +88,7 @@ func (m *awsRestjson1_deserializeOpGetRoleCredentials) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -200,6 +206,10 @@ func (m *awsRestjson1_deserializeOpListAccountRoles) HandleDeserialize(ctx conte 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)} @@ -239,6 +249,7 @@ func (m *awsRestjson1_deserializeOpListAccountRoles) HandleDeserialize(ctx conte } } + span.End() return out, metadata, err } @@ -365,6 +376,10 @@ func (m *awsRestjson1_deserializeOpListAccounts) HandleDeserialize(ctx context.C 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)} @@ -404,6 +419,7 @@ func (m *awsRestjson1_deserializeOpListAccounts) HandleDeserialize(ctx context.C } } + span.End() return out, metadata, err } @@ -530,6 +546,10 @@ func (m *awsRestjson1_deserializeOpLogout) HandleDeserialize(ctx context.Context 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)} @@ -547,6 +567,7 @@ func (m *awsRestjson1_deserializeOpLogout) HandleDeserialize(ctx context.Context } } + span.End() return out, metadata, err } @@ -868,7 +889,7 @@ func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRe for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -908,7 +929,7 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -1102,7 +1123,7 @@ func awsRestjson1_deserializeDocumentTooManyRequestsException(v **types.TooManyR for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -1142,7 +1163,7 @@ func awsRestjson1_deserializeDocumentUnauthorizedException(v **types.Unauthorize for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { 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 75ae283e..53c6bc75 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 @@ -16,6 +16,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -502,14 +503,13 @@ func (*resolveEndpointV2Middleware) ID() string { 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) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -520,11 +520,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + 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 } @@ -546,5 +551,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } 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 f252ba39..7c1604ea 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.22.4" +const goModuleVersion = "1.24.5" 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 d522129e..081867b3 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 @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go index 0ba182e9..aa744f15 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go @@ -9,7 +9,9 @@ import ( 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" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // 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 @@ -103,6 +105,9 @@ type Options struct { // 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. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go index 02e31411..a7a5b57d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go @@ -8,6 +8,7 @@ import ( smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -21,6 +22,10 @@ func (*awsRestjson1_serializeOpGetRoleCredentials) ID() string { func (m *awsRestjson1_serializeOpGetRoleCredentials) 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)} @@ -57,6 +62,8 @@ func (m *awsRestjson1_serializeOpGetRoleCredentials) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsGetRoleCredentialsInput(v *GetRoleCredentialsInput, encoder *httpbinding.Encoder) error { @@ -64,7 +71,7 @@ func awsRestjson1_serializeOpHttpBindingsGetRoleCredentialsInput(v *GetRoleCrede return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccessToken != nil && len(*v.AccessToken) > 0 { + if v.AccessToken != nil { locationName := "X-Amz-Sso_bearer_token" encoder.SetHeader(locationName).String(*v.AccessToken) } @@ -90,6 +97,10 @@ func (*awsRestjson1_serializeOpListAccountRoles) ID() string { func (m *awsRestjson1_serializeOpListAccountRoles) 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)} @@ -126,6 +137,8 @@ func (m *awsRestjson1_serializeOpListAccountRoles) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListAccountRolesInput(v *ListAccountRolesInput, encoder *httpbinding.Encoder) error { @@ -133,7 +146,7 @@ func awsRestjson1_serializeOpHttpBindingsListAccountRolesInput(v *ListAccountRol return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccessToken != nil && len(*v.AccessToken) > 0 { + if v.AccessToken != nil { locationName := "X-Amz-Sso_bearer_token" encoder.SetHeader(locationName).String(*v.AccessToken) } @@ -163,6 +176,10 @@ func (*awsRestjson1_serializeOpListAccounts) ID() string { func (m *awsRestjson1_serializeOpListAccounts) 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)} @@ -199,6 +216,8 @@ func (m *awsRestjson1_serializeOpListAccounts) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListAccountsInput(v *ListAccountsInput, encoder *httpbinding.Encoder) error { @@ -206,7 +225,7 @@ func awsRestjson1_serializeOpHttpBindingsListAccountsInput(v *ListAccountsInput, return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccessToken != nil && len(*v.AccessToken) > 0 { + if v.AccessToken != nil { locationName := "X-Amz-Sso_bearer_token" encoder.SetHeader(locationName).String(*v.AccessToken) } @@ -232,6 +251,10 @@ func (*awsRestjson1_serializeOpLogout) ID() string { func (m *awsRestjson1_serializeOpLogout) 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)} @@ -268,6 +291,8 @@ func (m *awsRestjson1_serializeOpLogout) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsLogoutInput(v *LogoutInput, encoder *httpbinding.Encoder) error { @@ -275,7 +300,7 @@ func awsRestjson1_serializeOpHttpBindingsLogoutInput(v *LogoutInput, encoder *ht return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccessToken != nil && len(*v.AccessToken) > 0 { + if v.AccessToken != nil { locationName := "X-Amz-Sso_bearer_token" encoder.SetHeader(locationName).String(*v.AccessToken) } 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 adf698c8..b7625523 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,62 @@ +# v1.28.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.4 (2024-10-03) + +* No change notes available for this release. + +# v1.27.3 (2024-09-27) + +* No change notes available for this release. + +# v1.27.2 (2024-09-25) + +* No change notes available for this release. + +# v1.27.1 (2024-09-23) + +* No change notes available for this release. + +# v1.27.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.8 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.26.7 (2024-09-04) + +* No change notes available for this release. + +# v1.26.6 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.26.4 (2024-07-10.2) * **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 25cd1c04..0b05bf6c 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 @@ -4,6 +4,7 @@ package ssooidc import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( 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" @@ -30,6 +33,133 @@ import ( const ServiceID = "SSO OIDC" const ServiceAPIVersion = "2019-06-10" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/ssooidc") +} + // Client provides the API client to make operations call for AWS SSO OIDC. type Client struct { options Options @@ -56,6 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -88,8 +222,15 @@ 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) { +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() @@ -113,15 +254,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + 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/ssooidc") + }) + 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 } @@ -159,7 +341,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o 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{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -237,16 +419,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -434,6 +615,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { 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) } @@ -477,6 +682,7 @@ func addIsPaginatorUserAgent(o *Options) { 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/ssooidc") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -540,25 +746,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -574,6 +761,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +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) } @@ -625,3 +824,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go index 8b829188..5fb8d2ab 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 @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt 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 } @@ -213,6 +216,18 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 af04c251..8abd4369 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 @@ -205,6 +205,9 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta 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 } @@ -244,6 +247,18 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 d8c766c9..03a3594b 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 @@ -135,6 +135,9 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, 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 } @@ -174,6 +177,18 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 7c2b38ba..203ca5e6 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 @@ -125,6 +125,9 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa 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 } @@ -164,6 +167,18 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 e6058da8..e4b87f5b 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 @@ -8,7 +8,9 @@ import ( 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" ) @@ -163,6 +165,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -175,6 +180,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -234,7 +242,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -244,12 +255,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + 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) } @@ -265,6 +284,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -274,6 +294,9 @@ func (*signRequestMiddleware) ID() string { 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) @@ -294,9 +317,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, 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/ssooidc/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go index 05e8c6b7..ae9f145e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go @@ -14,6 +14,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" @@ -43,6 +44,10 @@ func (m *awsRestjson1_deserializeOpCreateToken) HandleDeserialize(ctx context.Co 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)} @@ -82,6 +87,7 @@ func (m *awsRestjson1_deserializeOpCreateToken) HandleDeserialize(ctx context.Co } } + span.End() return out, metadata, err } @@ -264,6 +270,10 @@ func (m *awsRestjson1_deserializeOpCreateTokenWithIAM) HandleDeserialize(ctx con 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)} @@ -303,6 +313,7 @@ func (m *awsRestjson1_deserializeOpCreateTokenWithIAM) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -502,6 +513,10 @@ func (m *awsRestjson1_deserializeOpRegisterClient) HandleDeserialize(ctx context 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)} @@ -541,6 +556,7 @@ func (m *awsRestjson1_deserializeOpRegisterClient) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -721,6 +737,10 @@ func (m *awsRestjson1_deserializeOpStartDeviceAuthorization) HandleDeserialize(c 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)} @@ -760,6 +780,7 @@ func (m *awsRestjson1_deserializeOpStartDeviceAuthorization) HandleDeserialize(c } } + span.End() return out, metadata, 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 d7099721..6feea0c9 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 @@ -16,6 +16,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -502,14 +503,13 @@ func (*resolveEndpointV2Middleware) ID() string { 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) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -520,11 +520,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + 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 } @@ -546,5 +551,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } 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 b71407f8..a0db85a3 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.26.4" +const goModuleVersion = "1.28.4" 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 4a29eaa2..b4c61eba 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 @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go index a012e4cb..55dd80d0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go @@ -9,7 +9,9 @@ import ( 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" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // 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 @@ -103,6 +105,9 @@ type Options struct { // 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. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go index 04411bd6..1ad103d1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go @@ -10,6 +10,7 @@ import ( "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" ) @@ -23,6 +24,10 @@ func (*awsRestjson1_serializeOpCreateToken) ID() string { func (m *awsRestjson1_serializeOpCreateToken) 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)} @@ -66,6 +71,8 @@ func (m *awsRestjson1_serializeOpCreateToken) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateTokenInput(v *CreateTokenInput, encoder *httpbinding.Encoder) error { @@ -140,6 +147,10 @@ func (*awsRestjson1_serializeOpCreateTokenWithIAM) ID() string { func (m *awsRestjson1_serializeOpCreateTokenWithIAM) 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)} @@ -183,6 +194,8 @@ func (m *awsRestjson1_serializeOpCreateTokenWithIAM) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateTokenWithIAMInput(v *CreateTokenWithIAMInput, encoder *httpbinding.Encoder) error { @@ -267,6 +280,10 @@ func (*awsRestjson1_serializeOpRegisterClient) ID() string { func (m *awsRestjson1_serializeOpRegisterClient) 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)} @@ -310,6 +327,8 @@ func (m *awsRestjson1_serializeOpRegisterClient) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsRegisterClientInput(v *RegisterClientInput, encoder *httpbinding.Encoder) error { @@ -378,6 +397,10 @@ func (*awsRestjson1_serializeOpStartDeviceAuthorization) ID() string { func (m *awsRestjson1_serializeOpStartDeviceAuthorization) 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)} @@ -421,6 +444,8 @@ func (m *awsRestjson1_serializeOpStartDeviceAuthorization) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, encoder *httpbinding.Encoder) error { 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 f3128d75..95fe128b 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,66 @@ +# v1.32.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.4 (2024-10-03) + +* No change notes available for this release. + +# v1.31.3 (2024-09-27) + +* No change notes available for this release. + +# v1.31.2 (2024-09-25) + +* No change notes available for this release. + +# v1.31.1 (2024-09-23) + +* No change notes available for this release. + +# v1.31.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.8 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.30.7 (2024-09-04) + +* No change notes available for this release. + +# v1.30.6 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.5 (2024-08-22) + +* No change notes available for this release. + +# v1.30.4 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.30.3 (2024-07-10.2) * **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 acd2b8e7..4e678ce2 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 @@ -4,6 +4,7 @@ package sts import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -22,7 +23,9 @@ import ( 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" @@ -33,6 +36,133 @@ import ( const ServiceID = "STS" const ServiceAPIVersion = "2011-06-15" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sts") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/sts") +} + // Client provides the API client to make operations call for AWS Security Token // Service. type Client struct { @@ -60,6 +190,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -92,8 +226,15 @@ 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) { +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() @@ -117,15 +258,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + 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/sts") + }) + 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 } @@ -163,7 +345,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o 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{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -241,16 +423,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -438,6 +619,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { 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) } @@ -481,6 +686,7 @@ func addIsPaginatorUserAgent(o *Options) { 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/sts") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -544,25 +750,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -578,6 +765,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +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) } @@ -777,3 +976,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go index e74fc8ba..be03f017 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 @@ -445,6 +445,9 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti 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 } @@ -484,6 +487,18 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 4c685abd..b8b0c095 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 @@ -385,6 +385,9 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta 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 } @@ -424,6 +427,18 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 0b5e5a37..ffe2479f 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 @@ -396,6 +396,9 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew 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 } @@ -435,6 +438,18 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 b1f14d28..a56840e1 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 @@ -126,6 +126,9 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle 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 } @@ -165,6 +168,18 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 3ba00873..c80b0550 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 @@ -117,6 +117,9 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack 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 } @@ -156,6 +159,18 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 abac49ad..49304bda 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 @@ -108,6 +108,9 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac 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 } @@ -144,6 +147,18 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 2bae6742..96f59ec6 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 @@ -330,6 +330,9 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta 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 } @@ -369,6 +372,18 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 c73316a3..0ed9ecbc 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 @@ -179,6 +179,9 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, 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 } @@ -215,6 +218,18 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } 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 e842a7f7..a90b2b73 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 @@ -8,7 +8,9 @@ import ( 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" ) @@ -157,6 +159,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -169,6 +174,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -228,7 +236,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -238,12 +249,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + 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) } @@ -259,6 +278,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -268,6 +288,9 @@ func (*signRequestMiddleware) ID() string { 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) @@ -288,9 +311,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, 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/sts/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go index 7e4346ec..cf0cc54e 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 @@ -16,6 +16,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strconv" @@ -46,6 +47,10 @@ func (m *awsAwsquery_deserializeOpAssumeRole) HandleDeserialize(ctx context.Cont 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)} @@ -163,6 +168,10 @@ func (m *awsAwsquery_deserializeOpAssumeRoleWithSAML) HandleDeserialize(ctx cont 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)} @@ -286,6 +295,10 @@ func (m *awsAwsquery_deserializeOpAssumeRoleWithWebIdentity) HandleDeserialize(c 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)} @@ -412,6 +425,10 @@ func (m *awsAwsquery_deserializeOpDecodeAuthorizationMessage) HandleDeserialize( 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)} @@ -520,6 +537,10 @@ func (m *awsAwsquery_deserializeOpGetAccessKeyInfo) HandleDeserialize(ctx contex 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)} @@ -625,6 +646,10 @@ func (m *awsAwsquery_deserializeOpGetCallerIdentity) HandleDeserialize(ctx conte 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)} @@ -730,6 +755,10 @@ func (m *awsAwsquery_deserializeOpGetFederationToken) HandleDeserialize(ctx cont 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)} @@ -844,6 +873,10 @@ func (m *awsAwsquery_deserializeOpGetSessionToken) HandleDeserialize(ctx context 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)} 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 35305d89..dca2ce35 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 @@ -17,6 +17,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -1082,14 +1083,13 @@ func (*resolveEndpointV2Middleware) ID() string { 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) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -1100,11 +1100,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + 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 } @@ -1126,5 +1131,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } 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 84e221f2..a7c0c282 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.30.3" +const goModuleVersion = "1.32.4" 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 3dbd993b..9fe930b8 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 @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "aws-global", }: endpoints.Endpoint{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go index a9a35881..e1398f3b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go @@ -9,7 +9,9 @@ import ( 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" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // 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 @@ -103,6 +105,9 @@ type Options struct { // 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. 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 4c08061c..1bcbc828 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 @@ -11,6 +11,7 @@ import ( smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -25,6 +26,10 @@ func (*awsAwsquery_serializeOpAssumeRole) ID() string { func (m *awsAwsquery_serializeOpAssumeRole) 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)} @@ -76,6 +81,8 @@ func (m *awsAwsquery_serializeOpAssumeRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -89,6 +96,10 @@ func (*awsAwsquery_serializeOpAssumeRoleWithSAML) ID() string { func (m *awsAwsquery_serializeOpAssumeRoleWithSAML) 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)} @@ -140,6 +151,8 @@ func (m *awsAwsquery_serializeOpAssumeRoleWithSAML) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -153,6 +166,10 @@ func (*awsAwsquery_serializeOpAssumeRoleWithWebIdentity) ID() string { func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) 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)} @@ -204,6 +221,8 @@ func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -217,6 +236,10 @@ func (*awsAwsquery_serializeOpDecodeAuthorizationMessage) ID() string { func (m *awsAwsquery_serializeOpDecodeAuthorizationMessage) 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)} @@ -268,6 +291,8 @@ func (m *awsAwsquery_serializeOpDecodeAuthorizationMessage) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -281,6 +306,10 @@ func (*awsAwsquery_serializeOpGetAccessKeyInfo) ID() string { func (m *awsAwsquery_serializeOpGetAccessKeyInfo) 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)} @@ -332,6 +361,8 @@ func (m *awsAwsquery_serializeOpGetAccessKeyInfo) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -345,6 +376,10 @@ func (*awsAwsquery_serializeOpGetCallerIdentity) ID() string { func (m *awsAwsquery_serializeOpGetCallerIdentity) 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)} @@ -392,6 +427,8 @@ func (m *awsAwsquery_serializeOpGetCallerIdentity) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -405,6 +442,10 @@ func (*awsAwsquery_serializeOpGetFederationToken) ID() string { func (m *awsAwsquery_serializeOpGetFederationToken) 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)} @@ -456,6 +497,8 @@ func (m *awsAwsquery_serializeOpGetFederationToken) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -469,6 +512,10 @@ func (*awsAwsquery_serializeOpGetSessionToken) ID() string { func (m *awsAwsquery_serializeOpGetSessionToken) 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)} @@ -520,6 +567,8 @@ func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsquery_serializeDocumentPolicyDescriptorListType(v []types.PolicyDescriptorType, value query.Value) error { diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index bdbc7b43..56b19e3a 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,46 @@ +# Release (2024-11-15) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.22.1 + * **Bug Fix**: Fix failure to replace URI path segments when their names overlap. + +# Release (2024-10-03) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.22.0 + * **Feature**: Add HTTP client metrics. + +# Release (2024-09-25) + +## Module Highlights +* `github.com/aws/smithy-go/aws-http-auth`: [v1.0.0](aws-http-auth/CHANGELOG.md#v100-2024-09-25) + * **Release**: Initial release of module aws-http-auth, which implements generically consumable SigV4 and SigV4a request signing. + +# Release (2024-09-19) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.21.0 + * **Feature**: Add tracing and metrics APIs, and builtin instrumentation for both, in generated clients. +* `github.com/aws/smithy-go/metrics/smithyotelmetrics`: [v1.0.0](metrics/smithyotelmetrics/CHANGELOG.md#v100-2024-09-19) + * **Release**: Initial release of `smithyotelmetrics` module, which is used to adapt an OpenTelemetry SDK meter provider to be used with Smithy clients. +* `github.com/aws/smithy-go/tracing/smithyoteltracing`: [v1.0.0](tracing/smithyoteltracing/CHANGELOG.md#v100-2024-09-19) + * **Release**: Initial release of `smithyoteltracing` module, which is used to adapt an OpenTelemetry SDK tracer provider to be used with Smithy clients. + +# Release (2024-08-14) + +## Module Highlights +* `github.com/aws/smithy-go`: v1.20.4 + * **Dependency Update**: Bump minimum Go version to 1.21. + # Release (2024-06-27) ## Module Highlights diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md index c374f692..08df7458 100644 --- a/vendor/github.com/aws/smithy-go/README.md +++ b/vendor/github.com/aws/smithy-go/README.md @@ -1,19 +1,21 @@ -## Smithy Go +# Smithy Go [![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml)[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml) -[Smithy](https://smithy.io/) code generators for Go. +[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.20. **WARNING: All interfaces are subject to change.** -## Can I use this? +## Can I use the code generators? In order to generate a usable smithy client you must provide a [protocol definition](https://github.com/aws/smithy-go/blob/main/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/ProtocolGenerator.java), such as [AWS restJson1](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html), in order to generate transport mechanisms and serialization/deserialization code ("serde") accordingly. -The code generator does not currently support any protocols out of the box, +The code generator does not currently support any protocols out of the box other than the new `smithy.protocols#rpcv2Cbor`, therefore the useability of this project on its own is currently limited. Support for all [AWS protocols](https://smithy.io/2.0/aws/protocols/index.html) exists in [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2). We are @@ -21,6 +23,70 @@ tracking the movement of those out of the SDK into smithy-go in [#458](https://github.com/aws/smithy-go/issues/458), but there's currently no timeline for doing so. +## Plugins + +This repository implements the following Smithy build plugins: + +| ID | GAV prefix | Description | +|----|------------|-------------| +| `go-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go client code generation for Smithy models. | +| `go-server-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go server code generation for Smithy models. | + +**NOTE: Build plugins are not currently published to mavenCentral. You must publish to mavenLocal to make the build plugins visible to the Smithy CLI. The artifact version is currently fixed at 0.1.0.** + +## `go-codegen` + +### Configuration + +[`GoSettings`](codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java) +contains all of the settings enabled from `smithy-build.json` and helper +methods and types. The up-to-date list of top-level properties enabled for +`go-client-codegen` can be found in `GoSettings::from()`. + +| Setting | Type | Required | Description | +|-----------------|---------|----------|-----------------------------------------------------------------------------------------------------------------------------| +| `service` | string | yes | The Shape ID of the service for which to generate the client. | +| `module` | string | yes | Name of the module in `generated.json` (and `go.mod` if `generateGoMod` is enabled) and `doc.go`. | +| `generateGoMod` | boolean | | Whether to generate a default `go.mod` file. The default value is `false`. | +| `goDirective` | string | | [Go directive](https://go.dev/ref/mod#go-mod-file-go) of the module. The default value is the minimum supported Go version. | + +### Supported protocols + +| Protocol | Notes | +|----------|-------| +| [`smithy.protocols#rpcv2Cbor`](https://smithy.io/2.0/additional-specs/protocols/smithy-rpc-v2.html) | Event streaming not yet implemented. | + +### Example + +This example applies the `go-codegen` build plugin to the Smithy quickstart +example created from `smithy init`: + +```json +{ + "version": "1.0", + "sources": [ + "models" + ], + "maven": { + "dependencies": [ + "software.amazon.smithy.go:smithy-go-codegen:0.1.0" + ] + }, + "plugins": { + "go-codegen": { + "service": "example.weather#Weather", + "module": "github.com/example/weather", + "generateGoMod": true, + "goDirective": "1.20" + } + } +} +``` + +## `go-server-codegen` + +This plugin is a work-in-progress and is currently undocumented. + ## License This project is licensed under the Apache-2.0 License. diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go index e78926c9..9ae30854 100644 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go +++ b/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go @@ -22,33 +22,33 @@ func bufCap(b []byte, n int) []byte { // replacePathElement replaces a single element in the path []byte. // Escape is used to control whether the value will be escaped using Amazon path escape style. func replacePathElement(path, fieldBuf []byte, key, val string, escape bool) ([]byte, []byte, error) { - fieldBuf = bufCap(fieldBuf, len(key)+3) // { [+] } + // search for "{}". If not found, search for the greedy version "{+}". If none are found, return error + fieldBuf = bufCap(fieldBuf, len(key)+2) // { } fieldBuf = append(fieldBuf, uriTokenStart) fieldBuf = append(fieldBuf, key...) + fieldBuf = append(fieldBuf, uriTokenStop) start := bytes.Index(path, fieldBuf) - end := start + len(fieldBuf) - if start < 0 || len(path[end:]) == 0 { - // TODO what to do about error? - return path, fieldBuf, fmt.Errorf("invalid path index, start=%d,end=%d. %s", start, end, path) - } - encodeSep := true - if path[end] == uriTokenSkip { - // '+' token means do not escape slashes + if start < 0 { + fieldBuf = bufCap(fieldBuf, len(key)+3) // { [+] } + fieldBuf = append(fieldBuf, uriTokenStart) + fieldBuf = append(fieldBuf, key...) + fieldBuf = append(fieldBuf, uriTokenSkip) + fieldBuf = append(fieldBuf, uriTokenStop) + + start = bytes.Index(path, fieldBuf) + if start < 0 { + return path, fieldBuf, fmt.Errorf("invalid path index, start=%d. %s", start, path) + } encodeSep = false - end++ } + end := start + len(fieldBuf) if escape { val = EscapePath(val, encodeSep) } - if path[end] != uriTokenStop { - return path, fieldBuf, fmt.Errorf("invalid path element, does not contain token stop, %s", path) - } - end++ - fieldBuf = bufCap(fieldBuf, len(val)) fieldBuf = append(fieldBuf, val...) 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 f82b7672..212eae4f 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.20.3" +const goModuleVersion = "1.22.1" diff --git a/vendor/github.com/aws/smithy-go/metrics/metrics.go b/vendor/github.com/aws/smithy-go/metrics/metrics.go new file mode 100644 index 00000000..c009d9f2 --- /dev/null +++ b/vendor/github.com/aws/smithy-go/metrics/metrics.go @@ -0,0 +1,136 @@ +// Package metrics defines the metrics APIs used by Smithy clients. +package metrics + +import ( + "context" + + "github.com/aws/smithy-go" +) + +// MeterProvider is the entry point for creating a Meter. +type MeterProvider interface { + Meter(scope string, opts ...MeterOption) Meter +} + +// MeterOption applies configuration to a Meter. +type MeterOption func(o *MeterOptions) + +// MeterOptions represents configuration for a Meter. +type MeterOptions struct { + Properties smithy.Properties +} + +// Meter is the entry point for creation of measurement instruments. +type Meter interface { + // integer/synchronous + Int64Counter(name string, opts ...InstrumentOption) (Int64Counter, error) + Int64UpDownCounter(name string, opts ...InstrumentOption) (Int64UpDownCounter, error) + Int64Gauge(name string, opts ...InstrumentOption) (Int64Gauge, error) + Int64Histogram(name string, opts ...InstrumentOption) (Int64Histogram, error) + + // integer/asynchronous + Int64AsyncCounter(name string, callback Int64Callback, opts ...InstrumentOption) (AsyncInstrument, error) + Int64AsyncUpDownCounter(name string, callback Int64Callback, opts ...InstrumentOption) (AsyncInstrument, error) + Int64AsyncGauge(name string, callback Int64Callback, opts ...InstrumentOption) (AsyncInstrument, error) + + // floating-point/synchronous + Float64Counter(name string, opts ...InstrumentOption) (Float64Counter, error) + Float64UpDownCounter(name string, opts ...InstrumentOption) (Float64UpDownCounter, error) + Float64Gauge(name string, opts ...InstrumentOption) (Float64Gauge, error) + Float64Histogram(name string, opts ...InstrumentOption) (Float64Histogram, error) + + // floating-point/asynchronous + Float64AsyncCounter(name string, callback Float64Callback, opts ...InstrumentOption) (AsyncInstrument, error) + Float64AsyncUpDownCounter(name string, callback Float64Callback, opts ...InstrumentOption) (AsyncInstrument, error) + Float64AsyncGauge(name string, callback Float64Callback, opts ...InstrumentOption) (AsyncInstrument, error) +} + +// InstrumentOption applies configuration to an instrument. +type InstrumentOption func(o *InstrumentOptions) + +// InstrumentOptions represents configuration for an instrument. +type InstrumentOptions struct { + UnitLabel string + Description string +} + +// Int64Counter measures a monotonically increasing int64 value. +type Int64Counter interface { + Add(context.Context, int64, ...RecordMetricOption) +} + +// Int64UpDownCounter measures a fluctuating int64 value. +type Int64UpDownCounter interface { + Add(context.Context, int64, ...RecordMetricOption) +} + +// Int64Gauge samples a discrete int64 value. +type Int64Gauge interface { + Sample(context.Context, int64, ...RecordMetricOption) +} + +// Int64Histogram records multiple data points for an int64 value. +type Int64Histogram interface { + Record(context.Context, int64, ...RecordMetricOption) +} + +// Float64Counter measures a monotonically increasing float64 value. +type Float64Counter interface { + Add(context.Context, float64, ...RecordMetricOption) +} + +// Float64UpDownCounter measures a fluctuating float64 value. +type Float64UpDownCounter interface { + Add(context.Context, float64, ...RecordMetricOption) +} + +// Float64Gauge samples a discrete float64 value. +type Float64Gauge interface { + Sample(context.Context, float64, ...RecordMetricOption) +} + +// Float64Histogram records multiple data points for an float64 value. +type Float64Histogram interface { + Record(context.Context, float64, ...RecordMetricOption) +} + +// AsyncInstrument is the universal handle returned for creation of all async +// instruments. +// +// Callers use the Stop() API to unregister the callback passed at instrument +// creation. +type AsyncInstrument interface { + Stop() +} + +// Int64Callback describes a function invoked when an async int64 instrument is +// read. +type Int64Callback func(context.Context, Int64Observer) + +// Int64Observer is the interface passed to async int64 instruments. +// +// Callers use the Observe() API of this interface to report metrics to the +// underlying collector. +type Int64Observer interface { + Observe(context.Context, int64, ...RecordMetricOption) +} + +// Float64Callback describes a function invoked when an async float64 +// instrument is read. +type Float64Callback func(context.Context, Float64Observer) + +// Float64Observer is the interface passed to async int64 instruments. +// +// Callers use the Observe() API of this interface to report metrics to the +// underlying collector. +type Float64Observer interface { + Observe(context.Context, float64, ...RecordMetricOption) +} + +// RecordMetricOption applies configuration to a recorded metric. +type RecordMetricOption func(o *RecordMetricOptions) + +// RecordMetricOptions represents configuration for a recorded metric. +type RecordMetricOptions struct { + Properties smithy.Properties +} diff --git a/vendor/github.com/aws/smithy-go/metrics/nop.go b/vendor/github.com/aws/smithy-go/metrics/nop.go new file mode 100644 index 00000000..fb374e1f --- /dev/null +++ b/vendor/github.com/aws/smithy-go/metrics/nop.go @@ -0,0 +1,67 @@ +package metrics + +import "context" + +// NopMeterProvider is a no-op metrics implementation. +type NopMeterProvider struct{} + +var _ MeterProvider = (*NopMeterProvider)(nil) + +// Meter returns a meter which creates no-op instruments. +func (NopMeterProvider) Meter(string, ...MeterOption) Meter { + return nopMeter{} +} + +type nopMeter struct{} + +var _ Meter = (*nopMeter)(nil) + +func (nopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) { + return nopInstrument[int64]{}, nil +} +func (nopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) { + return nopInstrument[int64]{}, nil +} +func (nopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) { + return nopInstrument[int64]{}, nil +} +func (nopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) { + return nopInstrument[int64]{}, nil +} +func (nopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrument[int64]{}, nil +} +func (nopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrument[int64]{}, nil +} +func (nopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrument[int64]{}, nil +} +func (nopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) { + return nopInstrument[float64]{}, nil +} +func (nopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) { + return nopInstrument[float64]{}, nil +} +func (nopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) { + return nopInstrument[float64]{}, nil +} +func (nopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) { + return nopInstrument[float64]{}, nil +} +func (nopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrument[float64]{}, nil +} +func (nopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrument[float64]{}, nil +} +func (nopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrument[float64]{}, nil +} + +type nopInstrument[N any] struct{} + +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() {} diff --git a/vendor/github.com/aws/smithy-go/middleware/context.go b/vendor/github.com/aws/smithy-go/middleware/context.go new file mode 100644 index 00000000..f51aa4f0 --- /dev/null +++ b/vendor/github.com/aws/smithy-go/middleware/context.go @@ -0,0 +1,41 @@ +package middleware + +import "context" + +type ( + serviceIDKey struct{} + operationNameKey struct{} +) + +// WithServiceID adds a service ID to the context, scoped to middleware stack +// values. +// +// This API is called in the client runtime when bootstrapping an operation and +// should not typically be used directly. +func WithServiceID(parent context.Context, id string) context.Context { + return WithStackValue(parent, serviceIDKey{}, id) +} + +// GetServiceID retrieves the service ID from the context. This is typically +// the service shape's name from its Smithy model. Service clients for specific +// systems (e.g. AWS SDK) may use an alternate designated value. +func GetServiceID(ctx context.Context) string { + id, _ := GetStackValue(ctx, serviceIDKey{}).(string) + return id +} + +// WithOperationName adds the operation name to the context, scoped to +// middleware stack values. +// +// This API is called in the client runtime when bootstrapping an operation and +// should not typically be used directly. +func WithOperationName(parent context.Context, id string) context.Context { + return WithStackValue(parent, operationNameKey{}, id) +} + +// GetOperationName retrieves the operation name from the context. This is +// typically the operation shape's name from its Smithy model. +func GetOperationName(ctx context.Context) string { + name, _ := GetStackValue(ctx, operationNameKey{}).(string) + return name +} diff --git a/vendor/github.com/aws/smithy-go/properties.go b/vendor/github.com/aws/smithy-go/properties.go index c9af66c0..68df4c4e 100644 --- a/vendor/github.com/aws/smithy-go/properties.go +++ b/vendor/github.com/aws/smithy-go/properties.go @@ -1,9 +1,11 @@ package smithy +import "maps" + // PropertiesReader provides an interface for reading metadata from the // underlying metadata container. type PropertiesReader interface { - Get(key interface{}) interface{} + Get(key any) any } // Properties provides storing and reading metadata values. Keys may be any @@ -12,14 +14,14 @@ type PropertiesReader interface { // The zero value for a Properties instance is ready for reads/writes without // any additional initialization. type Properties struct { - values map[interface{}]interface{} + values map[any]any } // Get attempts to retrieve the value the key points to. Returns nil if the // key was not found. // // Panics if key type is not comparable. -func (m *Properties) Get(key interface{}) interface{} { +func (m *Properties) Get(key any) any { m.lazyInit() return m.values[key] } @@ -28,7 +30,7 @@ func (m *Properties) Get(key interface{}) interface{} { // that key it will be replaced with the new value. // // Panics if the key type is not comparable. -func (m *Properties) Set(key, value interface{}) { +func (m *Properties) Set(key, value any) { m.lazyInit() m.values[key] = value } @@ -36,7 +38,7 @@ func (m *Properties) Set(key, value interface{}) { // Has returns whether the key exists in the metadata. // // Panics if the key type is not comparable. -func (m *Properties) Has(key interface{}) bool { +func (m *Properties) Has(key any) bool { m.lazyInit() _, ok := m.values[key] return ok @@ -55,8 +57,13 @@ func (m *Properties) SetAll(other *Properties) { } } +// Values returns a shallow clone of the property set's values. +func (m *Properties) Values() map[any]any { + return maps.Clone(m.values) +} + func (m *Properties) lazyInit() { if m.values == nil { - m.values = map[interface{}]interface{}{} + m.values = map[any]any{} } } diff --git a/vendor/github.com/aws/smithy-go/tracing/context.go b/vendor/github.com/aws/smithy-go/tracing/context.go new file mode 100644 index 00000000..a404ed9d --- /dev/null +++ b/vendor/github.com/aws/smithy-go/tracing/context.go @@ -0,0 +1,96 @@ +package tracing + +import "context" + +type ( + operationTracerKey struct{} + spanLineageKey struct{} +) + +// GetSpan returns the active trace Span on the context. +// +// The boolean in the return indicates whether a Span was actually in the +// context, but a no-op implementation will be returned if not, so callers +// can generally disregard the boolean unless they wish to explicitly confirm +// presence/absence of a Span. +func GetSpan(ctx context.Context) (Span, bool) { + lineage := getLineage(ctx) + if len(lineage) == 0 { + return nopSpan{}, false + } + + return lineage[len(lineage)-1], true +} + +// WithSpan sets the active trace Span on the context. +func WithSpan(parent context.Context, span Span) context.Context { + lineage := getLineage(parent) + if len(lineage) == 0 { + return context.WithValue(parent, spanLineageKey{}, []Span{span}) + } + + lineage = append(lineage, span) + return context.WithValue(parent, spanLineageKey{}, lineage) +} + +// PopSpan pops the current Span off the context, setting the active Span on +// the returned Context back to its parent and returning the REMOVED one. +// +// PopSpan on a context with no active Span will return a no-op instance. +// +// This is mostly necessary for the runtime to manage base trace spans due to +// the wrapped-function nature of the middleware stack. End-users of Smithy +// clients SHOULD NOT generally be using this API. +func PopSpan(parent context.Context) (context.Context, Span) { + lineage := getLineage(parent) + if len(lineage) == 0 { + return parent, nopSpan{} + } + + span := lineage[len(lineage)-1] + lineage = lineage[:len(lineage)-1] + return context.WithValue(parent, spanLineageKey{}, lineage), span +} + +func getLineage(ctx context.Context) []Span { + v := ctx.Value(spanLineageKey{}) + if v == nil { + return nil + } + + return v.([]Span) +} + +// GetOperationTracer returns the embedded operation-scoped Tracer on a +// Context. +// +// The boolean in the return indicates whether a Tracer was actually in the +// context, but a no-op implementation will be returned if not, so callers +// can generally disregard the boolean unless they wish to explicitly confirm +// presence/absence of a Tracer. +func GetOperationTracer(ctx context.Context) (Tracer, bool) { + v := ctx.Value(operationTracerKey{}) + if v == nil { + return nopTracer{}, false + } + + return v.(Tracer), true +} + +// WithOperationTracer returns a child Context embedding the given Tracer. +// +// The runtime will use this embed a scoped tracer for client operations, +// Smithy/SDK client callers DO NOT need to do this explicitly. +func WithOperationTracer(parent context.Context, tracer Tracer) context.Context { + return context.WithValue(parent, operationTracerKey{}, tracer) +} + +// StartSpan is a convenience API for creating tracing Spans from a Context. +// +// StartSpan uses the operation-scoped Tracer, previously stored using +// [WithOperationTracer], to start the Span. If a Tracer has not been embedded +// the returned Span will be a no-op implementation. +func StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span) { + tracer, _ := GetOperationTracer(ctx) + return tracer.StartSpan(ctx, name, opts...) +} diff --git a/vendor/github.com/aws/smithy-go/tracing/nop.go b/vendor/github.com/aws/smithy-go/tracing/nop.go new file mode 100644 index 00000000..573d28b1 --- /dev/null +++ b/vendor/github.com/aws/smithy-go/tracing/nop.go @@ -0,0 +1,32 @@ +package tracing + +import "context" + +// NopTracerProvider is a no-op tracing implementation. +type NopTracerProvider struct{} + +var _ TracerProvider = (*NopTracerProvider)(nil) + +// Tracer returns a tracer which creates no-op spans. +func (NopTracerProvider) Tracer(string, ...TracerOption) Tracer { + return nopTracer{} +} + +type nopTracer struct{} + +var _ Tracer = (*nopTracer)(nil) + +func (nopTracer) StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span) { + return ctx, nopSpan{} +} + +type nopSpan struct{} + +var _ Span = (*nopSpan)(nil) + +func (nopSpan) Name() string { return "" } +func (nopSpan) Context() SpanContext { return SpanContext{} } +func (nopSpan) AddEvent(string, ...EventOption) {} +func (nopSpan) SetProperty(any, any) {} +func (nopSpan) SetStatus(SpanStatus) {} +func (nopSpan) End() {} diff --git a/vendor/github.com/aws/smithy-go/tracing/tracing.go b/vendor/github.com/aws/smithy-go/tracing/tracing.go new file mode 100644 index 00000000..089ed393 --- /dev/null +++ b/vendor/github.com/aws/smithy-go/tracing/tracing.go @@ -0,0 +1,95 @@ +// Package tracing defines tracing APIs to be used by Smithy clients. +package tracing + +import ( + "context" + + "github.com/aws/smithy-go" +) + +// SpanStatus records the "success" state of an observed span. +type SpanStatus int + +// Enumeration of SpanStatus. +const ( + SpanStatusUnset SpanStatus = iota + SpanStatusOK + SpanStatusError +) + +// SpanKind indicates the nature of the work being performed. +type SpanKind int + +// Enumeration of SpanKind. +const ( + SpanKindInternal SpanKind = iota + SpanKindClient + SpanKindServer + SpanKindProducer + SpanKindConsumer +) + +// TracerProvider is the entry point for creating client traces. +type TracerProvider interface { + Tracer(scope string, opts ...TracerOption) Tracer +} + +// TracerOption applies configuration to a tracer. +type TracerOption func(o *TracerOptions) + +// TracerOptions represent configuration for tracers. +type TracerOptions struct { + Properties smithy.Properties +} + +// Tracer is the entry point for creating observed client Spans. +// +// Spans created by tracers propagate by existing on the Context. Consumers of +// the API can use [GetSpan] to pull the active Span from a Context. +// +// Creation of child Spans is implicit through Context persistence. If +// CreateSpan is called with a Context that holds a Span, the result will be a +// child of that Span. +type Tracer interface { + StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span) +} + +// SpanOption applies configuration to a span. +type SpanOption func(o *SpanOptions) + +// SpanOptions represent configuration for span events. +type SpanOptions struct { + Kind SpanKind + Properties smithy.Properties +} + +// Span records a conceptually individual unit of work that takes place in a +// Smithy client operation. +type Span interface { + Name() string + Context() SpanContext + AddEvent(name string, opts ...EventOption) + SetStatus(status SpanStatus) + SetProperty(k, v any) + End() +} + +// EventOption applies configuration to a span event. +type EventOption func(o *EventOptions) + +// EventOptions represent configuration for span events. +type EventOptions struct { + Properties smithy.Properties +} + +// SpanContext uniquely identifies a Span. +type SpanContext struct { + TraceID string + SpanID string + IsRemote bool +} + +// IsValid is true when a span has nonzero trace and span IDs. +func (ctx *SpanContext) IsValid() bool { + return len(ctx.TraceID) != 0 && len(ctx.SpanID) != 0 +} diff --git a/vendor/github.com/aws/smithy-go/transport/http/client.go b/vendor/github.com/aws/smithy-go/transport/http/client.go index e691c69b..0fceae81 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/client.go +++ b/vendor/github.com/aws/smithy-go/transport/http/client.go @@ -6,7 +6,9 @@ import ( "net/http" smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" ) // ClientDo provides the interface for custom HTTP client implementations. @@ -27,13 +29,30 @@ func (fn ClientDoFunc) Do(r *http.Request) (*http.Response, error) { // implementation is http.Client. type ClientHandler struct { client ClientDo + + Meter metrics.Meter // For HTTP client metrics. } // NewClientHandler returns an initialized middleware handler for the client. +// +// Deprecated: Use [NewClientHandlerWithOptions]. func NewClientHandler(client ClientDo) ClientHandler { - return ClientHandler{ + return NewClientHandlerWithOptions(client) +} + +// NewClientHandlerWithOptions returns an initialized middleware handler for the client +// with applied options. +func NewClientHandlerWithOptions(client ClientDo, opts ...func(*ClientHandler)) ClientHandler { + h := ClientHandler{ client: client, } + for _, opt := range opts { + opt(&h) + } + if h.Meter == nil { + h.Meter = metrics.NopMeterProvider{}.Meter("") + } + return h } // Handle implements the middleware Handler interface, that will invoke the @@ -42,6 +61,14 @@ func NewClientHandler(client ClientDo) ClientHandler { func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( out interface{}, metadata middleware.Metadata, err error, ) { + ctx, span := tracing.StartSpan(ctx, "DoHTTPRequest") + defer span.End() + + ctx, client, err := withMetrics(ctx, c.client, c.Meter) + if err != nil { + return nil, metadata, fmt.Errorf("instrument with HTTP metrics: %w", err) + } + req, ok := input.(*Request) if !ok { return nil, metadata, fmt.Errorf("expect Smithy http.Request value as input, got unsupported type %T", input) @@ -52,7 +79,17 @@ func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( return nil, metadata, err } - resp, err := c.client.Do(builtRequest) + span.SetProperty("http.method", req.Method) + span.SetProperty("http.request_content_length", -1) // at least indicate unknown + length, ok, err := req.StreamLength() + if err != nil { + return nil, metadata, err + } + if ok { + span.SetProperty("http.request_content_length", length) + } + + resp, err := client.Do(builtRequest) if resp == nil { // Ensure a http response value is always present to prevent unexpected // panics. @@ -79,6 +116,10 @@ func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( _ = builtRequest.Body.Close() } + span.SetProperty("net.protocol.version", fmt.Sprintf("%d.%d", resp.ProtoMajor, resp.ProtoMinor)) + span.SetProperty("http.status_code", resp.StatusCode) + span.SetProperty("http.response_content_length", resp.ContentLength) + return &Response{Response: resp}, metadata, err } diff --git a/vendor/github.com/aws/smithy-go/transport/http/metrics.go b/vendor/github.com/aws/smithy-go/transport/http/metrics.go new file mode 100644 index 00000000..ab110139 --- /dev/null +++ b/vendor/github.com/aws/smithy-go/transport/http/metrics.go @@ -0,0 +1,184 @@ +package http + +import ( + "context" + "crypto/tls" + "net/http" + "net/http/httptrace" + "time" + + "github.com/aws/smithy-go/metrics" +) + +var now = time.Now + +// withMetrics instruments an HTTP client and context to collect HTTP metrics. +func withMetrics(parent context.Context, client ClientDo, meter metrics.Meter) ( + context.Context, ClientDo, error, +) { + hm, err := newHTTPMetrics(meter) + if err != nil { + return nil, nil, err + } + + ctx := httptrace.WithClientTrace(parent, &httptrace.ClientTrace{ + DNSStart: hm.DNSStart, + ConnectStart: hm.ConnectStart, + TLSHandshakeStart: hm.TLSHandshakeStart, + + GotConn: hm.GotConn(parent), + PutIdleConn: hm.PutIdleConn(parent), + ConnectDone: hm.ConnectDone(parent), + DNSDone: hm.DNSDone(parent), + TLSHandshakeDone: hm.TLSHandshakeDone(parent), + GotFirstResponseByte: hm.GotFirstResponseByte(parent), + }) + return ctx, &timedClientDo{client, hm}, nil +} + +type timedClientDo struct { + ClientDo + hm *httpMetrics +} + +func (c *timedClientDo) Do(r *http.Request) (*http.Response, error) { + c.hm.doStart = now() + resp, err := c.ClientDo.Do(r) + + c.hm.DoRequestDuration.Record(r.Context(), elapsed(c.hm.doStart)) + return resp, err +} + +type httpMetrics struct { + DNSLookupDuration metrics.Float64Histogram // client.http.connections.dns_lookup_duration + ConnectDuration metrics.Float64Histogram // client.http.connections.acquire_duration + TLSHandshakeDuration metrics.Float64Histogram // client.http.connections.tls_handshake_duration + ConnectionUsage metrics.Int64UpDownCounter // client.http.connections.usage + + DoRequestDuration metrics.Float64Histogram // client.http.do_request_duration + TimeToFirstByte metrics.Float64Histogram // client.http.time_to_first_byte + + doStart time.Time + dnsStart time.Time + connectStart time.Time + tlsStart time.Time +} + +func newHTTPMetrics(meter metrics.Meter) (*httpMetrics, error) { + hm := &httpMetrics{} + + var err error + hm.DNSLookupDuration, err = meter.Float64Histogram("client.http.connections.dns_lookup_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes a request to perform DNS lookup." + }) + if err != nil { + return nil, err + } + hm.ConnectDuration, err = meter.Float64Histogram("client.http.connections.acquire_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes a request to acquire a connection." + }) + if err != nil { + return nil, err + } + hm.TLSHandshakeDuration, err = meter.Float64Histogram("client.http.connections.tls_handshake_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes an HTTP request to perform the TLS handshake." + }) + if err != nil { + return nil, err + } + hm.ConnectionUsage, err = meter.Int64UpDownCounter("client.http.connections.usage", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "{connection}" + o.Description = "Current state of connections pool." + }) + if err != nil { + return nil, err + } + hm.DoRequestDuration, err = meter.Float64Histogram("client.http.do_request_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "Time spent performing an entire HTTP transaction." + }) + if err != nil { + return nil, err + } + hm.TimeToFirstByte, err = meter.Float64Histogram("client.http.time_to_first_byte", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "Time from start of transaction to when the first response byte is available." + }) + if err != nil { + return nil, err + } + + return hm, nil +} + +func (m *httpMetrics) DNSStart(httptrace.DNSStartInfo) { + m.dnsStart = now() +} + +func (m *httpMetrics) ConnectStart(string, string) { + m.connectStart = now() +} + +func (m *httpMetrics) TLSHandshakeStart() { + m.tlsStart = now() +} + +func (m *httpMetrics) GotConn(ctx context.Context) func(httptrace.GotConnInfo) { + return func(httptrace.GotConnInfo) { + m.addConnAcquired(ctx, 1) + } +} + +func (m *httpMetrics) PutIdleConn(ctx context.Context) func(error) { + return func(error) { + m.addConnAcquired(ctx, -1) + } +} + +func (m *httpMetrics) DNSDone(ctx context.Context) func(httptrace.DNSDoneInfo) { + return func(httptrace.DNSDoneInfo) { + m.DNSLookupDuration.Record(ctx, elapsed(m.dnsStart)) + } +} + +func (m *httpMetrics) ConnectDone(ctx context.Context) func(string, string, error) { + return func(string, string, error) { + m.ConnectDuration.Record(ctx, elapsed(m.connectStart)) + } +} + +func (m *httpMetrics) TLSHandshakeDone(ctx context.Context) func(tls.ConnectionState, error) { + return func(tls.ConnectionState, error) { + m.TLSHandshakeDuration.Record(ctx, elapsed(m.tlsStart)) + } +} + +func (m *httpMetrics) GotFirstResponseByte(ctx context.Context) func() { + return func() { + m.TimeToFirstByte.Record(ctx, elapsed(m.doStart)) + } +} + +func (m *httpMetrics) addConnAcquired(ctx context.Context, incr int64) { + m.ConnectionUsage.Add(ctx, incr, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("state", "acquired") + }) +} + +// Not used: it is recommended to track acquired vs idle conn, but we can't +// determine when something is truly idle with the current HTTP client hooks +// available to us. +func (m *httpMetrics) addConnIdle(ctx context.Context, incr int64) { + m.ConnectionUsage.Add(ctx, incr, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("state", "idle") + }) +} + +func elapsed(start time.Time) float64 { + end := now() + elapsed := end.Sub(start) + return float64(elapsed) / 1e9 +} diff --git a/vendor/github.com/blevesearch/bleve/v2/README.md b/vendor/github.com/blevesearch/bleve/v2/README.md index 80499ec5..fa75ef3d 100644 --- a/vendor/github.com/blevesearch/bleve/v2/README.md +++ b/vendor/github.com/blevesearch/bleve/v2/README.md @@ -9,28 +9,29 @@ [![Sourcegraph](https://sourcegraph.com/github.com/blevesearch/bleve/-/badge.svg)](https://sourcegraph.com/github.com/blevesearch/bleve?badge) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -A modern indexing library in GO +A modern indexing + search library in GO ## Features -* Index any go data structure (including JSON) -* Intelligent defaults backed up by powerful configuration +* Index any GO data structure or JSON +* Intelligent defaults backed up by powerful configuration ([scorch](https://github.com/blevesearch/bleve/blob/master/index/scorch/README.md)) * Supported field types: * `text`, `number`, `datetime`, `boolean`, `geopoint`, `geoshape`, `IP`, `vector` * Supported query types: - * Term, Phrase, Match, Match Phrase, Prefix, Fuzzy - * Conjunction, Disjunction, Boolean (`must`/`should`/`must_not`) - * Term Range, Numeric Range, Date Range - * [Geo Spatial](https://github.com/blevesearch/bleve/blob/master/geo/README.md) - * Simple [query string syntax](http://www.blevesearch.com/docs/Query-String-Query/) - * Approximate k-nearest neighbors over [vectors](https://github.com/blevesearch/bleve/blob/master/docs/vectors.md) -* [tf-idf](https://en.wikipedia.org/wiki/Tf-idf) Scoring + * `term`, `phrase`, `match`, `match_phrase`, `prefix`, `regexp`, `wildcard`, `fuzzy` + * term range, numeric range, date range, boolean field + * compound queries: `conjuncts`, `disjuncts`, boolean (`must`/`should`/`must_not`) + * [query string syntax](http://www.blevesearch.com/docs/Query-String-Query/) + * [geo spatial search](https://github.com/blevesearch/bleve/blob/master/geo/README.md) + * approximate k-nearest neighbors via [vector search](https://github.com/blevesearch/bleve/blob/master/docs/vectors.md) +* [tf-idf](https://en.wikipedia.org/wiki/Tf-idf) scoring +* Hybrid search: exact + semantic * Query time boosting * Search result match highlighting with document fragments * Aggregations/faceting support: - * Terms Facet - * Numeric Range Facet - * Date Range Facet + * terms facet + * numeric range facet + * date range facet ## Indexing diff --git a/vendor/github.com/blevesearch/bleve/v2/index.go b/vendor/github.com/blevesearch/bleve/v2/index.go index 7d4c9be9..acbefc69 100644 --- a/vendor/github.com/blevesearch/bleve/v2/index.go +++ b/vendor/github.com/blevesearch/bleve/v2/index.go @@ -46,6 +46,9 @@ func (b *Batch) Index(id string, data interface{}) error { if id == "" { return ErrorEmptyID } + if eventIndex, ok := b.index.(index.EventIndex); ok { + eventIndex.FireIndexEvent() + } doc := document.NewDocument(id) err := b.index.Mapping().MapDocument(doc, data) if err != nil { diff --git a/vendor/github.com/blevesearch/bleve/v2/index/scorch/event.go b/vendor/github.com/blevesearch/bleve/v2/index/scorch/event.go index 0f653ccf..e0bc3b60 100644 --- a/vendor/github.com/blevesearch/bleve/v2/index/scorch/event.go +++ b/vendor/github.com/blevesearch/bleve/v2/index/scorch/event.go @@ -67,3 +67,7 @@ var EventKindMergeTaskIntroduction = EventKind(8) // EventKindPreMergeCheck is fired before the merge begins to check if // the caller should proceed with the merge. var EventKindPreMergeCheck = EventKind(9) + +// EventKindIndexStart is fired when Index() is invoked which +// creates a new Document object from an interface using the index mapping. +var EventKindIndexStart = EventKind(10) diff --git a/vendor/github.com/blevesearch/bleve/v2/index/scorch/optimize_knn.go b/vendor/github.com/blevesearch/bleve/v2/index/scorch/optimize_knn.go index 6b10a207..ca179574 100644 --- a/vendor/github.com/blevesearch/bleve/v2/index/scorch/optimize_knn.go +++ b/vendor/github.com/blevesearch/bleve/v2/index/scorch/optimize_knn.go @@ -23,6 +23,7 @@ import ( "sync" "sync/atomic" + "github.com/RoaringBitmap/roaring" "github.com/blevesearch/bleve/v2/search" index "github.com/blevesearch/bleve_index_api" segment_api "github.com/blevesearch/scorch_segment_api/v2" @@ -34,6 +35,8 @@ type OptimizeVR struct { totalCost uint64 // maps field to vector readers vrs map[string][]*IndexSnapshotVectorReader + // if at least one of the vector readers requires filtered kNN. + requiresFiltering bool } // This setting _MUST_ only be changed during init and not after. @@ -62,6 +65,11 @@ func (o *OptimizeVR) Finish() error { var errorsM sync.Mutex var errors []error + var snapshotGlobalDocNums map[int]*roaring.Bitmap + if o.requiresFiltering { + snapshotGlobalDocNums = o.snapshot.globalDocNums() + } + defer o.invokeSearcherEndCallback() wg := sync.WaitGroup{} @@ -77,7 +85,8 @@ func (o *OptimizeVR) Finish() error { wg.Done() }() for field, vrs := range o.vrs { - vecIndex, err := segment.InterpretVectorIndex(field, origSeg.deleted) + vecIndex, err := segment.InterpretVectorIndex(field, + o.requiresFiltering, origSeg.deleted) if err != nil { errorsM.Lock() errors = append(errors, err) @@ -89,9 +98,37 @@ func (o *OptimizeVR) Finish() error { vectorIndexSize := vecIndex.Size() origSeg.cachedMeta.updateMeta(field, vectorIndexSize) for _, vr := range vrs { + var pl segment_api.VecPostingsList + var err error + // for each VR, populate postings list and iterators // by passing the obtained vector index and getting similar vectors. - pl, err := vecIndex.Search(vr.vector, vr.k, vr.searchParams) + + // Only applies to filtered kNN. + if vr.eligibleDocIDs != nil && len(vr.eligibleDocIDs) > 0 { + eligibleVectorInternalIDs := vr.getEligibleDocIDs() + if snapshotGlobalDocNums != nil { + // Only the eligible documents belonging to this segment + // will get filtered out. + // There is no way to determine which doc belongs to which segment + eligibleVectorInternalIDs.And(snapshotGlobalDocNums[index]) + } + + eligibleLocalDocNums := make([]uint64, + eligibleVectorInternalIDs.GetCardinality()) + // get the (segment-)local document numbers + for i, docNum := range eligibleVectorInternalIDs.ToArray() { + localDocNum := o.snapshot.localDocNumFromGlobal(index, + uint64(docNum)) + eligibleLocalDocNums[i] = localDocNum + } + + pl, err = vecIndex.SearchWithFilter(vr.vector, vr.k, + eligibleLocalDocNums, vr.searchParams) + } else { + pl, err = vecIndex.Search(vr.vector, vr.k, vr.searchParams) + } + if err != nil { errorsM.Lock() errors = append(errors, err) @@ -140,6 +177,9 @@ func (s *IndexSnapshotVectorReader) VectorOptimize(ctx context.Context, return octx, nil } o.ctx = ctx + if !o.requiresFiltering { + o.requiresFiltering = len(s.eligibleDocIDs) > 0 + } if o.snapshot != s.snapshot { o.invokeSearcherEndCallback() diff --git a/vendor/github.com/blevesearch/bleve/v2/index/scorch/scorch.go b/vendor/github.com/blevesearch/bleve/v2/index/scorch/scorch.go index 7966d844..429d1daa 100644 --- a/vendor/github.com/blevesearch/bleve/v2/index/scorch/scorch.go +++ b/vendor/github.com/blevesearch/bleve/v2/index/scorch/scorch.go @@ -49,7 +49,7 @@ type Scorch struct { unsafeBatch bool - rootLock sync.RWMutex + rootLock sync.RWMutex root *IndexSnapshot // holds 1 ref-count on the root rootPersisted []chan error // closed when root is persisted @@ -376,6 +376,8 @@ func (s *Scorch) Delete(id string) error { func (s *Scorch) Batch(batch *index.Batch) (err error) { start := time.Now() + // notify handlers that we're about to index a batch of data + s.fireEvent(EventKindBatchIntroductionStart, 0) defer func() { s.fireEvent(EventKindBatchIntroduction, time.Since(start)) }() @@ -434,9 +436,6 @@ func (s *Scorch) Batch(batch *index.Batch) (err error) { indexStart := time.Now() - // notify handlers that we're about to introduce a segment - s.fireEvent(EventKindBatchIntroductionStart, 0) - var newSegment segment.Segment var bufBytes uint64 stats := newFieldStats() @@ -878,3 +877,8 @@ func (s *Scorch) CopyReader() index.CopyReader { s.rootLock.Unlock() return rv } + +// external API to fire a scorch event (EventKindIndexStart) externally from bleve +func (s *Scorch) FireIndexEvent() { + s.fireEvent(EventKindIndexStart, 0) +} diff --git a/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index.go b/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index.go index f0e7ae1c..79840a41 100644 --- a/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index.go +++ b/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index.go @@ -471,16 +471,44 @@ func (is *IndexSnapshot) Document(id string) (rv index.Document, err error) { return rvd, nil } +// In a multi-segment index, each document has: +// 1. a local docnum - local to the segment +// 2. a global docnum - unique identifier across the index +// This function returns the segment index(the segment in which the docnum is present) +// and local docnum of a document. func (is *IndexSnapshot) segmentIndexAndLocalDocNumFromGlobal(docNum uint64) (int, uint64) { segmentIndex := sort.Search(len(is.offsets), func(x int) bool { return is.offsets[x] > docNum }) - 1 - localDocNum := docNum - is.offsets[segmentIndex] + localDocNum := is.localDocNumFromGlobal(segmentIndex, docNum) return int(segmentIndex), localDocNum } +// This function returns the local docnum, given the segment index and global docnum +func (is *IndexSnapshot) localDocNumFromGlobal(segmentIndex int, docNum uint64) uint64 { + return docNum - is.offsets[segmentIndex] +} + +// Function to return a mapping of the segment index to the live global doc nums +// in the segment of the specified index snapshot. +func (is *IndexSnapshot) globalDocNums() map[int]*roaring.Bitmap { + if len(is.segment) == 0 { + return nil + } + + segmentIndexGlobalDocNums := make(map[int]*roaring.Bitmap) + + for i := range is.segment { + segmentIndexGlobalDocNums[i] = roaring.NewBitmap() + for _, localDocNum := range is.segment[i].DocNumbersLive().ToArray() { + segmentIndexGlobalDocNums[i].Add(localDocNum + uint32(is.offsets[i])) + } + } + return segmentIndexGlobalDocNums +} + func (is *IndexSnapshot) ExternalID(id index.IndexInternalID) (string, error) { docNum, err := docInternalToNumber(id) if err != nil { diff --git a/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index_vr.go b/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index_vr.go index 30e03dcb..320364bc 100644 --- a/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index_vr.go +++ b/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_index_vr.go @@ -24,6 +24,7 @@ import ( "fmt" "reflect" + "github.com/RoaringBitmap/roaring" "github.com/blevesearch/bleve/v2/size" index "github.com/blevesearch/bleve_index_api" segment_api "github.com/blevesearch/scorch_segment_api/v2" @@ -51,6 +52,31 @@ type IndexSnapshotVectorReader struct { ctx context.Context searchParams json.RawMessage + + // The following fields are only applicable for vector readers which will + // process pre-filtered kNN queries. + eligibleDocIDs []index.IndexInternalID +} + +// Function to convert the internal IDs of the eligible documents to a type suitable +// for addition to a bitmap. +// Useful to have the eligible doc IDs in a bitmap to leverage the fast intersection +// (AND) operations. Eg. finding the eligible doc IDs present in a segment. +func (i *IndexSnapshotVectorReader) getEligibleDocIDs() *roaring.Bitmap { + res := roaring.NewBitmap() + if len(i.eligibleDocIDs) > 0 { + internalDocIDs := make([]uint32, 0, len(i.eligibleDocIDs)) + // converts the doc IDs to uint32 and returns + for _, eligibleDocInternalID := range i.eligibleDocIDs { + internalDocID, err := docInternalToNumber(index.IndexInternalID(eligibleDocInternalID)) + if err != nil { + continue + } + internalDocIDs = append(internalDocIDs, uint32(internalDocID)) + } + res.AddMany(internalDocIDs) + } + return res } func (i *IndexSnapshotVectorReader) Size() int { @@ -108,7 +134,17 @@ func (i *IndexSnapshotVectorReader) Advance(ID index.IndexInternalID, preAlloced *index.VectorDoc) (*index.VectorDoc, error) { if i.currPosting != nil && bytes.Compare(i.currID, ID) >= 0 { - i2, err := i.snapshot.VectorReader(i.ctx, i.vector, i.field, i.k, i.searchParams) + var i2 index.VectorReader + var err error + + if len(i.eligibleDocIDs) > 0 { + i2, err = i.snapshot.VectorReaderWithFilter(i.ctx, i.vector, i.field, + i.k, i.searchParams, i.eligibleDocIDs) + } else { + i2, err = i.snapshot.VectorReader(i.ctx, i.vector, i.field, i.k, + i.searchParams) + } + if err != nil { return nil, err } diff --git a/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_vector_index.go b/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_vector_index.go index 70546d4e..bcb05024 100644 --- a/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_vector_index.go +++ b/vendor/github.com/blevesearch/bleve/v2/index/scorch/snapshot_vector_index.go @@ -48,3 +48,29 @@ func (is *IndexSnapshot) VectorReader(ctx context.Context, vector []float32, return rv, nil } + +func (is *IndexSnapshot) VectorReaderWithFilter(ctx context.Context, vector []float32, + field string, k int64, searchParams json.RawMessage, + filterIDs []index.IndexInternalID) ( + index.VectorReader, error) { + + rv := &IndexSnapshotVectorReader{ + vector: vector, + field: field, + k: k, + snapshot: is, + searchParams: searchParams, + eligibleDocIDs: filterIDs, + } + + if rv.postings == nil { + rv.postings = make([]segment_api.VecPostingsList, len(is.segment)) + } + if rv.iterators == nil { + rv.iterators = make([]segment_api.VecPostingsIterator, len(is.segment)) + } + + // initialize postings and iterators within the OptimizeVR's Finish() + + return rv, nil +} diff --git a/vendor/github.com/blevesearch/bleve/v2/index_impl.go b/vendor/github.com/blevesearch/bleve/v2/index_impl.go index 55212e3e..e6debf17 100644 --- a/vendor/github.com/blevesearch/bleve/v2/index_impl.go +++ b/vendor/github.com/blevesearch/bleve/v2/index_impl.go @@ -256,6 +256,8 @@ func (i *indexImpl) Index(id string, data interface{}) (err error) { return ErrorIndexClosed } + i.FireIndexEvent() + doc := document.NewDocument(id) err = i.m.MapDocument(doc, data) if err != nil { @@ -1112,3 +1114,16 @@ func (f FileSystemDirectory) GetWriter(filePath string) (io.WriteCloser, return os.OpenFile(filepath.Join(string(f), dir, file), os.O_RDWR|os.O_CREATE, 0600) } + +func (i *indexImpl) FireIndexEvent() { + // get the internal index implementation + internalIndex, err := i.Advanced() + if err != nil { + return + } + // check if the internal index implementation supports events + if internalEventIndex, ok := internalIndex.(index.EventIndex); ok { + // fire the Index() event + internalEventIndex.FireIndexEvent() + } +} diff --git a/vendor/github.com/blevesearch/bleve/v2/mapping/mapping_vectors.go b/vendor/github.com/blevesearch/bleve/v2/mapping/mapping_vectors.go index a3879c4b..dbfde1fb 100644 --- a/vendor/github.com/blevesearch/bleve/v2/mapping/mapping_vectors.go +++ b/vendor/github.com/blevesearch/bleve/v2/mapping/mapping_vectors.go @@ -24,6 +24,7 @@ import ( "github.com/blevesearch/bleve/v2/document" "github.com/blevesearch/bleve/v2/util" index "github.com/blevesearch/bleve_index_api" + faiss "github.com/blevesearch/go-faiss" ) // Min and Max allowed dimensions for a vector field; @@ -140,6 +141,10 @@ func (fm *FieldMapping) processVector(propertyMightBeVector interface{}, if !ok { return false } + // normalize raw vector if similarity is cosine + if fm.Similarity == index.CosineSimilarity { + vector = NormalizeVector(vector) + } fieldName := getFieldName(pathString, path, fm) options := fm.Options() @@ -163,6 +168,10 @@ func (fm *FieldMapping) processVectorBase64(propertyMightBeVectorBase64 interfac if err != nil || len(decodedVector) != fm.Dims { return } + // normalize raw vector if similarity is cosine + if fm.Similarity == index.CosineSimilarity { + decodedVector = NormalizeVector(decodedVector) + } fieldName := getFieldName(pathString, path, fm) options := fm.Options() @@ -252,3 +261,12 @@ func validateVectorFieldAlias(field *FieldMapping, parentName string, return nil } + +func NormalizeVector(vec []float32) []float32 { + // make a copy of the vector to avoid modifying the original + // vector in-place + vecCopy := make([]float32, len(vec)) + copy(vecCopy, vec) + // normalize the vector copy using in-place normalization provided by faiss + return faiss.NormalizeVector(vecCopy) +} diff --git a/vendor/github.com/blevesearch/bleve/v2/search/collector/eligible.go b/vendor/github.com/blevesearch/bleve/v2/search/collector/eligible.go new file mode 100644 index 00000000..5590290b --- /dev/null +++ b/vendor/github.com/blevesearch/bleve/v2/search/collector/eligible.go @@ -0,0 +1,157 @@ +// Copyright (c) 2024 Couchbase, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "context" + "fmt" + "time" + + "github.com/blevesearch/bleve/v2/search" + index "github.com/blevesearch/bleve_index_api" +) + +type EligibleCollector struct { + size int + total uint64 + took time.Duration + results search.DocumentMatchCollection + + ids []index.IndexInternalID +} + +func NewEligibleCollector(size int) *EligibleCollector { + return newEligibleCollector(size) +} + +func newEligibleCollector(size int) *EligibleCollector { + // No sort order & skip always 0 since this is only to filter eligible docs. + ec := &EligibleCollector{size: size, + ids: make([]index.IndexInternalID, 0, size), + } + return ec +} + +func makeEligibleDocumentMatchHandler(ctx *search.SearchContext) (search.DocumentMatchHandler, error) { + if ec, ok := ctx.Collector.(*EligibleCollector); ok { + return func(d *search.DocumentMatch) error { + if d == nil { + return nil + } + + copyOfID := make([]byte, len(d.IndexInternalID)) + copy(copyOfID, d.IndexInternalID) + ec.ids = append(ec.ids, copyOfID) + + // recycle the DocumentMatch + ctx.DocumentMatchPool.Put(d) + + return nil + }, nil + } + + return nil, fmt.Errorf("eligiblity collector not available") +} + +func (ec *EligibleCollector) Collect(ctx context.Context, searcher search.Searcher, reader index.IndexReader) error { + startTime := time.Now() + var err error + var next *search.DocumentMatch + + backingSize := ec.size + if backingSize > PreAllocSizeSkipCap { + backingSize = PreAllocSizeSkipCap + 1 + } + searchContext := &search.SearchContext{ + DocumentMatchPool: search.NewDocumentMatchPool(backingSize+searcher.DocumentMatchPoolSize(), 0), + Collector: ec, + IndexReader: reader, + } + + dmHandler, err := makeEligibleDocumentMatchHandler(searchContext) + if err != nil { + return err + } + select { + case <-ctx.Done(): + search.RecordSearchCost(ctx, search.AbortM, 0) + return ctx.Err() + default: + next, err = searcher.Next(searchContext) + } + for err == nil && next != nil { + if ec.total%CheckDoneEvery == 0 { + select { + case <-ctx.Done(): + search.RecordSearchCost(ctx, search.AbortM, 0) + return ctx.Err() + default: + } + } + ec.total++ + + err = dmHandler(next) + if err != nil { + break + } + + next, err = searcher.Next(searchContext) + } + if err != nil { + return err + } + + // help finalize/flush the results in case + // of custom document match handlers. + err = dmHandler(nil) + if err != nil { + return err + } + + // compute search duration + ec.took = time.Since(startTime) + + return nil +} + +func (ec *EligibleCollector) Results() search.DocumentMatchCollection { + return nil +} + +func (ec *EligibleCollector) IDs() []index.IndexInternalID { + return ec.ids +} + +func (ec *EligibleCollector) Total() uint64 { + return ec.total +} + +// No concept of scoring in the eligible collector. +func (ec *EligibleCollector) MaxScore() float64 { + return 0 +} + +func (ec *EligibleCollector) Took() time.Duration { + return ec.took +} + +func (ec *EligibleCollector) SetFacetsBuilder(facetsBuilder *search.FacetsBuilder) { + // facet unsupported for pre-filtering in KNN search +} + +func (ec *EligibleCollector) FacetResults() search.FacetResults { + // facet unsupported for pre-filtering in KNN search + return nil +} diff --git a/vendor/github.com/blevesearch/bleve/v2/search/collector/slice.go b/vendor/github.com/blevesearch/bleve/v2/search/collector/slice.go index 07534e69..6120921c 100644 --- a/vendor/github.com/blevesearch/bleve/v2/search/collector/slice.go +++ b/vendor/github.com/blevesearch/bleve/v2/search/collector/slice.go @@ -14,7 +14,9 @@ package collector -import "github.com/blevesearch/bleve/v2/search" +import ( + "github.com/blevesearch/bleve/v2/search" +) type collectStoreSlice struct { slice search.DocumentMatchCollection diff --git a/vendor/github.com/blevesearch/bleve/v2/search/query/boolean.go b/vendor/github.com/blevesearch/bleve/v2/search/query/boolean.go index 026a5868..734dfd13 100644 --- a/vendor/github.com/blevesearch/bleve/v2/search/query/boolean.go +++ b/vendor/github.com/blevesearch/bleve/v2/search/query/boolean.go @@ -74,6 +74,9 @@ func (q *BooleanQuery) SetMinShould(minShould float64) { } func (q *BooleanQuery) AddMust(m ...Query) { + if m == nil { + return + } if q.Must == nil { tmp := NewConjunctionQuery([]Query{}) tmp.queryStringMode = q.queryStringMode @@ -85,6 +88,9 @@ func (q *BooleanQuery) AddMust(m ...Query) { } func (q *BooleanQuery) AddShould(m ...Query) { + if m == nil { + return + } if q.Should == nil { tmp := NewDisjunctionQuery([]Query{}) tmp.queryStringMode = q.queryStringMode @@ -96,6 +102,9 @@ func (q *BooleanQuery) AddShould(m ...Query) { } func (q *BooleanQuery) AddMustNot(m ...Query) { + if m == nil { + return + } if q.MustNot == nil { tmp := NewDisjunctionQuery([]Query{}) tmp.queryStringMode = q.queryStringMode diff --git a/vendor/github.com/blevesearch/bleve/v2/search/query/knn.go b/vendor/github.com/blevesearch/bleve/v2/search/query/knn.go index 17e85541..4d105d94 100644 --- a/vendor/github.com/blevesearch/bleve/v2/search/query/knn.go +++ b/vendor/github.com/blevesearch/bleve/v2/search/query/knn.go @@ -35,7 +35,9 @@ type KNNQuery struct { BoostVal *Boost `json:"boost,omitempty"` // see KNNRequest.Params for description - Params json.RawMessage `json:"params"` + Params json.RawMessage `json:"params"` + FilterQuery Query `json:"filter,omitempty"` + filterResults []index.IndexInternalID } func NewKNNQuery(vector []float32) *KNNQuery { @@ -67,6 +69,14 @@ func (q *KNNQuery) SetParams(params json.RawMessage) { q.Params = params } +func (q *KNNQuery) SetFilterQuery(f Query) { + q.FilterQuery = f +} + +func (q *KNNQuery) SetFilterResults(results []index.IndexInternalID) { + q.filterResults = results +} + func (q *KNNQuery) Searcher(ctx context.Context, i index.IndexReader, m mapping.IndexMapping, options search.SearcherOptions) (search.Searcher, error) { fieldMapping := m.FieldMappingForPath(q.VectorField) @@ -77,6 +87,12 @@ func (q *KNNQuery) Searcher(ctx context.Context, i index.IndexReader, if q.K <= 0 || len(q.Vector) == 0 { return nil, fmt.Errorf("k must be greater than 0 and vector must be non-empty") } + if similarityMetric == index.CosineSimilarity { + // normalize the vector + q.Vector = mapping.NormalizeVector(q.Vector) + } + return searcher.NewKNNSearcher(ctx, i, m, options, q.VectorField, - q.Vector, q.K, q.BoostVal.Value(), similarityMetric, q.Params) + q.Vector, q.K, q.BoostVal.Value(), similarityMetric, q.Params, + q.filterResults) } diff --git a/vendor/github.com/blevesearch/bleve/v2/search/searcher/search_knn.go b/vendor/github.com/blevesearch/bleve/v2/search/searcher/search_knn.go index e17bb7a0..866900d4 100644 --- a/vendor/github.com/blevesearch/bleve/v2/search/searcher/search_knn.go +++ b/vendor/github.com/blevesearch/bleve/v2/search/searcher/search_knn.go @@ -49,11 +49,20 @@ type KNNSearcher struct { func NewKNNSearcher(ctx context.Context, i index.IndexReader, m mapping.IndexMapping, options search.SearcherOptions, field string, vector []float32, k int64, - boost float64, similarityMetric string, searchParams json.RawMessage) ( + boost float64, similarityMetric string, searchParams json.RawMessage, + filterIDs []index.IndexInternalID) ( search.Searcher, error) { if vr, ok := i.(index.VectorIndexReader); ok { - vectorReader, err := vr.VectorReader(ctx, vector, field, k, searchParams) + var vectorReader index.VectorReader + var err error + + if len(filterIDs) > 0 { + vectorReader, err = vr.VectorReaderWithFilter(ctx, vector, field, k, + searchParams, filterIDs) + } else { + vectorReader, err = vr.VectorReader(ctx, vector, field, k, searchParams) + } if err != nil { return nil, err } diff --git a/vendor/github.com/blevesearch/bleve/v2/search_knn.go b/vendor/github.com/blevesearch/bleve/v2/search_knn.go index 008a3615..309b3659 100644 --- a/vendor/github.com/blevesearch/bleve/v2/search_knn.go +++ b/vendor/github.com/blevesearch/bleve/v2/search_knn.go @@ -87,6 +87,10 @@ type KNNRequest struct { // // Consult go-faiss to know all supported search params Params json.RawMessage `json:"params"` + + // Filter query to use with kNN pre-filtering. + // Supports pre-filtering with all existing types of query clauses. + FilterQuery query.Query `json:"filter,omitempty"` } func (r *SearchRequest) AddKNN(field string, vector []float32, k int64, boost float64) { @@ -99,6 +103,18 @@ func (r *SearchRequest) AddKNN(field string, vector []float32, k int64, boost fl }) } +func (r *SearchRequest) AddKNNWithFilter(field string, vector []float32, k int64, + boost float64, filterQuery query.Query) { + b := query.Boost(boost) + r.KNN = append(r.KNN, &KNNRequest{ + Field: field, + Vector: vector, + K: k, + Boost: &b, + FilterQuery: filterQuery, + }) +} + func (r *SearchRequest) AddKNNOperator(operator knnOperator) { r.KNNOperator = operator } @@ -106,6 +122,16 @@ func (r *SearchRequest) AddKNNOperator(operator knnOperator) { // UnmarshalJSON deserializes a JSON representation of // a SearchRequest func (r *SearchRequest) UnmarshalJSON(input []byte) error { + type tempKNNReq struct { + Field string `json:"field"` + Vector []float32 `json:"vector"` + VectorBase64 string `json:"vector_base64"` + K int64 `json:"k"` + Boost *query.Boost `json:"boost,omitempty"` + Params json.RawMessage `json:"params"` + FilterQuery json.RawMessage `json:"filter,omitempty"` + } + var temp struct { Q json.RawMessage `json:"query"` Size *int `json:"size"` @@ -119,7 +145,7 @@ func (r *SearchRequest) UnmarshalJSON(input []byte) error { Score string `json:"score"` SearchAfter []string `json:"search_after"` SearchBefore []string `json:"search_before"` - KNN []*KNNRequest `json:"knn"` + KNN []*tempKNNReq `json:"knn"` KNNOperator knnOperator `json:"knn_operator"` PreSearchData json.RawMessage `json:"pre_search_data"` } @@ -163,7 +189,22 @@ func (r *SearchRequest) UnmarshalJSON(input []byte) error { r.From = 0 } - r.KNN = temp.KNN + r.KNN = make([]*KNNRequest, len(temp.KNN)) + for i, knnReq := range temp.KNN { + r.KNN[i] = &KNNRequest{} + r.KNN[i].Field = temp.KNN[i].Field + r.KNN[i].Vector = temp.KNN[i].Vector + r.KNN[i].VectorBase64 = temp.KNN[i].VectorBase64 + r.KNN[i].K = temp.KNN[i].K + r.KNN[i].Boost = temp.KNN[i].Boost + r.KNN[i].Params = temp.KNN[i].Params + if len(knnReq.FilterQuery) == 0 { + // Setting this to nil to avoid ParseQuery() setting it to a match none + r.KNN[i].FilterQuery = nil + } else { + r.KNN[i].FilterQuery, err = query.ParseQuery(knnReq.FilterQuery) + } + } r.KNNOperator = temp.KNNOperator if r.KNNOperator == "" { r.KNNOperator = knnOperatorOr @@ -209,7 +250,9 @@ var ( knnOperatorOr = knnOperator("or") ) -func createKNNQuery(req *SearchRequest) (query.Query, []int64, int64, error) { +func createKNNQuery(req *SearchRequest, eligibleDocsMap map[int][]index.IndexInternalID, + requiresFiltering map[int]bool) ( + query.Query, []int64, int64, error) { if requestHasKNN(req) { // first perform validation err := validateKNN(req) @@ -219,12 +262,25 @@ func createKNNQuery(req *SearchRequest) (query.Query, []int64, int64, error) { var subQueries []query.Query kArray := make([]int64, 0, len(req.KNN)) sumOfK := int64(0) - for _, knn := range req.KNN { + for i, knn := range req.KNN { + // If it's a filtered kNN but has no eligible filter hits, then + // do not run the kNN query. + if requiresFiltering[i] && len(eligibleDocsMap[i]) <= 0 { + continue + } + knnQuery := query.NewKNNQuery(knn.Vector) knnQuery.SetFieldVal(knn.Field) knnQuery.SetK(knn.K) knnQuery.SetBoost(knn.Boost.Value()) knnQuery.SetParams(knn.Params) + if len(eligibleDocsMap[i]) > 0 { + knnQuery.SetFilterQuery(knn.FilterQuery) + filterResults, exists := eligibleDocsMap[i] + if exists { + knnQuery.SetFilterResults(filterResults) + } + } subQueries = append(subQueries, knnQuery) kArray = append(kArray, knn.K) sumOfK += knn.K @@ -303,7 +359,62 @@ func addSortAndFieldsToKNNHits(req *SearchRequest, knnHits []*search.DocumentMat } func (i *indexImpl) runKnnCollector(ctx context.Context, req *SearchRequest, reader index.IndexReader, preSearch bool) ([]*search.DocumentMatch, error) { - KNNQuery, kArray, sumOfK, err := createKNNQuery(req) + // maps the index of the KNN query in the req to the pre-filter hits aka + // eligible docs' internal IDs . + filterHitsMap := make(map[int][]index.IndexInternalID) + // Indicates if this query requires filtering downstream + // No filtering required if it's a match all query/no filters applied. + requiresFiltering := make(map[int]bool) + + for idx, knnReq := range req.KNN { + // TODO Can use goroutines for this filter query stuff - do it if perf results + // show this to be significantly slow otherwise. + filterQ := knnReq.FilterQuery + if filterQ == nil { + requiresFiltering[idx] = false + continue + } + + if _, ok := filterQ.(*query.MatchAllQuery); ok { + // Equivalent to not having a filter query. + requiresFiltering[idx] = false + continue + } + + if _, ok := filterQ.(*query.MatchNoneQuery); ok { + // Filtering required since no hits are eligible. + requiresFiltering[idx] = true + // a match none query just means none the documents are eligible + // hence, we can save on running the query. + continue + } + + // Applies to all supported types of queries. + filterSearcher, _ := filterQ.Searcher(ctx, reader, i.m, search.SearcherOptions{ + Score: "none", // just want eligible hits --> don't compute scores if not needed + }) + // Using the index doc count to determine collector size since we do not + // have an estimate of the number of eligible docs in the index yet. + indexDocCount, err := i.DocCount() + if err != nil { + return nil, err + } + filterColl := collector.NewEligibleCollector(int(indexDocCount)) + err = filterColl.Collect(ctx, filterSearcher, reader) + if err != nil { + return nil, err + } + filterHits := filterColl.IDs() + if len(filterHits) > 0 { + filterHitsMap[idx] = filterHits + } + // set requiresFiltering regardless of whether there're filtered hits or + // not to later decide whether to consider the knnQuery or not + requiresFiltering[idx] = true + } + + // Add the filter hits when creating the kNN query + KNNQuery, kArray, sumOfK, err := createKNNQuery(req, filterHitsMap, requiresFiltering) if err != nil { return nil, err } diff --git a/vendor/github.com/blevesearch/bleve_index_api/index.go b/vendor/github.com/blevesearch/bleve_index_api/index.go index a0035560..c2125d66 100644 --- a/vendor/github.com/blevesearch/bleve_index_api/index.go +++ b/vendor/github.com/blevesearch/bleve_index_api/index.go @@ -57,6 +57,14 @@ type CopyIndex interface { CopyReader() CopyReader } +// EventIndex is an optional interface for exposing the support for firing event +// callbacks for various events in the index. +type EventIndex interface { + // FireIndexEvent is used to fire an event callback when Index() is called, + // to notify the caller that a document has been added to the index. + FireIndexEvent() +} + type IndexReader interface { TermFieldReader(ctx context.Context, term []byte, field string, includeFreq, includeNorm, includeTermVectors bool) (TermFieldReader, error) diff --git a/vendor/github.com/blevesearch/bleve_index_api/vector.go b/vendor/github.com/blevesearch/bleve_index_api/vector.go index 3eff52ca..c1b5837a 100644 --- a/vendor/github.com/blevesearch/bleve_index_api/vector.go +++ b/vendor/github.com/blevesearch/bleve_index_api/vector.go @@ -32,12 +32,9 @@ type VectorField interface { const ( EuclideanDistance = "l2_norm" - // dotProduct(vecA, vecB) = vecA . vecB = |vecA| * |vecB| * cos(theta); - // where, theta is the angle between vecA and vecB - // If vecA and vecB are normalized (unit magnitude), then - // vecA . vecB = cos(theta), which is the cosine similarity. - // Thus, we don't need a separate similarity type for cosine similarity - CosineSimilarity = "dot_product" + InnerProduct = "dot_product" + + CosineSimilarity = "cosine" ) const DefaultSimilarityMetric = EuclideanDistance @@ -45,6 +42,7 @@ const DefaultSimilarityMetric = EuclideanDistance // Supported similarity metrics for vector fields var SupportedSimilarityMetrics = map[string]struct{}{ EuclideanDistance: {}, + InnerProduct: {}, CosineSimilarity: {}, } diff --git a/vendor/github.com/blevesearch/bleve_index_api/vector_index.go b/vendor/github.com/blevesearch/bleve_index_api/vector_index.go index da0a74ae..d1a4ca3f 100644 --- a/vendor/github.com/blevesearch/bleve_index_api/vector_index.go +++ b/vendor/github.com/blevesearch/bleve_index_api/vector_index.go @@ -48,8 +48,11 @@ type VectorReader interface { } type VectorIndexReader interface { - VectorReader(ctx context.Context, vector []float32, field string, k int64, searchParams json.RawMessage) ( - VectorReader, error) + VectorReader(ctx context.Context, vector []float32, field string, k int64, + searchParams json.RawMessage) (VectorReader, error) + + VectorReaderWithFilter(ctx context.Context, vector []float32, field string, k int64, + searchParams json.RawMessage, filterIDs []IndexInternalID) (VectorReader, error) } type VectorDoc struct { diff --git a/vendor/github.com/blevesearch/go-faiss/faiss.go b/vendor/github.com/blevesearch/go-faiss/faiss.go index 4a73f760..a7087e74 100644 --- a/vendor/github.com/blevesearch/go-faiss/faiss.go +++ b/vendor/github.com/blevesearch/go-faiss/faiss.go @@ -9,6 +9,7 @@ package faiss #include #include +#include */ import "C" import "errors" @@ -28,3 +29,13 @@ const ( MetricBrayCurtis = C.METRIC_BrayCurtis MetricJensenShannon = C.METRIC_JensenShannon ) + +// In-place normalization of provided vector (single) +func NormalizeVector(vector []float32) []float32 { + C.faiss_fvec_renorm_L2( + C.size_t(len(vector)), + 1, // number of vectors + (*C.float)(&vector[0])) + + return vector +} diff --git a/vendor/github.com/blevesearch/go-faiss/index.go b/vendor/github.com/blevesearch/go-faiss/index.go index b58a6149..58543f29 100644 --- a/vendor/github.com/blevesearch/go-faiss/index.go +++ b/vendor/github.com/blevesearch/go-faiss/index.go @@ -44,6 +44,15 @@ type Index interface { // AddWithIDs is like Add, but stores xids instead of sequential IDs. AddWithIDs(x []float32, xids []int64) error + // Applicable only to IVF indexes: Return a map of centroid ID --> []vector IDs + // for the cluster. + ObtainClusterToVecIDsFromIVFIndex() (ids map[int64][]int64, err error) + + // Applicable only to IVF indexes: Returns the centroid IDs in decreasing order + // of proximity to query 'x' and their distance from 'x' + ObtainClustersWithDistancesFromIVFIndex(x []float32, centroidIDs []int64) ( + []int64, []float32, error) + // Search queries the index with the vectors in x. // Returns the IDs of the k nearest neighbors for each query vector and the // corresponding distances. @@ -52,6 +61,14 @@ type Index interface { SearchWithoutIDs(x []float32, k int64, exclude []int64, params json.RawMessage) (distances []float32, labels []int64, err error) + SearchWithIDs(x []float32, k int64, include []int64, params json.RawMessage) (distances []float32, + labels []int64, err error) + + // Applicable only to IVF indexes: Search clusters whose IDs are in eligibleCentroidIDs + SearchClustersFromIVFIndex(selector Selector, nvecs int, eligibleCentroidIDs []int64, + minEligibleCentroids int, k int64, x, centroidDis []float32, + params json.RawMessage) ([]float32, []int64, error) + Reconstruct(key int64) ([]float32, error) ReconstructBatch(keys []int64, recons []float32) ([]float32, error) @@ -123,6 +140,101 @@ func (idx *faissIndex) Add(x []float32) error { return nil } +func (idx *faissIndex) ObtainClusterToVecIDsFromIVFIndex() (map[int64][]int64, error) { + // This type assertion is required to determine whether to invoke + // ObtainClustersWithDistancesFromIVFIndex, SearchClustersFromIVFIndex or not. + if ivfIdx := C.faiss_IndexIVF_cast(idx.cPtr()); ivfIdx == nil { + return nil, nil + } + + clusterVectorIDMap := make(map[int64][]int64) + + nlist := C.faiss_IndexIVF_nlist(idx.idx) + for i := 0; i < int(nlist); i++ { + list_size := C.faiss_IndexIVF_get_list_size(idx.idx, C.size_t(i)) + invlist := make([]int64, list_size) + C.faiss_IndexIVF_invlists_get_ids(idx.idx, C.size_t(i), (*C.idx_t)(&invlist[0])) + clusterVectorIDMap[int64(i)] = invlist + } + + return clusterVectorIDMap, nil +} + +func (idx *faissIndex) ObtainClustersWithDistancesFromIVFIndex(x []float32, centroidIDs []int64) ( + []int64, []float32, error) { + // Selector to include only the centroids whose IDs are part of 'centroidIDs'. + includeSelector, err := NewIDSelectorBatch(centroidIDs) + if err != nil { + return nil, nil, err + } + defer includeSelector.Delete() + + params, err := NewSearchParams(idx, json.RawMessage{}, includeSelector.Get()) + if err != nil { + return nil, nil, err + } + + // Populate these with the centroids and their distances. + centroids := make([]int64, len(centroidIDs)) + centroidDistances := make([]float32, len(centroidIDs)) + + n := len(x) / idx.D() + + c := C.faiss_Search_closest_eligible_centroids(idx.idx, (C.int)(n), + (*C.float)(&x[0]), (C.int)(len(centroidIDs)), + (*C.float)(¢roidDistances[0]), (*C.idx_t)(¢roids[0]), params.sp) + if c != 0 { + return nil, nil, getLastError() + } + + return centroids, centroidDistances, nil +} + +func (idx *faissIndex) SearchClustersFromIVFIndex(selector Selector, nvecs int, + eligibleCentroidIDs []int64, minEligibleCentroids int, k int64, x, + centroidDis []float32, params json.RawMessage) ([]float32, []int64, error) { + defer selector.Delete() + + tempParams := defaultSearchParamsIVF{ + Nlist: len(eligibleCentroidIDs), + // Have to override nprobe so that more clusters will be searched for this + // query, if required. + Nprobe: minEligibleCentroids, + Nvecs: nvecs, + } + + searchParams, err := NewSearchParamsIVF(idx, params, selector.Get(), + tempParams) + if err != nil { + return nil, nil, err + } + + n := len(x) / idx.D() + + distances := make([]float32, int64(n)*k) + labels := make([]int64, int64(n)*k) + + effectiveNprobe := getNProbeFromSearchParams(searchParams) + eligibleCentroidIDs = eligibleCentroidIDs[:effectiveNprobe] + centroidDis = centroidDis[:effectiveNprobe] + + if c := C.faiss_IndexIVF_search_preassigned_with_params( + idx.idx, + (C.idx_t)(n), + (*C.float)(&x[0]), + (C.idx_t)(k), + (*C.idx_t)(&eligibleCentroidIDs[0]), + (*C.float)(¢roidDis[0]), + (*C.float)(&distances[0]), + (*C.idx_t)(&labels[0]), + (C.int)(0), + searchParams.sp); c != 0 { + return nil, nil, getLastError() + } + + return distances, labels, nil +} + func (idx *faissIndex) AddWithIDs(x []float32, xids []int64) error { n := len(x) / idx.D() if c := C.faiss_Index_add_with_ids( @@ -139,7 +251,6 @@ func (idx *faissIndex) AddWithIDs(x []float32, xids []int64) error { func (idx *faissIndex) Search(x []float32, k int64) ( distances []float32, labels []int64, err error, ) { - n := len(x) / idx.D() distances = make([]float32, int64(n)*k) labels = make([]int64, int64(n)*k) @@ -170,7 +281,7 @@ func (idx *faissIndex) SearchWithoutIDs(x []float32, k int64, exclude []int64, p if err != nil { return nil, nil, err } - selector = excludeSelector.sel + selector = excludeSelector.Get() defer excludeSelector.Delete() } @@ -185,6 +296,25 @@ func (idx *faissIndex) SearchWithoutIDs(x []float32, k int64, exclude []int64, p return } +func (idx *faissIndex) SearchWithIDs(x []float32, k int64, include []int64, + params json.RawMessage) (distances []float32, labels []int64, err error, +) { + includeSelector, err := NewIDSelectorBatch(include) + if err != nil { + return nil, nil, err + } + defer includeSelector.Delete() + + searchParams, err := NewSearchParams(idx, params, includeSelector.Get()) + if err != nil { + return nil, nil, err + } + defer searchParams.Delete() + + distances, labels, err = idx.searchWithParams(x, k, searchParams.sp) + return +} + func (idx *faissIndex) Reconstruct(key int64) (recons []float32, err error) { rv := make([]float32, idx.D()) if c := C.faiss_Index_reconstruct( diff --git a/vendor/github.com/blevesearch/go-faiss/index_ivf.go b/vendor/github.com/blevesearch/go-faiss/index_ivf.go index 2d84e4ab..38f023aa 100644 --- a/vendor/github.com/blevesearch/go-faiss/index_ivf.go +++ b/vendor/github.com/blevesearch/go-faiss/index_ivf.go @@ -51,3 +51,11 @@ func (idx *IndexImpl) SetNProbe(nprobe int32) { } C.faiss_IndexIVF_set_nprobe(ivfPtr, C.size_t(nprobe)) } + +func (idx *IndexImpl) GetNProbe() int32 { + ivfPtr := C.faiss_IndexIVF_cast(idx.cPtr()) + if ivfPtr == nil { + return 0 + } + return int32(C.faiss_IndexIVF_nprobe(ivfPtr)) +} diff --git a/vendor/github.com/blevesearch/go-faiss/search_params.go b/vendor/github.com/blevesearch/go-faiss/search_params.go index 17575d5f..cc49a6a5 100644 --- a/vendor/github.com/blevesearch/go-faiss/search_params.go +++ b/vendor/github.com/blevesearch/go-faiss/search_params.go @@ -28,6 +28,15 @@ type searchParamsIVF struct { MaxCodesPct float32 `json:"ivf_max_codes_pct,omitempty"` } +// IVF Parameters used to override the index-time defaults for a specific query. +// Serve as the 'new' defaults for this query, unless overridden by search-time +// params. +type defaultSearchParamsIVF struct { + Nprobe int `json:"ivf_nprobe,omitempty"` + Nlist int `json:"ivf_nlist,omitempty"` + Nvecs int `json:"ivf_nvecs,omitempty"` +} + func (s *searchParamsIVF) Validate() error { if s.NprobePct < 0 || s.NprobePct > 100 { return fmt.Errorf("invalid IVF search params, ivf_nprobe_pct:%v, "+ @@ -42,6 +51,70 @@ func (s *searchParamsIVF) Validate() error { return nil } +func getNProbeFromSearchParams(params *SearchParams) int32 { + return int32(C.faiss_SearchParametersIVF_nprobe(params.sp)) +} + +func NewSearchParamsIVF(idx Index, params json.RawMessage, sel *C.FaissIDSelector, + defaultParams defaultSearchParamsIVF) (*SearchParams, error) { + rv := &SearchParams{} + if ivfIdx := C.faiss_IndexIVF_cast(idx.cPtr()); ivfIdx != nil { + rv.sp = C.faiss_SearchParametersIVF_cast(rv.sp) + if len(params) == 0 && sel == nil { + return rv, nil + } + + var nprobe, maxCodes, nlist int + nlist = int(C.faiss_IndexIVF_nlist(ivfIdx)) + // It's important to set nprobe to the value decided at the time of + // index creation. Otherwise, nprobe will be set to the default + // value of 1. + nprobe = int(C.faiss_IndexIVF_nprobe(ivfIdx)) + + nvecs := idx.Ntotal() + if defaultParams.Nvecs > 0 { + nvecs = int64(defaultParams.Nvecs) + } + if defaultParams.Nlist > 0 { + nlist = defaultParams.Nlist + } + if defaultParams.Nprobe > 0 { + nprobe = defaultParams.Nprobe + } + + var ivfParams searchParamsIVF + if len(params) > 0 { + if err := json.Unmarshal(params, &ivfParams); err != nil { + return rv, fmt.Errorf("failed to unmarshal IVF search params, "+ + "err:%v", err) + } + if err := ivfParams.Validate(); err != nil { + return rv, err + } + } + + if ivfParams.NprobePct > 0 { + // in the situation when the calculated nprobe happens to be + // between 0 and 1, we'll round it up. + nprobe = max(int(float32(nlist)*(ivfParams.NprobePct/100)), 1) + } + + if ivfParams.MaxCodesPct > 0 { + maxCodes = int(float32(nvecs) * (ivfParams.MaxCodesPct / 100)) + } // else, maxCodes will be set to the default value of 0, which means no limit + + if c := C.faiss_SearchParametersIVF_new_with( + &rv.sp, + sel, + C.size_t(nprobe), + C.size_t(maxCodes), + ); c != 0 { + return rv, fmt.Errorf("failed to create faiss IVF search params") + } + } + return rv, nil +} + // Always return a valid SearchParams object, // thus caller must clean up the object // by invoking Delete() method, even if an error is returned. @@ -52,29 +125,33 @@ func NewSearchParams(idx Index, params json.RawMessage, sel *C.FaissIDSelector, return rv, fmt.Errorf("failed to create faiss search params") } - // # check if the index is IVF and set the search params + // check if the index is IVF and set the search params if ivfIdx := C.faiss_IndexIVF_cast(idx.cPtr()); ivfIdx != nil { rv.sp = C.faiss_SearchParametersIVF_cast(rv.sp) - if len(params) == 0 { + if len(params) == 0 && sel == nil { return rv, nil } var ivfParams searchParamsIVF - if err := json.Unmarshal(params, &ivfParams); err != nil { - return rv, fmt.Errorf("failed to unmarshal IVF search params, "+ - "err:%v", err) - } - if err := ivfParams.Validate(); err != nil { - return rv, err + if len(params) > 0 { + if err := json.Unmarshal(params, &ivfParams); err != nil { + return rv, fmt.Errorf("failed to unmarshal IVF search params, "+ + "err:%v", err) + } + if err := ivfParams.Validate(); err != nil { + return rv, err + } } var nprobe, maxCodes int if ivfParams.NprobePct > 0 { nlist := float32(C.faiss_IndexIVF_nlist(ivfIdx)) - nprobe = int(nlist * (ivfParams.NprobePct / 100)) + // in the situation when the calculated nprobe happens to be + // between 0 and 1, we'll round it up. + nprobe = max(int(nlist*(ivfParams.NprobePct/100)), 1) } else { - // It's important to set nprobe to the value decided at the time of + // it's important to set nprobe to the value decided at the time of // index creation. Otherwise, nprobe will be set to the default // value of 1. nprobe = int(C.faiss_IndexIVF_nprobe(ivfIdx)) diff --git a/vendor/github.com/blevesearch/go-faiss/selector.go b/vendor/github.com/blevesearch/go-faiss/selector.go index d372006b..8e95c461 100644 --- a/vendor/github.com/blevesearch/go-faiss/selector.go +++ b/vendor/github.com/blevesearch/go-faiss/selector.go @@ -5,6 +5,11 @@ package faiss */ import "C" +type Selector interface { + Get() *C.FaissIDSelector + Delete() +} + // IDSelector represents a set of IDs to remove. type IDSelector struct { sel *C.FaissIDSelector @@ -19,13 +24,17 @@ func (s *IDSelector) Delete() { C.faiss_IDSelector_free(s.sel) } -type IDSelectorBatch struct { +func (s *IDSelector) Get() *C.FaissIDSelector { + return s.sel +} + +type IDSelectorNot struct { sel *C.FaissIDSelector batchSel *C.FaissIDSelector } // Delete frees the memory associated with s. -func (s *IDSelectorBatch) Delete() { +func (s *IDSelectorNot) Delete() { if s == nil { return } @@ -38,8 +47,12 @@ func (s *IDSelectorBatch) Delete() { } } +func (s *IDSelectorNot) Get() *C.FaissIDSelector { + return s.sel +} + // NewIDSelectorRange creates a selector that removes IDs on [imin, imax). -func NewIDSelectorRange(imin, imax int64) (*IDSelector, error) { +func NewIDSelectorRange(imin, imax int64) (Selector, error) { var sel *C.FaissIDSelectorRange c := C.faiss_IDSelectorRange_new(&sel, C.idx_t(imin), C.idx_t(imax)) if c != 0 { @@ -49,7 +62,7 @@ func NewIDSelectorRange(imin, imax int64) (*IDSelector, error) { } // NewIDSelectorBatch creates a new batch selector. -func NewIDSelectorBatch(indices []int64) (*IDSelector, error) { +func NewIDSelectorBatch(indices []int64) (Selector, error) { var sel *C.FaissIDSelectorBatch if c := C.faiss_IDSelectorBatch_new( &sel, @@ -61,9 +74,9 @@ func NewIDSelectorBatch(indices []int64) (*IDSelector, error) { return &IDSelector{(*C.FaissIDSelector)(sel)}, nil } -// NewIDSelectorNot creates a new Not selector, wrapped arround a +// NewIDSelectorNot creates a new Not selector, wrapped around a // batch selector, with the IDs in 'exclude'. -func NewIDSelectorNot(exclude []int64) (*IDSelectorBatch, error) { +func NewIDSelectorNot(exclude []int64) (Selector, error) { batchSelector, err := NewIDSelectorBatch(exclude) if err != nil { return nil, err @@ -72,10 +85,11 @@ func NewIDSelectorNot(exclude []int64) (*IDSelectorBatch, error) { var sel *C.FaissIDSelectorNot if c := C.faiss_IDSelectorNot_new( &sel, - batchSelector.sel, + batchSelector.Get(), ); c != 0 { batchSelector.Delete() return nil, getLastError() } - return &IDSelectorBatch{sel: (*C.FaissIDSelector)(sel), batchSel: batchSelector.sel}, nil + return &IDSelectorNot{sel: (*C.FaissIDSelector)(sel), + batchSel: batchSelector.Get()}, nil } diff --git a/vendor/github.com/blevesearch/scorch_segment_api/v2/segment_vector.go b/vendor/github.com/blevesearch/scorch_segment_api/v2/segment_vector.go index 3af08e25..77b03621 100644 --- a/vendor/github.com/blevesearch/scorch_segment_api/v2/segment_vector.go +++ b/vendor/github.com/blevesearch/scorch_segment_api/v2/segment_vector.go @@ -59,13 +59,17 @@ type VecPostingsIterator interface { type VectorIndex interface { // @params: Search params for backing vector index (like IVF, HNSW, etc.) Search(qVector []float32, k int64, params json.RawMessage) (VecPostingsList, error) + // @eligibleDocIDs: DocIDs in the segment eligible for the kNN query. + SearchWithFilter(qVector []float32, k int64, eligibleDocIDs []uint64, + params json.RawMessage) (VecPostingsList, error) Close() Size() uint64 } type VectorSegment interface { Segment - InterpretVectorIndex(field string, except *roaring.Bitmap) (VectorIndex, error) + InterpretVectorIndex(field string, requiresFiltering bool, except *roaring.Bitmap) ( + VectorIndex, error) } type VecPosting interface { diff --git a/vendor/github.com/blevesearch/zapx/v15/chunk.go b/vendor/github.com/blevesearch/zapx/v15/chunk.go index 4307d0ed..53d124f0 100644 --- a/vendor/github.com/blevesearch/zapx/v15/chunk.go +++ b/vendor/github.com/blevesearch/zapx/v15/chunk.go @@ -15,6 +15,7 @@ package zap import ( + "errors" "fmt" ) @@ -26,8 +27,18 @@ var LegacyChunkMode uint32 = 1024 // be used by default. var DefaultChunkMode uint32 = 1026 +var ErrChunkSizeZero = errors.New("chunk size is zero") + +// getChunkSize returns the chunk size for the given chunkMode, cardinality, and +// maxDocs. +// +// In error cases, the returned chunk size will be 0. Caller can differentiate +// between a valid chunk size of 0 and an error by checking for ErrChunkSizeZero. func getChunkSize(chunkMode uint32, cardinality uint64, maxDocs uint64) (uint64, error) { switch { + case chunkMode == 0: + return 0, ErrChunkSizeZero + // any chunkMode <= 1024 will always chunk with chunkSize=chunkMode case chunkMode <= 1024: // legacy chunk size @@ -46,6 +57,9 @@ func getChunkSize(chunkMode uint32, cardinality uint64, maxDocs uint64) (uint64, // chunk-size items. // no attempt is made to tweak any other case if cardinality <= 1024 { + if maxDocs == 0 { + return 0, ErrChunkSizeZero + } return maxDocs, nil } return 1024, nil @@ -61,6 +75,9 @@ func getChunkSize(chunkMode uint32, cardinality uint64, maxDocs uint64) (uint64, // 2. convert to chunkSize, dividing into maxDocs numChunks := (cardinality / 1024) + 1 chunkSize := maxDocs / numChunks + if chunkSize == 0 { + return 0, ErrChunkSizeZero + } return chunkSize, nil } return 0, fmt.Errorf("unknown chunk mode %d", chunkMode) diff --git a/vendor/github.com/blevesearch/zapx/v15/contentcoder.go b/vendor/github.com/blevesearch/zapx/v15/contentcoder.go index cd8b3fc8..3343d317 100644 --- a/vendor/github.com/blevesearch/zapx/v15/contentcoder.go +++ b/vendor/github.com/blevesearch/zapx/v15/contentcoder.go @@ -19,7 +19,6 @@ import ( "encoding/binary" "io" "reflect" - "sync/atomic" "github.com/golang/snappy" ) @@ -37,7 +36,7 @@ var ( ) type chunkedContentCoder struct { - bytesWritten uint64 // atomic access to this variable, moved to top to correct alignment issues on ARM, 386 and 32-bit MIPS. + bytesWritten uint64 // moved to top to correct alignment issues on ARM, 386 and 32-bit MIPS. final []byte chunkSize uint64 @@ -112,11 +111,11 @@ func (c *chunkedContentCoder) Close() error { } func (c *chunkedContentCoder) incrementBytesWritten(val uint64) { - atomic.AddUint64(&c.bytesWritten, val) + c.bytesWritten += val } func (c *chunkedContentCoder) getBytesWritten() uint64 { - return atomic.LoadUint64(&c.bytesWritten) + return c.bytesWritten } func (c *chunkedContentCoder) flushContents() error { diff --git a/vendor/github.com/blevesearch/zapx/v15/docvalues.go b/vendor/github.com/blevesearch/zapx/v15/docvalues.go index 046244d1..9c306a8d 100644 --- a/vendor/github.com/blevesearch/zapx/v15/docvalues.go +++ b/vendor/github.com/blevesearch/zapx/v15/docvalues.go @@ -75,7 +75,6 @@ type docValueReader struct { curChunkData []byte // compressed data cache uncompressed []byte // temp buf for snappy decompression - // atomic access to this variable bytesRead uint64 } diff --git a/vendor/github.com/blevesearch/zapx/v15/intDecoder.go b/vendor/github.com/blevesearch/zapx/v15/intDecoder.go index e50c4717..1a69e614 100644 --- a/vendor/github.com/blevesearch/zapx/v15/intDecoder.go +++ b/vendor/github.com/blevesearch/zapx/v15/intDecoder.go @@ -27,7 +27,6 @@ type chunkedIntDecoder struct { data []byte r *memUvarintReader - // atomic access to this variable bytesRead uint64 } diff --git a/vendor/github.com/blevesearch/zapx/v15/intcoder.go b/vendor/github.com/blevesearch/zapx/v15/intcoder.go index 2957fbd0..e1586edc 100644 --- a/vendor/github.com/blevesearch/zapx/v15/intcoder.go +++ b/vendor/github.com/blevesearch/zapx/v15/intcoder.go @@ -18,7 +18,6 @@ import ( "bytes" "encoding/binary" "io" - "sync/atomic" ) // We can safely use 0 to represent termNotEncoded since 0 @@ -36,7 +35,6 @@ type chunkedIntCoder struct { buf []byte - // atomic access to this variable bytesWritten uint64 } @@ -79,11 +77,11 @@ func (c *chunkedIntCoder) SetChunkSize(chunkSize uint64, maxDocNum uint64) { } func (c *chunkedIntCoder) incrementBytesWritten(val uint64) { - atomic.AddUint64(&c.bytesWritten, val) + c.bytesWritten += val } func (c *chunkedIntCoder) getBytesWritten() uint64 { - return atomic.LoadUint64(&c.bytesWritten) + return c.bytesWritten } // Add encodes the provided integers into the correct chunk for the provided diff --git a/vendor/github.com/blevesearch/zapx/v15/merge.go b/vendor/github.com/blevesearch/zapx/v15/merge.go index fa406e6d..63ff2089 100644 --- a/vendor/github.com/blevesearch/zapx/v15/merge.go +++ b/vendor/github.com/blevesearch/zapx/v15/merge.go @@ -591,6 +591,10 @@ func writePostings(postings *roaring.Bitmap, tfEncoder, locEncoder *chunkedIntCo use1HitEncoding func(uint64) (bool, uint64, uint64), w *CountHashWriter, bufMaxVarintLen64 []byte) ( offset uint64, err error) { + if postings == nil { + return 0, nil + } + termCardinality := postings.GetCardinality() if termCardinality <= 0 { return 0, nil diff --git a/vendor/github.com/blevesearch/zapx/v15/new.go b/vendor/github.com/blevesearch/zapx/v15/new.go index f659a5d0..869d1b53 100644 --- a/vendor/github.com/blevesearch/zapx/v15/new.go +++ b/vendor/github.com/blevesearch/zapx/v15/new.go @@ -147,7 +147,6 @@ type interim struct { lastNumDocs int lastOutSize int - // atomic access to this variable bytesWritten uint64 } @@ -497,11 +496,11 @@ func (s *interim) processDocument(docNum uint64, } func (s *interim) getBytesWritten() uint64 { - return atomic.LoadUint64(&s.bytesWritten) + return s.bytesWritten } func (s *interim) incrementBytesWritten(val uint64) { - atomic.AddUint64(&s.bytesWritten, val) + s.bytesWritten += val } func (s *interim) writeStoredFields() ( @@ -667,7 +666,11 @@ func (s *interim) writeDicts() (fdvIndexOffset uint64, dictOffsets []uint64, err locs := s.Locs[pid] locOffset := 0 - chunkSize, err := getChunkSize(s.chunkMode, postingsBS.GetCardinality(), uint64(len(s.results))) + var cardinality uint64 + if postingsBS != nil { + cardinality = postingsBS.GetCardinality() + } + chunkSize, err := getChunkSize(s.chunkMode, cardinality, uint64(len(s.results))) if err != nil { return 0, nil, err } diff --git a/vendor/github.com/blevesearch/zapx/v15/posting.go b/vendor/github.com/blevesearch/zapx/v15/posting.go index ad47df0d..07ae202f 100644 --- a/vendor/github.com/blevesearch/zapx/v15/posting.go +++ b/vendor/github.com/blevesearch/zapx/v15/posting.go @@ -305,10 +305,7 @@ func (rv *PostingsList) read(postingsOffset uint64, d *Dictionary) error { chunkSize, err := getChunkSize(d.sb.chunkMode, rv.postings.GetCardinality(), d.sb.numDocs) if err != nil { - return err - } else if chunkSize == 0 { - return fmt.Errorf("chunk size is zero, chunkMode: %v, numDocs: %v", - d.sb.chunkMode, d.sb.numDocs) + return fmt.Errorf("failed to get chunk size: %v", err) } rv.chunkSize = chunkSize @@ -632,6 +629,10 @@ func (i *PostingsIterator) nextDocNumAtOrAfter(atOrAfter uint64) (uint64, bool, return i.nextDocNumAtOrAfterClean(atOrAfter) } + if i.postings.chunkSize == 0 { + return 0, false, ErrChunkSizeZero + } + i.Actual.AdvanceIfNeeded(uint32(atOrAfter)) if !i.Actual.HasNext() || !i.all.HasNext() { @@ -741,6 +742,10 @@ func (i *PostingsIterator) nextDocNumAtOrAfterClean( return uint64(i.Actual.Next()), true, nil } + if i.postings != nil && i.postings.chunkSize == 0 { + return 0, false, ErrChunkSizeZero + } + // freq-norm's needed, so maintain freq-norm chunk reader sameChunkNexts := 0 // # of times we called Next() in the same chunk n := i.Actual.Next() diff --git a/vendor/github.com/blevesearch/zapx/v16/build.go b/vendor/github.com/blevesearch/zapx/v16/build.go index 99635739..53fd34d1 100644 --- a/vendor/github.com/blevesearch/zapx/v16/build.go +++ b/vendor/github.com/blevesearch/zapx/v16/build.go @@ -157,24 +157,24 @@ func persistStoredFieldValues(fieldID int, return curr, data, nil } -func InitSegmentBase(mem []byte, memCRC uint32, chunkMode uint32, - fieldsMap map[string]uint16, fieldsInv []string, numDocs uint64, - storedIndexOffset uint64, dictLocs []uint64, - sectionsIndexOffset uint64) (*SegmentBase, error) { +func InitSegmentBase(mem []byte, memCRC uint32, chunkMode uint32, numDocs uint64, + storedIndexOffset uint64, sectionsIndexOffset uint64) (*SegmentBase, error) { sb := &SegmentBase{ mem: mem, memCRC: memCRC, chunkMode: chunkMode, - fieldsMap: fieldsMap, numDocs: numDocs, storedIndexOffset: storedIndexOffset, fieldsIndexOffset: sectionsIndexOffset, sectionsIndexOffset: sectionsIndexOffset, fieldDvReaders: make([]map[uint16]*docValueReader, len(segmentSections)), docValueOffset: 0, // docValueOffsets identified automatically by the section - dictLocs: dictLocs, fieldFSTs: make(map[uint16]*vellum.FST), vecIndexCache: newVectorIndexCache(), + // following fields gets populated by loadFieldsNew + fieldsMap: make(map[string]uint16), + dictLocs: make([]uint64, 0), + fieldsInv: make([]string, 0), } sb.updateSize() diff --git a/vendor/github.com/blevesearch/zapx/v16/chunk.go b/vendor/github.com/blevesearch/zapx/v16/chunk.go index 4307d0ed..53d124f0 100644 --- a/vendor/github.com/blevesearch/zapx/v16/chunk.go +++ b/vendor/github.com/blevesearch/zapx/v16/chunk.go @@ -15,6 +15,7 @@ package zap import ( + "errors" "fmt" ) @@ -26,8 +27,18 @@ var LegacyChunkMode uint32 = 1024 // be used by default. var DefaultChunkMode uint32 = 1026 +var ErrChunkSizeZero = errors.New("chunk size is zero") + +// getChunkSize returns the chunk size for the given chunkMode, cardinality, and +// maxDocs. +// +// In error cases, the returned chunk size will be 0. Caller can differentiate +// between a valid chunk size of 0 and an error by checking for ErrChunkSizeZero. func getChunkSize(chunkMode uint32, cardinality uint64, maxDocs uint64) (uint64, error) { switch { + case chunkMode == 0: + return 0, ErrChunkSizeZero + // any chunkMode <= 1024 will always chunk with chunkSize=chunkMode case chunkMode <= 1024: // legacy chunk size @@ -46,6 +57,9 @@ func getChunkSize(chunkMode uint32, cardinality uint64, maxDocs uint64) (uint64, // chunk-size items. // no attempt is made to tweak any other case if cardinality <= 1024 { + if maxDocs == 0 { + return 0, ErrChunkSizeZero + } return maxDocs, nil } return 1024, nil @@ -61,6 +75,9 @@ func getChunkSize(chunkMode uint32, cardinality uint64, maxDocs uint64) (uint64, // 2. convert to chunkSize, dividing into maxDocs numChunks := (cardinality / 1024) + 1 chunkSize := maxDocs / numChunks + if chunkSize == 0 { + return 0, ErrChunkSizeZero + } return chunkSize, nil } return 0, fmt.Errorf("unknown chunk mode %d", chunkMode) diff --git a/vendor/github.com/blevesearch/zapx/v16/contentcoder.go b/vendor/github.com/blevesearch/zapx/v16/contentcoder.go index cd8b3fc8..3343d317 100644 --- a/vendor/github.com/blevesearch/zapx/v16/contentcoder.go +++ b/vendor/github.com/blevesearch/zapx/v16/contentcoder.go @@ -19,7 +19,6 @@ import ( "encoding/binary" "io" "reflect" - "sync/atomic" "github.com/golang/snappy" ) @@ -37,7 +36,7 @@ var ( ) type chunkedContentCoder struct { - bytesWritten uint64 // atomic access to this variable, moved to top to correct alignment issues on ARM, 386 and 32-bit MIPS. + bytesWritten uint64 // moved to top to correct alignment issues on ARM, 386 and 32-bit MIPS. final []byte chunkSize uint64 @@ -112,11 +111,11 @@ func (c *chunkedContentCoder) Close() error { } func (c *chunkedContentCoder) incrementBytesWritten(val uint64) { - atomic.AddUint64(&c.bytesWritten, val) + c.bytesWritten += val } func (c *chunkedContentCoder) getBytesWritten() uint64 { - return atomic.LoadUint64(&c.bytesWritten) + return c.bytesWritten } func (c *chunkedContentCoder) flushContents() error { diff --git a/vendor/github.com/blevesearch/zapx/v16/docvalues.go b/vendor/github.com/blevesearch/zapx/v16/docvalues.go index 6fb7a9a2..3d0d269f 100644 --- a/vendor/github.com/blevesearch/zapx/v16/docvalues.go +++ b/vendor/github.com/blevesearch/zapx/v16/docvalues.go @@ -75,7 +75,6 @@ type docValueReader struct { curChunkData []byte // compressed data cache uncompressed []byte // temp buf for snappy decompression - // atomic access to this variable bytesRead uint64 } diff --git a/vendor/github.com/blevesearch/zapx/v16/faiss_vector_cache.go b/vendor/github.com/blevesearch/zapx/v16/faiss_vector_cache.go index 893da2d5..f4aa6087 100644 --- a/vendor/github.com/blevesearch/zapx/v16/faiss_vector_cache.go +++ b/vendor/github.com/blevesearch/zapx/v16/faiss_vector_cache.go @@ -52,54 +52,97 @@ func (vc *vectorIndexCache) Clear() { vc.m.Unlock() } -func (vc *vectorIndexCache) loadOrCreate(fieldID uint16, mem []byte, except *roaring.Bitmap) ( - index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, vecIDsToExclude []int64, err error) { - var found bool - index, vecDocIDMap, vecIDsToExclude, found = vc.loadFromCache(fieldID, except) - if !found { - index, vecDocIDMap, vecIDsToExclude, err = vc.createAndCache(fieldID, mem, except) - } - return index, vecDocIDMap, vecIDsToExclude, err +// loadDocVecIDMap indicates if a non-nil docVecIDMap should be returned. +// It is true when a filtered kNN query accesses the cache since it requires the +// map. It's false otherwise. +func (vc *vectorIndexCache) loadOrCreate(fieldID uint16, mem []byte, + loadDocVecIDMap bool, except *roaring.Bitmap) ( + index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, docVecIDMap map[uint32][]int64, + vecIDsToExclude []int64, err error) { + index, vecDocIDMap, docVecIDMap, vecIDsToExclude, err = vc.loadFromCache( + fieldID, loadDocVecIDMap, mem, except) + return index, vecDocIDMap, docVecIDMap, vecIDsToExclude, err } -func (vc *vectorIndexCache) loadFromCache(fieldID uint16, except *roaring.Bitmap) ( - index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, vecIDsToExclude []int64, found bool) { +// function to load the vectorDocIDMap and if required, docVecIDMap from cache +// If not, it will create these and add them to the cache. +func (vc *vectorIndexCache) loadFromCache(fieldID uint16, loadDocVecIDMap bool, + mem []byte, except *roaring.Bitmap) (index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, + docVecIDMap map[uint32][]int64, vecIDsToExclude []int64, err error) { + vc.m.RLock() - defer vc.m.RUnlock() entry, ok := vc.cache[fieldID] - if !ok { - return nil, nil, nil, false - } - - index, vecDocIDMap = entry.load() - vecIDsToExclude = getVecIDsToExclude(vecDocIDMap, except) + if ok { + index, vecDocIDMap, docVecIDMap = entry.load() + vecIDsToExclude = getVecIDsToExclude(vecDocIDMap, except) + if !loadDocVecIDMap || (loadDocVecIDMap && len(entry.docVecIDMap) > 0) { + vc.m.RUnlock() + return index, vecDocIDMap, docVecIDMap, vecIDsToExclude, nil + } - return index, vecDocIDMap, vecIDsToExclude, true -} + vc.m.RUnlock() + vc.m.Lock() + // in cases where only the docVecID isn't part of the cache, build it and + // add it to the cache, while holding a lock to avoid concurrent modifications. + // typically seen for the first filtered query. + docVecIDMap = vc.addDocVecIDMapToCacheLOCKED(entry) + vc.m.Unlock() + return index, vecDocIDMap, docVecIDMap, vecIDsToExclude, nil + } -func (vc *vectorIndexCache) createAndCache(fieldID uint16, mem []byte, except *roaring.Bitmap) ( - index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, vecIDsToExclude []int64, err error) { + vc.m.RUnlock() + // acquiring a lock since this is modifying the cache. vc.m.Lock() defer vc.m.Unlock() + return vc.createAndCacheLOCKED(fieldID, mem, loadDocVecIDMap, except) +} - // when there are multiple threads trying to build the index, guard redundant - // index creation by doing a double check and return if already created and - // cached. - entry, ok := vc.cache[fieldID] - if ok { - index, vecDocIDMap = entry.load() +func (vc *vectorIndexCache) addDocVecIDMapToCacheLOCKED(ce *cacheEntry) map[uint32][]int64 { + // Handle concurrent accesses (to avoid unnecessary work) by adding a + // check within the write lock here. + if ce.docVecIDMap != nil { + return ce.docVecIDMap + } + + docVecIDMap := make(map[uint32][]int64) + for vecID, docID := range ce.vecDocIDMap { + docVecIDMap[docID] = append(docVecIDMap[docID], vecID) + } + + ce.docVecIDMap = docVecIDMap + return docVecIDMap +} + +// Rebuilding the cache on a miss. +func (vc *vectorIndexCache) createAndCacheLOCKED(fieldID uint16, mem []byte, + loadDocVecIDMap bool, except *roaring.Bitmap) ( + index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, + docVecIDMap map[uint32][]int64, vecIDsToExclude []int64, err error) { + + // Handle concurrent accesses (to avoid unnecessary work) by adding a + // check within the write lock here. + entry := vc.cache[fieldID] + if entry != nil { + index, vecDocIDMap, docVecIDMap = entry.load() vecIDsToExclude = getVecIDsToExclude(vecDocIDMap, except) - return index, vecDocIDMap, vecIDsToExclude, nil + if !loadDocVecIDMap || (loadDocVecIDMap && len(entry.docVecIDMap) > 0) { + return index, vecDocIDMap, docVecIDMap, vecIDsToExclude, nil + } + docVecIDMap = vc.addDocVecIDMapToCacheLOCKED(entry) + return index, vecDocIDMap, docVecIDMap, vecIDsToExclude, nil } - // if the cache doesn't have entry, construct the vector to doc id map and the - // vector index out of the mem bytes and update the cache under lock. + // if the cache doesn't have the entry, construct the vector to doc id map and + // the vector index out of the mem bytes and update the cache under lock. pos := 0 numVecs, n := binary.Uvarint(mem[pos : pos+binary.MaxVarintLen64]) pos += n vecDocIDMap = make(map[int64]uint32, numVecs) + if loadDocVecIDMap { + docVecIDMap = make(map[uint32][]int64, numVecs) + } isExceptNotEmpty := except != nil && !except.IsEmpty() for i := 0; i < int(numVecs); i++ { vecID, n := binary.Varint(mem[pos : pos+binary.MaxVarintLen64]) @@ -113,6 +156,9 @@ func (vc *vectorIndexCache) createAndCache(fieldID uint16, mem []byte, except *r continue } vecDocIDMap[vecID] = docIDUint32 + if loadDocVecIDMap { + docVecIDMap[docIDUint32] = append(docVecIDMap[docIDUint32], vecID) + } } indexSize, n := binary.Uvarint(mem[pos : pos+binary.MaxVarintLen64]) @@ -120,15 +166,16 @@ func (vc *vectorIndexCache) createAndCache(fieldID uint16, mem []byte, except *r index, err = faiss.ReadIndexFromBuffer(mem[pos:pos+int(indexSize)], faissIOFlags) if err != nil { - return nil, nil, nil, err + return nil, nil, nil, nil, err } - vc.insertLOCKED(fieldID, index, vecDocIDMap) - return index, vecDocIDMap, vecIDsToExclude, nil + vc.insertLOCKED(fieldID, index, vecDocIDMap, loadDocVecIDMap, docVecIDMap) + return index, vecDocIDMap, docVecIDMap, vecIDsToExclude, nil } func (vc *vectorIndexCache) insertLOCKED(fieldIDPlus1 uint16, - index *faiss.IndexImpl, vecDocIDMap map[int64]uint32) { + index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, loadDocVecIDMap bool, + docVecIDMap map[uint32][]int64) { // the first time we've hit the cache, try to spawn a monitoring routine // which will reconcile the moving averages for all the fields being hit if len(vc.cache) == 0 { @@ -142,7 +189,8 @@ func (vc *vectorIndexCache) insertLOCKED(fieldIDPlus1 uint16, // this makes the average to be kept above the threshold value for a // longer time and thereby the index to be resident in the cache // for longer time. - vc.cache[fieldIDPlus1] = createCacheEntry(index, vecDocIDMap, 0.4) + vc.cache[fieldIDPlus1] = createCacheEntry(index, vecDocIDMap, + loadDocVecIDMap, docVecIDMap, 0.4) } } @@ -235,8 +283,9 @@ func (e *ewma) add(val uint64) { // ----------------------------------------------------------------------------- -func createCacheEntry(index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, alpha float64) *cacheEntry { - return &cacheEntry{ +func createCacheEntry(index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, + loadDocVecIDMap bool, docVecIDMap map[uint32][]int64, alpha float64) *cacheEntry { + ce := &cacheEntry{ index: index, vecDocIDMap: vecDocIDMap, tracker: &ewma{ @@ -245,6 +294,10 @@ func createCacheEntry(index *faiss.IndexImpl, vecDocIDMap map[int64]uint32, alph }, refs: 1, } + if loadDocVecIDMap { + ce.docVecIDMap = docVecIDMap + } + return ce } type cacheEntry struct { @@ -257,6 +310,7 @@ type cacheEntry struct { index *faiss.IndexImpl vecDocIDMap map[int64]uint32 + docVecIDMap map[uint32][]int64 } func (ce *cacheEntry) incHit() { @@ -271,10 +325,10 @@ func (ce *cacheEntry) decRef() { atomic.AddInt64(&ce.refs, -1) } -func (ce *cacheEntry) load() (*faiss.IndexImpl, map[int64]uint32) { +func (ce *cacheEntry) load() (*faiss.IndexImpl, map[int64]uint32, map[uint32][]int64) { ce.incHit() ce.addRef() - return ce.index, ce.vecDocIDMap + return ce.index, ce.vecDocIDMap, ce.docVecIDMap } func (ce *cacheEntry) close() { @@ -282,6 +336,7 @@ func (ce *cacheEntry) close() { ce.index.Close() ce.index = nil ce.vecDocIDMap = nil + ce.docVecIDMap = nil }() } diff --git a/vendor/github.com/blevesearch/zapx/v16/faiss_vector_posting.go b/vendor/github.com/blevesearch/zapx/v16/faiss_vector_posting.go index e4275d76..6b9840fe 100644 --- a/vendor/github.com/blevesearch/zapx/v16/faiss_vector_posting.go +++ b/vendor/github.com/blevesearch/zapx/v16/faiss_vector_posting.go @@ -134,12 +134,15 @@ func (p *VecPostingsList) Size() int { } func (p *VecPostingsList) Count() uint64 { - n := p.postings.GetCardinality() - var e uint64 - if p.except != nil { - e = p.postings.AndCardinality(p.except) + if p.postings != nil { + n := p.postings.GetCardinality() + var e uint64 + if p.except != nil { + e = p.postings.AndCardinality(p.except) + } + return n - e } - return n - e + return 0 } func (vpl *VecPostingsList) ResetBytesRead(val uint64) { @@ -267,16 +270,26 @@ func (vpl *VecPostingsIterator) BytesWritten() uint64 { // vectorIndexWrapper conforms to scorch_segment_api's VectorIndex interface type vectorIndexWrapper struct { - search func(qVector []float32, k int64, params json.RawMessage) (segment.VecPostingsList, error) - close func() - size func() uint64 + search func(qVector []float32, k int64, + params json.RawMessage) (segment.VecPostingsList, error) + searchWithFilter func(qVector []float32, k int64, eligibleDocIDs []uint64, + params json.RawMessage) (segment.VecPostingsList, error) + close func() + size func() uint64 } -func (i *vectorIndexWrapper) Search(qVector []float32, k int64, params json.RawMessage) ( +func (i *vectorIndexWrapper) Search(qVector []float32, k int64, + params json.RawMessage) ( segment.VecPostingsList, error) { return i.search(qVector, k, params) } +func (i *vectorIndexWrapper) SearchWithFilter(qVector []float32, k int64, + eligibleDocIDs []uint64, params json.RawMessage) ( + segment.VecPostingsList, error) { + return i.searchWithFilter(qVector, k, eligibleDocIDs, params) +} + func (i *vectorIndexWrapper) Close() { i.close() } @@ -288,20 +301,40 @@ func (i *vectorIndexWrapper) Size() uint64 { // InterpretVectorIndex returns a construct of closures (vectorIndexWrapper) // that will allow the caller to - // (1) search within an attached vector index -// (2) close attached vector index -// (3) get the size of the attached vector index -func (sb *SegmentBase) InterpretVectorIndex(field string, except *roaring.Bitmap) ( +// (2) search limited to a subset of documents within an attached vector index +// (3) close attached vector index +// (4) get the size of the attached vector index +func (sb *SegmentBase) InterpretVectorIndex(field string, requiresFiltering bool, + except *roaring.Bitmap) ( segment.VectorIndex, error) { // Params needed for the closures var vecIndex *faiss.IndexImpl var vecDocIDMap map[int64]uint32 + var docVecIDMap map[uint32][]int64 var vectorIDsToExclude []int64 var fieldIDPlus1 uint16 var vecIndexSize uint64 + // Utility function to add the corresponding docID and scores for each vector + // returned after the kNN query to the newly + // created vecPostingsList + addIDsToPostingsList := func(pl *VecPostingsList, ids []int64, scores []float32) { + for i := 0; i < len(ids); i++ { + vecID := ids[i] + // Checking if it's present in the vecDocIDMap. + // If -1 is returned as an ID(insufficient vectors), this will ensure + // it isn't added to the final postings list. + if docID, ok := vecDocIDMap[vecID]; ok { + code := getVectorCode(docID, scores[i]) + pl.postings.Add(uint64(code)) + } + } + } + var ( wrapVecIndex = &vectorIndexWrapper{ - search: func(qVector []float32, k int64, params json.RawMessage) (segment.VecPostingsList, error) { + search: func(qVector []float32, k int64, params json.RawMessage) ( + segment.VecPostingsList, error) { // 1. returned postings list (of type PostingsList) has two types of information - docNum and its score. // 2. both the values can be represented using roaring bitmaps. // 3. the Iterator (of type PostingsIterator) returned would operate in terms of VecPostings. @@ -318,23 +351,204 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, except *roaring.Bitmap return rv, nil } - scores, ids, err := vecIndex.SearchWithoutIDs(qVector, k, vectorIDsToExclude, params) + scores, ids, err := vecIndex.SearchWithoutIDs(qVector, k, + vectorIDsToExclude, params) if err != nil { return nil, err } - // for every similar vector returned by the Search() API, add the corresponding - // docID and the score to the newly created vecPostingsList - for i := 0; i < len(ids); i++ { - vecID := ids[i] - // Checking if it's present in the vecDocIDMap. - // If -1 is returned as an ID(insufficient vectors), this will ensure - // it isn't added to the final postings list. - if docID, ok := vecDocIDMap[vecID]; ok { - code := getVectorCode(docID, scores[i]) - rv.postings.Add(uint64(code)) - } + + addIDsToPostingsList(rv, ids, scores) + + return rv, nil + }, + searchWithFilter: func(qVector []float32, k int64, + eligibleDocIDs []uint64, params json.RawMessage) ( + segment.VecPostingsList, error) { + // 1. returned postings list (of type PostingsList) has two types of information - docNum and its score. + // 2. both the values can be represented using roaring bitmaps. + // 3. the Iterator (of type PostingsIterator) returned would operate in terms of VecPostings. + // 4. VecPostings would just have the docNum and the score. Every call of Next() + // and Advance just returns the next VecPostings. The caller would do a vp.Number() + // and the Score() to get the corresponding values + rv := &VecPostingsList{ + except: nil, // todo: handle the except bitmap within postings iterator. + postings: roaring64.New(), } + if vecIndex == nil || vecIndex.D() != len(qVector) { + // vector index not found or dimensionality mismatched + return rv, nil + } + + if len(eligibleDocIDs) > 0 { + // Non-zero documents eligible per the filter query. + + // If every element in the index is eligible(eg. high selectivity + // cases), then this can basically be considered unfiltered kNN. + if len(eligibleDocIDs) == int(sb.numDocs) { + scores, ids, err := vecIndex.SearchWithoutIDs(qVector, k, + vectorIDsToExclude, params) + if err != nil { + return nil, err + } + + addIDsToPostingsList(rv, ids, scores) + return rv, nil + } + + // vector IDs corresponding to the local doc numbers to be + // considered for the search + vectorIDsToInclude := make([]int64, 0, len(eligibleDocIDs)) + for _, id := range eligibleDocIDs { + vectorIDsToInclude = append(vectorIDsToInclude, docVecIDMap[uint32(id)]...) + } + + // Retrieve the mapping of centroid IDs to vectors within + // the cluster. + clusterAssignment, _ := vecIndex.ObtainClusterToVecIDsFromIVFIndex() + // Accounting for a flat index + if len(clusterAssignment) == 0 { + scores, ids, err := vecIndex.SearchWithIDs(qVector, k, + vectorIDsToInclude, params) + if err != nil { + return nil, err + } + + addIDsToPostingsList(rv, ids, scores) + return rv, nil + } + + // Converting to roaring bitmap for ease of intersect ops with + // the set of eligible doc IDs. + centroidVecIDMap := make(map[int64]*roaring.Bitmap) + for centroidID, vecIDs := range clusterAssignment { + if _, exists := centroidVecIDMap[centroidID]; !exists { + centroidVecIDMap[centroidID] = roaring.NewBitmap() + } + vecIDsUint32 := make([]uint32, 0, len(vecIDs)) + for _, vecID := range vecIDs { + vecIDsUint32 = append(vecIDsUint32, uint32(vecID)) + } + centroidVecIDMap[centroidID].AddMany(vecIDsUint32) + } + + // Determining which clusters, identified by centroid ID, + // have at least one eligible vector and hence, ought to be + // probed. + eligibleCentroidIDs := make([]int64, 0) + + var selector faiss.Selector + var err error + // If there are more elements to be included than excluded, it + // might be quicker to use an exclusion selector as a filter + // instead of an inclusion selector. + if float32(len(eligibleDocIDs))/float32(len(docVecIDMap)) > 0.5 { + ineligibleVecIDsBitmap := roaring.NewBitmap() + eligibleDocIDsMap := make(map[uint64]struct{}) + for _, eligibleDocID := range eligibleDocIDs { + eligibleDocIDsMap[(eligibleDocID)] = struct{}{} + } + + ineligibleVectorIDs := make([]int64, 0, len(vecDocIDMap)- + len(vectorIDsToInclude)) + + for docID, vecIDs := range docVecIDMap { + if _, exists := eligibleDocIDsMap[uint64(docID)]; !exists { + for _, vecID := range vecIDs { + ineligibleVecIDsBitmap.Add(uint32(vecID)) + ineligibleVectorIDs = append(ineligibleVectorIDs, vecID) + } + } + } + + for centroidID, vecIDs := range centroidVecIDMap { + vecIDs.AndNot(ineligibleVecIDsBitmap) + // At least one eligible vec in cluster. + if !vecIDs.IsEmpty() { + // The mapping is now reduced to those vectors which + // are also eligible docs for the filter query. + centroidVecIDMap[centroidID] = vecIDs + eligibleCentroidIDs = append(eligibleCentroidIDs, centroidID) + } else { + // don't consider clusters with no eligible IDs. + delete(centroidVecIDMap, centroidID) + } + } + + selector, err = faiss.NewIDSelectorNot(ineligibleVectorIDs) + } else { + // Getting the vector IDs corresponding to the eligible + // doc IDs. + // The docVecIDMap maps each docID to vectorIDs corresponding + // to it. + // Usually, each docID has one vecID mapped to it unless + // the vector is nested, in which case there can be multiple + // vectorIDs mapped to the same docID. + // Eg. docID d1 -> vecID v1, for the first case + // d1 -> {v1,v2}, for the second case. + eligibleVecIDsBitmap := roaring.NewBitmap() + vecIDsUint32 := make([]uint32, 0) + for _, eligibleDocID := range eligibleDocIDs { + vecIDs := docVecIDMap[uint32(eligibleDocID)] + for _, vecID := range vecIDs { + vecIDsUint32 = append(vecIDsUint32, uint32(vecID)) + } + } + eligibleVecIDsBitmap.AddMany(vecIDsUint32) + for centroidID, vecIDs := range centroidVecIDMap { + vecIDs.And(eligibleVecIDsBitmap) + if !vecIDs.IsEmpty() { + // The mapping is now reduced to those vectors which + // are also eligible docs for the filter query. + centroidVecIDMap[centroidID] = vecIDs + eligibleCentroidIDs = append(eligibleCentroidIDs, centroidID) + } else { + // don't consider clusters with no eligible IDs. + delete(centroidVecIDMap, centroidID) + } + } + + selector, err = faiss.NewIDSelectorBatch(vectorIDsToInclude) + } + if err != nil { + return nil, err + } + + // Ordering the retrieved centroid IDs by increasing order + // of distance i.e. decreasing order of proximity to query vector. + closestCentroidIDs, centroidDistances, _ := + vecIndex.ObtainClustersWithDistancesFromIVFIndex(qVector, + eligibleCentroidIDs) + + // Getting the nprobe value set at index time. + nprobe := vecIndex.GetNProbe() + + eligibleDocsTillNow := int64(0) + minEligibleCentroids := 0 + for i, centroidID := range closestCentroidIDs { + eligibleDocsTillNow += int64(centroidVecIDMap[centroidID].GetCardinality()) + if eligibleDocsTillNow >= k && i >= int(nprobe-1) { + // Continue till at least 'K' cumulative vectors are + // collected or 'nprobe' clusters are examined, whichever + // comes later. + minEligibleCentroids = i + 1 + break + } + minEligibleCentroids = i + 1 + } + + // Search the clusters specified by 'closestCentroidIDs' for + // vectors whose IDs are present in 'vectorIDsToInclude' + scores, ids, err := vecIndex.SearchClustersFromIVFIndex( + selector, len(vectorIDsToInclude), closestCentroidIDs, + minEligibleCentroids, k, qVector, centroidDistances, params) + if err != nil { + return nil, err + } + + addIDsToPostingsList(rv, ids, scores) + return rv, nil + } return rv, nil }, close: func() { @@ -372,8 +586,9 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, except *roaring.Bitmap pos += n } - vecIndex, vecDocIDMap, vectorIDsToExclude, err = - sb.vecIndexCache.loadOrCreate(fieldIDPlus1, sb.mem[pos:], except) + vecIndex, vecDocIDMap, docVecIDMap, vectorIDsToExclude, err = + sb.vecIndexCache.loadOrCreate(fieldIDPlus1, sb.mem[pos:], requiresFiltering, + except) if vecIndex != nil { vecIndexSize = vecIndex.Size() diff --git a/vendor/github.com/blevesearch/zapx/v16/intDecoder.go b/vendor/github.com/blevesearch/zapx/v16/intDecoder.go index e50c4717..1a69e614 100644 --- a/vendor/github.com/blevesearch/zapx/v16/intDecoder.go +++ b/vendor/github.com/blevesearch/zapx/v16/intDecoder.go @@ -27,7 +27,6 @@ type chunkedIntDecoder struct { data []byte r *memUvarintReader - // atomic access to this variable bytesRead uint64 } diff --git a/vendor/github.com/blevesearch/zapx/v16/intcoder.go b/vendor/github.com/blevesearch/zapx/v16/intcoder.go index 2957fbd0..e1586edc 100644 --- a/vendor/github.com/blevesearch/zapx/v16/intcoder.go +++ b/vendor/github.com/blevesearch/zapx/v16/intcoder.go @@ -18,7 +18,6 @@ import ( "bytes" "encoding/binary" "io" - "sync/atomic" ) // We can safely use 0 to represent termNotEncoded since 0 @@ -36,7 +35,6 @@ type chunkedIntCoder struct { buf []byte - // atomic access to this variable bytesWritten uint64 } @@ -79,11 +77,11 @@ func (c *chunkedIntCoder) SetChunkSize(chunkSize uint64, maxDocNum uint64) { } func (c *chunkedIntCoder) incrementBytesWritten(val uint64) { - atomic.AddUint64(&c.bytesWritten, val) + c.bytesWritten += val } func (c *chunkedIntCoder) getBytesWritten() uint64 { - return atomic.LoadUint64(&c.bytesWritten) + return c.bytesWritten } // Add encodes the provided integers into the correct chunk for the provided diff --git a/vendor/github.com/blevesearch/zapx/v16/merge.go b/vendor/github.com/blevesearch/zapx/v16/merge.go index 490e9da0..683d9209 100644 --- a/vendor/github.com/blevesearch/zapx/v16/merge.go +++ b/vendor/github.com/blevesearch/zapx/v16/merge.go @@ -73,8 +73,8 @@ func mergeSegmentBases(segmentBases []*SegmentBase, drops []*roaring.Bitmap, pat // wrap it for counting (tracking offsets) cr := NewCountHashWriterWithStatsReporter(br, s) - newDocNums, numDocs, storedIndexOffset, _, _, _, sectionsIndexOffset, err := - MergeToWriter(segmentBases, drops, chunkMode, cr, closeCh) + newDocNums, numDocs, storedIndexOffset, _, _, sectionsIndexOffset, err := + mergeToWriter(segmentBases, drops, chunkMode, cr, closeCh) if err != nil { cleanup() return nil, 0, err @@ -109,9 +109,9 @@ func mergeSegmentBases(segmentBases []*SegmentBase, drops []*roaring.Bitmap, pat return newDocNums, uint64(cr.Count()), nil } -func MergeToWriter(segments []*SegmentBase, drops []*roaring.Bitmap, +func mergeToWriter(segments []*SegmentBase, drops []*roaring.Bitmap, chunkMode uint32, cr *CountHashWriter, closeCh chan struct{}) ( - newDocNums [][]uint64, numDocs, storedIndexOffset uint64, dictLocs []uint64, + newDocNums [][]uint64, numDocs, storedIndexOffset uint64, fieldsInv []string, fieldsMap map[string]uint16, sectionsIndexOffset uint64, err error) { @@ -122,7 +122,7 @@ func MergeToWriter(segments []*SegmentBase, drops []*roaring.Bitmap, numDocs = computeNewDocCount(segments, drops) if isClosed(closeCh) { - return nil, 0, 0, nil, nil, nil, 0, seg.ErrClosed + return nil, 0, 0, nil, nil, 0, seg.ErrClosed } // the merge opaque is especially important when it comes to tracking the file @@ -140,7 +140,7 @@ func MergeToWriter(segments []*SegmentBase, drops []*roaring.Bitmap, storedIndexOffset, newDocNums, err = mergeStoredAndRemap(segments, drops, fieldsMap, fieldsInv, fieldsSame, numDocs, cr, closeCh) if err != nil { - return nil, 0, 0, nil, nil, nil, 0, err + return nil, 0, 0, nil, nil, 0, err } // at this point, ask each section implementation to merge itself @@ -149,21 +149,19 @@ func MergeToWriter(segments []*SegmentBase, drops []*roaring.Bitmap, err = x.Merge(mergeOpaque, segments, drops, fieldsInv, newDocNums, cr, closeCh) if err != nil { - return nil, 0, 0, nil, nil, nil, 0, err + return nil, 0, 0, nil, nil, 0, err } } - } else { - dictLocs = make([]uint64, len(fieldsInv)) } // we can persist the fields section index now, this will point // to the various indexes (each in different section) available for a field. - sectionsIndexOffset, err = persistFieldsSection(fieldsInv, cr, dictLocs, mergeOpaque) + sectionsIndexOffset, err = persistFieldsSection(fieldsInv, cr, mergeOpaque) if err != nil { - return nil, 0, 0, nil, nil, nil, 0, err + return nil, 0, 0, nil, nil, 0, err } - return newDocNums, numDocs, storedIndexOffset, dictLocs, fieldsInv, fieldsMap, sectionsIndexOffset, nil + return newDocNums, numDocs, storedIndexOffset, fieldsInv, fieldsMap, sectionsIndexOffset, nil } // mapFields takes the fieldsInv list and returns a map of fieldName @@ -306,6 +304,10 @@ func writePostings(postings *roaring.Bitmap, tfEncoder, locEncoder *chunkedIntCo use1HitEncoding func(uint64) (bool, uint64, uint64), w *CountHashWriter, bufMaxVarintLen64 []byte) ( offset uint64, err error) { + if postings == nil { + return 0, nil + } + termCardinality := postings.GetCardinality() if termCardinality <= 0 { return 0, nil diff --git a/vendor/github.com/blevesearch/zapx/v16/new.go b/vendor/github.com/blevesearch/zapx/v16/new.go index 94079eaf..f0d37c43 100644 --- a/vendor/github.com/blevesearch/zapx/v16/new.go +++ b/vendor/github.com/blevesearch/zapx/v16/new.go @@ -66,14 +66,13 @@ func (*ZapPlugin) newWithChunkMode(results []index.Document, s.chunkMode = chunkMode s.w = NewCountHashWriter(&br) - storedIndexOffset, dictOffsets, sectionsIndexOffset, err := s.convert() + storedIndexOffset, sectionsIndexOffset, err := s.convert() if err != nil { return nil, uint64(0), err } sb, err := InitSegmentBase(br.Bytes(), s.w.Sum32(), chunkMode, - s.FieldsMap, s.FieldsInv, uint64(len(results)), - storedIndexOffset, dictOffsets, sectionsIndexOffset) + uint64(len(results)), storedIndexOffset, sectionsIndexOffset) // get the bytes written before the interim's reset() call // write it to the newly formed segment base. @@ -125,8 +124,10 @@ func (s *interim) reset() (err error) { s.results = nil s.chunkMode = 0 s.w = nil - s.FieldsMap = nil - s.FieldsInv = nil + for k := range s.FieldsMap { + delete(s.FieldsMap, k) + } + s.FieldsInv = s.FieldsInv[:0] s.metaBuf.Reset() s.tmp0 = s.tmp0[:0] s.tmp1 = s.tmp1[:0] @@ -168,8 +169,10 @@ type interimLoc struct { arrayposs []uint64 } -func (s *interim) convert() (uint64, []uint64, uint64, error) { - s.FieldsMap = map[string]uint16{} +func (s *interim) convert() (uint64, uint64, error) { + if s.FieldsMap == nil { + s.FieldsMap = map[string]uint16{} + } args := map[string]interface{}{ "results": s.results, @@ -209,17 +212,15 @@ func (s *interim) convert() (uint64, []uint64, uint64, error) { storedIndexOffset, err := s.writeStoredFields() if err != nil { - return 0, nil, 0, err + return 0, 0, err } - var dictOffsets []uint64 - // we can persist the various sections at this point. // the rule of thumb here is that each section must persist field wise. for _, x := range segmentSections { _, err = x.Persist(s.opaque, s.w) if err != nil { - return 0, nil, 0, err + return 0, 0, err } } @@ -231,18 +232,14 @@ func (s *interim) convert() (uint64, []uint64, uint64, error) { } } - if len(s.results) == 0 { - dictOffsets = make([]uint64, len(s.FieldsInv)) - } - // we can persist a new fields section here // this new fields section will point to the various indexes available - sectionsIndexOffset, err := persistFieldsSection(s.FieldsInv, s.w, dictOffsets, s.opaque) + sectionsIndexOffset, err := persistFieldsSection(s.FieldsInv, s.w, s.opaque) if err != nil { - return 0, nil, 0, err + return 0, 0, err } - return storedIndexOffset, dictOffsets, sectionsIndexOffset, nil + return storedIndexOffset, sectionsIndexOffset, nil } func (s *interim) getOrDefineField(fieldName string) int { diff --git a/vendor/github.com/blevesearch/zapx/v16/posting.go b/vendor/github.com/blevesearch/zapx/v16/posting.go index ad47df0d..07ae202f 100644 --- a/vendor/github.com/blevesearch/zapx/v16/posting.go +++ b/vendor/github.com/blevesearch/zapx/v16/posting.go @@ -305,10 +305,7 @@ func (rv *PostingsList) read(postingsOffset uint64, d *Dictionary) error { chunkSize, err := getChunkSize(d.sb.chunkMode, rv.postings.GetCardinality(), d.sb.numDocs) if err != nil { - return err - } else if chunkSize == 0 { - return fmt.Errorf("chunk size is zero, chunkMode: %v, numDocs: %v", - d.sb.chunkMode, d.sb.numDocs) + return fmt.Errorf("failed to get chunk size: %v", err) } rv.chunkSize = chunkSize @@ -632,6 +629,10 @@ func (i *PostingsIterator) nextDocNumAtOrAfter(atOrAfter uint64) (uint64, bool, return i.nextDocNumAtOrAfterClean(atOrAfter) } + if i.postings.chunkSize == 0 { + return 0, false, ErrChunkSizeZero + } + i.Actual.AdvanceIfNeeded(uint32(atOrAfter)) if !i.Actual.HasNext() || !i.all.HasNext() { @@ -741,6 +742,10 @@ func (i *PostingsIterator) nextDocNumAtOrAfterClean( return uint64(i.Actual.Next()), true, nil } + if i.postings != nil && i.postings.chunkSize == 0 { + return 0, false, ErrChunkSizeZero + } + // freq-norm's needed, so maintain freq-norm chunk reader sameChunkNexts := 0 // # of times we called Next() in the same chunk n := i.Actual.Next() diff --git a/vendor/github.com/blevesearch/zapx/v16/section_faiss_vector_index.go b/vendor/github.com/blevesearch/zapx/v16/section_faiss_vector_index.go index c73bf011..1c9f91a0 100644 --- a/vendor/github.com/blevesearch/zapx/v16/section_faiss_vector_index.go +++ b/vendor/github.com/blevesearch/zapx/v16/section_faiss_vector_index.go @@ -68,12 +68,14 @@ func (v *faissVectorIndexSection) AddrForField(opaque map[int]resetable, fieldID return vo.fieldAddrs[uint16(fieldID)] } -// metadata corresponding to a serialized vector index -type vecIndexMeta struct { +// information specific to a vector index - (including metadata and +// the index pointer itself) +type vecIndexInfo struct { startOffset int indexSize uint64 vecIds []int64 indexOptimizedFor string + index *faiss.IndexImpl } // keep in mind with respect to update and delete operations with respect to vectors @@ -87,7 +89,7 @@ func (v *faissVectorIndexSection) Merge(opaque map[int]resetable, segments []*Se // in the segment this will help by avoiding multiple allocation // calls. vecSegs := make([]*SegmentBase, 0, len(segments)) - indexes := make([]*vecIndexMeta, 0, len(segments)) + indexes := make([]*vecIndexInfo, 0, len(segments)) for fieldID, fieldName := range fieldsInv { indexes = indexes[:0] // resizing the slices @@ -128,7 +130,7 @@ func (v *faissVectorIndexSection) Merge(opaque map[int]resetable, segments []*Se pos += n vecSegs = append(vecSegs, sb) - indexes = append(indexes, &vecIndexMeta{ + indexes = append(indexes, &vecIndexInfo{ vecIds: make([]int64, 0, numVecs), indexOptimizedFor: index.VectorIndexOptimizationsReverseLookup[int(indexOptimizationTypeInt)], }) @@ -182,7 +184,7 @@ func (v *faissVectorIndexSection) Merge(opaque map[int]resetable, segments []*Se } func (v *vectorIndexOpaque) flushSectionMetadata(fieldID int, w *CountHashWriter, - vecToDocID map[int64]uint64, indexes []*vecIndexMeta) error { + vecToDocID map[int64]uint64, indexes []*vecIndexInfo) error { tempBuf := v.grabBuf(binary.MaxVarintLen64) // early exit if there are absolutely no valid vectors present in the segment @@ -275,9 +277,14 @@ func calculateNprobe(nlist int, indexOptimizedFor string) int32 { // todo: naive implementation. need to keep in mind the perf implications and improve on this. // perhaps, parallelized merging can help speed things up over here. func (v *vectorIndexOpaque) mergeAndWriteVectorIndexes(sbs []*SegmentBase, - indexes []*vecIndexMeta, w *CountHashWriter, closeCh chan struct{}) error { + vecIndexes []*vecIndexInfo, w *CountHashWriter, closeCh chan struct{}) error { - vecIndexes := make([]*faiss.IndexImpl, 0, len(sbs)) + // safe to assume that all the indexes are of the same config values, given + // that they are extracted from the field mapping info. + var dims, metric int + var indexOptimizedFor string + + var validMerge bool var finalVecIDCap, indexDataCap, reconsCap int for segI, segBase := range sbs { // Considering merge operations on vector indexes are expensive, it is @@ -287,26 +294,37 @@ func (v *vectorIndexOpaque) mergeAndWriteVectorIndexes(sbs []*SegmentBase, freeReconstructedIndexes(vecIndexes) return seg.ErrClosed } + if len(vecIndexes[segI].vecIds) == 0 { + // no valid vectors for this index, don't bring it into memory + continue + } + // read the index bytes. todo: parallelize this - indexBytes := segBase.mem[indexes[segI].startOffset : indexes[segI].startOffset+int(indexes[segI].indexSize)] + indexBytes := segBase.mem[vecIndexes[segI].startOffset : vecIndexes[segI].startOffset+int(vecIndexes[segI].indexSize)] index, err := faiss.ReadIndexFromBuffer(indexBytes, faissIOFlags) if err != nil { freeReconstructedIndexes(vecIndexes) return err } - if len(indexes[segI].vecIds) > 0 { - indexReconsLen := len(indexes[segI].vecIds) * index.D() + if len(vecIndexes[segI].vecIds) > 0 { + indexReconsLen := len(vecIndexes[segI].vecIds) * index.D() if indexReconsLen > reconsCap { reconsCap = indexReconsLen } indexDataCap += indexReconsLen - finalVecIDCap += len(indexes[segI].vecIds) + finalVecIDCap += len(vecIndexes[segI].vecIds) } - vecIndexes = append(vecIndexes, index) + vecIndexes[segI].index = index + + validMerge = true + // set the dims and metric values from the constructed index. + dims = index.D() + metric = int(index.MetricType()) + indexOptimizedFor = vecIndexes[segI].indexOptimizedFor } - // no vector indexes to merge - if len(vecIndexes) == 0 { + // not a valid merge operation as there are no valid indexes to merge. + if !validMerge { return nil } @@ -326,18 +344,18 @@ func (v *vectorIndexOpaque) mergeAndWriteVectorIndexes(sbs []*SegmentBase, // reconstruct the vectors only if present, it could be that // some of the indexes had all of their vectors updated/deleted. - if len(indexes[i].vecIds) > 0 { - neededReconsLen := len(indexes[i].vecIds) * vecIndexes[i].D() + if len(vecIndexes[i].vecIds) > 0 { + neededReconsLen := len(vecIndexes[i].vecIds) * vecIndexes[i].index.D() recons = recons[:neededReconsLen] // todo: parallelize reconstruction - recons, err = vecIndexes[i].ReconstructBatch(indexes[i].vecIds, recons) + recons, err = vecIndexes[i].index.ReconstructBatch(vecIndexes[i].vecIds, recons) if err != nil { freeReconstructedIndexes(vecIndexes) return err } indexData = append(indexData, recons...) // Adding vector IDs in the same order as the vectors - finalVecIDs = append(finalVecIDs, indexes[i].vecIds...) + finalVecIDs = append(finalVecIDs, vecIndexes[i].vecIds...) } } @@ -351,12 +369,6 @@ func (v *vectorIndexOpaque) mergeAndWriteVectorIndexes(sbs []*SegmentBase, nvecs := len(finalVecIDs) - // safe to assume that all the indexes are of the same config values, given - // that they are extracted from the field mapping info. - dims := vecIndexes[0].D() - metric := vecIndexes[0].MetricType() - indexOptimizedFor := indexes[0].indexOptimizedFor - // index type to be created after merge based on the number of vectors // in indexData added into the index. nlist := determineCentroids(nvecs) @@ -419,9 +431,11 @@ func (v *vectorIndexOpaque) mergeAndWriteVectorIndexes(sbs []*SegmentBase, } // todo: can be parallelized. -func freeReconstructedIndexes(indexes []*faiss.IndexImpl) { - for _, index := range indexes { - index.Close() +func freeReconstructedIndexes(indexes []*vecIndexInfo) { + for _, entry := range indexes { + if entry.index != nil { + entry.index.Close() + } } } @@ -494,8 +508,10 @@ func (vo *vectorIndexOpaque) writeVectorIndexes(w *CountHashWriter) (offset uint ids = append(ids, hash) } + // Set the faiss metric type (default is Euclidean Distance or l2_norm) var metric = faiss.MetricL2 - if content.metric == index.CosineSimilarity { + if content.metric == index.InnerProduct || content.metric == index.CosineSimilarity { + // use the same FAISS metric for inner product and cosine similarity metric = faiss.MetricInnerProduct } diff --git a/vendor/github.com/blevesearch/zapx/v16/section_inverted_text_index.go b/vendor/github.com/blevesearch/zapx/v16/section_inverted_text_index.go index d19dc945..ea8722e4 100644 --- a/vendor/github.com/blevesearch/zapx/v16/section_inverted_text_index.go +++ b/vendor/github.com/blevesearch/zapx/v16/section_inverted_text_index.go @@ -398,11 +398,11 @@ func (i *invertedIndexOpaque) grabBuf(size int) []byte { } func (i *invertedIndexOpaque) incrementBytesWritten(bytes uint64) { - atomic.AddUint64(&i.bytesWritten, bytes) + i.bytesWritten += bytes } func (i *invertedIndexOpaque) BytesWritten() uint64 { - return atomic.LoadUint64(&i.bytesWritten) + return i.bytesWritten } func (i *invertedIndexOpaque) BytesRead() uint64 { @@ -412,7 +412,6 @@ func (i *invertedIndexOpaque) BytesRead() uint64 { func (i *invertedIndexOpaque) ResetBytesRead(uint64) {} func (io *invertedIndexOpaque) writeDicts(w *CountHashWriter) (dictOffsets []uint64, err error) { - if io.results == nil || len(io.results) == 0 { return nil, nil } @@ -462,7 +461,11 @@ func (io *invertedIndexOpaque) writeDicts(w *CountHashWriter) (dictOffsets []uin locs := io.Locs[pid] locOffset := 0 - chunkSize, err := getChunkSize(io.chunkMode, postingsBS.GetCardinality(), uint64(len(io.results))) + var cardinality uint64 + if postingsBS != nil { + cardinality = postingsBS.GetCardinality() + } + chunkSize, err := getChunkSize(io.chunkMode, cardinality, uint64(len(io.results))) if err != nil { return nil, err } diff --git a/vendor/github.com/blevesearch/zapx/v16/segment.go b/vendor/github.com/blevesearch/zapx/v16/segment.go index 8dce0856..8780ead1 100644 --- a/vendor/github.com/blevesearch/zapx/v16/segment.go +++ b/vendor/github.com/blevesearch/zapx/v16/segment.go @@ -326,7 +326,7 @@ func (s *SegmentBase) loadFieldsNew() error { if seek > uint64(len(s.mem)) { // handling a buffer overflow case. // a rare case where the backing buffer is not large enough to be read directly via - // a pos+binary.MaxVarinLen64 seek. For eg, this can happen when there is only + // a pos+binary.MaxVarintLen64 seek. For eg, this can happen when there is only // one field to be indexed in the entire batch of data and while writing out // these fields metadata, you write 1 + 8 bytes whereas the MaxVarintLen64 = 10. seek = uint64(len(s.mem)) @@ -342,7 +342,7 @@ func (s *SegmentBase) loadFieldsNew() error { // the following loop will be executed only once in the edge case pointed out above // since there is only field's offset store which occupies 8 bytes. // the pointer then seeks to a position preceding the sectionsIndexOffset, at - // which point the responbility of handling the out-of-bounds cases shifts to + // which point the responsibility of handling the out-of-bounds cases shifts to // the specific section's parsing logic. var fieldID uint64 for fieldID < numFields { @@ -867,15 +867,6 @@ func (s *SegmentBase) loadDvReaders() error { s.incrementBytesRead(read) - dataLoc, n := binary.Uvarint(s.mem[pos : pos+binary.MaxVarintLen64]) - if n <= 0 { - return fmt.Errorf("loadDvReaders: failed to read the dataLoc "+ - "offset for sectionID %v field %v", secID, s.fieldsInv[fieldID]) - } - if secID == SectionInvertedTextIndex { - s.dictLocs = append(s.dictLocs, dataLoc) - s.incrementBytesRead(uint64(n)) - } fieldDvReader, err := s.loadFieldDocValueReader(s.fieldsInv[fieldID], fieldLocStart, fieldLocEnd) if err != nil { return err diff --git a/vendor/github.com/blevesearch/zapx/v16/write.go b/vendor/github.com/blevesearch/zapx/v16/write.go index 1906a9bd..7b2c99e1 100644 --- a/vendor/github.com/blevesearch/zapx/v16/write.go +++ b/vendor/github.com/blevesearch/zapx/v16/write.go @@ -50,7 +50,7 @@ func writeRoaringWithLen(r *roaring.Bitmap, w io.Writer, return tw, nil } -func persistFieldsSection(fieldsInv []string, w *CountHashWriter, dictLocs []uint64, opaque map[int]resetable) (uint64, error) { +func persistFieldsSection(fieldsInv []string, w *CountHashWriter, opaque map[int]resetable) (uint64, error) { var rv uint64 fieldsOffsets := make([]uint64, 0, len(fieldsInv)) diff --git a/vendor/github.com/klauspost/compress/.goreleaser.yml b/vendor/github.com/klauspost/compress/.goreleaser.yml index a2295380..4528059c 100644 --- a/vendor/github.com/klauspost/compress/.goreleaser.yml +++ b/vendor/github.com/klauspost/compress/.goreleaser.yml @@ -1,5 +1,5 @@ -# This is an example goreleaser.yaml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com +version: 2 + before: hooks: - ./gen.sh @@ -99,7 +99,7 @@ archives: checksum: name_template: 'checksums.txt' snapshot: - name_template: "{{ .Tag }}-next" + version_template: "{{ .Tag }}-next" changelog: sort: asc filters: diff --git a/vendor/github.com/klauspost/compress/README.md b/vendor/github.com/klauspost/compress/README.md index 05c7359e..de264c85 100644 --- a/vendor/github.com/klauspost/compress/README.md +++ b/vendor/github.com/klauspost/compress/README.md @@ -16,6 +16,27 @@ This package provides various compression algorithms. # changelog +* Sep 23rd, 2024 - [1.17.10](https://github.com/klauspost/compress/releases/tag/v1.17.10) + * gzhttp: Add TransportAlwaysDecompress option. https://github.com/klauspost/compress/pull/978 + * gzhttp: Add supported decompress request body by @mirecl in https://github.com/klauspost/compress/pull/1002 + * s2: Add EncodeBuffer buffer recycling callback https://github.com/klauspost/compress/pull/982 + * zstd: Improve memory usage on small streaming encodes https://github.com/klauspost/compress/pull/1007 + * flate: read data written with partial flush by @vajexal in https://github.com/klauspost/compress/pull/996 + +* Jun 12th, 2024 - [1.17.9](https://github.com/klauspost/compress/releases/tag/v1.17.9) + * s2: Reduce ReadFrom temporary allocations https://github.com/klauspost/compress/pull/949 + * flate, zstd: Shave some bytes off amd64 matchLen by @greatroar in https://github.com/klauspost/compress/pull/963 + * Upgrade zip/zlib to 1.22.4 upstream https://github.com/klauspost/compress/pull/970 https://github.com/klauspost/compress/pull/971 + * zstd: BuildDict fails with RLE table https://github.com/klauspost/compress/pull/951 + +* Apr 9th, 2024 - [1.17.8](https://github.com/klauspost/compress/releases/tag/v1.17.8) + * zstd: Reject blocks where reserved values are not 0 https://github.com/klauspost/compress/pull/885 + * zstd: Add RLE detection+encoding https://github.com/klauspost/compress/pull/938 + +* Feb 21st, 2024 - [1.17.7](https://github.com/klauspost/compress/releases/tag/v1.17.7) + * s2: Add AsyncFlush method: Complete the block without flushing by @Jille in https://github.com/klauspost/compress/pull/927 + * s2: Fix literal+repeat exceeds dst crash https://github.com/klauspost/compress/pull/930 + * Feb 5th, 2024 - [1.17.6](https://github.com/klauspost/compress/releases/tag/v1.17.6) * zstd: Fix incorrect repeat coding in best mode https://github.com/klauspost/compress/pull/923 * s2: Fix DecodeConcurrent deadlock on errors https://github.com/klauspost/compress/pull/925 @@ -81,7 +102,7 @@ https://github.com/klauspost/compress/pull/919 https://github.com/klauspost/comp * zstd: Various minor improvements by @greatroar in https://github.com/klauspost/compress/pull/788 https://github.com/klauspost/compress/pull/794 https://github.com/klauspost/compress/pull/795 * s2: Fix huge block overflow https://github.com/klauspost/compress/pull/779 * s2: Allow CustomEncoder fallback https://github.com/klauspost/compress/pull/780 - * gzhttp: Suppport ResponseWriter Unwrap() in gzhttp handler by @jgimenez in https://github.com/klauspost/compress/pull/799 + * gzhttp: Support ResponseWriter Unwrap() in gzhttp handler by @jgimenez in https://github.com/klauspost/compress/pull/799 * Mar 13, 2023 - [v1.16.1](https://github.com/klauspost/compress/releases/tag/v1.16.1) * zstd: Speed up + improve best encoder by @greatroar in https://github.com/klauspost/compress/pull/776 @@ -136,7 +157,7 @@ https://github.com/klauspost/compress/pull/919 https://github.com/klauspost/comp * zstd: Add [WithDecodeAllCapLimit](https://pkg.go.dev/github.com/klauspost/compress@v1.15.10/zstd#WithDecodeAllCapLimit) https://github.com/klauspost/compress/pull/649 * Add Go 1.19 - deprecate Go 1.16 https://github.com/klauspost/compress/pull/651 * flate: Improve level 5+6 compression https://github.com/klauspost/compress/pull/656 - * zstd: Improve "better" compresssion https://github.com/klauspost/compress/pull/657 + * zstd: Improve "better" compression https://github.com/klauspost/compress/pull/657 * s2: Improve "best" compression https://github.com/klauspost/compress/pull/658 * s2: Improve "better" compression. https://github.com/klauspost/compress/pull/635 * s2: Slightly faster non-assembly decompression https://github.com/klauspost/compress/pull/646 @@ -339,7 +360,7 @@ While the release has been extensively tested, it is recommended to testing when * s2: Fix binaries. * Feb 25, 2021 (v1.11.8) - * s2: Fixed occational out-of-bounds write on amd64. Upgrade recommended. + * s2: Fixed occasional out-of-bounds write on amd64. Upgrade recommended. * s2: Add AMD64 assembly for better mode. 25-50% faster. [#315](https://github.com/klauspost/compress/pull/315) * s2: Less upfront decoder allocation. [#322](https://github.com/klauspost/compress/pull/322) * zstd: Faster "compression" of incompressible data. [#314](https://github.com/klauspost/compress/pull/314) @@ -518,7 +539,7 @@ While the release has been extensively tested, it is recommended to testing when * Feb 19, 2016: Faster bit writer, level -2 is 15% faster, level 1 is 4% faster. * Feb 19, 2016: Handle small payloads faster in level 1-3. * Feb 19, 2016: Added faster level 2 + 3 compression modes. -* Feb 19, 2016: [Rebalanced compression levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so there is a more even progresssion in terms of compression. New default level is 5. +* Feb 19, 2016: [Rebalanced compression levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so there is a more even progression in terms of compression. New default level is 5. * Feb 14, 2016: Snappy: Merge upstream changes. * Feb 14, 2016: Snappy: Fix aggressive skipping. * Feb 14, 2016: Snappy: Update benchmark. diff --git a/vendor/github.com/klauspost/compress/fse/decompress.go b/vendor/github.com/klauspost/compress/fse/decompress.go index cc05d0f7..0c7dd4ff 100644 --- a/vendor/github.com/klauspost/compress/fse/decompress.go +++ b/vendor/github.com/klauspost/compress/fse/decompress.go @@ -15,7 +15,7 @@ const ( // It is possible, but by no way guaranteed that corrupt data will // return an error. // It is up to the caller to verify integrity of the returned data. -// Use a predefined Scrach to set maximum acceptable output size. +// Use a predefined Scratch to set maximum acceptable output size. func Decompress(b []byte, s *Scratch) ([]byte, error) { s, err := s.prepare(b) if err != nil { diff --git a/vendor/github.com/klauspost/compress/huff0/decompress.go b/vendor/github.com/klauspost/compress/huff0/decompress.go index 54bd08b2..0f56b02d 100644 --- a/vendor/github.com/klauspost/compress/huff0/decompress.go +++ b/vendor/github.com/klauspost/compress/huff0/decompress.go @@ -1136,7 +1136,7 @@ func (s *Scratch) matches(ct cTable, w io.Writer) { errs++ } if errs > 0 { - fmt.Fprintf(w, "%d errros in base, stopping\n", errs) + fmt.Fprintf(w, "%d errors in base, stopping\n", errs) continue } // Ensure that all combinations are covered. @@ -1152,7 +1152,7 @@ func (s *Scratch) matches(ct cTable, w io.Writer) { errs++ } if errs > 20 { - fmt.Fprintf(w, "%d errros, stopping\n", errs) + fmt.Fprintf(w, "%d errors, stopping\n", errs) break } } diff --git a/vendor/github.com/klauspost/compress/zstd/blockdec.go b/vendor/github.com/klauspost/compress/zstd/blockdec.go index 03744fbc..9c28840c 100644 --- a/vendor/github.com/klauspost/compress/zstd/blockdec.go +++ b/vendor/github.com/klauspost/compress/zstd/blockdec.go @@ -598,7 +598,9 @@ func (b *blockDec) prepareSequences(in []byte, hist *history) (err error) { printf("RLE set to 0x%x, code: %v", symb, v) } case compModeFSE: - println("Reading table for", tableIndex(i)) + if debugDecoder { + println("Reading table for", tableIndex(i)) + } if seq.fse == nil || seq.fse.preDefined { seq.fse = fseDecoderPool.Get().(*fseDecoder) } diff --git a/vendor/github.com/klauspost/compress/zstd/enc_better.go b/vendor/github.com/klauspost/compress/zstd/enc_better.go index a4f5bf91..84a79fde 100644 --- a/vendor/github.com/klauspost/compress/zstd/enc_better.go +++ b/vendor/github.com/klauspost/compress/zstd/enc_better.go @@ -179,9 +179,9 @@ encodeLoop: if repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) { // Consider history as well. var seq seq - lenght := 4 + e.matchlen(s+4+repOff, repIndex+4, src) + length := 4 + e.matchlen(s+4+repOff, repIndex+4, src) - seq.matchLen = uint32(lenght - zstdMinMatch) + seq.matchLen = uint32(length - zstdMinMatch) // We might be able to match backwards. // Extend as long as we can. @@ -210,12 +210,12 @@ encodeLoop: // Index match start+1 (long) -> s - 1 index0 := s + repOff - s += lenght + repOff + s += length + repOff nextEmit = s if s >= sLimit { if debugEncoder { - println("repeat ended", s, lenght) + println("repeat ended", s, length) } break encodeLoop @@ -241,9 +241,9 @@ encodeLoop: if false && repIndex >= 0 && load6432(src, repIndex) == load6432(src, s+repOff) { // Consider history as well. var seq seq - lenght := 8 + e.matchlen(s+8+repOff2, repIndex+8, src) + length := 8 + e.matchlen(s+8+repOff2, repIndex+8, src) - seq.matchLen = uint32(lenght - zstdMinMatch) + seq.matchLen = uint32(length - zstdMinMatch) // We might be able to match backwards. // Extend as long as we can. @@ -270,11 +270,11 @@ encodeLoop: } blk.sequences = append(blk.sequences, seq) - s += lenght + repOff2 + s += length + repOff2 nextEmit = s if s >= sLimit { if debugEncoder { - println("repeat ended", s, lenght) + println("repeat ended", s, length) } break encodeLoop @@ -708,9 +708,9 @@ encodeLoop: if repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) { // Consider history as well. var seq seq - lenght := 4 + e.matchlen(s+4+repOff, repIndex+4, src) + length := 4 + e.matchlen(s+4+repOff, repIndex+4, src) - seq.matchLen = uint32(lenght - zstdMinMatch) + seq.matchLen = uint32(length - zstdMinMatch) // We might be able to match backwards. // Extend as long as we can. @@ -738,12 +738,12 @@ encodeLoop: blk.sequences = append(blk.sequences, seq) // Index match start+1 (long) -> s - 1 - s += lenght + repOff + s += length + repOff nextEmit = s if s >= sLimit { if debugEncoder { - println("repeat ended", s, lenght) + println("repeat ended", s, length) } break encodeLoop @@ -772,9 +772,9 @@ encodeLoop: if false && repIndex >= 0 && load6432(src, repIndex) == load6432(src, s+repOff) { // Consider history as well. var seq seq - lenght := 8 + e.matchlen(s+8+repOff2, repIndex+8, src) + length := 8 + e.matchlen(s+8+repOff2, repIndex+8, src) - seq.matchLen = uint32(lenght - zstdMinMatch) + seq.matchLen = uint32(length - zstdMinMatch) // We might be able to match backwards. // Extend as long as we can. @@ -801,11 +801,11 @@ encodeLoop: } blk.sequences = append(blk.sequences, seq) - s += lenght + repOff2 + s += length + repOff2 nextEmit = s if s >= sLimit { if debugEncoder { - println("repeat ended", s, lenght) + println("repeat ended", s, length) } break encodeLoop diff --git a/vendor/github.com/klauspost/compress/zstd/enc_dfast.go b/vendor/github.com/klauspost/compress/zstd/enc_dfast.go index a154c18f..d36be7bd 100644 --- a/vendor/github.com/klauspost/compress/zstd/enc_dfast.go +++ b/vendor/github.com/klauspost/compress/zstd/enc_dfast.go @@ -138,9 +138,9 @@ encodeLoop: if repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) { // Consider history as well. var seq seq - lenght := 4 + e.matchlen(s+4+repOff, repIndex+4, src) + length := 4 + e.matchlen(s+4+repOff, repIndex+4, src) - seq.matchLen = uint32(lenght - zstdMinMatch) + seq.matchLen = uint32(length - zstdMinMatch) // We might be able to match backwards. // Extend as long as we can. @@ -166,11 +166,11 @@ encodeLoop: println("repeat sequence", seq, "next s:", s) } blk.sequences = append(blk.sequences, seq) - s += lenght + repOff + s += length + repOff nextEmit = s if s >= sLimit { if debugEncoder { - println("repeat ended", s, lenght) + println("repeat ended", s, length) } break encodeLoop @@ -798,9 +798,9 @@ encodeLoop: if repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) { // Consider history as well. var seq seq - lenght := 4 + e.matchlen(s+4+repOff, repIndex+4, src) + length := 4 + e.matchlen(s+4+repOff, repIndex+4, src) - seq.matchLen = uint32(lenght - zstdMinMatch) + seq.matchLen = uint32(length - zstdMinMatch) // We might be able to match backwards. // Extend as long as we can. @@ -826,11 +826,11 @@ encodeLoop: println("repeat sequence", seq, "next s:", s) } blk.sequences = append(blk.sequences, seq) - s += lenght + repOff + s += length + repOff nextEmit = s if s >= sLimit { if debugEncoder { - println("repeat ended", s, lenght) + println("repeat ended", s, length) } break encodeLoop diff --git a/vendor/github.com/klauspost/compress/zstd/encoder.go b/vendor/github.com/klauspost/compress/zstd/encoder.go index 72af7ef0..8f8223cd 100644 --- a/vendor/github.com/klauspost/compress/zstd/encoder.go +++ b/vendor/github.com/klauspost/compress/zstd/encoder.go @@ -6,6 +6,7 @@ package zstd import ( "crypto/rand" + "errors" "fmt" "io" "math" @@ -149,6 +150,9 @@ func (e *Encoder) ResetContentSize(w io.Writer, size int64) { // and write CRC if requested. func (e *Encoder) Write(p []byte) (n int, err error) { s := &e.state + if s.eofWritten { + return 0, ErrEncoderClosed + } for len(p) > 0 { if len(p)+len(s.filling) < e.o.blockSize { if e.o.crc { @@ -202,7 +206,7 @@ func (e *Encoder) nextBlock(final bool) error { return nil } if final && len(s.filling) > 0 { - s.current = e.EncodeAll(s.filling, s.current[:0]) + s.current = e.encodeAll(s.encoder, s.filling, s.current[:0]) var n2 int n2, s.err = s.w.Write(s.current) if s.err != nil { @@ -288,6 +292,9 @@ func (e *Encoder) nextBlock(final bool) error { s.filling, s.current, s.previous = s.previous[:0], s.filling, s.current s.nInput += int64(len(s.current)) s.wg.Add(1) + if final { + s.eofWritten = true + } go func(src []byte) { if debugEncoder { println("Adding block,", len(src), "bytes, final:", final) @@ -303,9 +310,6 @@ func (e *Encoder) nextBlock(final bool) error { blk := enc.Block() enc.Encode(blk, src) blk.last = final - if final { - s.eofWritten = true - } // Wait for pending writes. s.wWg.Wait() if s.writeErr != nil { @@ -401,12 +405,20 @@ func (e *Encoder) Flush() error { if len(s.filling) > 0 { err := e.nextBlock(false) if err != nil { + // Ignore Flush after Close. + if errors.Is(s.err, ErrEncoderClosed) { + return nil + } return err } } s.wg.Wait() s.wWg.Wait() if s.err != nil { + // Ignore Flush after Close. + if errors.Is(s.err, ErrEncoderClosed) { + return nil + } return s.err } return s.writeErr @@ -422,6 +434,9 @@ func (e *Encoder) Close() error { } err := e.nextBlock(true) if err != nil { + if errors.Is(s.err, ErrEncoderClosed) { + return nil + } return err } if s.frameContentSize > 0 { @@ -459,6 +474,11 @@ func (e *Encoder) Close() error { } _, s.err = s.w.Write(frame) } + if s.err == nil { + s.err = ErrEncoderClosed + return nil + } + return s.err } @@ -469,6 +489,15 @@ func (e *Encoder) Close() error { // Data compressed with EncodeAll can be decoded with the Decoder, // using either a stream or DecodeAll. func (e *Encoder) EncodeAll(src, dst []byte) []byte { + e.init.Do(e.initialize) + enc := <-e.encoders + defer func() { + e.encoders <- enc + }() + return e.encodeAll(enc, src, dst) +} + +func (e *Encoder) encodeAll(enc encoder, src, dst []byte) []byte { if len(src) == 0 { if e.o.fullZero { // Add frame header. @@ -491,13 +520,7 @@ func (e *Encoder) EncodeAll(src, dst []byte) []byte { } return dst } - e.init.Do(e.initialize) - enc := <-e.encoders - defer func() { - // Release encoder reference to last block. - // If a non-single block is needed the encoder will reset again. - e.encoders <- enc - }() + // Use single segments when above minimum window and below window size. single := len(src) <= e.o.windowSize && len(src) > MinWindowSize if e.o.single != nil { diff --git a/vendor/github.com/klauspost/compress/zstd/framedec.go b/vendor/github.com/klauspost/compress/zstd/framedec.go index 53e160f7..e47af66e 100644 --- a/vendor/github.com/klauspost/compress/zstd/framedec.go +++ b/vendor/github.com/klauspost/compress/zstd/framedec.go @@ -146,7 +146,9 @@ func (d *frameDec) reset(br byteBuffer) error { } return err } - printf("raw: %x, mantissa: %d, exponent: %d\n", wd, wd&7, wd>>3) + if debugDecoder { + printf("raw: %x, mantissa: %d, exponent: %d\n", wd, wd&7, wd>>3) + } windowLog := 10 + (wd >> 3) windowBase := uint64(1) << windowLog windowAdd := (windowBase / 8) * uint64(wd&0x7) diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go index 8adabd82..c59f17e0 100644 --- a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go +++ b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go @@ -146,7 +146,7 @@ func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) { return true, fmt.Errorf("output bigger than max block size (%d)", maxBlockSize) default: - return true, fmt.Errorf("sequenceDecs_decode returned erronous code %d", errCode) + return true, fmt.Errorf("sequenceDecs_decode returned erroneous code %d", errCode) } s.seqSize += ctx.litRemain @@ -292,7 +292,7 @@ func (s *sequenceDecs) decode(seqs []seqVals) error { return io.ErrUnexpectedEOF } - return fmt.Errorf("sequenceDecs_decode_amd64 returned erronous code %d", errCode) + return fmt.Errorf("sequenceDecs_decode_amd64 returned erroneous code %d", errCode) } if ctx.litRemain < 0 { diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s index 5b06174b..f5591fa1 100644 --- a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s +++ b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s @@ -1814,7 +1814,7 @@ TEXT ·sequenceDecs_decodeSync_amd64(SB), $64-32 MOVQ 40(SP), AX ADDQ AX, 48(SP) - // Calculate poiter to s.out[cap(s.out)] (a past-end pointer) + // Calculate pointer to s.out[cap(s.out)] (a past-end pointer) ADDQ R10, 32(SP) // outBase += outPosition @@ -2376,7 +2376,7 @@ TEXT ·sequenceDecs_decodeSync_bmi2(SB), $64-32 MOVQ 40(SP), CX ADDQ CX, 48(SP) - // Calculate poiter to s.out[cap(s.out)] (a past-end pointer) + // Calculate pointer to s.out[cap(s.out)] (a past-end pointer) ADDQ R9, 32(SP) // outBase += outPosition @@ -2896,7 +2896,7 @@ TEXT ·sequenceDecs_decodeSync_safe_amd64(SB), $64-32 MOVQ 40(SP), AX ADDQ AX, 48(SP) - // Calculate poiter to s.out[cap(s.out)] (a past-end pointer) + // Calculate pointer to s.out[cap(s.out)] (a past-end pointer) ADDQ R10, 32(SP) // outBase += outPosition @@ -3560,7 +3560,7 @@ TEXT ·sequenceDecs_decodeSync_safe_bmi2(SB), $64-32 MOVQ 40(SP), CX ADDQ CX, 48(SP) - // Calculate poiter to s.out[cap(s.out)] (a past-end pointer) + // Calculate pointer to s.out[cap(s.out)] (a past-end pointer) ADDQ R9, 32(SP) // outBase += outPosition diff --git a/vendor/github.com/klauspost/compress/zstd/zstd.go b/vendor/github.com/klauspost/compress/zstd/zstd.go index 4be7cc73..066bef2a 100644 --- a/vendor/github.com/klauspost/compress/zstd/zstd.go +++ b/vendor/github.com/klauspost/compress/zstd/zstd.go @@ -88,6 +88,10 @@ var ( // Close has been called. ErrDecoderClosed = errors.New("decoder used after Close") + // ErrEncoderClosed will be returned if the Encoder was used after + // Close has been called. + ErrEncoderClosed = errors.New("encoder used after Close") + // ErrDecoderNilInput is returned when a nil Reader was provided // and an operation other than Reset/DecodeAll/Close was attempted. ErrDecoderNilInput = errors.New("nil input provided as reader") diff --git a/vendor/github.com/marcboeker/go-duckdb/.gitignore b/vendor/github.com/marcboeker/go-duckdb/.gitignore index 4edda059..fcff0a3c 100644 --- a/vendor/github.com/marcboeker/go-duckdb/.gitignore +++ b/vendor/github.com/marcboeker/go-duckdb/.gitignore @@ -3,3 +3,5 @@ run.sh duckdb/ .idea +./duckdb +duckdb diff --git a/vendor/github.com/marcboeker/go-duckdb/Makefile b/vendor/github.com/marcboeker/go-duckdb/Makefile index bce3a365..ecacdb75 100644 --- a/vendor/github.com/marcboeker/go-duckdb/Makefile +++ b/vendor/github.com/marcboeker/go-duckdb/Makefile @@ -1,5 +1,5 @@ DUCKDB_REPO=https://github.com/duckdb/duckdb.git -DUCKDB_BRANCH=v1.0.0 +DUCKDB_BRANCH=v1.1.3 .PHONY: install install: @@ -9,6 +9,9 @@ install: examples: go run examples/simple/main.go go run examples/appender/main.go + go run examples/scalar_udf/main.go + go run examples/table_udf/main.go + go run examples/table_udf_parallel/main.go .PHONY: test test: @@ -24,11 +27,12 @@ duckdb: rm -rf duckdb git clone -b ${DUCKDB_BRANCH} --depth 1 ${DUCKDB_REPO} -DUCKDB_COMMON_BUILD_FLAGS := BUILD_SHELL=0 BUILD_UNITTESTS=0 DUCKDB_PLATFORM=any +DUCKDB_COMMON_BUILD_FLAGS := BUILD_SHELL=0 BUILD_UNITTESTS=0 DUCKDB_PLATFORM=any ENABLE_EXTENSION_AUTOLOADING=1 ENABLE_EXTENSION_AUTOINSTALL=1 BUILD_EXTENSIONS="json" .PHONY: deps.darwin.amd64 deps.darwin.amd64: duckdb if [ "$(shell uname -s | tr '[:upper:]' '[:lower:]')" != "darwin" ]; then echo "Error: must run build on darwin"; false; fi + mkdir -p deps/darwin_amd64 cd duckdb && \ CFLAGS="-target x86_64-apple-macos11 -O3" CXXFLAGS="-target x86_64-apple-macos11 -O3" ${DUCKDB_COMMON_BUILD_FLAGS} make bundle-library -j 2 @@ -37,6 +41,7 @@ deps.darwin.amd64: duckdb .PHONY: deps.darwin.arm64 deps.darwin.arm64: duckdb if [ "$(shell uname -s | tr '[:upper:]' '[:lower:]')" != "darwin" ]; then echo "Error: must run build on darwin"; false; fi + mkdir -p deps/darwin_arm64 cd duckdb && \ CFLAGS="-target arm64-apple-macos11 -O3" CXXFLAGS="-target arm64-apple-macos11 -O3" ${DUCKDB_COMMON_BUILD_FLAGS} make bundle-library -j 2 @@ -45,6 +50,7 @@ deps.darwin.arm64: duckdb .PHONY: deps.linux.amd64 deps.linux.amd64: duckdb if [ "$(shell uname -s | tr '[:upper:]' '[:lower:]')" != "linux" ]; then echo "Error: must run build on linux"; false; fi + mkdir -p deps/linux_amd64 cd duckdb && \ CFLAGS="-O3" CXXFLAGS="-O3" ${DUCKDB_COMMON_BUILD_FLAGS} make bundle-library -j 2 @@ -53,6 +59,7 @@ deps.linux.amd64: duckdb .PHONY: deps.linux.arm64 deps.linux.arm64: duckdb if [ "$(shell uname -s | tr '[:upper:]' '[:lower:]')" != "linux" ]; then echo "Error: must run build on linux"; false; fi + mkdir -p deps/linux_arm64 cd duckdb && \ CC="aarch64-linux-gnu-gcc" CXX="aarch64-linux-gnu-g++" CFLAGS="-O3" CXXFLAGS="-O3" ${DUCKDB_COMMON_BUILD_FLAGS} make bundle-library -j 2 @@ -61,7 +68,28 @@ deps.linux.arm64: duckdb .PHONY: deps.freebsd.amd64 deps.freebsd.amd64: duckdb if [ "$(shell uname -s | tr '[:upper:]' '[:lower:]')" != "freebsd" ]; then echo "Error: must run build on freebsd"; false; fi + mkdir -p deps/freebsd_amd64 cd duckdb && \ CFLAGS="-O3" CXXFLAGS="-O3" ${DUCKDB_COMMON_BUILD_FLAGS} gmake bundle-library -j 2 cp duckdb/build/release/libduckdb_bundle.a deps/freebsd_amd64/libduckdb.a + +.PHONY: deps.windows.amd64 +deps.windows.amd64: duckdb + if [ "$(shell uname -s | tr '[:upper:]' '[:lower:]')" != "mingw64_nt-10.0-20348" ]; then echo "Error: must run build on windows"; false; fi + mkdir -p deps/windows_amd64 + + # Copied from the DuckDB repository and fixed for Windows. Ideally, `make bundle-library` should also work for Windows. + cd duckdb && \ + ${DUCKDB_COMMON_BUILD_FLAGS} GENERATOR="-G \"MinGW Makefiles\"" gmake release -j 2 + cd duckdb/build/release && \ + mkdir -p bundle && \ + cp src/libduckdb_static.a bundle/. && \ + cp third_party/*/libduckdb_*.a bundle/. && \ + cp extension/*/lib*_extension.a bundle/. + cd duckdb/build/release/bundle && \ + find . -name '*.a' -exec ${AR} -x {} \; + cd duckdb/build/release/bundle && \ + ${AR} cr ../libduckdb_bundle.a *.obj + + cp duckdb/build/release/libduckdb_bundle.a deps/windows_amd64/libduckdb.a diff --git a/vendor/github.com/marcboeker/go-duckdb/README.md b/vendor/github.com/marcboeker/go-duckdb/README.md index ffca7b16..123165ac 100644 --- a/vendor/github.com/marcboeker/go-duckdb/README.md +++ b/vendor/github.com/marcboeker/go-duckdb/README.md @@ -3,6 +3,7 @@ The DuckDB driver conforms to the built-in `database/sql` interface. ![Tests status](https://github.com/marcboeker/go-duckdb/actions/workflows/tests.yaml/badge.svg) +[![GoDoc](https://godoc.org/github.com/marcboeker/go-duckdb?status.svg)](https://pkg.go.dev/github.com/marcboeker/go-duckdb) ## Installation @@ -10,7 +11,16 @@ The DuckDB driver conforms to the built-in `database/sql` interface. go get github.com/marcboeker/go-duckdb ``` -`go-duckdb` uses `CGO` to make calls to DuckDB. You must build your binaries with `CGO_ENABLED=1`. +### Windows + +On windows, the correct version of gcc and the neccesary runtime libraries needs to be installed. +One method to do this is using msys64. To begin, install msys64 using their installer. Once this is done, open a msys64 shell and run + +``` +pacman -S mingw-w64-ucrt-x86_64-gcc +``` + +select yes when neccesary, its ok if the shell closes. Then add gcc to the path using whatever method you prefer. In powershell this is `$env:PATH = "C:\msys64\ucrt64\bin:$env:PATH"`. Once this is done, you can compile this package on windows. ## Usage @@ -18,9 +28,7 @@ go get github.com/marcboeker/go-duckdb ```go db, err := sql.Open("duckdb", "") -if err != nil { - ... -} +check(err) defer db.Close() ``` @@ -29,9 +37,7 @@ the file does not exist, then DuckDB creates it. ```go db, err := sql.Open("duckdb", "/path/to/foo.db") -if err != nil { - ... -} +check(err) defer db.Close() ``` @@ -39,33 +45,30 @@ If you want to set specific [config options for DuckDB](https://duckdb.org/docs/ ```go db, err := sql.Open("duckdb", "/path/to/foo.db?access_mode=read_only&threads=4") -if err != nil { - ... -} +check(err) defer db.Close() ``` -Alternatively, you can use [sql.OpenDB](https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/database/sql/sql.go;l=855). That way, you can perform initialization steps in a callback function before opening the database. -Here's an example that installs and loads the JSON extension when opening a database with `sql.OpenDB(connector)`. +Alternatively, you can use [sql.OpenDB](https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/database/sql/sql.go;l=824). +That way, you can perform initialization steps in a callback function before opening the database. +Here's an example that configures some database parameters when opening a database with `sql.OpenDB(connector)`. ```go connector, err := duckdb.NewConnector("/path/to/foo.db?access_mode=read_only&threads=4", func(execer driver.ExecerContext) error { bootQueries := []string{ - "INSTALL 'json'", - "LOAD 'json'", + "SET schema=main", + "SET search_path=main", } for _, query := range bootQueries { _, err = execer.ExecContext(context.Background(), query, nil) if err != nil { - ... + return err } } return nil }) -if err != nil { - ... -} +check(err) db := sql.OpenDB(connector) defer db.Close() @@ -73,6 +76,30 @@ defer db.Close() Please refer to the [database/sql](https://godoc.org/database/sql) documentation for further usage instructions. +## Notes and FAQs + +**`undefined: conn`** + +When building this package, some people run into an `undefined: conn` error. +This is due to the go compiler determining that CGO is not available. This can happen due to a few issues. + +The first noted in the [comment here](https://github.com/marcboeker/go-duckdb/issues/275#issuecomment-2355712997) is that the buildtools are not installed. +To fix this for ubuntu, you can install them using: +``` +sudo apt-get update && sudo apt-get install build-essential +``` + +Another issue is when you are cross-compiling, since the go compiler automatically disables CGO when cross-compiling. +To enable cgo when cross-compiling use `CC={C cross compiler} CGO_ENABLED=1 {command}` to force-enable CGO and set the right cross-compiler. + +**`TIMESTAMP vs. TIMESTAMP_TZ`** + +In the C API, DuckDB stores both `TIMESTAMP` and `TIMESTAMP_TZ` as `duckdb_timestamp`, which holds the number of +microseconds elapsed since January 1, 1970 UTC (i.e., an instant without offset information). +When passing a `time.Time` to go-duckdb, go-duckdb transforms it to an instant with `UnixMicro()`, +even when using `TIMESTAMP_TZ`. Later, scanning either type of value returns an instant, as SQL types do not model +time zone information for individual values. + ## Memory Allocation DuckDB lives in-process. Therefore, all its memory lives in the driver. All allocations live in the host process, which @@ -87,46 +114,70 @@ conn, err := db.Conn(context.Background()) defer conn.Close() rows, err := conn.QueryContext(context.Background(), "SELECT 42") -// alternatively, rows.Next() has to return false +// Alternatively, rows.Next() has to return false. rows.Close() appender, err := NewAppenderFromConn(conn, "", "test") defer appender.Close() -// if not passed to sql.OpenDB +// If not passed to sql.OpenDB. connector, err := NewConnector("", nil) defer connector.Close() ``` ## DuckDB Appender API -If you want to use the [DuckDB Appender API](https://duckdb.org/docs/data/appender.html), you can obtain a new `Appender` by passing a DuckDB connection to `NewAppenderFromConn()`. See `examples/appender.go` for a complete example. +If you want to use the [DuckDB Appender API](https://duckdb.org/docs/data/appender.html), you can obtain a new `Appender` by passing a DuckDB connection to `NewAppenderFromConn()`. +See `examples/appender.go` for a complete example. ```go connector, err := duckdb.NewConnector("test.db", nil) -if err != nil { - ... -} +check(err) defer connector.Close() conn, err := connector.Connect(context.Background()) -if err != nil { - ... -} +check(err) defer conn.Close() -// obtain an appender from the connection -// NOTE: the table 'test_tbl' must exist in test.db +// Obtain an appender from the connection. +// NOTE: The table 'test_tbl' must exist in test.db. appender, err := NewAppenderFromConn(conn, "", "test_tbl") -if err != nil { - ... -} +check(err) defer appender.Close() err = appender.AppendRow(...) -if err != nil { - ... -} +check(err) +``` + +## DuckDB Profiling API + +This section describes using the [DuckDB Profiling API](https://duckdb.org/docs/dev/profiling.html). +DuckDB's profiling information is connection-local. +The following example walks you through the necessary steps to obtain the `ProfilingInfo` type, which contains all available metrics. +Please refer to the [DuckDB documentation](https://duckdb.org/docs/dev/profiling.html) on configuring and collecting specific metrics. + +- First, you need to obtain a connection. +- Then, you enable profiling for the connection. +- Now, for each subsequent query on this connection, DuckDB will collect profiling information. + - Optionally, you can turn off profiling at any point. +- Next, you execute the query for which you want to obtain profiling information. +- Finally, directly after executing the query, retrieve any available profiling information. + +For readability, we omit error handling in this example. +```Go +db, err := sql.Open("duckdb", "") +con, err := db.Conn(context.Background()) + +_, err = con.ExecContext(context.Background(), `PRAGMA enable_profiling = 'no_output'`) +_, err = con.ExecContext(context.Background(), `PRAGMA profiling_mode = 'detailed'`) + +res, err := con.QueryContext(context.Background(), `SELECT 42`) +info, err := GetProfilingInfo(con) +err = res.Close() + +_, err = con.ExecContext(context.Background(), `PRAGMA disable_profiling`) +err = con.Close() +err = db.Close() ``` ## DuckDB Apache Arrow Interface @@ -135,35 +186,29 @@ If you want to use the [DuckDB Arrow Interface](https://duckdb.org/docs/api/c/ap ```go connector, err := duckdb.NewConnector("", nil) -if err != nil { - ... -} +check(err) defer connector.Close() conn, err := connector.Connect(context.Background()) -if err != nil { - ... -} +check(err) defer conn.Close() -// obtain the Arrow from the connection +// Obtain the Arrow from the connection. arrow, err := duckdb.NewArrowFromConn(conn) -if err != nil { - ... -} +check(err) rdr, err := arrow.QueryContext(context.Background(), "SELECT * FROM generate_series(1, 10)") -if err != nil { - ... -} +check(err) defer rdr.Release() for rdr.Next() { - // process records + // Process each record. } ``` -The Arrow interface is a heavy dependency. If you do not need it, you can disable it by passing `-tags=no_duckdb_arrow` to `go build`. This will be made opt-in in V2. +The Arrow interface is a heavy dependency. +If you do not need it, you can disable it by passing `-tags=no_duckdb_arrow` to `go build`. +This will be made opt-in in V2. ```sh go build -tags="no_duckdb_arrow" @@ -182,26 +227,35 @@ Now you can build your module as usual. ## Linking DuckDB -By default, `go-duckdb` statically links DuckDB into your binary. Statically linking DuckDB adds around 30 MB to your binary size. On Linux (Intel) and macOS (Intel and ARM), `go-duckdb` bundles pre-compiled static libraries for fast builds. +By default, `go-duckdb` statically links DuckDB into your binary. +Statically linking DuckDB increases your binary size. + +`go-duckdb` bundles pre-compiled static libraries for some OS and architecture combinations. +- MacOS: amd64, arm64. +- Linux: amd64, arm64. +- FreeBSD: amd64. +- Windows: amd64. -Alternatively, you can dynamically link DuckDB by passing `-tags=duckdb_use_lib` to `go build`. You must have a copy of `libduckdb` available on your system (`.so` on Linux or `.dylib` on macOS), which you can download from the DuckDB [releases page](https://github.com/duckdb/duckdb/releases). For example: +Alternatively, you can dynamically link DuckDB by passing `-tags=duckdb_use_lib` to `go build`. +You must have a copy of `libduckdb` available on your system (`.so` on Linux or `.dylib` on macOS), which you can download from the DuckDB [releases page](https://github.com/duckdb/duckdb/releases). +For example: ```sh -# On Linux +# On Linux. CGO_ENABLED=1 CGO_LDFLAGS="-L/path/to/libs" go build -tags=duckdb_use_lib main.go LD_LIBRARY_PATH=/path/to/libs ./main -# On macOS +# On macOS. CGO_ENABLED=1 CGO_LDFLAGS="-L/path/to/libs" go build -tags=duckdb_use_lib main.go DYLD_LIBRARY_PATH=/path/to/libs ./main ``` -## Notes +## DuckDB Extensions -`TIMESTAMP vs. TIMESTAMP_TZ` +`go-duckdb` statically builds the `JSON` extension for its pre-compiled libraries. +Additionally, automatic extension loading is enabled. +The extensions available differ between the pre-compiled libraries. +Thus, if you fail to install and load an extension, you might have to link a custom DuckDB. -In the C API, DuckDB stores both `TIMESTAMP` and `TIMESTAMP_TZ` as `duckdb_timestamp`, which holds the number of -microseconds elapsed since January 1, 1970 UTC (i.e., an instant without offset information). -When passing a `time.Time` to go-duckdb, go-duckdb transforms it to an instant with `UnixMicro()`, -even when using `TIMESTAMP_TZ`. Later, scanning either type of value returns an instant, as SQL types do not model -time zone information for individual values. +Specifically, for MingW (Windows), there are no distributed extensions (yet). +You can statically include them by extending the `BUILD_EXTENSIONS="json"` variable in the `Makefile`. diff --git a/vendor/github.com/marcboeker/go-duckdb/appender.go b/vendor/github.com/marcboeker/go-duckdb/appender.go index 0b3d5b77..31c264a6 100644 --- a/vendor/github.com/marcboeker/go-duckdb/appender.go +++ b/vendor/github.com/marcboeker/go-duckdb/appender.go @@ -1,13 +1,13 @@ package duckdb /* -#include #include */ import "C" import ( "database/sql/driver" + "errors" "unsafe" ) @@ -33,20 +33,20 @@ type Appender struct { func NewAppenderFromConn(driverConn driver.Conn, schema, table string) (*Appender, error) { con, ok := driverConn.(*conn) if !ok { - return nil, getError(errAppenderInvalidCon, nil) + return nil, getError(errInvalidCon, nil) } if con.closed { - return nil, getError(errAppenderClosedCon, nil) + return nil, getError(errClosedCon, nil) } var cSchema *C.char if schema != "" { cSchema = C.CString(schema) - defer C.free(unsafe.Pointer(cSchema)) + defer C.duckdb_free(unsafe.Pointer(cSchema)) } cTable := C.CString(table) - defer C.free(unsafe.Pointer(cTable)) + defer C.duckdb_free(unsafe.Pointer(cTable)) var duckdbAppender C.duckdb_appender state := C.duckdb_appender_create(con.duckdbCon, cSchema, cTable, &duckdbAppender) @@ -73,10 +73,10 @@ func NewAppenderFromConn(driverConn driver.Conn, schema, table string) (*Appende a.types[i] = C.duckdb_appender_column_type(duckdbAppender, C.idx_t(i)) // Ensure that we only create an appender for supported column types. - duckdbType := C.duckdb_get_type_id(a.types[i]) - name, found := unsupportedTypeMap[duckdbType] + t := Type(C.duckdb_get_type_id(a.types[i])) + name, found := unsupportedTypeToStringMap[t] if found { - err := columnError(unsupportedTypeError(name), i+1) + err := addIndexToError(unsupportedTypeError(name), i+1) destroyTypeSlice(a.ptr, a.types) C.duckdb_appender_destroy(&duckdbAppender) return nil, getError(errAppenderCreation, err) @@ -111,15 +111,26 @@ func (a *Appender) Close() error { a.closed = true // Append all remaining chunks. - err := a.appendDataChunks() + errAppend := a.appendDataChunks() - // Destroy all appender data. + // We flush before closing to get a meaningful error message. + var errFlush error + state := C.duckdb_appender_flush(a.duckdbAppender) + if state == C.DuckDBError { + errFlush = duckdbError(C.duckdb_appender_error(a.duckdbAppender)) + } + + // Destroy all appender data and the appender. destroyTypeSlice(a.ptr, a.types) - state := C.duckdb_appender_destroy(&a.duckdbAppender) + var errClose error + state = C.duckdb_appender_destroy(&a.duckdbAppender) + if state == C.DuckDBError { + errClose = errAppenderClose + } - if err != nil || state == C.DuckDBError { - // We destroyed the appender, so we cannot retrieve the duckdb internal error. - return getError(errAppenderClose, invalidatedAppenderError(err)) + err := errors.Join(errAppend, errFlush, errClose) + if err != nil { + return getError(invalidatedAppenderError(err), nil) } return nil } @@ -217,5 +228,5 @@ func destroyTypeSlice(ptr unsafe.Pointer, slice []C.duckdb_logical_type) { for _, t := range slice { C.duckdb_destroy_logical_type(&t) } - C.free(ptr) + C.duckdb_free(ptr) } diff --git a/vendor/github.com/marcboeker/go-duckdb/arrow.go b/vendor/github.com/marcboeker/go-duckdb/arrow.go index b06146e5..e5af7f7d 100644 --- a/vendor/github.com/marcboeker/go-duckdb/arrow.go +++ b/vendor/github.com/marcboeker/go-duckdb/arrow.go @@ -47,6 +47,14 @@ struct ArrowArray { void* private_data; }; +struct ArrowArrayStream { + void (*get_schema)(struct ArrowArrayStream*); + void (*get_next)(struct ArrowArrayStream*); + void (*get_last_error)(struct ArrowArrayStream*); + void (*release)(struct ArrowArrayStream*); + void* private_data; +}; + #endif // ARROW_C_DATA_INTERFACE */ import "C" @@ -58,9 +66,9 @@ import ( "fmt" "unsafe" - "github.com/apache/arrow/go/v17/arrow" - "github.com/apache/arrow/go/v17/arrow/array" - "github.com/apache/arrow/go/v17/arrow/cdata" + "github.com/apache/arrow-go/v18/arrow" + "github.com/apache/arrow-go/v18/arrow/array" + "github.com/apache/arrow-go/v18/arrow/cdata" ) // Arrow exposes DuckDB Apache Arrow interface. @@ -77,7 +85,7 @@ func NewArrowFromConn(driverConn driver.Conn) (*Arrow, error) { } if dbConn.closed { - panic("database/sql/driver: misuse of duckdb driver: Arrow after Close") + return nil, errClosedCon } return &Arrow{c: dbConn}, nil @@ -87,7 +95,7 @@ func NewArrowFromConn(driverConn driver.Conn) (*Arrow, error) { // executed statement. Arguments are bound to the last statement. func (a *Arrow) QueryContext(ctx context.Context, query string, args ...any) (array.RecordReader, error) { if a.c.closed { - panic("database/sql/driver: misuse of duckdb driver: Arrow.Query after Close") + return nil, errClosedCon } stmts, size, err := a.c.extractStmts(query) @@ -210,7 +218,7 @@ func (a *Arrow) queryArrowArray(res *C.duckdb_arrow, sc *arrow.Schema) (arrow.Re func (a *Arrow) execute(s *stmt, args []driver.NamedValue) (*C.duckdb_arrow, error) { if s.closed { - panic("database/sql/driver: misuse of duckdb driver: executeArrow after Close") + return nil, errClosedCon } if err := s.bind(args); err != nil { @@ -239,3 +247,33 @@ func (a *Arrow) anyArgsToNamedArgs(args []any) []driver.NamedValue { return argsToNamedArgs(values) } + +// RegisterView registers an Arrow record reader as a view with the given name in DuckDB. +// The returned release function must be called to release the memory once the view is no longer needed. +func (a *Arrow) RegisterView(reader array.RecordReader, name string) (release func(), err error) { + if a.c.closed { + return nil, errClosedCon + } + + // duckdb_state duckdb_arrow_scan(duckdb_connection connection, const char *table_name, duckdb_arrow_stream arrow); + + stream := C.calloc(1, C.sizeof_struct_ArrowArrayStream) + release = func() { + C.free(stream) + } + cdata.ExportRecordReader(reader, (*cdata.CArrowArrayStream)(stream)) + + cName := C.CString(name) + defer C.free(unsafe.Pointer(cName)) + + if state := C.duckdb_arrow_scan( + a.c.duckdbCon, + cName, + (C.duckdb_arrow_stream)(stream), + ); state == C.DuckDBError { + release() + return nil, errors.New("duckdb_arrow_scan") + } + + return release, nil +} diff --git a/vendor/github.com/marcboeker/go-duckdb/cgo_static.go b/vendor/github.com/marcboeker/go-duckdb/cgo_static.go index e39cfebb..824be404 100644 --- a/vendor/github.com/marcboeker/go-duckdb/cgo_static.go +++ b/vendor/github.com/marcboeker/go-duckdb/cgo_static.go @@ -1,13 +1,15 @@ -//go:build !duckdb_use_lib && (darwin || (linux && (amd64 || arm64)) || (freebsd && amd64)) +//go:build !duckdb_use_lib && (darwin || (linux && (amd64 || arm64)) || (freebsd && amd64) || (windows && amd64)) package duckdb /* +#cgo CPPFLAGS: -DDUCKDB_STATIC_BUILD #cgo LDFLAGS: -lduckdb #cgo darwin,amd64 LDFLAGS: -lc++ -L${SRCDIR}/deps/darwin_amd64 #cgo darwin,arm64 LDFLAGS: -lc++ -L${SRCDIR}/deps/darwin_arm64 #cgo linux,amd64 LDFLAGS: -lstdc++ -lm -ldl -L${SRCDIR}/deps/linux_amd64 #cgo linux,arm64 LDFLAGS: -lstdc++ -lm -ldl -L${SRCDIR}/deps/linux_arm64 +#cgo windows,amd64 LDFLAGS: -lws2_32 -lwsock32 -lrstrtmgr -lstdc++ -lm --static -L${SRCDIR}/deps/windows_amd64 #cgo freebsd,amd64 LDFLAGS: -lstdc++ -lm -ldl -L${SRCDIR}/deps/freebsd_amd64 #include */ diff --git a/vendor/github.com/marcboeker/go-duckdb/connection.go b/vendor/github.com/marcboeker/go-duckdb/connection.go index a5e250f1..c2d6340e 100644 --- a/vendor/github.com/marcboeker/go-duckdb/connection.go +++ b/vendor/github.com/marcboeker/go-duckdb/connection.go @@ -1,7 +1,6 @@ package duckdb /* -#include #include */ import "C" @@ -30,109 +29,87 @@ func (c *conn) CheckNamedValue(nv *driver.NamedValue) error { } func (c *conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) { - if c.closed { - panic("database/sql/driver: misuse of duckdb driver: ExecContext after Close") - } - - stmts, size, err := c.extractStmts(query) + prepared, err := c.prepareStmts(ctx, query) if err != nil { return nil, err } - defer C.duckdb_destroy_extracted(&stmts) - // execute all statements without args, except the last one - for i := C.idx_t(0); i < size-1; i++ { - stmt, err := c.prepareExtractedStmt(stmts, i) - if err != nil { - return nil, err - } - // send nil args to execute statement and ignore result - _, err = stmt.ExecContext(ctx, nil) - stmt.Close() - if err != nil { - return nil, err - } - } - - // prepare and execute last statement with args and return result - stmt, err := c.prepareExtractedStmt(stmts, size-1) + res, err := prepared.ExecContext(ctx, args) + errClose := prepared.Close() if err != nil { + if errClose != nil { + return nil, errors.Join(err, errClose) + } return nil, err } - defer stmt.Close() - return stmt.ExecContext(ctx, args) + if errClose != nil { + return nil, errClose + } + return res, nil } func (c *conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) { - if c.closed { - panic("database/sql/driver: misuse of duckdb driver: QueryContext after Close") - } - - stmts, size, err := c.extractStmts(query) + prepared, err := c.prepareStmts(ctx, query) if err != nil { return nil, err } - defer C.duckdb_destroy_extracted(&stmts) - // execute all statements without args, except the last one - for i := C.idx_t(0); i < size-1; i++ { - stmt, err := c.prepareExtractedStmt(stmts, i) - if err != nil { - return nil, err - } - // send nil args to execute statement and ignore result (using ExecContext since we're ignoring the result anyway) - _, err = stmt.ExecContext(ctx, nil) - stmt.Close() - if err != nil { - return nil, err + r, err := prepared.QueryContext(ctx, args) + if err != nil { + errClose := prepared.Close() + if errClose != nil { + return nil, errors.Join(err, errClose) } + return nil, err } - // prepare and execute last statement with args and return result - stmt, err := c.prepareExtractedStmt(stmts, size-1) - if err != nil { - return nil, err + // We must close the prepared statement after closing the rows r. + prepared.closeOnRowsClose = true + return r, nil +} + +func (c *conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) { + return c.prepareStmts(ctx, query) +} + +func (c *conn) Prepare(query string) (driver.Stmt, error) { + if c.closed { + return nil, errors.Join(errPrepare, errClosedCon) } - rows, err := stmt.QueryContext(ctx, args) + stmts, count, err := c.extractStmts(query) if err != nil { - stmt.Close() return nil, err } + defer C.duckdb_destroy_extracted(&stmts) - // we can't close the statement before the query result rows are closed - stmt.closeOnRowsClose = true - return rows, err -} - -func (c *conn) Prepare(cmd string) (driver.Stmt, error) { - if c.closed { - panic("database/sql/driver: misuse of duckdb driver: Prepare after Close") + if count != 1 { + return nil, errors.Join(errPrepare, errMissingPrepareContext) } - return c.prepareStmt(cmd) + return c.prepareExtractedStmt(stmts, 0) } -// Deprecated: Use BeginTx instead. +// Begin is deprecated: Use BeginTx instead. func (c *conn) Begin() (driver.Tx, error) { return c.BeginTx(context.Background(), driver.TxOptions{}) } func (c *conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) { if c.tx { - panic("database/sql/driver: misuse of duckdb driver: multiple Tx") + return nil, errors.Join(errBeginTx, errMultipleTx) } if opts.ReadOnly { - return nil, errors.New("read-only transactions are not supported") + return nil, errors.Join(errBeginTx, errReadOnlyTxNotSupported) } switch sql.IsolationLevel(opts.Isolation) { case sql.LevelDefault: default: - return nil, errors.New("isolation levels other than default are not supported") + return nil, errors.Join(errBeginTx, errIsolationLevelNotSupported) } - if _, err := c.ExecContext(ctx, "BEGIN TRANSACTION", nil); err != nil { + if _, err := c.ExecContext(ctx, `BEGIN TRANSACTION`, nil); err != nil { return nil, err } @@ -142,54 +119,69 @@ func (c *conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, e func (c *conn) Close() error { if c.closed { - panic("database/sql/driver: misuse of duckdb driver: Close of already closed connection") + return errClosedCon } c.closed = true - C.duckdb_disconnect(&c.duckdbCon) - return nil } -func (c *conn) prepareStmt(cmd string) (*stmt, error) { - cmdstr := C.CString(cmd) - defer C.free(unsafe.Pointer(cmdstr)) - - var s C.duckdb_prepared_statement - if state := C.duckdb_prepare(c.duckdbCon, cmdstr, &s); state == C.DuckDBError { - dbErr := getDuckDBError(C.GoString(C.duckdb_prepare_error(s))) - C.duckdb_destroy_prepare(&s) - return nil, dbErr - } - - return &stmt{c: c, stmt: &s}, nil -} - func (c *conn) extractStmts(query string) (C.duckdb_extracted_statements, C.idx_t, error) { - cquery := C.CString(query) - defer C.free(unsafe.Pointer(cquery)) + cQuery := C.CString(query) + defer C.duckdb_free(unsafe.Pointer(cQuery)) var stmts C.duckdb_extracted_statements - stmtsCount := C.duckdb_extract_statements(c.duckdbCon, cquery, &stmts) - if stmtsCount == 0 { - err := C.GoString(C.duckdb_extract_statements_error(stmts)) + count := C.duckdb_extract_statements(c.duckdbCon, cQuery, &stmts) + + if count == 0 { + errMsg := C.GoString(C.duckdb_extract_statements_error(stmts)) C.duckdb_destroy_extracted(&stmts) - if err != "" { - return nil, 0, getDuckDBError(err) + if errMsg != "" { + return nil, 0, getDuckDBError(errMsg) } - return nil, 0, errors.New("no statements found") + return nil, 0, errEmptyQuery } - return stmts, stmtsCount, nil + return stmts, count, nil } -func (c *conn) prepareExtractedStmt(extractedStmts C.duckdb_extracted_statements, index C.idx_t) (*stmt, error) { +func (c *conn) prepareExtractedStmt(stmts C.duckdb_extracted_statements, i C.idx_t) (*stmt, error) { var s C.duckdb_prepared_statement - if state := C.duckdb_prepare_extracted_statement(c.duckdbCon, extractedStmts, index, &s); state == C.DuckDBError { - dbErr := getDuckDBError(C.GoString(C.duckdb_prepare_error(s))) + state := C.duckdb_prepare_extracted_statement(c.duckdbCon, stmts, i, &s) + + if state == C.DuckDBError { + err := getDuckDBError(C.GoString(C.duckdb_prepare_error(s))) C.duckdb_destroy_prepare(&s) - return nil, dbErr + return nil, err } return &stmt{c: c, stmt: &s}, nil } + +func (c *conn) prepareStmts(ctx context.Context, query string) (*stmt, error) { + if c.closed { + return nil, errClosedCon + } + + stmts, count, errExtract := c.extractStmts(query) + if errExtract != nil { + return nil, errExtract + } + defer C.duckdb_destroy_extracted(&stmts) + + for i := C.idx_t(0); i < count-1; i++ { + prepared, err := c.prepareExtractedStmt(stmts, i) + if err != nil { + return nil, err + } + + // Execute the statement without any arguments and ignore the result. + if _, err = prepared.ExecContext(ctx, nil); err != nil { + return nil, err + } + if err = prepared.Close(); err != nil { + return nil, err + } + } + return c.prepareExtractedStmt(stmts, count-1) +} diff --git a/vendor/github.com/marcboeker/go-duckdb/data_chunk.go b/vendor/github.com/marcboeker/go-duckdb/data_chunk.go index 03d3cdc3..629e328a 100644 --- a/vendor/github.com/marcboeker/go-duckdb/data_chunk.go +++ b/vendor/github.com/marcboeker/go-duckdb/data_chunk.go @@ -1,7 +1,6 @@ package duckdb /* -#include #include */ import "C" @@ -47,31 +46,32 @@ func (chunk *DataChunk) GetValue(colIdx int, rowIdx int) (any, error) { if colIdx >= len(chunk.columns) { return nil, getError(errAPI, columnCountError(colIdx, len(chunk.columns))) } + column := &chunk.columns[colIdx] return column.getFn(column, C.idx_t(rowIdx)), nil } -// SetValue writes a single value to a column in a data chunk. Note that this requires casting the type for each invocation. +// SetValue writes a single value to a column in a data chunk. +// Note that this requires casting the type for each invocation. // NOTE: Custom ENUM types must be passed as string. func (chunk *DataChunk) SetValue(colIdx int, rowIdx int, val any) error { if colIdx >= len(chunk.columns) { return getError(errAPI, columnCountError(colIdx, len(chunk.columns))) } + column := &chunk.columns[colIdx] + return column.setFn(column, C.idx_t(rowIdx), val) +} - // Ensure that the types match before attempting to set anything. - // This is done to prevent failures 'halfway through' writing column values, - // potentially corrupting data in that column. - // FIXME: Can we improve efficiency here? We are casting back-and-forth to any A LOT. - // FIXME: Maybe we can make columnar insertions unsafe, i.e., we always assume a correct type. - v, err := column.tryCast(val) - if err != nil { - return columnError(err, colIdx) +// SetChunkValue writes a single value to a column in a data chunk. +// The difference with `chunk.SetValue` is that `SetChunkValue` does not +// require casting the value to `any` (implicitly). +// NOTE: Custom ENUM types must be passed as string. +func SetChunkValue[T any](chunk DataChunk, colIdx int, rowIdx int, val T) error { + if colIdx >= len(chunk.columns) { + return getError(errAPI, columnCountError(colIdx, len(chunk.columns))) } - - // Set the value. - column.setFn(column, C.idx_t(rowIdx), v) - return nil + return setVectorVal(&chunk.columns[colIdx], C.idx_t(rowIdx), val) } func (chunk *DataChunk) initFromTypes(ptr unsafe.Pointer, types []C.duckdb_logical_type, writable bool) error { @@ -127,6 +127,23 @@ func (chunk *DataChunk) initFromDuckDataChunk(data C.duckdb_data_chunk, writable return err } +func (chunk *DataChunk) initFromDuckVector(duckdbVector C.duckdb_vector, writable bool) error { + columnCount := 1 + chunk.columns = make([]vector, columnCount) + + // Initialize the callback functions to read and write values. + logicalType := C.duckdb_vector_get_column_type(duckdbVector) + err := chunk.columns[0].init(logicalType, 0) + C.duckdb_destroy_logical_type(&logicalType) + if err != nil { + return err + } + + // Initialize the vector and its child vectors. + chunk.columns[0].initVectors(duckdbVector, writable) + return nil +} + func (chunk *DataChunk) close() { C.duckdb_destroy_data_chunk(&chunk.data) } diff --git a/vendor/github.com/marcboeker/go-duckdb/duckdb.go b/vendor/github.com/marcboeker/go-duckdb/duckdb.go index 6ca46ce8..fdf67082 100644 --- a/vendor/github.com/marcboeker/go-duckdb/duckdb.go +++ b/vendor/github.com/marcboeker/go-duckdb/duckdb.go @@ -5,7 +5,6 @@ package duckdb /* -#include #include */ import "C" @@ -58,13 +57,13 @@ func NewConnector(dsn string, connInitFn func(execer driver.ExecerContext) error defer C.duckdb_destroy_config(&config) connStr := C.CString(getConnString(dsn)) - defer C.free(unsafe.Pointer(connStr)) + defer C.duckdb_free(unsafe.Pointer(connStr)) var outError *C.char defer C.duckdb_free(unsafe.Pointer(outError)) if state := C.duckdb_open_ext(connStr, &db, config, &outError); state == C.DuckDBError { - return nil, getError(errOpen, duckdbError(outError)) + return nil, getError(errConnect, duckdbError(outError)) } return &Connector{ @@ -143,10 +142,10 @@ func prepareConfig(parsedDSN *url.URL) (C.duckdb_config, error) { func setConfigOption(config C.duckdb_config, name string, option string) error { cName := C.CString(name) - defer C.free(unsafe.Pointer(cName)) + defer C.duckdb_free(unsafe.Pointer(cName)) cOption := C.CString(option) - defer C.free(unsafe.Pointer(cOption)) + defer C.duckdb_free(unsafe.Pointer(cOption)) state := C.duckdb_set_config(config, cName, cOption) if state == C.DuckDBError { diff --git a/vendor/github.com/marcboeker/go-duckdb/duckdb.h b/vendor/github.com/marcboeker/go-duckdb/duckdb.h index 395befc0..30b79fd9 100644 --- a/vendor/github.com/marcboeker/go-duckdb/duckdb.h +++ b/vendor/github.com/marcboeker/go-duckdb/duckdb.h @@ -6,17 +6,25 @@ // // //===----------------------------------------------------------------------===// +// +// !!!!!!! +// WARNING: this file is autogenerated by scripts/generate_c_api.py, manual changes will be overwritten +// !!!!!!! #pragma once //! duplicate of duckdb/main/winapi.hpp #ifndef DUCKDB_API #ifdef _WIN32 +#ifdef DUCKDB_STATIC_BUILD +#define DUCKDB_API +#else #if defined(DUCKDB_BUILD_LIBRARY) && !defined(DUCKDB_BUILD_LOADABLE_EXTENSION) #define DUCKDB_API __declspec(dllexport) #else #define DUCKDB_API __declspec(dllimport) #endif +#endif #else #define DUCKDB_API #endif @@ -25,41 +33,20 @@ //! duplicate of duckdb/main/winapi.hpp #ifndef DUCKDB_EXTENSION_API #ifdef _WIN32 +#ifdef DUCKDB_STATIC_BUILD +#define DUCKDB_EXTENSION_API +#else #ifdef DUCKDB_BUILD_LOADABLE_EXTENSION #define DUCKDB_EXTENSION_API __declspec(dllexport) #else #define DUCKDB_EXTENSION_API #endif +#endif #else #define DUCKDB_EXTENSION_API __attribute__((visibility("default"))) #endif #endif -//! In the future, we are planning to move extension functions to a separate header. For now you can set the define -//! below to remove the functions that are planned to be moved out of this header. -// #define DUCKDB_NO_EXTENSION_FUNCTIONS - -//! Set the define below to remove all functions that are deprecated or planned to be deprecated -// #define DUCKDB_API_NO_DEPRECATED - -//! API versions -//! If no explicit API version is defined, the latest API version is used. -//! Note that using older API versions (i.e. not using DUCKDB_API_LATEST) is deprecated. -//! These will not be supported long-term, and will be removed in future versions. -#ifndef DUCKDB_API_0_3_1 -#define DUCKDB_API_0_3_1 1 -#endif -#ifndef DUCKDB_API_0_3_2 -#define DUCKDB_API_0_3_2 2 -#endif -#ifndef DUCKDB_API_LATEST -#define DUCKDB_API_LATEST DUCKDB_API_0_3_2 -#endif - -#ifndef DUCKDB_API_VERSION -#define DUCKDB_API_VERSION DUCKDB_API_LATEST -#endif - #include #include #include @@ -142,25 +129,31 @@ typedef enum DUCKDB_TYPE { DUCKDB_TYPE_TIME_TZ = 30, // duckdb_timestamp DUCKDB_TYPE_TIMESTAMP_TZ = 31, + // ANY type + DUCKDB_TYPE_ANY = 34, + // duckdb_varint + DUCKDB_TYPE_VARINT = 35, + // SQLNULL type + DUCKDB_TYPE_SQLNULL = 36, } duckdb_type; //! An enum over the returned state of different functions. -typedef enum { DuckDBSuccess = 0, DuckDBError = 1 } duckdb_state; +typedef enum duckdb_state { DuckDBSuccess = 0, DuckDBError = 1 } duckdb_state; //! An enum over the pending state of a pending query result. -typedef enum { +typedef enum duckdb_pending_state { DUCKDB_PENDING_RESULT_READY = 0, DUCKDB_PENDING_RESULT_NOT_READY = 1, DUCKDB_PENDING_ERROR = 2, DUCKDB_PENDING_NO_TASKS_AVAILABLE = 3 } duckdb_pending_state; //! An enum over DuckDB's different result types. -typedef enum { +typedef enum duckdb_result_type { DUCKDB_RESULT_TYPE_INVALID = 0, DUCKDB_RESULT_TYPE_CHANGED_ROWS = 1, DUCKDB_RESULT_TYPE_NOTHING = 2, DUCKDB_RESULT_TYPE_QUERY_RESULT = 3, } duckdb_result_type; //! An enum over DuckDB's different statement types. -typedef enum { +typedef enum duckdb_statement_type { DUCKDB_STATEMENT_TYPE_INVALID = 0, DUCKDB_STATEMENT_TYPE_SELECT = 1, DUCKDB_STATEMENT_TYPE_INSERT = 2, @@ -190,6 +183,54 @@ typedef enum { DUCKDB_STATEMENT_TYPE_DETACH = 26, DUCKDB_STATEMENT_TYPE_MULTI = 27, } duckdb_statement_type; +//! An enum over DuckDB's different result types. +typedef enum duckdb_error_type { + DUCKDB_ERROR_INVALID = 0, + DUCKDB_ERROR_OUT_OF_RANGE = 1, + DUCKDB_ERROR_CONVERSION = 2, + DUCKDB_ERROR_UNKNOWN_TYPE = 3, + DUCKDB_ERROR_DECIMAL = 4, + DUCKDB_ERROR_MISMATCH_TYPE = 5, + DUCKDB_ERROR_DIVIDE_BY_ZERO = 6, + DUCKDB_ERROR_OBJECT_SIZE = 7, + DUCKDB_ERROR_INVALID_TYPE = 8, + DUCKDB_ERROR_SERIALIZATION = 9, + DUCKDB_ERROR_TRANSACTION = 10, + DUCKDB_ERROR_NOT_IMPLEMENTED = 11, + DUCKDB_ERROR_EXPRESSION = 12, + DUCKDB_ERROR_CATALOG = 13, + DUCKDB_ERROR_PARSER = 14, + DUCKDB_ERROR_PLANNER = 15, + DUCKDB_ERROR_SCHEDULER = 16, + DUCKDB_ERROR_EXECUTOR = 17, + DUCKDB_ERROR_CONSTRAINT = 18, + DUCKDB_ERROR_INDEX = 19, + DUCKDB_ERROR_STAT = 20, + DUCKDB_ERROR_CONNECTION = 21, + DUCKDB_ERROR_SYNTAX = 22, + DUCKDB_ERROR_SETTINGS = 23, + DUCKDB_ERROR_BINDER = 24, + DUCKDB_ERROR_NETWORK = 25, + DUCKDB_ERROR_OPTIMIZER = 26, + DUCKDB_ERROR_NULL_POINTER = 27, + DUCKDB_ERROR_IO = 28, + DUCKDB_ERROR_INTERRUPT = 29, + DUCKDB_ERROR_FATAL = 30, + DUCKDB_ERROR_INTERNAL = 31, + DUCKDB_ERROR_INVALID_INPUT = 32, + DUCKDB_ERROR_OUT_OF_MEMORY = 33, + DUCKDB_ERROR_PERMISSION = 34, + DUCKDB_ERROR_PARAMETER_NOT_RESOLVED = 35, + DUCKDB_ERROR_PARAMETER_NOT_ALLOWED = 36, + DUCKDB_ERROR_DEPENDENCY = 37, + DUCKDB_ERROR_HTTP = 38, + DUCKDB_ERROR_MISSING_EXTENSION = 39, + DUCKDB_ERROR_AUTOLOAD = 40, + DUCKDB_ERROR_SEQUENCE = 41, + DUCKDB_INVALID_CONFIGURATION = 42 +} duckdb_error_type; +//! An enum over DuckDB's different cast modes. +typedef enum duckdb_cast_mode { DUCKDB_CAST_NORMAL = 0, DUCKDB_CAST_TRY = 1 } duckdb_cast_mode; //===--------------------------------------------------------------------===// // General type definitions @@ -313,28 +354,21 @@ typedef struct { //! duckdb_column_type, and duckdb_column_name, which take the result and the column index //! as their parameters typedef struct { -#if DUCKDB_API_VERSION < DUCKDB_API_0_3_2 - void *data; - bool *nullmask; - duckdb_type type; - char *name; -#else // deprecated, use duckdb_column_data - void *__deprecated_data; + void *deprecated_data; // deprecated, use duckdb_nullmask_data - bool *__deprecated_nullmask; + bool *deprecated_nullmask; // deprecated, use duckdb_column_type - duckdb_type __deprecated_type; + duckdb_type deprecated_type; // deprecated, use duckdb_column_name - char *__deprecated_name; -#endif + char *deprecated_name; void *internal_data; } duckdb_column; //! A vector to a specified column in a data chunk. Lives as long as the //! data chunk lives, i.e., must not be destroyed. typedef struct _duckdb_vector { - void *__vctr; + void *internal_ptr; } * duckdb_vector; //===--------------------------------------------------------------------===// @@ -358,100 +392,177 @@ typedef struct { //! A query result consists of a pointer to its internal data. //! Must be freed with 'duckdb_destroy_result'. typedef struct { -#if DUCKDB_API_VERSION < DUCKDB_API_0_3_2 - idx_t column_count; - idx_t row_count; - idx_t rows_changed; - duckdb_column *columns; - char *error_message; -#else // deprecated, use duckdb_column_count - idx_t __deprecated_column_count; + idx_t deprecated_column_count; // deprecated, use duckdb_row_count - idx_t __deprecated_row_count; + idx_t deprecated_row_count; // deprecated, use duckdb_rows_changed - idx_t __deprecated_rows_changed; + idx_t deprecated_rows_changed; // deprecated, use duckdb_column_*-family of functions - duckdb_column *__deprecated_columns; + duckdb_column *deprecated_columns; // deprecated, use duckdb_result_error - char *__deprecated_error_message; -#endif + char *deprecated_error_message; void *internal_data; } duckdb_result; //! A database object. Should be closed with `duckdb_close`. typedef struct _duckdb_database { - void *__db; + void *internal_ptr; } * duckdb_database; //! A connection to a duckdb database. Must be closed with `duckdb_disconnect`. typedef struct _duckdb_connection { - void *__conn; + void *internal_ptr; } * duckdb_connection; //! A prepared statement is a parameterized query that allows you to bind parameters to it. //! Must be destroyed with `duckdb_destroy_prepare`. typedef struct _duckdb_prepared_statement { - void *__prep; + void *internal_ptr; } * duckdb_prepared_statement; //! Extracted statements. Must be destroyed with `duckdb_destroy_extracted`. typedef struct _duckdb_extracted_statements { - void *__extrac; + void *internal_ptr; } * duckdb_extracted_statements; //! The pending result represents an intermediate structure for a query that is not yet fully executed. //! Must be destroyed with `duckdb_destroy_pending`. typedef struct _duckdb_pending_result { - void *__pend; + void *internal_ptr; } * duckdb_pending_result; //! The appender enables fast data loading into DuckDB. //! Must be destroyed with `duckdb_appender_destroy`. typedef struct _duckdb_appender { - void *__appn; + void *internal_ptr; } * duckdb_appender; +//! The table description allows querying info about the table. +//! Must be destroyed with `duckdb_table_description_destroy`. +typedef struct _duckdb_table_description { + void *internal_ptr; +} * duckdb_table_description; + //! Can be used to provide start-up options for the DuckDB instance. //! Must be destroyed with `duckdb_destroy_config`. typedef struct _duckdb_config { - void *__cnfg; + void *internal_ptr; } * duckdb_config; //! Holds an internal logical type. //! Must be destroyed with `duckdb_destroy_logical_type`. typedef struct _duckdb_logical_type { - void *__lglt; + void *internal_ptr; } * duckdb_logical_type; +//! Holds extra information used when registering a custom logical type. +//! Reserved for future use. +typedef struct _duckdb_create_type_info { + void *internal_ptr; +} * duckdb_create_type_info; + //! Contains a data chunk from a duckdb_result. //! Must be destroyed with `duckdb_destroy_data_chunk`. typedef struct _duckdb_data_chunk { - void *__dtck; + void *internal_ptr; } * duckdb_data_chunk; //! Holds a DuckDB value, which wraps a type. //! Must be destroyed with `duckdb_destroy_value`. typedef struct _duckdb_value { - void *__val; + void *internal_ptr; } * duckdb_value; +//! Holds a recursive tree that matches the query plan. +typedef struct _duckdb_profiling_info { + void *internal_ptr; +} * duckdb_profiling_info; + +//===--------------------------------------------------------------------===// +// C API Extension info +//===--------------------------------------------------------------------===// +//! Holds state during the C API extension intialization process +typedef struct _duckdb_extension_info { + void *internal_ptr; +} * duckdb_extension_info; + +//===--------------------------------------------------------------------===// +// Function types +//===--------------------------------------------------------------------===// +//! Additional function info. When setting this info, it is necessary to pass a destroy-callback function. +typedef struct _duckdb_function_info { + void *internal_ptr; +} * duckdb_function_info; + +//===--------------------------------------------------------------------===// +// Scalar function types +//===--------------------------------------------------------------------===// +//! A scalar function. Must be destroyed with `duckdb_destroy_scalar_function`. +typedef struct _duckdb_scalar_function { + void *internal_ptr; +} * duckdb_scalar_function; + +//! A scalar function set. Must be destroyed with `duckdb_destroy_scalar_function_set`. +typedef struct _duckdb_scalar_function_set { + void *internal_ptr; +} * duckdb_scalar_function_set; + +//! The main function of the scalar function. +typedef void (*duckdb_scalar_function_t)(duckdb_function_info info, duckdb_data_chunk input, duckdb_vector output); + +//===--------------------------------------------------------------------===// +// Aggregate function types +//===--------------------------------------------------------------------===// +//! An aggregate function. Must be destroyed with `duckdb_destroy_aggregate_function`. +typedef struct _duckdb_aggregate_function { + void *internal_ptr; +} * duckdb_aggregate_function; + +//! A aggregate function set. Must be destroyed with `duckdb_destroy_aggregate_function_set`. +typedef struct _duckdb_aggregate_function_set { + void *internal_ptr; +} * duckdb_aggregate_function_set; + +//! Aggregate state +typedef struct _duckdb_aggregate_state { + void *internal_ptr; +} * duckdb_aggregate_state; + +//! Returns the aggregate state size +typedef idx_t (*duckdb_aggregate_state_size)(duckdb_function_info info); +//! Initialize the aggregate state +typedef void (*duckdb_aggregate_init_t)(duckdb_function_info info, duckdb_aggregate_state state); +//! Destroy aggregate state (optional) +typedef void (*duckdb_aggregate_destroy_t)(duckdb_aggregate_state *states, idx_t count); +//! Update a set of aggregate states with new values +typedef void (*duckdb_aggregate_update_t)(duckdb_function_info info, duckdb_data_chunk input, + duckdb_aggregate_state *states); +//! Combine aggregate states +typedef void (*duckdb_aggregate_combine_t)(duckdb_function_info info, duckdb_aggregate_state *source, + duckdb_aggregate_state *target, idx_t count); +//! Finalize aggregate states into a result vector +typedef void (*duckdb_aggregate_finalize_t)(duckdb_function_info info, duckdb_aggregate_state *source, + duckdb_vector result, idx_t count, idx_t offset); + //===--------------------------------------------------------------------===// // Table function types //===--------------------------------------------------------------------===// -#ifndef DUCKDB_NO_EXTENSION_FUNCTIONS //! A table function. Must be destroyed with `duckdb_destroy_table_function`. -typedef void *duckdb_table_function; +typedef struct _duckdb_table_function { + void *internal_ptr; +} * duckdb_table_function; //! The bind info of the function. When setting this info, it is necessary to pass a destroy-callback function. -typedef void *duckdb_bind_info; +typedef struct _duckdb_bind_info { + void *internal_ptr; +} * duckdb_bind_info; //! Additional function init info. When setting this info, it is necessary to pass a destroy-callback function. -typedef void *duckdb_init_info; - -//! Additional function info. When setting this info, it is necessary to pass a destroy-callback function. -typedef void *duckdb_function_info; +typedef struct _duckdb_init_info { + void *internal_ptr; +} * duckdb_init_info; //! The bind function of the table function. typedef void (*duckdb_table_function_bind_t)(duckdb_bind_info info); @@ -462,16 +573,29 @@ typedef void (*duckdb_table_function_init_t)(duckdb_init_info info); //! The main function of the table function. typedef void (*duckdb_table_function_t)(duckdb_function_info info, duckdb_data_chunk output); +//===--------------------------------------------------------------------===// +// Cast types +//===--------------------------------------------------------------------===// + +//! A cast function. Must be destroyed with `duckdb_destroy_cast_function`. +typedef struct _duckdb_cast_function { + void *internal_ptr; +} * duckdb_cast_function; + +typedef bool (*duckdb_cast_function_t)(duckdb_function_info info, idx_t count, duckdb_vector input, + duckdb_vector output); + //===--------------------------------------------------------------------===// // Replacement scan types //===--------------------------------------------------------------------===// //! Additional replacement scan info. When setting this info, it is necessary to pass a destroy-callback function. -typedef void *duckdb_replacement_scan_info; +typedef struct _duckdb_replacement_scan_info { + void *internal_ptr; +} * duckdb_replacement_scan_info; //! A replacement scan function that can be added to a database. typedef void (*duckdb_replacement_callback_t)(duckdb_replacement_scan_info info, const char *table_name, void *data); -#endif //===--------------------------------------------------------------------===// // Arrow-related types @@ -479,30 +603,43 @@ typedef void (*duckdb_replacement_callback_t)(duckdb_replacement_scan_info info, //! Holds an arrow query result. Must be destroyed with `duckdb_destroy_arrow`. typedef struct _duckdb_arrow { - void *__arrw; + void *internal_ptr; } * duckdb_arrow; //! Holds an arrow array stream. Must be destroyed with `duckdb_destroy_arrow_stream`. typedef struct _duckdb_arrow_stream { - void *__arrwstr; + void *internal_ptr; } * duckdb_arrow_stream; //! Holds an arrow schema. Remember to release the respective ArrowSchema object. typedef struct _duckdb_arrow_schema { - void *__arrs; + void *internal_ptr; } * duckdb_arrow_schema; //! Holds an arrow array. Remember to release the respective ArrowArray object. typedef struct _duckdb_arrow_array { - void *__arra; + void *internal_ptr; } * duckdb_arrow_array; +//===--------------------------------------------------------------------===// +// DuckDB extension access +//===--------------------------------------------------------------------===// +//! Passed to C API extension as parameter to the entrypoint +struct duckdb_extension_access { + //! Indicate that an error has occurred + void (*set_error)(duckdb_extension_info info, const char *error); + //! Fetch the database from duckdb to register extensions to + duckdb_database *(*get_database)(duckdb_extension_info info); + //! Fetch the API + const void *(*get_api)(duckdb_extension_info info, const char *version); +}; + //===--------------------------------------------------------------------===// // Functions //===--------------------------------------------------------------------===// //===--------------------------------------------------------------------===// -// Open/Connect +// Open Connect //===--------------------------------------------------------------------===// /*! @@ -510,9 +647,9 @@ Creates a new database or opens an existing database file stored at the given pa If no path is given a new in-memory database is created instead. The instantiated database should be closed with 'duckdb_close'. -* path: Path to the database file on disk, or `nullptr` or `:memory:` to open an in-memory database. -* out_database: The result database object. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param path Path to the database file on disk, or `nullptr` or `:memory:` to open an in-memory database. +* @param out_database The result database object. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_open(const char *path, duckdb_database *out_database); @@ -520,12 +657,12 @@ DUCKDB_API duckdb_state duckdb_open(const char *path, duckdb_database *out_datab Extended version of duckdb_open. Creates a new database or opens an existing database file stored at the given path. The instantiated database should be closed with 'duckdb_close'. -* path: Path to the database file on disk, or `nullptr` or `:memory:` to open an in-memory database. -* out_database: The result database object. -* config: (Optional) configuration used to start up the database system. -* out_error: If set and the function returns DuckDBError, this will contain the reason why the start-up failed. +* @param path Path to the database file on disk, or `nullptr` or `:memory:` to open an in-memory database. +* @param out_database The result database object. +* @param config (Optional) configuration used to start up the database system. +* @param out_error If set and the function returns DuckDBError, this will contain the reason why the start-up failed. Note that the error must be freed using `duckdb_free`. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_open_ext(const char *path, duckdb_database *out_database, duckdb_config config, char **out_error); @@ -536,7 +673,7 @@ This should be called after you are done with any database allocated through `du Note that failing to call `duckdb_close` (in case of e.g. a program crash) will not cause data corruption. Still, it is recommended to always correctly close a database object after you are done with it. -* database: The database object to shut down. +* @param database The database object to shut down. */ DUCKDB_API void duckdb_close(duckdb_database *database); @@ -545,31 +682,31 @@ Opens a connection to a database. Connections are required to query the database associated with the connection. The instantiated connection should be closed using 'duckdb_disconnect'. -* database: The database file to connect to. -* out_connection: The result connection object. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param database The database file to connect to. +* @param out_connection The result connection object. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_connect(duckdb_database database, duckdb_connection *out_connection); /*! Interrupt running query -* connection: The connection to interrupt +* @param connection The connection to interrupt */ DUCKDB_API void duckdb_interrupt(duckdb_connection connection); /*! Get progress of the running query -* connection: The working connection -* returns: -1 if no progress or a percentage of the progress +* @param connection The working connection +* @return -1 if no progress or a percentage of the progress */ DUCKDB_API duckdb_query_progress_type duckdb_query_progress(duckdb_connection connection); /*! Closes the specified connection and de-allocates all memory allocated for that connection. -* connection: The connection to close. +* @param connection The connection to close. */ DUCKDB_API void duckdb_disconnect(duckdb_connection *connection); @@ -591,8 +728,11 @@ The duckdb_config must be destroyed using 'duckdb_destroy_config' This will always succeed unless there is a malloc failure. -* out_config: The result configuration object. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +Note that `duckdb_destroy_config` should always be called on the resulting config, even if the function returns +`DuckDBError`. + +* @param out_config The result configuration object. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_create_config(duckdb_config *out_config); @@ -601,7 +741,7 @@ This returns the total amount of configuration options available for usage with This should not be called in a loop as it internally loops over all the options. -* returns: The amount of config options available. +* @return The amount of config options available. */ DUCKDB_API size_t duckdb_config_count(); @@ -611,10 +751,10 @@ display configuration options. This will succeed unless `index` is out of range The result name or description MUST NOT be freed. -* index: The index of the configuration option (between 0 and `duckdb_config_count`) -* out_name: A name of the configuration flag. -* out_description: A description of the configuration flag. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param index The index of the configuration option (between 0 and `duckdb_config_count`) +* @param out_name A name of the configuration flag. +* @param out_description A description of the configuration flag. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_get_config_flag(size_t index, const char **out_name, const char **out_description); @@ -626,17 +766,17 @@ In the source code, configuration options are defined in `config.cpp`. This can fail if either the name is invalid, or if the value provided for the option is invalid. -* duckdb_config: The configuration object to set the option on. -* name: The name of the configuration flag to set. -* option: The value to set the configuration flag to. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param config The configuration object to set the option on. +* @param name The name of the configuration flag to set. +* @param option The value to set the configuration flag to. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_set_config(duckdb_config config, const char *name, const char *option); /*! Destroys the specified configuration object and de-allocates all memory allocated for the object. -* config: The configuration object to destroy. +* @param config The configuration object to destroy. */ DUCKDB_API void duckdb_destroy_config(duckdb_config *config); @@ -652,17 +792,17 @@ If the query fails to execute, DuckDBError is returned and the error message can Note that after running `duckdb_query`, `duckdb_destroy_result` must be called on the result object even if the query fails, otherwise the error stored within the result will not be freed correctly. -* connection: The connection to perform the query in. -* query: The SQL query to run. -* out_result: The query result. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param connection The connection to perform the query in. +* @param query The SQL query to run. +* @param out_result The query result. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_query(duckdb_connection connection, const char *query, duckdb_result *out_result); /*! Closes the result and de-allocates all memory allocated for that connection. -* result: The result to destroy. +* @param result The result to destroy. */ DUCKDB_API void duckdb_destroy_result(duckdb_result *result); @@ -672,9 +812,9 @@ automatically be destroyed when the result is destroyed. Returns `NULL` if the column is out of range. -* result: The result object to fetch the column name from. -* col: The column index. -* returns: The column name of the specified column. +* @param result The result object to fetch the column name from. +* @param col The column index. +* @return The column name of the specified column. */ DUCKDB_API const char *duckdb_column_name(duckdb_result *result, idx_t col); @@ -683,18 +823,18 @@ Returns the column type of the specified column. Returns `DUCKDB_TYPE_INVALID` if the column is out of range. -* result: The result object to fetch the column type from. -* col: The column index. -* returns: The column type of the specified column. +* @param result The result object to fetch the column type from. +* @param col The column index. +* @return The column type of the specified column. */ DUCKDB_API duckdb_type duckdb_column_type(duckdb_result *result, idx_t col); /*! Returns the statement type of the statement that was executed -* result: The result object to fetch the statement type from. - * returns: duckdb_statement_type value or DUCKDB_STATEMENT_TYPE_INVALID - */ +* @param result The result object to fetch the statement type from. +* @return duckdb_statement_type value or DUCKDB_STATEMENT_TYPE_INVALID +*/ DUCKDB_API duckdb_statement_type duckdb_result_statement_type(duckdb_result result); /*! @@ -704,17 +844,17 @@ The return type of this call should be destroyed with `duckdb_destroy_logical_ty Returns `NULL` if the column is out of range. -* result: The result object to fetch the column type from. -* col: The column index. -* returns: The logical column type of the specified column. +* @param result The result object to fetch the column type from. +* @param col The column index. +* @return The logical column type of the specified column. */ DUCKDB_API duckdb_logical_type duckdb_column_logical_type(duckdb_result *result, idx_t col); /*! Returns the number of columns present in a the result object. -* result: The result object. -* returns: The number of columns present in the result object. +* @param result The result object. +* @return The number of columns present in the result object. */ DUCKDB_API idx_t duckdb_column_count(duckdb_result *result); @@ -724,18 +864,18 @@ DUCKDB_API idx_t duckdb_column_count(duckdb_result *result); Returns the number of rows present in the result object. -* result: The result object. -* returns: The number of rows present in the result object. +* @param result The result object. +* @return The number of rows present in the result object. */ DUCKDB_API idx_t duckdb_row_count(duckdb_result *result); -#endif +#endif /*! Returns the number of rows changed by the query stored in the result. This is relevant only for INSERT/UPDATE/DELETE queries. For other queries the rows_changed will be 0. -* result: The result object. -* returns: The number of rows changed. +* @param result The result object. +* @return The number of rows changed. */ DUCKDB_API idx_t duckdb_rows_changed(duckdb_result *result); @@ -755,9 +895,9 @@ int32_t *data = (int32_t *) duckdb_column_data(&result, 0); printf("Data for row %d: %d\n", row, data[row]); ``` -* result: The result object to fetch the column data from. -* col: The column index. -* returns: The column data of the specified column. +* @param result The result object to fetch the column data from. +* @param col The column index. +* @return The column data of the specified column. */ DUCKDB_API void *duckdb_column_data(duckdb_result *result, idx_t col); @@ -778,26 +918,36 @@ if (nullmask[row]) { } ``` -* result: The result object to fetch the nullmask from. -* col: The column index. -* returns: The nullmask of the specified column. +* @param result The result object to fetch the nullmask from. +* @param col The column index. +* @return The nullmask of the specified column. */ DUCKDB_API bool *duckdb_nullmask_data(duckdb_result *result, idx_t col); -#endif +#endif /*! Returns the error message contained within the result. The error is only set if `duckdb_query` returns `DuckDBError`. The result of this function must not be freed. It will be cleaned up when `duckdb_destroy_result` is called. -* result: The result object to fetch the error from. -* returns: The error of the result. +* @param result The result object to fetch the error from. +* @return The error of the result. */ DUCKDB_API const char *duckdb_result_error(duckdb_result *result); +/*! +Returns the result error type contained within the result. The error is only set if `duckdb_query` returns +`DuckDBError`. + +* @param result The result object to fetch the error from. +* @return The error type of the result. +*/ +DUCKDB_API duckdb_error_type duckdb_result_error_type(duckdb_result *result); + //===--------------------------------------------------------------------===// // Result Functions //===--------------------------------------------------------------------===// + #ifndef DUCKDB_API_NO_DEPRECATED /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. @@ -814,9 +964,9 @@ mixed with the legacy result functions). Use `duckdb_result_chunk_count` to figure out how many chunks there are in the result. -* result: The result object to fetch the data chunk from. -* chunk_index: The chunk index to fetch from. -* returns: The resulting data chunk. Returns `NULL` if the chunk index is out of bounds. +* @param result The result object to fetch the data chunk from. +* @param chunk_index The chunk index to fetch from. +* @return The resulting data chunk. Returns `NULL` if the chunk index is out of bounds. */ DUCKDB_API duckdb_data_chunk duckdb_result_get_chunk(duckdb_result result, idx_t chunk_index); @@ -825,8 +975,8 @@ DUCKDB_API duckdb_data_chunk duckdb_result_get_chunk(duckdb_result result, idx_t Checks if the type of the internal result is StreamQueryResult. -* result: The result object to check. -* returns: Whether or not the result object is of the type StreamQueryResult +* @param result The result object to check. +* @return Whether or not the result object is of the type StreamQueryResult */ DUCKDB_API bool duckdb_result_is_streaming(duckdb_result result); @@ -835,159 +985,160 @@ DUCKDB_API bool duckdb_result_is_streaming(duckdb_result result); Returns the number of data chunks present in the result. -* result: The result object -* returns: Number of data chunks present in the result. +* @param result The result object +* @return Number of data chunks present in the result. */ DUCKDB_API idx_t duckdb_result_chunk_count(duckdb_result result); -#endif +#endif /*! Returns the return_type of the given result, or DUCKDB_RETURN_TYPE_INVALID on error -* result: The result object -* returns: The return_type - */ +* @param result The result object +* @return The return_type +*/ DUCKDB_API duckdb_result_type duckdb_result_return_type(duckdb_result result); -#ifndef DUCKDB_API_NO_DEPRECATED //===--------------------------------------------------------------------===// -// Safe fetch functions +// Safe Fetch Functions //===--------------------------------------------------------------------===// // These functions will perform conversions if necessary. // On failure (e.g. if conversion cannot be performed or if the value is NULL) a default value is returned. // Note that these functions are slow since they perform bounds checking and conversion // For fast access of values prefer using `duckdb_result_get_chunk` - +#ifndef DUCKDB_API_NO_DEPRECATED /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The boolean value at the specified location, or false if the value cannot be converted. - */ +* @return The boolean value at the specified location, or false if the value cannot be converted. +*/ DUCKDB_API bool duckdb_value_boolean(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The int8_t value at the specified location, or 0 if the value cannot be converted. - */ +* @return The int8_t value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API int8_t duckdb_value_int8(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The int16_t value at the specified location, or 0 if the value cannot be converted. - */ +* @return The int16_t value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API int16_t duckdb_value_int16(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The int32_t value at the specified location, or 0 if the value cannot be converted. - */ +* @return The int32_t value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API int32_t duckdb_value_int32(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The int64_t value at the specified location, or 0 if the value cannot be converted. - */ +* @return The int64_t value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API int64_t duckdb_value_int64(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The duckdb_hugeint value at the specified location, or 0 if the value cannot be converted. - */ +* @return The duckdb_hugeint value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API duckdb_hugeint duckdb_value_hugeint(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The duckdb_uhugeint value at the specified location, or 0 if the value cannot be converted. - */ +* @return The duckdb_uhugeint value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API duckdb_uhugeint duckdb_value_uhugeint(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The duckdb_decimal value at the specified location, or 0 if the value cannot be converted. - */ +* @return The duckdb_decimal value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API duckdb_decimal duckdb_value_decimal(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The uint8_t value at the specified location, or 0 if the value cannot be converted. - */ +* @return The uint8_t value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API uint8_t duckdb_value_uint8(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The uint16_t value at the specified location, or 0 if the value cannot be converted. - */ +* @return The uint16_t value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API uint16_t duckdb_value_uint16(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The uint32_t value at the specified location, or 0 if the value cannot be converted. - */ +* @return The uint32_t value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API uint32_t duckdb_value_uint32(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The uint64_t value at the specified location, or 0 if the value cannot be converted. - */ +* @return The uint64_t value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API uint64_t duckdb_value_uint64(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The float value at the specified location, or 0 if the value cannot be converted. - */ +* @return The float value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API float duckdb_value_float(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The double value at the specified location, or 0 if the value cannot be converted. - */ +* @return The double value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API double duckdb_value_double(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The duckdb_date value at the specified location, or 0 if the value cannot be converted. - */ +* @return The duckdb_date value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API duckdb_date duckdb_value_date(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The duckdb_time value at the specified location, or 0 if the value cannot be converted. - */ +* @return The duckdb_time value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API duckdb_time duckdb_value_time(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The duckdb_timestamp value at the specified location, or 0 if the value cannot be converted. - */ +* @return The duckdb_timestamp value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API duckdb_timestamp duckdb_value_timestamp(duckdb_result *result, idx_t col, idx_t row); /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The duckdb_interval value at the specified location, or 0 if the value cannot be converted. - */ +* @return The duckdb_interval value at the specified location, or 0 if the value cannot be converted. +*/ DUCKDB_API duckdb_interval duckdb_value_interval(duckdb_result *result, idx_t col, idx_t row); /*! -* DEPRECATED: use duckdb_value_string instead. This function does not work correctly if the string contains null bytes. -* returns: The text value at the specified location as a null-terminated string, or nullptr if the value cannot be +**DEPRECATED**: Use duckdb_value_string instead. This function does not work correctly if the string contains null +bytes. + +* @return The text value at the specified location as a null-terminated string, or nullptr if the value cannot be converted. The result must be freed with `duckdb_free`. */ DUCKDB_API char *duckdb_value_varchar(duckdb_result *result, idx_t col, idx_t row); @@ -995,16 +1146,18 @@ DUCKDB_API char *duckdb_value_varchar(duckdb_result *result, idx_t col, idx_t ro /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: The string value at the specified location. Attempts to cast the result value to string. - * No support for nested types, and for other complex types. - * The resulting field "string.data" must be freed with `duckdb_free.` - */ +No support for nested types, and for other complex types. +The resulting field "string.data" must be freed with `duckdb_free.` + +* @return The string value at the specified location. Attempts to cast the result value to string. +*/ DUCKDB_API duckdb_string duckdb_value_string(duckdb_result *result, idx_t col, idx_t row); /*! -* DEPRECATED: use duckdb_value_string_internal instead. This function does not work correctly if the string contains +**DEPRECATED**: Use duckdb_value_string_internal instead. This function does not work correctly if the string contains null bytes. -* returns: The char* value at the specified location. ONLY works on VARCHAR columns and does not auto-cast. + +* @return The char* value at the specified location. ONLY works on VARCHAR columns and does not auto-cast. If the column is NOT a VARCHAR column this function will return NULL. The result must NOT be freed. @@ -1012,9 +1165,9 @@ The result must NOT be freed. DUCKDB_API char *duckdb_value_varchar_internal(duckdb_result *result, idx_t col, idx_t row); /*! -* DEPRECATED: use duckdb_value_string_internal instead. This function does not work correctly if the string contains +**DEPRECATED**: Use duckdb_value_string_internal instead. This function does not work correctly if the string contains null bytes. -* returns: The char* value at the specified location. ONLY works on VARCHAR columns and does not auto-cast. +* @return The char* value at the specified location. ONLY works on VARCHAR columns and does not auto-cast. If the column is NOT a VARCHAR column this function will return NULL. The result must NOT be freed. @@ -1024,7 +1177,7 @@ DUCKDB_API duckdb_string duckdb_value_string_internal(duckdb_result *result, idx /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. -* returns: The duckdb_blob value at the specified location. Returns a blob with blob.data set to nullptr if the +* @return The duckdb_blob value at the specified location. Returns a blob with blob.data set to nullptr if the value cannot be converted. The resulting field "blob.data" must be freed with `duckdb_free.` */ DUCKDB_API duckdb_blob duckdb_value_blob(duckdb_result *result, idx_t col, idx_t row); @@ -1032,11 +1185,11 @@ DUCKDB_API duckdb_blob duckdb_value_blob(duckdb_result *result, idx_t col, idx_t /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. - * returns: Returns true if the value at the specified index is NULL, and false otherwise. - */ +* @return Returns true if the value at the specified index is NULL, and false otherwise. +*/ DUCKDB_API bool duckdb_value_is_null(duckdb_result *result, idx_t col, idx_t row); -#endif +#endif //===--------------------------------------------------------------------===// // Helpers //===--------------------------------------------------------------------===// @@ -1045,8 +1198,8 @@ DUCKDB_API bool duckdb_value_is_null(duckdb_result *result, idx_t col, idx_t row Allocate `size` bytes of memory using the duckdb internal malloc function. Any memory allocated in this manner should be freed using `duckdb_free`. -* size: The number of bytes to allocate. -* returns: A pointer to the allocated memory region. +* @param size The number of bytes to allocate. +* @return A pointer to the allocated memory region. */ DUCKDB_API void *duckdb_malloc(size_t size); @@ -1054,7 +1207,7 @@ DUCKDB_API void *duckdb_malloc(size_t size); Free a value returned from `duckdb_malloc`, `duckdb_value_varchar`, `duckdb_value_blob`, or `duckdb_value_string`. -* ptr: The memory region to de-allocate. +* @param ptr The memory region to de-allocate. */ DUCKDB_API void duckdb_free(void *ptr); @@ -1062,7 +1215,7 @@ DUCKDB_API void duckdb_free(void *ptr); The internal vector size used by DuckDB. This is the amount of tuples that will fit into a data chunk created by `duckdb_create_data_chunk`. -* returns: The vector size. +* @return The vector size. */ DUCKDB_API idx_t duckdb_vector_size(); @@ -1073,48 +1226,64 @@ This means that the data of the string does not have a separate allocation. */ DUCKDB_API bool duckdb_string_is_inlined(duckdb_string_t string); +/*! +Get the string length of a string_t + +* @param string The string to get the length of. +* @return The length. +*/ +DUCKDB_API uint32_t duckdb_string_t_length(duckdb_string_t string); + +/*! +Get a pointer to the string data of a string_t + +* @param string The string to get the pointer to. +* @return The pointer. +*/ +DUCKDB_API const char *duckdb_string_t_data(duckdb_string_t *string); + //===--------------------------------------------------------------------===// -// Date/Time/Timestamp Helpers +// Date Time Timestamp Helpers //===--------------------------------------------------------------------===// /*! Decompose a `duckdb_date` object into year, month and date (stored as `duckdb_date_struct`). -* date: The date object, as obtained from a `DUCKDB_TYPE_DATE` column. -* returns: The `duckdb_date_struct` with the decomposed elements. +* @param date The date object, as obtained from a `DUCKDB_TYPE_DATE` column. +* @return The `duckdb_date_struct` with the decomposed elements. */ DUCKDB_API duckdb_date_struct duckdb_from_date(duckdb_date date); /*! Re-compose a `duckdb_date` from year, month and date (`duckdb_date_struct`). -* date: The year, month and date stored in a `duckdb_date_struct`. -* returns: The `duckdb_date` element. +* @param date The year, month and date stored in a `duckdb_date_struct`. +* @return The `duckdb_date` element. */ DUCKDB_API duckdb_date duckdb_to_date(duckdb_date_struct date); /*! Test a `duckdb_date` to see if it is a finite value. -* date: The date object, as obtained from a `DUCKDB_TYPE_DATE` column. -* returns: True if the date is finite, false if it is ±infinity. +* @param date The date object, as obtained from a `DUCKDB_TYPE_DATE` column. +* @return True if the date is finite, false if it is ±infinity. */ DUCKDB_API bool duckdb_is_finite_date(duckdb_date date); /*! Decompose a `duckdb_time` object into hour, minute, second and microsecond (stored as `duckdb_time_struct`). -* time: The time object, as obtained from a `DUCKDB_TYPE_TIME` column. -* returns: The `duckdb_time_struct` with the decomposed elements. +* @param time The time object, as obtained from a `DUCKDB_TYPE_TIME` column. +* @return The `duckdb_time_struct` with the decomposed elements. */ DUCKDB_API duckdb_time_struct duckdb_from_time(duckdb_time time); /*! Create a `duckdb_time_tz` object from micros and a timezone offset. -* micros: The microsecond component of the time. -* offset: The timezone offset component of the time. -* returns: The `duckdb_time_tz` element. +* @param micros The microsecond component of the time. +* @param offset The timezone offset component of the time. +* @return The `duckdb_time_tz` element. */ DUCKDB_API duckdb_time_tz duckdb_create_time_tz(int64_t micros, int32_t offset); @@ -1123,41 +1292,39 @@ Decompose a TIME_TZ objects into micros and a timezone offset. Use `duckdb_from_time` to further decompose the micros into hour, minute, second and microsecond. -* micros: The time object, as obtained from a `DUCKDB_TYPE_TIME_TZ` column. -* out_micros: The microsecond component of the time. -* out_offset: The timezone offset component of the time. +* @param micros The time object, as obtained from a `DUCKDB_TYPE_TIME_TZ` column. */ DUCKDB_API duckdb_time_tz_struct duckdb_from_time_tz(duckdb_time_tz micros); /*! Re-compose a `duckdb_time` from hour, minute, second and microsecond (`duckdb_time_struct`). -* time: The hour, minute, second and microsecond in a `duckdb_time_struct`. -* returns: The `duckdb_time` element. +* @param time The hour, minute, second and microsecond in a `duckdb_time_struct`. +* @return The `duckdb_time` element. */ DUCKDB_API duckdb_time duckdb_to_time(duckdb_time_struct time); /*! Decompose a `duckdb_timestamp` object into a `duckdb_timestamp_struct`. -* ts: The ts object, as obtained from a `DUCKDB_TYPE_TIMESTAMP` column. -* returns: The `duckdb_timestamp_struct` with the decomposed elements. +* @param ts The ts object, as obtained from a `DUCKDB_TYPE_TIMESTAMP` column. +* @return The `duckdb_timestamp_struct` with the decomposed elements. */ DUCKDB_API duckdb_timestamp_struct duckdb_from_timestamp(duckdb_timestamp ts); /*! Re-compose a `duckdb_timestamp` from a duckdb_timestamp_struct. -* ts: The de-composed elements in a `duckdb_timestamp_struct`. -* returns: The `duckdb_timestamp` element. +* @param ts The de-composed elements in a `duckdb_timestamp_struct`. +* @return The `duckdb_timestamp` element. */ DUCKDB_API duckdb_timestamp duckdb_to_timestamp(duckdb_timestamp_struct ts); /*! Test a `duckdb_timestamp` to see if it is a finite value. -* ts: The timestamp object, as obtained from a `DUCKDB_TYPE_TIMESTAMP` column. -* returns: True if the timestamp is finite, false if it is ±infinity. +* @param ts The timestamp object, as obtained from a `DUCKDB_TYPE_TIMESTAMP` column. +* @return True if the timestamp is finite, false if it is ±infinity. */ DUCKDB_API bool duckdb_is_finite_timestamp(duckdb_timestamp ts); @@ -1168,8 +1335,8 @@ DUCKDB_API bool duckdb_is_finite_timestamp(duckdb_timestamp ts); /*! Converts a duckdb_hugeint object (as obtained from a `DUCKDB_TYPE_HUGEINT` column) into a double. -* val: The hugeint value. -* returns: The converted `double` element. +* @param val The hugeint value. +* @return The converted `double` element. */ DUCKDB_API double duckdb_hugeint_to_double(duckdb_hugeint val); @@ -1178,8 +1345,8 @@ Converts a double value to a duckdb_hugeint object. If the conversion fails because the double value is too big the result will be 0. -* val: The double value. -* returns: The converted `duckdb_hugeint` element. +* @param val The double value. +* @return The converted `duckdb_hugeint` element. */ DUCKDB_API duckdb_hugeint duckdb_double_to_hugeint(double val); @@ -1190,8 +1357,8 @@ DUCKDB_API duckdb_hugeint duckdb_double_to_hugeint(double val); /*! Converts a duckdb_uhugeint object (as obtained from a `DUCKDB_TYPE_UHUGEINT` column) into a double. -* val: The uhugeint value. -* returns: The converted `double` element. +* @param val The uhugeint value. +* @return The converted `double` element. */ DUCKDB_API double duckdb_uhugeint_to_double(duckdb_uhugeint val); @@ -1200,8 +1367,8 @@ Converts a double value to a duckdb_uhugeint object. If the conversion fails because the double value is too big the result will be 0. -* val: The double value. -* returns: The converted `duckdb_uhugeint` element. +* @param val The double value. +* @return The converted `duckdb_uhugeint` element. */ DUCKDB_API duckdb_uhugeint duckdb_double_to_uhugeint(double val); @@ -1214,16 +1381,16 @@ Converts a double value to a duckdb_decimal object. If the conversion fails because the double value is too big, or the width/scale are invalid the result will be 0. -* val: The double value. -* returns: The converted `duckdb_decimal` element. +* @param val The double value. +* @return The converted `duckdb_decimal` element. */ DUCKDB_API duckdb_decimal duckdb_double_to_decimal(double val, uint8_t width, uint8_t scale); /*! Converts a duckdb_decimal object (as obtained from a `DUCKDB_TYPE_DECIMAL` column) into a double. -* val: The decimal value. -* returns: The converted `double` element. +* @param val The decimal value. +* @return The converted `double` element. */ DUCKDB_API double duckdb_decimal_to_double(duckdb_decimal val); @@ -1240,7 +1407,6 @@ DUCKDB_API double duckdb_decimal_to_double(duckdb_decimal val); // SELECT * FROM tbl WHERE id=? // Or a query with multiple parameters: // SELECT * FROM tbl WHERE id=$1 OR name=$2 - /*! Create a prepared statement object from a query. @@ -1249,10 +1415,10 @@ Note that after calling `duckdb_prepare`, the prepared statement should always b If the prepare fails, `duckdb_prepare_error` can be called to obtain the reason why the prepare failed. -* connection: The connection object -* query: The SQL query to prepare -* out_prepared_statement: The resulting prepared statement object -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param connection The connection object +* @param query The SQL query to prepare +* @param out_prepared_statement The resulting prepared statement object +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_prepare(duckdb_connection connection, const char *query, duckdb_prepared_statement *out_prepared_statement); @@ -1260,7 +1426,7 @@ DUCKDB_API duckdb_state duckdb_prepare(duckdb_connection connection, const char /*! Closes the prepared statement and de-allocates all memory allocated for the statement. -* prepared_statement: The prepared statement to destroy. +* @param prepared_statement The prepared statement to destroy. */ DUCKDB_API void duckdb_destroy_prepare(duckdb_prepared_statement *prepared_statement); @@ -1270,8 +1436,8 @@ If the prepared statement has no error message, this returns `nullptr` instead. The error message should not be freed. It will be de-allocated when `duckdb_destroy_prepare` is called. -* prepared_statement: The prepared statement to obtain the error from. -* returns: The error message, or `nullptr` if there is none. +* @param prepared_statement The prepared statement to obtain the error from. +* @return The error message, or `nullptr` if there is none. */ DUCKDB_API const char *duckdb_prepare_error(duckdb_prepared_statement prepared_statement); @@ -1280,7 +1446,7 @@ Returns the number of parameters that can be provided to the given prepared stat Returns 0 if the query was not successfully prepared. -* prepared_statement: The prepared statement to obtain the number of parameters for. +* @param prepared_statement The prepared statement to obtain the number of parameters for. */ DUCKDB_API idx_t duckdb_nparams(duckdb_prepared_statement prepared_statement); @@ -1290,7 +1456,7 @@ The returned string should be freed using `duckdb_free`. Returns NULL if the index is out of range for the provided prepared statement. -* prepared_statement: The prepared statement for which to get the parameter name from. +* @param prepared_statement The prepared statement for which to get the parameter name from. */ DUCKDB_API const char *duckdb_parameter_name(duckdb_prepared_statement prepared_statement, idx_t index); @@ -1299,9 +1465,9 @@ Returns the parameter type for the parameter at the given index. Returns `DUCKDB_TYPE_INVALID` if the parameter index is out of range or the statement was not successfully prepared. -* prepared_statement: The prepared statement. -* param_idx: The parameter index. -* returns: The parameter type +* @param prepared_statement The prepared statement. +* @param param_idx The parameter index. +* @return The parameter type */ DUCKDB_API duckdb_type duckdb_param_type(duckdb_prepared_statement prepared_statement, idx_t param_idx); @@ -1313,13 +1479,13 @@ DUCKDB_API duckdb_state duckdb_clear_bindings(duckdb_prepared_statement prepared /*! Returns the statement type of the statement to be executed - * statement: The prepared statement. - * returns: duckdb_statement_type value or DUCKDB_STATEMENT_TYPE_INVALID - */ +* @param statement The prepared statement. +* @return duckdb_statement_type value or DUCKDB_STATEMENT_TYPE_INVALID +*/ DUCKDB_API duckdb_statement_type duckdb_prepared_statement_type(duckdb_prepared_statement statement); //===--------------------------------------------------------------------===// -// Bind Values to Prepared Statements +// Bind Values To Prepared Statements //===--------------------------------------------------------------------===// /*! @@ -1364,11 +1530,13 @@ Binds a duckdb_hugeint value to the prepared statement at the specified index. */ DUCKDB_API duckdb_state duckdb_bind_hugeint(duckdb_prepared_statement prepared_statement, idx_t param_idx, duckdb_hugeint val); + /*! Binds an duckdb_uhugeint value to the prepared statement at the specified index. */ DUCKDB_API duckdb_state duckdb_bind_uhugeint(duckdb_prepared_statement prepared_statement, idx_t param_idx, duckdb_uhugeint val); + /*! Binds a duckdb_decimal value to the prepared statement at the specified index. */ @@ -1423,6 +1591,12 @@ Binds a duckdb_timestamp value to the prepared statement at the specified index. DUCKDB_API duckdb_state duckdb_bind_timestamp(duckdb_prepared_statement prepared_statement, idx_t param_idx, duckdb_timestamp val); +/*! +Binds a duckdb_timestamp value to the prepared statement at the specified index. +*/ +DUCKDB_API duckdb_state duckdb_bind_timestamp_tz(duckdb_prepared_statement prepared_statement, idx_t param_idx, + duckdb_timestamp val); + /*! Binds a duckdb_interval value to the prepared statement at the specified index. */ @@ -1464,9 +1638,9 @@ between calls to this function. Note that the result must be freed with `duckdb_destroy_result`. -* prepared_statement: The prepared statement to execute. -* out_result: The query result. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param prepared_statement The prepared statement to execute. +* @param out_result The query result. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_execute_prepared(duckdb_prepared_statement prepared_statement, duckdb_result *out_result); @@ -1483,20 +1657,19 @@ between calls to this function. Note that the result must be freed with `duckdb_destroy_result`. -* prepared_statement: The prepared statement to execute. -* out_result: The query result. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param prepared_statement The prepared statement to execute. +* @param out_result The query result. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_execute_prepared_streaming(duckdb_prepared_statement prepared_statement, duckdb_result *out_result); -#endif +#endif //===--------------------------------------------------------------------===// // Extract Statements //===--------------------------------------------------------------------===// // A query string can be extracted into multiple SQL statements. Each statement can be prepared and executed separately. - /*! Extract all statements from a query. Note that after calling `duckdb_extract_statements`, the extracted statements should always be destroyed using @@ -1504,10 +1677,10 @@ Note that after calling `duckdb_extract_statements`, the extracted statements sh If the extract fails, `duckdb_extract_statements_error` can be called to obtain the reason why the extract failed. -* connection: The connection object -* query: The SQL query to extract -* out_extracted_statements: The resulting extracted statements object -* returns: The number of extracted statements or 0 on failure. +* @param connection The connection object +* @param query The SQL query to extract +* @param out_extracted_statements The resulting extracted statements object +* @return The number of extracted statements or 0 on failure. */ DUCKDB_API idx_t duckdb_extract_statements(duckdb_connection connection, const char *query, duckdb_extracted_statements *out_extracted_statements); @@ -1519,28 +1692,29 @@ Note that after calling `duckdb_prepare_extracted_statement`, the prepared state If the prepare fails, `duckdb_prepare_error` can be called to obtain the reason why the prepare failed. -* connection: The connection object -* extracted_statements: The extracted statements object -* index: The index of the extracted statement to prepare -* out_prepared_statement: The resulting prepared statement object -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param connection The connection object +* @param extracted_statements The extracted statements object +* @param index The index of the extracted statement to prepare +* @param out_prepared_statement The resulting prepared statement object +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_prepare_extracted_statement(duckdb_connection connection, duckdb_extracted_statements extracted_statements, idx_t index, duckdb_prepared_statement *out_prepared_statement); + /*! Returns the error message contained within the extracted statements. The result of this function must not be freed. It will be cleaned up when `duckdb_destroy_extracted` is called. -* result: The extracted statements to fetch the error from. -* returns: The error of the extracted statements. +* @param extracted_statements The extracted statements to fetch the error from. +* @return The error of the extracted statements. */ DUCKDB_API const char *duckdb_extract_statements_error(duckdb_extracted_statements extracted_statements); /*! De-allocates all memory allocated for the extracted statements. -* extracted_statements: The extracted statements to destroy. +* @param extracted_statements The extracted statements to destroy. */ DUCKDB_API void duckdb_destroy_extracted(duckdb_extracted_statements *extracted_statements); @@ -1556,12 +1730,13 @@ The pending result can be used to incrementally execute a query, returning contr Note that after calling `duckdb_pending_prepared`, the pending result should always be destroyed using `duckdb_destroy_pending`, even if this function returns DuckDBError. -* prepared_statement: The prepared statement to execute. -* out_result: The pending query result. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param prepared_statement The prepared statement to execute. +* @param out_result The pending query result. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_pending_prepared(duckdb_prepared_statement prepared_statement, duckdb_pending_result *out_result); + #ifndef DUCKDB_API_NO_DEPRECATED /*! **DEPRECATION NOTICE**: This method is scheduled for removal in a future release. @@ -1573,18 +1748,18 @@ The pending result represents an intermediate structure for a query that is not Note that after calling `duckdb_pending_prepared_streaming`, the pending result should always be destroyed using `duckdb_destroy_pending`, even if this function returns DuckDBError. -* prepared_statement: The prepared statement to execute. -* out_result: The pending query result. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param prepared_statement The prepared statement to execute. +* @param out_result The pending query result. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_pending_prepared_streaming(duckdb_prepared_statement prepared_statement, duckdb_pending_result *out_result); -#endif +#endif /*! Closes the pending result and de-allocates all memory allocated for the result. -* pending_result: The pending result to destroy. +* @param pending_result The pending result to destroy. */ DUCKDB_API void duckdb_destroy_pending(duckdb_pending_result *pending_result); @@ -1593,8 +1768,8 @@ Returns the error message contained within the pending result. The result of this function must not be freed. It will be cleaned up when `duckdb_destroy_pending` is called. -* result: The pending result to fetch the error from. -* returns: The error of the pending result. +* @param pending_result The pending result to fetch the error from. +* @return The error of the pending result. */ DUCKDB_API const char *duckdb_pending_error(duckdb_pending_result pending_result); @@ -1607,8 +1782,8 @@ If this returns DUCKDB_PENDING_ERROR, an error occurred during execution. The error message can be obtained by calling duckdb_pending_error on the pending_result. -* pending_result: The pending result to execute a task within. -* returns: The state of the pending result after the execution. +* @param pending_result The pending result to execute a task within. +* @return The state of the pending result after the execution. */ DUCKDB_API duckdb_pending_state duckdb_pending_execute_task(duckdb_pending_result pending_result); @@ -1619,8 +1794,8 @@ If this returns DUCKDB_PENDING_ERROR, an error occurred during execution. The error message can be obtained by calling duckdb_pending_error on the pending_result. -* pending_result: The pending result. -* returns: The state of the pending result. +* @param pending_result The pending result. +* @return The state of the pending result. */ DUCKDB_API duckdb_pending_state duckdb_pending_execute_check_state(duckdb_pending_result pending_result); @@ -1632,9 +1807,9 @@ Otherwise, all remaining tasks must be executed first. Note that the result must be freed with `duckdb_destroy_result`. -* pending_result: The pending result to execute. -* out_result: The result object. -* returns: `DuckDBSuccess` on success or `DuckDBError` on failure. +* @param pending_result The pending result to execute. +* @param out_result The result object. +* @return `DuckDBSuccess` on success or `DuckDBError` on failure. */ DUCKDB_API duckdb_state duckdb_execute_pending(duckdb_pending_result pending_result, duckdb_result *out_result); @@ -1642,8 +1817,8 @@ DUCKDB_API duckdb_state duckdb_execute_pending(duckdb_pending_result pending_res Returns whether a duckdb_pending_state is finished executing. For example if `pending_state` is DUCKDB_PENDING_RESULT_READY, this function will return true. -* pending_state: The pending state on which to decide whether to finish execution. -* returns: Boolean indicating pending execution should be considered finished. +* @param pending_state The pending state on which to decide whether to finish execution. +* @return Boolean indicating pending execution should be considered finished. */ DUCKDB_API bool duckdb_pending_execution_is_finished(duckdb_pending_state pending_state); @@ -1654,439 +1829,786 @@ DUCKDB_API bool duckdb_pending_execution_is_finished(duckdb_pending_state pendin /*! Destroys the value and de-allocates all memory allocated for that type. -* value: The value to destroy. +* @param value The value to destroy. */ DUCKDB_API void duckdb_destroy_value(duckdb_value *value); /*! Creates a value from a null-terminated string -* value: The null-terminated string -* returns: The value. This must be destroyed with `duckdb_destroy_value`. +* @param text The null-terminated string +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ DUCKDB_API duckdb_value duckdb_create_varchar(const char *text); /*! Creates a value from a string -* value: The text -* length: The length of the text -* returns: The value. This must be destroyed with `duckdb_destroy_value`. +* @param text The text +* @param length The length of the text +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ DUCKDB_API duckdb_value duckdb_create_varchar_length(const char *text, idx_t length); /*! -Creates a value from an int64 +Creates a value from a boolean -* value: The bigint value -* returns: The value. This must be destroyed with `duckdb_destroy_value`. +* @param input The boolean value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_value duckdb_create_int64(int64_t val); +DUCKDB_API duckdb_value duckdb_create_bool(bool input); /*! -Creates a struct value from a type and an array of values +Creates a value from a int8_t (a tinyint) -* type: The type of the struct -* values: The values for the struct fields -* returns: The value. This must be destroyed with `duckdb_destroy_value`. +* @param input The tinyint value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_value duckdb_create_struct_value(duckdb_logical_type type, duckdb_value *values); +DUCKDB_API duckdb_value duckdb_create_int8(int8_t input); /*! -Creates a list value from a type and an array of values of length `value_count` +Creates a value from a uint8_t (a utinyint) -* type: The type of the list -* values: The values for the list -* value_count: The number of values in the list -* returns: The value. This must be destroyed with `duckdb_destroy_value`. +* @param input The utinyint value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_value duckdb_create_list_value(duckdb_logical_type type, duckdb_value *values, idx_t value_count); +DUCKDB_API duckdb_value duckdb_create_uint8(uint8_t input); /*! -Creates a array value from a type and an array of values of length `value_count` +Creates a value from a int16_t (a smallint) -* type: The type of the array -* values: The values for the array -* value_count: The number of values in the array -* returns: The value. This must be destroyed with `duckdb_destroy_value`. +* @param input The smallint value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_value duckdb_create_array_value(duckdb_logical_type type, duckdb_value *values, idx_t value_count); +DUCKDB_API duckdb_value duckdb_create_int16(int16_t input); /*! -Obtains a string representation of the given value. -The result must be destroyed with `duckdb_free`. +Creates a value from a uint16_t (a usmallint) -* value: The value -* returns: The string value. This must be destroyed with `duckdb_free`. +* @param input The usmallint value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API char *duckdb_get_varchar(duckdb_value value); +DUCKDB_API duckdb_value duckdb_create_uint16(uint16_t input); /*! -Obtains an int64 of the given value. +Creates a value from a int32_t (an integer) -* value: The value -* returns: The int64 value, or 0 if no conversion is possible +* @param input The integer value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API int64_t duckdb_get_int64(duckdb_value value); - -//===--------------------------------------------------------------------===// -// Logical Type Interface -//===--------------------------------------------------------------------===// +DUCKDB_API duckdb_value duckdb_create_int32(int32_t input); /*! -Creates a `duckdb_logical_type` from a standard primitive type. -The resulting type should be destroyed with `duckdb_destroy_logical_type`. +Creates a value from a uint32_t (a uinteger) -This should not be used with `DUCKDB_TYPE_DECIMAL`. - -* type: The primitive type to create. -* returns: The logical type. +* @param input The uinteger value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_logical_type duckdb_create_logical_type(duckdb_type type); +DUCKDB_API duckdb_value duckdb_create_uint32(uint32_t input); /*! -Returns the alias of a duckdb_logical_type, if one is set, else `NULL`. -The result must be destroyed with `duckdb_free`. +Creates a value from a uint64_t (a ubigint) -* type: The logical type to return the alias of -* returns: The alias or `NULL` - */ -DUCKDB_API char *duckdb_logical_type_get_alias(duckdb_logical_type type); +* @param input The ubigint value +* @return The value. This must be destroyed with `duckdb_destroy_value`. +*/ +DUCKDB_API duckdb_value duckdb_create_uint64(uint64_t input); /*! -Creates a list type from its child type. -The resulting type should be destroyed with `duckdb_destroy_logical_type`. +Creates a value from an int64 -* type: The child type of list type to create. -* returns: The logical type. +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_logical_type duckdb_create_list_type(duckdb_logical_type type); +DUCKDB_API duckdb_value duckdb_create_int64(int64_t val); /*! -Creates a array type from its child type. -The resulting type should be destroyed with `duckdb_destroy_logical_type`. +Creates a value from a hugeint -* type: The child type of array type to create. -* array_size: The number of elements in the array. -* returns: The logical type. +* @param input The hugeint value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_logical_type duckdb_create_array_type(duckdb_logical_type type, idx_t array_size); +DUCKDB_API duckdb_value duckdb_create_hugeint(duckdb_hugeint input); /*! -Creates a map type from its key type and value type. -The resulting type should be destroyed with `duckdb_destroy_logical_type`. +Creates a value from a uhugeint -* type: The key type and value type of map type to create. -* returns: The logical type. +* @param input The uhugeint value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_logical_type duckdb_create_map_type(duckdb_logical_type key_type, duckdb_logical_type value_type); +DUCKDB_API duckdb_value duckdb_create_uhugeint(duckdb_uhugeint input); /*! -Creates a UNION type from the passed types array. -The resulting type should be destroyed with `duckdb_destroy_logical_type`. +Creates a value from a float -* types: The array of types that the union should consist of. -* type_amount: The size of the types array. -* returns: The logical type. +* @param input The float value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_logical_type duckdb_create_union_type(duckdb_logical_type *member_types, const char **member_names, - idx_t member_count); +DUCKDB_API duckdb_value duckdb_create_float(float input); /*! -Creates a STRUCT type from the passed member name and type arrays. -The resulting type should be destroyed with `duckdb_destroy_logical_type`. +Creates a value from a double -* member_types: The array of types that the struct should consist of. -* member_names: The array of names that the struct should consist of. -* member_count: The number of members that were specified for both arrays. -* returns: The logical type. +* @param input The double value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_logical_type duckdb_create_struct_type(duckdb_logical_type *member_types, const char **member_names, - idx_t member_count); +DUCKDB_API duckdb_value duckdb_create_double(double input); /*! -Creates an ENUM type from the passed member name array. -The resulting type should be destroyed with `duckdb_destroy_logical_type`. +Creates a value from a date -* enum_name: The name of the enum. -* member_names: The array of names that the enum should consist of. -* member_count: The number of elements that were specified in the array. -* returns: The logical type. +* @param input The date value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_logical_type duckdb_create_enum_type(const char **member_names, idx_t member_count); +DUCKDB_API duckdb_value duckdb_create_date(duckdb_date input); /*! -Creates a `duckdb_logical_type` of type decimal with the specified width and scale. -The resulting type should be destroyed with `duckdb_destroy_logical_type`. +Creates a value from a time -* width: The width of the decimal type -* scale: The scale of the decimal type -* returns: The logical type. +* @param input The time value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_logical_type duckdb_create_decimal_type(uint8_t width, uint8_t scale); +DUCKDB_API duckdb_value duckdb_create_time(duckdb_time input); /*! -Retrieves the enum type class of a `duckdb_logical_type`. +Creates a value from a time_tz. +Not to be confused with `duckdb_create_time_tz`, which creates a duckdb_time_tz_t. -* type: The logical type object -* returns: The type id +* @param value The time_tz value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_type duckdb_get_type_id(duckdb_logical_type type); +DUCKDB_API duckdb_value duckdb_create_time_tz_value(duckdb_time_tz value); /*! -Retrieves the width of a decimal type. +Creates a value from a timestamp -* type: The logical type object -* returns: The width of the decimal type +* @param input The timestamp value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API uint8_t duckdb_decimal_width(duckdb_logical_type type); +DUCKDB_API duckdb_value duckdb_create_timestamp(duckdb_timestamp input); /*! -Retrieves the scale of a decimal type. +Creates a value from an interval -* type: The logical type object -* returns: The scale of the decimal type +* @param input The interval value +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API uint8_t duckdb_decimal_scale(duckdb_logical_type type); +DUCKDB_API duckdb_value duckdb_create_interval(duckdb_interval input); /*! -Retrieves the internal storage type of a decimal type. +Creates a value from a blob -* type: The logical type object -* returns: The internal type of the decimal type +* @param data The blob data +* @param length The length of the blob data +* @return The value. This must be destroyed with `duckdb_destroy_value`. */ -DUCKDB_API duckdb_type duckdb_decimal_internal_type(duckdb_logical_type type); +DUCKDB_API duckdb_value duckdb_create_blob(const uint8_t *data, idx_t length); /*! -Retrieves the internal storage type of an enum type. +Returns the boolean value of the given value. -* type: The logical type object -* returns: The internal type of the enum type +* @param val A duckdb_value containing a boolean +* @return A boolean, or false if the value cannot be converted */ -DUCKDB_API duckdb_type duckdb_enum_internal_type(duckdb_logical_type type); +DUCKDB_API bool duckdb_get_bool(duckdb_value val); /*! -Retrieves the dictionary size of the enum type. +Returns the int8_t value of the given value. -* type: The logical type object -* returns: The dictionary size of the enum type +* @param val A duckdb_value containing a tinyint +* @return A int8_t, or MinValue if the value cannot be converted */ -DUCKDB_API uint32_t duckdb_enum_dictionary_size(duckdb_logical_type type); +DUCKDB_API int8_t duckdb_get_int8(duckdb_value val); /*! -Retrieves the dictionary value at the specified position from the enum. - -The result must be freed with `duckdb_free`. +Returns the uint8_t value of the given value. -* type: The logical type object -* index: The index in the dictionary -* returns: The string value of the enum type. Must be freed with `duckdb_free`. +* @param val A duckdb_value containing a utinyint +* @return A uint8_t, or MinValue if the value cannot be converted */ -DUCKDB_API char *duckdb_enum_dictionary_value(duckdb_logical_type type, idx_t index); +DUCKDB_API uint8_t duckdb_get_uint8(duckdb_value val); /*! -Retrieves the child type of the given list type. - -The result must be freed with `duckdb_destroy_logical_type`. +Returns the int16_t value of the given value. -* type: The logical type object -* returns: The child type of the list type. Must be destroyed with `duckdb_destroy_logical_type`. +* @param val A duckdb_value containing a smallint +* @return A int16_t, or MinValue if the value cannot be converted */ -DUCKDB_API duckdb_logical_type duckdb_list_type_child_type(duckdb_logical_type type); +DUCKDB_API int16_t duckdb_get_int16(duckdb_value val); /*! -Retrieves the child type of the given array type. +Returns the uint16_t value of the given value. -The result must be freed with `duckdb_destroy_logical_type`. - -* type: The logical type object -* returns: The child type of the array type. Must be destroyed with `duckdb_destroy_logical_type`. +* @param val A duckdb_value containing a usmallint +* @return A uint16_t, or MinValue if the value cannot be converted */ -DUCKDB_API duckdb_logical_type duckdb_array_type_child_type(duckdb_logical_type type); +DUCKDB_API uint16_t duckdb_get_uint16(duckdb_value val); /*! -Retrieves the array size of the given array type. +Returns the int32_t value of the given value. -* type: The logical type object -* returns: The fixed number of elements the values of this array type can store. +* @param val A duckdb_value containing a integer +* @return A int32_t, or MinValue if the value cannot be converted */ -DUCKDB_API idx_t duckdb_array_type_array_size(duckdb_logical_type type); +DUCKDB_API int32_t duckdb_get_int32(duckdb_value val); /*! -Retrieves the key type of the given map type. - -The result must be freed with `duckdb_destroy_logical_type`. +Returns the uint32_t value of the given value. -* type: The logical type object -* returns: The key type of the map type. Must be destroyed with `duckdb_destroy_logical_type`. +* @param val A duckdb_value containing a uinteger +* @return A uint32_t, or MinValue if the value cannot be converted */ -DUCKDB_API duckdb_logical_type duckdb_map_type_key_type(duckdb_logical_type type); +DUCKDB_API uint32_t duckdb_get_uint32(duckdb_value val); /*! -Retrieves the value type of the given map type. - -The result must be freed with `duckdb_destroy_logical_type`. +Returns the int64_t value of the given value. -* type: The logical type object -* returns: The value type of the map type. Must be destroyed with `duckdb_destroy_logical_type`. +* @param val A duckdb_value containing a bigint +* @return A int64_t, or MinValue if the value cannot be converted */ -DUCKDB_API duckdb_logical_type duckdb_map_type_value_type(duckdb_logical_type type); +DUCKDB_API int64_t duckdb_get_int64(duckdb_value val); /*! -Returns the number of children of a struct type. +Returns the uint64_t value of the given value. -* type: The logical type object -* returns: The number of children of a struct type. +* @param val A duckdb_value containing a ubigint +* @return A uint64_t, or MinValue if the value cannot be converted */ -DUCKDB_API idx_t duckdb_struct_type_child_count(duckdb_logical_type type); +DUCKDB_API uint64_t duckdb_get_uint64(duckdb_value val); /*! -Retrieves the name of the struct child. +Returns the hugeint value of the given value. -The result must be freed with `duckdb_free`. - -* type: The logical type object -* index: The child index -* returns: The name of the struct type. Must be freed with `duckdb_free`. +* @param val A duckdb_value containing a hugeint +* @return A duckdb_hugeint, or MinValue if the value cannot be converted */ -DUCKDB_API char *duckdb_struct_type_child_name(duckdb_logical_type type, idx_t index); +DUCKDB_API duckdb_hugeint duckdb_get_hugeint(duckdb_value val); /*! -Retrieves the child type of the given struct type at the specified index. +Returns the uhugeint value of the given value. -The result must be freed with `duckdb_destroy_logical_type`. - -* type: The logical type object -* index: The child index -* returns: The child type of the struct type. Must be destroyed with `duckdb_destroy_logical_type`. +* @param val A duckdb_value containing a uhugeint +* @return A duckdb_uhugeint, or MinValue if the value cannot be converted */ -DUCKDB_API duckdb_logical_type duckdb_struct_type_child_type(duckdb_logical_type type, idx_t index); +DUCKDB_API duckdb_uhugeint duckdb_get_uhugeint(duckdb_value val); /*! -Returns the number of members that the union type has. +Returns the float value of the given value. -* type: The logical type (union) object -* returns: The number of members of a union type. +* @param val A duckdb_value containing a float +* @return A float, or NAN if the value cannot be converted */ -DUCKDB_API idx_t duckdb_union_type_member_count(duckdb_logical_type type); +DUCKDB_API float duckdb_get_float(duckdb_value val); /*! -Retrieves the name of the union member. +Returns the double value of the given value. -The result must be freed with `duckdb_free`. +* @param val A duckdb_value containing a double +* @return A double, or NAN if the value cannot be converted +*/ +DUCKDB_API double duckdb_get_double(duckdb_value val); -* type: The logical type object -* index: The child index -* returns: The name of the union member. Must be freed with `duckdb_free`. +/*! +Returns the date value of the given value. + +* @param val A duckdb_value containing a date +* @return A duckdb_date, or MinValue if the value cannot be converted */ -DUCKDB_API char *duckdb_union_type_member_name(duckdb_logical_type type, idx_t index); +DUCKDB_API duckdb_date duckdb_get_date(duckdb_value val); /*! -Retrieves the child type of the given union member at the specified index. +Returns the time value of the given value. -The result must be freed with `duckdb_destroy_logical_type`. +* @param val A duckdb_value containing a time +* @return A duckdb_time, or MinValue