From 55adbb3faea5122b858c38d8e584ddfa8e8b8408 Mon Sep 17 00:00:00 2001 From: Vasi Vasireddy Date: Thu, 12 Dec 2024 10:13:40 -0800 Subject: [PATCH 1/4] Bump V0.115.0, removed logging exporter and ballast extension --- README.md | 9 +- go.mod | 576 +- go.sum | 1217 ++-- pkg/defaultcomponents/defaults.go | 4 - pkg/defaultcomponents/defaults_test.go | 8 +- testbed/go.mod | 582 +- testbed/go.sum | 1265 ++-- testbed/sampling/sampling_test.go | 24 +- tools/release/image-mirror/go.sum | 48 - tools/workflow/cleaner/go.sum | 2 - tools/workflow/linters/go.mod | 2 - tools/workflow/linters/go.sum | 129 +- .../datadog-agent/comp/core/log/def/LICENSE | 200 + .../comp/core/log/def/component.go | 59 + .../datadog-agent/comp/core/log/def/params.go | 184 + .../telemetry/telemetryimpl/telemetry_mock.go | 7 +- .../comp/logs/agent/config/config.go | 3 +- .../comp/logs/agent/config/config_keys.go | 3 +- .../logsagentpipelineimpl/agent.go | 8 +- .../exporter/logsagentexporter/factory.go | 2 +- .../pkg/config/nodetreemodel/LICENSE | 200 + .../pkg/config/nodetreemodel/config.go | 868 +++ .../datadog-agent/pkg/config/setup/config.go | 58 +- .../pkg/config/setup/config_change_checker.go | 56 + .../pkg/config/setup/constants/constants.go | 2 + .../datadog-agent/pkg/config/setup/otlp.go | 1 - .../pkg/config/setup/system_probe.go | 3 +- .../pkg/config/setup/system_probe_cws.go | 3 +- .../pkg/config/structure/LICENSE | 200 + .../pkg/config/structure/unmarshal.go | 557 ++ .../pkg/config/teeconfig/LICENSE | 200 + .../pkg/config/teeconfig/teeconfig.go | 410 ++ .../datadog-agent/pkg/logs/auditor/auditor.go | 16 +- .../pkg/logs/auditor/null_auditor.go | 4 +- .../pkg/logs/client/http/sync_destination.go | 2 +- .../pkg/logs/diagnostic/format.go | 2 +- .../datadog-agent/pkg/logs/message/message.go | 10 + .../datadog-agent/pkg/logs/metrics/metrics.go | 12 + .../pkg/logs/pipeline/pipeline.go | 48 +- .../pkg/logs/pipeline/provider.go | 39 +- .../pkg/logs/processor/encoder.go | 23 +- .../pkg/logs/processor/processor.go | 125 +- .../datadog-agent/pkg/logs/sds/reconfigure.go | 81 +- .../datadog-agent/pkg/logs/sds/rules.go | 9 +- .../datadog-agent/pkg/logs/sds/scanner.go | 82 +- .../pkg/logs/sds/scanner_nosds.go | 4 +- .../pkg/logs/sender/batch_strategy.go | 30 +- .../datadog-agent/pkg/logs/sender/sender.go | 13 +- .../datadog-agent/pkg/obfuscate/obfuscate.go | 5 + .../datadog-agent/pkg/obfuscate/sql.go | 1 + .../pkg/obfuscate/sql_tokenizer.go | 20 +- .../pkg/remoteconfig/state/products.go | 3 + .../datadog-agent/pkg/telemetry/histogram.go | 8 +- .../pkg/telemetry/stat_counter_wrapper.go | 6 + .../datadog-agent/pkg/trace/agent/agent.go | 15 + .../datadog-agent/pkg/trace/api/api.go | 10 + .../datadog-agent/pkg/trace/api/telemetry.go | 7 + .../datadog-agent/pkg/trace/config/config.go | 16 + .../pkg/trace/config/peer_tags.ini | 4 +- .../datadog-agent/pkg/trace/writer/stats.go | 10 + .../datadog-agent/pkg/trace/writer/trace.go | 16 +- .../datadog-agent/pkg/util/http/transport.go | 13 +- .../pkg/util/log/log_podman_util.go | 27 + .../v2/.apigentools-info | 8 +- .../datadog-api-client-go/v2/CHANGELOG.md | 51 + .../datadog-api-client-go/v2/README.md | 2 +- .../v2/api/datadogV1/api_synthetics.go | 296 +- .../v2/api/datadogV1/doc.go | 4 + .../model_alert_graph_widget_definition.go | 3 - .../model_change_widget_definition.go | 3 - .../model_check_status_widget_definition.go | 3 - .../model_distribution_point_item.go | 2 +- .../model_distribution_widget_definition.go | 3 - .../model_event_stream_widget_definition.go | 3 - .../model_event_timeline_widget_definition.go | 3 - .../model_funnel_widget_definition.go | 3 - .../model_geomap_widget_definition.go | 3 - .../model_heat_map_widget_definition.go | 3 - ...del_hourly_usage_attribution_usage_type.go | 2 + .../api/datadogV1/model_list_stream_query.go | 2 +- .../model_list_stream_widget_definition.go | 3 - .../model_log_stream_widget_definition.go | 3 - .../v2/api/datadogV1/model_logs_index.go | 44 +- .../model_logs_index_update_request.go | 49 +- .../v2/api/datadogV1/model_monitor.go | 2 +- .../v2/api/datadogV1/model_monitor_options.go | 6 +- ...hly_usage_attribution_supported_metrics.go | 4 + .../model_monthly_usage_attribution_values.go | 37 +- .../model_query_value_widget_definition.go | 3 - .../model_run_workflow_widget_definition.go | 3 - .../model_scatter_plot_widget_definition.go | 3 - ...model_service_summary_widget_definition.go | 3 - .../model_shared_dashboard_invites_data.go | 2 +- .../model_split_graph_widget_definition.go | 3 - .../model_sunburst_widget_definition.go | 3 - .../datadogV1/model_synthetics_assertion.go | 32 + .../model_synthetics_assertion_javascript.go | 143 + ...el_synthetics_assertion_javascript_type.go | 64 + .../model_synthetics_config_variable_type.go | 2 + .../model_synthetics_fetch_uptimes_payload.go | 165 + .../model_synthetics_global_variable.go | 72 +- ...tics_global_variable_parse_test_options.go | 2 +- ...global_variable_parse_test_options_type.go | 10 +- ...odel_synthetics_global_variable_request.go | 425 ++ ...ics_local_variable_parsing_options_type.go | 72 + .../model_synthetics_mobile_device_id.go | 514 ++ .../datadogV1/model_synthetics_mobile_step.go | 392 ++ .../model_synthetics_mobile_step_type.go | 96 + .../model_synthetics_mobile_test_.go | 465 ++ .../model_synthetics_mobile_test_binding.go | 111 + ...el_synthetics_mobile_test_binding_items.go | 147 + ...nthetics_mobile_test_binding_items_role.go | 66 + ...model_synthetics_mobile_test_ci_options.go | 111 + .../model_synthetics_mobile_test_config.go | 146 + ...bile_test_initial_application_arguments.go | 111 + ...al_application_arguments_property_names.go | 102 + .../model_synthetics_mobile_test_options.go | 684 ++ ...ics_mobile_test_options_monitor_options.go | 219 + ...onitor_options_notification_preset_name.go | 70 + .../model_synthetics_mobile_test_type.go | 64 + ...thetics_mobile_tests_mobile_application.go | 182 + ...tests_mobile_application_reference_type.go | 66 + .../model_synthetics_parsing_options.go | 26 +- .../model_synthetics_test_request.go | 28 +- .../model_synthetics_test_request_port.go | 105 + .../datadogV1/model_synthetics_test_uptime.go | 216 + .../api/datadogV1/model_synthetics_uptime.go | 247 + .../model_table_widget_definition.go | 3 - .../datadogV1/model_table_widget_request.go | 37 +- .../model_table_widget_text_format_match.go | 143 + ...del_table_widget_text_format_match_type.go | 74 + .../model_table_widget_text_format_palette.go | 84 + .../model_table_widget_text_format_replace.go | 105 + ...el_table_widget_text_format_replace_all.go | 143 + ...ble_widget_text_format_replace_all_type.go | 64 + ...le_widget_text_format_replace_substring.go | 175 + ...dget_text_format_replace_substring_type.go | 64 + .../model_table_widget_text_format_rule.go | 258 + .../model_timeseries_widget_definition.go | 3 - .../model_toplist_widget_definition.go | 3 - .../datadogV1/model_toplist_widget_style.go | 37 +- .../model_tree_map_widget_definition.go | 3 - .../api/datadogV1/model_usage_summary_date.go | 107 +- .../datadogV1/model_usage_summary_date_org.go | 107 +- .../datadogV1/model_usage_summary_response.go | 107 +- .../model_widget_legacy_live_span.go | 97 + .../datadogV1/model_widget_live_span_unit.go | 74 + .../datadogV1/model_widget_new_fixed_span.go | 175 + .../model_widget_new_fixed_span_type.go | 64 + .../datadogV1/model_widget_new_live_span.go | 179 + .../model_widget_new_live_span_type.go | 64 + .../v2/api/datadogV1/model_widget_time.go | 169 +- .../v2/api/datadogV2/api_metrics.go | 4 +- .../api_microsoft_teams_integration.go | 545 ++ .../api/datadogV2/api_restriction_policies.go | 6 +- .../v2/api/datadogV2/api_software_catalog.go | 394 ++ .../v2/api/datadogV2/doc.go | 10 + .../model_api_key_create_attributes.go | 74 +- .../model_api_key_response_included_item.go | 36 +- .../model_api_key_update_attributes.go | 74 +- ..._application_key_response_included_item.go | 38 +- .../model_auth_n_mapping_included.go | 2 +- .../model_ci_app_aggregate_bucket_value.go | 2 +- ...flare_account_update_request_attributes.go | 37 +- .../datadogV2/model_container_image_item.go | 4 +- .../v2/api/datadogV2/model_container_item.go | 4 +- ...odel_dora_deployment_request_attributes.go | 39 +- .../model_downtime_response_included_item.go | 4 +- .../model_downtime_schedule_create_request.go | 2 +- .../model_downtime_schedule_update_request.go | 4 +- .../api/datadogV2/model_entity_attributes.go | 347 + .../v2/api/datadogV2/model_entity_data.go | 257 + .../v2/api/datadogV2/model_entity_meta.go | 207 + .../datadogV2/model_entity_relationships.go | 263 + ...model_entity_response_included_incident.go | 181 + .../model_entity_response_included_oncall.go | 181 + ...del_entity_response_included_raw_schema.go | 181 + ...response_included_raw_schema_attributes.go | 102 + ...entity_response_included_related_entity.go | 219 + ...onse_included_related_entity_attributes.go | 207 + ...y_response_included_related_entity_meta.go | 217 + ...se_included_related_incident_attributes.go | 248 + ...onse_included_related_oncall_attributes.go | 137 + ...included_related_oncall_escalation_item.go | 172 + .../model_entity_response_included_schema.go | 181 + ...ity_response_included_schema_attributes.go | 102 + .../datadogV2/model_entity_response_meta.go | 137 + .../datadogV2/model_entity_to_incidents.go | 102 + .../api/datadogV2/model_entity_to_oncalls.go | 102 + .../datadogV2/model_entity_to_raw_schema.go | 111 + .../model_entity_to_related_entities.go | 102 + .../api/datadogV2/model_entity_to_schema.go | 111 + .../v2/api/datadogV2/model_entity_v3.go | 169 + .../datadogV2/model_entity_v3_api_version.go | 64 + ...el_entity_v3_datadog_code_location_item.go | 122 + .../model_entity_v3_datadog_event_item.go | 122 + ..._entity_v3_datadog_integration_opsgenie.go | 121 + ...entity_v3_datadog_integration_pagerduty.go | 86 + .../model_entity_v3_datadog_log_item.go | 122 + .../model_entity_v3_datadog_performance.go | 87 + .../model_entity_v3_datadog_pipelines.go | 87 + .../datadogV2/model_entity_v3_datastore.go | 316 + .../model_entity_v3_datastore_datadog.go | 166 + .../model_entity_v3_datastore_kind.go | 64 + .../model_entity_v3_datastore_spec.go | 157 + .../datadogV2/model_entity_v3_integrations.go | 134 + .../api/datadogV2/model_entity_v3_metadata.go | 480 ++ ...ity_v3_metadata_additional_owners_items.go | 136 + ...model_entity_v3_metadata_contacts_items.go | 153 + .../model_entity_v3_metadata_links_items.go | 187 + .../model_entity_v3_metadata_owner.go | 87 + .../v2/api/datadogV2/model_entity_v3_queue.go | 316 + .../model_entity_v3_queue_datadog.go | 166 + .../datadogV2/model_entity_v3_queue_kind.go | 64 + .../datadogV2/model_entity_v3_queue_spec.go | 157 + .../api/datadogV2/model_entity_v3_service.go | 316 + .../model_entity_v3_service_datadog.go | 239 + .../datadogV2/model_entity_v3_service_kind.go | 64 + .../datadogV2/model_entity_v3_service_spec.go | 227 + .../api/datadogV2/model_entity_v3_system.go | 316 + .../model_entity_v3_system_datadog.go | 204 + .../datadogV2/model_entity_v3_system_kind.go | 64 + .../datadogV2/model_entity_v3_system_spec.go | 157 + ...astly_account_update_request_attributes.go | 37 +- .../model_fastly_services_response.go | 14 +- .../model_full_api_key_attributes.go | 52 +- ...dent_attachments_response_included_item.go | 2 +- .../model_incident_field_attributes.go | 4 +- ...gration_metadata_response_included_item.go | 2 +- .../model_incident_notification_handle.go | 2 +- .../model_incident_response_included_item.go | 2 +- .../model_incident_service_included_items.go | 2 +- .../model_incident_team_included_items.go | 2 +- ...el_incident_todo_response_included_item.go | 2 +- .../v2/api/datadogV2/model_include_type.go | 72 + .../v2/api/datadogV2/model_leaked_key.go | 180 + .../datadogV2/model_leaked_key_attributes.go | 141 + .../v2/api/datadogV2/model_leaked_key_type.go | 64 + .../model_list_entity_catalog_response.go | 219 + ...t_entity_catalog_response_included_item.go | 201 + ...odel_list_entity_catalog_response_links.go | 172 + .../model_logs_aggregate_bucket_value.go | 2 +- .../model_metric_asset_attributes.go | 39 +- .../datadogV2/model_metric_dashboard_asset.go | 2 +- .../model_metric_dashboard_attributes.go | 39 +- .../datadogV2/model_metric_monitor_asset.go | 2 +- .../datadogV2/model_metric_notebook_asset.go | 2 +- .../api/datadogV2/model_metric_slo_asset.go | 2 +- ...del_metric_tag_configuration_attributes.go | 2 +- ...ric_tag_configuration_create_attributes.go | 2 +- ..._tag_configuration_metric_type_category.go | 66 + ...ric_tag_configuration_update_attributes.go | 2 +- .../v2/api/datadogV2/model_metric_volumes.go | 4 +- ...l_metrics_and_metric_tag_configurations.go | 4 +- ...l_microsoft_teams_api_handle_attributes.go | 207 + ...icrosoft_teams_api_handle_info_response.go | 111 + ...ams_api_handle_info_response_attributes.go | 312 + ...oft_teams_api_handle_info_response_data.go | 189 + ...el_microsoft_teams_api_handle_info_type.go | 64 + ...oft_teams_api_handle_request_attributes.go | 197 + ...microsoft_teams_api_handle_request_data.go | 148 + ...icrosoft_teams_api_handle_response_data.go | 189 + .../model_microsoft_teams_api_handle_type.go | 64 + ...el_microsoft_teams_api_handles_response.go | 101 + ..._teams_channel_info_response_attributes.go | 172 + ...rosoft_teams_channel_info_response_data.go | 189 + ...model_microsoft_teams_channel_info_type.go | 64 + ...crosoft_teams_create_api_handle_request.go | 110 + ...rosoft_teams_create_api_handle_response.go | 110 + ...soft_teams_get_channel_by_name_response.go | 111 + ...crosoft_teams_update_api_handle_request.go | 110 + ...ft_teams_update_api_handle_request_data.go | 148 + .../model_monitor_config_policy_policy.go | 2 +- .../model_powerpack_template_variable.go | 98 +- .../v2/api/datadogV2/model_relation_type.go | 82 + .../api/datadogV2/model_relationship_item.go | 137 + .../model_rum_aggregate_bucket_value.go | 2 +- .../v2/api/datadogV2/model_scalar_column.go | 4 +- ...del_security_monitoring_reference_table.go | 242 + .../model_security_monitoring_rule_query.go | 2 +- ...model_security_monitoring_rule_response.go | 4 +- ...security_monitoring_rule_update_payload.go | 37 +- ...monitoring_standard_rule_create_payload.go | 37 +- ...curity_monitoring_standard_rule_payload.go | 37 +- ...urity_monitoring_standard_rule_response.go | 37 +- ...y_monitoring_standard_rule_test_payload.go | 37 +- ...urity_monitoring_suppression_attributes.go | 37 +- ...e_data_scanner_get_config_included_item.go | 4 +- .../model_spans_aggregate_bucket_value.go | 2 +- .../v2/api/datadogV2/model_team_included.go | 2 +- .../datadogV2/model_team_update_attributes.go | 37 +- .../model_upsert_catalog_entity_request.go | 105 + .../model_upsert_catalog_entity_response.go | 181 + ...t_catalog_entity_response_included_item.go | 73 + .../api/datadogV2/model_user_team_included.go | 2 +- .../DataDog/datadog-api-client-go/v2/doc.go | 2 +- .../v2/repository.datadog.yaml | 6 + .../datadog-api-client-go/v2/run-tests.sh | 4 +- .../datadog-api-client-go/v2/version.go | 2 +- .../go-sqllexer/obfuscate_and_normalize.go | 2 +- .../DataDog/go-sqllexer/obfuscator.go | 23 +- .../DataDog/go-sqllexer/sqllexer.go | 4 + .../DataDog/go-sqllexer/sqllexer_utils.go | 22 + .../pkg/otlp/metrics/metrics_remapping.go | 9 - .../detectors/gcp/app_engine.go | 4 +- .../detectors/gcp/detector.go | 27 +- .../detectors/gcp/faas.go | 5 +- .../detectors/gcp/gce.go | 58 +- .../detectors/gcp/gke.go | 7 +- vendor/github.com/antchfx/xmlquery/.gitignore | 32 + vendor/github.com/antchfx/xmlquery/LICENSE | 17 + vendor/github.com/antchfx/xmlquery/README.md | 302 + vendor/github.com/antchfx/xmlquery/cache.go | 43 + .../antchfx/xmlquery/cached_reader.go | 69 + vendor/github.com/antchfx/xmlquery/node.go | 341 + vendor/github.com/antchfx/xmlquery/options.go | 33 + vendor/github.com/antchfx/xmlquery/parse.go | 414 ++ vendor/github.com/antchfx/xmlquery/query.go | 304 + vendor/github.com/antchfx/xpath/.gitignore | 32 + vendor/github.com/antchfx/xpath/LICENSE | 17 + vendor/github.com/antchfx/xpath/README.md | 167 + vendor/github.com/antchfx/xpath/build.go | 718 ++ vendor/github.com/antchfx/xpath/cache.go | 80 + vendor/github.com/antchfx/xpath/func.go | 679 ++ vendor/github.com/antchfx/xpath/func_go110.go | 16 + .../antchfx/xpath/func_pre_go110.go | 22 + vendor/github.com/antchfx/xpath/operator.go | 288 + vendor/github.com/antchfx/xpath/parse.go | 1256 ++++ vendor/github.com/antchfx/xpath/query.go | 1437 ++++ vendor/github.com/antchfx/xpath/xpath.go | 176 + .../thrift/lib/go/thrift/configuration.go | 76 +- .../apache/thrift/lib/go/thrift/exception.go | 24 +- .../thrift/lib/go/thrift/header_protocol.go | 5 + .../thrift/lib/go/thrift/header_transport.go | 80 +- .../apache/thrift/lib/go/thrift/protocol.go | 6 +- .../lib/go/thrift/simple_json_protocol.go | 47 +- .../thrift/lib/go/thrift/ssl_server_socket.go | 3 + .../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +- .../aws/middleware/private/metrics/metrics.go | 320 - .../aws/middleware/user_agent.go | 11 +- .../aws/protocol/eventstream/CHANGELOG.md | 8 + .../eventstream/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/aws/retry/middleware.go | 8 - .../aws-sdk-go-v2/aws/signer/v4/middleware.go | 3 +- .../aws/aws-sdk-go-v2/config/CHANGELOG.md | 53 + .../config/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/config/load_options.go | 33 + .../aws-sdk-go-v2/credentials/CHANGELOG.md | 49 + .../credentials/go_module_metadata.go | 2 +- .../feature/ec2/imds/CHANGELOG.md | 29 + .../feature/ec2/imds/go_module_metadata.go | 2 +- .../internal/configsources/CHANGELOG.md | 29 + .../configsources/go_module_metadata.go | 2 +- .../internal/endpoints/v2/CHANGELOG.md | 29 + .../endpoints/v2/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/internal/v4a/CHANGELOG.md | 29 + .../internal/v4a/go_module_metadata.go | 2 +- .../internal/accept-encoding/CHANGELOG.md | 8 + .../accept-encoding/go_module_metadata.go | 2 +- .../service/internal/checksum/CHANGELOG.md | 30 + .../internal/checksum/go_module_metadata.go | 2 +- .../internal/presigned-url/CHANGELOG.md | 30 + .../presigned-url/go_module_metadata.go | 2 +- .../service/internal/s3shared/CHANGELOG.md | 30 + .../internal/s3shared/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/service/s3/CHANGELOG.md | 89 + .../aws-sdk-go-v2/service/s3/api_client.go | 313 +- .../service/s3/api_op_AbortMultipartUpload.go | 51 +- .../s3/api_op_CompleteMultipartUpload.go | 122 +- .../service/s3/api_op_CopyObject.go | 179 +- .../service/s3/api_op_CreateBucket.go | 41 +- ..._CreateBucketMetadataTableConfiguration.go | 286 + .../s3/api_op_CreateMultipartUpload.go | 193 +- .../service/s3/api_op_CreateSession.go | 216 +- .../service/s3/api_op_DeleteBucket.go | 37 +- ...i_op_DeleteBucketAnalyticsConfiguration.go | 17 +- .../service/s3/api_op_DeleteBucketCors.go | 17 +- .../s3/api_op_DeleteBucketEncryption.go | 69 +- ...teBucketIntelligentTieringConfiguration.go | 17 +- ...i_op_DeleteBucketInventoryConfiguration.go | 17 +- .../s3/api_op_DeleteBucketLifecycle.go | 61 +- ..._DeleteBucketMetadataTableConfiguration.go | 234 + ...api_op_DeleteBucketMetricsConfiguration.go | 17 +- .../api_op_DeleteBucketOwnershipControls.go | 17 +- .../service/s3/api_op_DeleteBucketPolicy.go | 37 +- .../s3/api_op_DeleteBucketReplication.go | 17 +- .../service/s3/api_op_DeleteBucketTagging.go | 17 +- .../service/s3/api_op_DeleteBucketWebsite.go | 17 +- .../service/s3/api_op_DeleteObject.go | 71 +- .../service/s3/api_op_DeleteObjectTagging.go | 17 +- .../service/s3/api_op_DeleteObjects.go | 38 +- .../s3/api_op_DeletePublicAccessBlock.go | 17 +- ...api_op_GetBucketAccelerateConfiguration.go | 17 +- .../service/s3/api_op_GetBucketAcl.go | 17 +- .../api_op_GetBucketAnalyticsConfiguration.go | 17 +- .../service/s3/api_op_GetBucketCors.go | 17 +- .../service/s3/api_op_GetBucketEncryption.go | 66 +- ...etBucketIntelligentTieringConfiguration.go | 17 +- .../api_op_GetBucketInventoryConfiguration.go | 17 +- .../api_op_GetBucketLifecycleConfiguration.go | 99 +- .../service/s3/api_op_GetBucketLocation.go | 17 +- .../service/s3/api_op_GetBucketLogging.go | 17 +- ..._op_GetBucketMetadataTableConfiguration.go | 239 + .../api_op_GetBucketMetricsConfiguration.go | 17 +- ...i_op_GetBucketNotificationConfiguration.go | 17 +- .../s3/api_op_GetBucketOwnershipControls.go | 17 +- .../service/s3/api_op_GetBucketPolicy.go | 37 +- .../s3/api_op_GetBucketPolicyStatus.go | 17 +- .../service/s3/api_op_GetBucketReplication.go | 17 +- .../s3/api_op_GetBucketRequestPayment.go | 17 +- .../service/s3/api_op_GetBucketTagging.go | 17 +- .../service/s3/api_op_GetBucketVersioning.go | 17 +- .../service/s3/api_op_GetBucketWebsite.go | 17 +- .../service/s3/api_op_GetObject.go | 75 +- .../service/s3/api_op_GetObjectAcl.go | 17 +- .../service/s3/api_op_GetObjectAttributes.go | 72 +- .../service/s3/api_op_GetObjectLegalHold.go | 17 +- .../s3/api_op_GetObjectLockConfiguration.go | 17 +- .../service/s3/api_op_GetObjectRetention.go | 17 +- .../service/s3/api_op_GetObjectTagging.go | 17 +- .../service/s3/api_op_GetObjectTorrent.go | 17 +- .../service/s3/api_op_GetPublicAccessBlock.go | 17 +- .../service/s3/api_op_HeadBucket.go | 42 +- .../service/s3/api_op_HeadObject.go | 86 +- ...pi_op_ListBucketAnalyticsConfigurations.go | 17 +- ...tBucketIntelligentTieringConfigurations.go | 17 +- ...pi_op_ListBucketInventoryConfigurations.go | 17 +- .../api_op_ListBucketMetricsConfigurations.go | 17 +- .../service/s3/api_op_ListBuckets.go | 56 +- .../service/s3/api_op_ListDirectoryBuckets.go | 28 +- .../service/s3/api_op_ListMultipartUploads.go | 40 +- .../service/s3/api_op_ListObjectVersions.go | 17 +- .../service/s3/api_op_ListObjects.go | 28 +- .../service/s3/api_op_ListObjectsV2.go | 44 +- .../service/s3/api_op_ListParts.go | 38 +- ...api_op_PutBucketAccelerateConfiguration.go | 17 +- .../service/s3/api_op_PutBucketAcl.go | 17 +- .../api_op_PutBucketAnalyticsConfiguration.go | 17 +- .../service/s3/api_op_PutBucketCors.go | 17 +- .../service/s3/api_op_PutBucketEncryption.go | 145 +- ...utBucketIntelligentTieringConfiguration.go | 17 +- .../api_op_PutBucketInventoryConfiguration.go | 17 +- .../api_op_PutBucketLifecycleConfiguration.go | 135 +- .../service/s3/api_op_PutBucketLogging.go | 17 +- .../api_op_PutBucketMetricsConfiguration.go | 17 +- ...i_op_PutBucketNotificationConfiguration.go | 17 +- .../s3/api_op_PutBucketOwnershipControls.go | 17 +- .../service/s3/api_op_PutBucketPolicy.go | 37 +- .../service/s3/api_op_PutBucketReplication.go | 17 +- .../s3/api_op_PutBucketRequestPayment.go | 17 +- .../service/s3/api_op_PutBucketTagging.go | 17 +- .../service/s3/api_op_PutBucketVersioning.go | 23 +- .../service/s3/api_op_PutBucketWebsite.go | 17 +- .../service/s3/api_op_PutObject.go | 257 +- .../service/s3/api_op_PutObjectAcl.go | 17 +- .../service/s3/api_op_PutObjectLegalHold.go | 17 +- .../s3/api_op_PutObjectLockConfiguration.go | 17 +- .../service/s3/api_op_PutObjectRetention.go | 17 +- .../service/s3/api_op_PutObjectTagging.go | 17 +- .../service/s3/api_op_PutPublicAccessBlock.go | 17 +- .../service/s3/api_op_RestoreObject.go | 22 +- .../service/s3/api_op_SelectObjectContent.go | 28 +- .../service/s3/api_op_UploadPart.go | 71 +- .../service/s3/api_op_UploadPartCopy.go | 87 +- .../s3/api_op_WriteGetObjectResponse.go | 21 +- .../aws/aws-sdk-go-v2/service/s3/auth.go | 35 +- .../aws-sdk-go-v2/service/s3/deserializers.go | 1477 ++++- .../aws/aws-sdk-go-v2/service/s3/endpoints.go | 594 +- .../aws-sdk-go-v2/service/s3/generated.json | 3 + .../service/s3/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/service/s3/options.go | 8 + .../aws-sdk-go-v2/service/s3/presign_post.go | 18 +- .../aws-sdk-go-v2/service/s3/serializers.go | 1612 ++++- .../aws-sdk-go-v2/service/s3/types/enums.go | 24 + .../aws-sdk-go-v2/service/s3/types/errors.go | 121 + .../aws-sdk-go-v2/service/s3/types/types.go | 568 +- .../aws-sdk-go-v2/service/s3/uri_context.go | 23 + .../aws-sdk-go-v2/service/s3/validators.go | 197 +- .../service/servicediscovery/CHANGELOG.md | 55 + .../service/servicediscovery/api_client.go | 313 +- .../api_op_CreateHttpNamespace.go | 15 + .../api_op_CreatePrivateDnsNamespace.go | 15 + .../api_op_CreatePublicDnsNamespace.go | 15 + .../servicediscovery/api_op_CreateService.go | 15 + .../api_op_DeleteNamespace.go | 15 + .../servicediscovery/api_op_DeleteService.go | 15 + .../api_op_DeregisterInstance.go | 15 + .../api_op_DiscoverInstances.go | 15 + .../api_op_DiscoverInstancesRevision.go | 15 + .../servicediscovery/api_op_GetInstance.go | 15 + .../api_op_GetInstancesHealthStatus.go | 15 + .../servicediscovery/api_op_GetNamespace.go | 15 + .../servicediscovery/api_op_GetOperation.go | 15 + .../servicediscovery/api_op_GetService.go | 15 + .../servicediscovery/api_op_ListInstances.go | 15 + .../servicediscovery/api_op_ListNamespaces.go | 15 + .../servicediscovery/api_op_ListOperations.go | 15 + .../servicediscovery/api_op_ListServices.go | 15 + .../api_op_ListTagsForResource.go | 15 + .../api_op_RegisterInstance.go | 15 + .../servicediscovery/api_op_TagResource.go | 15 + .../servicediscovery/api_op_UntagResource.go | 15 + .../api_op_UpdateHttpNamespace.go | 15 + ...api_op_UpdateInstanceCustomHealthStatus.go | 15 + .../api_op_UpdatePrivateDnsNamespace.go | 15 + .../api_op_UpdatePublicDnsNamespace.go | 15 + .../servicediscovery/api_op_UpdateService.go | 15 + .../service/servicediscovery/auth.go | 35 +- .../service/servicediscovery/deserializers.go | 137 +- .../service/servicediscovery/endpoints.go | 12 +- .../servicediscovery/go_module_metadata.go | 2 +- .../service/servicediscovery/options.go | 8 + .../service/servicediscovery/serializers.go | 163 + .../aws-sdk-go-v2/service/sso/CHANGELOG.md | 46 + .../aws-sdk-go-v2/service/sso/api_client.go | 8 +- .../service/sso/deserializers.go | 8 +- .../service/sso/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/sso/serializers.go | 8 +- .../service/ssooidc/CHANGELOG.md | 42 + .../service/ssooidc/api_client.go | 8 +- .../service/ssooidc/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/sts/CHANGELOG.md | 46 + .../aws-sdk-go-v2/service/sts/api_client.go | 8 +- .../service/sts/api_op_AssumeRole.go | 50 +- .../service/sts/api_op_AssumeRoleWithSAML.go | 12 +- .../sts/api_op_AssumeRoleWithWebIdentity.go | 48 +- .../service/sts/api_op_AssumeRoot.go | 221 + .../service/sts/api_op_GetFederationToken.go | 4 +- .../service/sts/api_op_GetSessionToken.go | 4 +- .../service/sts/deserializers.go | 170 + .../aws-sdk-go-v2/service/sts/generated.json | 1 + .../service/sts/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/sts/serializers.go | 94 + .../aws-sdk-go-v2/service/sts/types/errors.go | 8 +- .../aws-sdk-go-v2/service/sts/validators.go | 42 + vendor/github.com/aws/smithy-go/CHANGELOG.md | 24 + .../encoding/httpbinding/path_replace.go | 30 +- .../aws/smithy-go/go_module_metadata.go | 2 +- .../aws/smithy-go/transport/http/client.go | 27 +- .../aws/smithy-go/transport/http/metrics.go | 184 + .../bmatcuk/doublestar/v4/README.md | 29 + .../github.com/bmatcuk/doublestar/v4/match.go | 22 + .../github.com/bmatcuk/doublestar/v4/utils.go | 10 + vendor/github.com/docker/docker/api/common.go | 2 +- .../github.com/docker/docker/api/swagger.yaml | 193 +- .../docker/api/types/container/hostconfig.go | 5 +- .../docker/docker/api/types/filters/parse.go | 2 +- .../docker/docker/api/types/image/manifest.go | 99 + .../docker/docker/api/types/image/opts.go | 3 + .../docker/docker/api/types/image/summary.go | 15 +- .../docker/api/types/registry/authconfig.go | 14 +- .../docker/docker/api/types/swarm/swarm.go | 2 +- .../docker/api/types/volume/cluster_volume.go | 2 +- .../docker/docker/client/image_list.go | 8 + .../github.com/ebitengine/purego/.gitignore | 1 + vendor/github.com/ebitengine/purego/LICENSE | 201 + vendor/github.com/ebitengine/purego/README.md | 97 + .../github.com/ebitengine/purego/abi_amd64.h | 99 + .../github.com/ebitengine/purego/abi_arm64.h | 39 + vendor/github.com/ebitengine/purego/cgo.go | 19 + .../github.com/ebitengine/purego/dlerror.go | 17 + vendor/github.com/ebitengine/purego/dlfcn.go | 99 + .../ebitengine/purego/dlfcn_android.go | 34 + .../ebitengine/purego/dlfcn_darwin.go | 24 + .../ebitengine/purego/dlfcn_freebsd.go | 14 + .../ebitengine/purego/dlfcn_linux.go | 16 + .../ebitengine/purego/dlfcn_nocgo_freebsd.go | 11 + .../ebitengine/purego/dlfcn_nocgo_linux.go | 19 + .../ebitengine/purego/dlfcn_playground.go | 24 + .../ebitengine/purego/dlfcn_stubs.s | 26 + vendor/github.com/ebitengine/purego/func.go | 436 ++ .../ebitengine/purego/go_runtime.go | 13 + .../purego/internal/cgo/dlfcn_cgo_unix.go | 56 + .../ebitengine/purego/internal/cgo/empty.go | 6 + .../purego/internal/cgo/syscall_cgo_unix.go | 55 + .../purego/internal/fakecgo/abi_amd64.h | 99 + .../purego/internal/fakecgo/abi_arm64.h | 39 + .../purego/internal/fakecgo/asm_amd64.s | 39 + .../purego/internal/fakecgo/asm_arm64.s | 36 + .../purego/internal/fakecgo/callbacks.go | 93 + .../ebitengine/purego/internal/fakecgo/doc.go | 32 + .../purego/internal/fakecgo/freebsd.go | 27 + .../internal/fakecgo/go_darwin_amd64.go | 73 + .../internal/fakecgo/go_darwin_arm64.go | 88 + .../internal/fakecgo/go_freebsd_amd64.go | 95 + .../internal/fakecgo/go_freebsd_arm64.go | 98 + .../purego/internal/fakecgo/go_libinit.go | 66 + .../purego/internal/fakecgo/go_linux_amd64.go | 95 + .../purego/internal/fakecgo/go_linux_arm64.go | 98 + .../purego/internal/fakecgo/go_setenv.go | 18 + .../purego/internal/fakecgo/go_util.go | 37 + .../purego/internal/fakecgo/iscgo.go | 19 + .../purego/internal/fakecgo/libcgo.go | 35 + .../purego/internal/fakecgo/libcgo_darwin.go | 22 + .../purego/internal/fakecgo/libcgo_freebsd.go | 16 + .../purego/internal/fakecgo/libcgo_linux.go | 16 + .../purego/internal/fakecgo/setenv.go | 19 + .../purego/internal/fakecgo/symbols.go | 181 + .../purego/internal/fakecgo/symbols_darwin.go | 29 + .../internal/fakecgo/symbols_freebsd.go | 29 + .../purego/internal/fakecgo/symbols_linux.go | 29 + .../internal/fakecgo/trampolines_amd64.s | 104 + .../internal/fakecgo/trampolines_arm64.s | 72 + .../internal/fakecgo/trampolines_stubs.s | 90 + .../purego/internal/strings/strings.go | 40 + vendor/github.com/ebitengine/purego/is_ios.go | 13 + vendor/github.com/ebitengine/purego/nocgo.go | 25 + .../ebitengine/purego/struct_amd64.go | 260 + .../ebitengine/purego/struct_arm64.go | 274 + .../ebitengine/purego/struct_other.go | 16 + .../github.com/ebitengine/purego/sys_amd64.s | 164 + .../github.com/ebitengine/purego/sys_arm64.s | 92 + .../ebitengine/purego/sys_unix_arm64.s | 70 + .../github.com/ebitengine/purego/syscall.go | 53 + .../ebitengine/purego/syscall_cgo_linux.go | 21 + .../ebitengine/purego/syscall_sysv.go | 223 + .../ebitengine/purego/syscall_windows.go | 46 + .../ebitengine/purego/zcallback_amd64.s | 2014 ++++++ .../ebitengine/purego/zcallback_arm64.s | 4014 +++++++++++ .../envoy/annotations/deprecation.pb.go | 2 +- .../envoy/annotations/resource.pb.go | 2 +- .../envoy/config/core/v3/address.pb.go | 2 +- .../envoy/config/core/v3/backoff.pb.go | 2 +- .../envoy/config/core/v3/base.pb.go | 2 +- .../envoy/config/core/v3/config_source.pb.go | 2 +- .../config/core/v3/event_service_config.pb.go | 2 +- .../envoy/config/core/v3/extension.pb.go | 2 +- .../config/core/v3/grpc_method_list.pb.go | 2 +- .../envoy/config/core/v3/grpc_service.pb.go | 494 +- .../core/v3/grpc_service.pb.validate.go | 2 + .../config/core/v3/grpc_service_vtproto.pb.go | 13 + .../envoy/config/core/v3/health_check.pb.go | 2 +- .../envoy/config/core/v3/http_service.pb.go | 2 +- .../envoy/config/core/v3/http_uri.pb.go | 2 +- .../envoy/config/core/v3/protocol.pb.go | 9 +- .../envoy/config/core/v3/proxy_protocol.pb.go | 2 +- .../envoy/config/core/v3/resolver.pb.go | 2 +- .../envoy/config/core/v3/socket_option.pb.go | 285 +- .../core/v3/socket_option.pb.validate.go | 397 ++ .../core/v3/socket_option_vtproto.pb.go | 171 + .../core/v3/substitution_format_string.pb.go | 2 +- .../config/core/v3/udp_socket_config.pb.go | 2 +- .../envoy/service/discovery/v3/ads.pb.go | 2 +- .../envoy/service/discovery/v3/ads_grpc.pb.go | 2 +- .../service/discovery/v3/discovery.pb.go | 2 +- .../envoy/type/matcher/v3/filter_state.pb.go | 2 +- .../envoy/type/matcher/v3/http_inputs.pb.go | 2 +- .../envoy/type/matcher/v3/metadata.pb.go | 2 +- .../envoy/type/matcher/v3/node.pb.go | 2 +- .../envoy/type/matcher/v3/number.pb.go | 2 +- .../envoy/type/matcher/v3/path.pb.go | 2 +- .../envoy/type/matcher/v3/regex.pb.go | 2 +- .../type/matcher/v3/status_code_input.pb.go | 2 +- .../envoy/type/matcher/v3/string.pb.go | 2 +- .../envoy/type/matcher/v3/struct.pb.go | 2 +- .../envoy/type/matcher/v3/value.pb.go | 2 +- .../envoy/type/v3/hash_policy.pb.go | 2 +- .../go-control-plane/envoy/type/v3/http.pb.go | 2 +- .../envoy/type/v3/http_status.pb.go | 2 +- .../envoy/type/v3/percent.pb.go | 2 +- .../envoy/type/v3/range.pb.go | 2 +- .../envoy/type/v3/ratelimit_strategy.pb.go | 2 +- .../envoy/type/v3/ratelimit_unit.pb.go | 2 +- .../envoy/type/v3/semantic_version.pb.go | 2 +- .../envoy/type/v3/token_bucket.pb.go | 2 +- .../validate/validate.pb.go | 10 +- .../github.com/fsnotify/fsnotify/.cirrus.yml | 7 +- .../fsnotify/fsnotify/.editorconfig | 12 - .../fsnotify/fsnotify/.gitattributes | 1 - .../github.com/fsnotify/fsnotify/.gitignore | 3 + .../github.com/fsnotify/fsnotify/CHANGELOG.md | 34 +- .../fsnotify/fsnotify/CONTRIBUTING.md | 120 +- .../fsnotify/fsnotify/backend_fen.go | 324 +- .../fsnotify/fsnotify/backend_inotify.go | 594 +- .../fsnotify/fsnotify/backend_kqueue.go | 747 +-- .../fsnotify/fsnotify/backend_other.go | 204 +- .../fsnotify/fsnotify/backend_windows.go | 305 +- .../github.com/fsnotify/fsnotify/fsnotify.go | 368 +- .../fsnotify/fsnotify/internal/darwin.go | 39 + .../fsnotify/internal/debug_darwin.go | 57 + .../fsnotify/internal/debug_dragonfly.go | 33 + .../fsnotify/internal/debug_freebsd.go | 42 + .../fsnotify/internal/debug_kqueue.go | 32 + .../fsnotify/fsnotify/internal/debug_linux.go | 56 + .../fsnotify/internal/debug_netbsd.go | 25 + .../fsnotify/internal/debug_openbsd.go | 28 + .../fsnotify/internal/debug_solaris.go | 45 + .../fsnotify/internal/debug_windows.go | 40 + .../fsnotify/fsnotify/internal/freebsd.go | 31 + .../fsnotify/fsnotify/internal/internal.go | 2 + .../fsnotify/fsnotify/internal/unix.go | 31 + .../fsnotify/fsnotify/internal/unix2.go | 7 + .../fsnotify/fsnotify/internal/windows.go | 41 + vendor/github.com/fsnotify/fsnotify/mkdoc.zsh | 259 - .../fsnotify/fsnotify/system_bsd.go | 1 - .../fsnotify/fsnotify/system_darwin.go | 1 - .../go-viper/mapstructure/v2/decode_hooks.go | 21 + .../go-viper/mapstructure/v2/mapstructure.go | 69 +- .../grpc-gateway/v2/runtime/convert.go | 6 +- .../grpc-gateway/v2/runtime/errors.go | 15 + .../grpc-gateway/v2/runtime/fieldmask.go | 2 +- .../v2/runtime/marshaler_registry.go | 4 +- .../grpc-gateway/v2/runtime/proto2_convert.go | 4 +- .../grpc-gateway/v2/utilities/pattern.go | 2 +- .../v2/utilities/string_array_flag.go | 2 +- vendor/github.com/hashicorp/consul/api/acl.go | 13 +- .../consul/api/config_entry_intentions.go | 16 +- .../hashicorp/consul/api/config_entry_mesh.go | 41 + .../cmd/agent/app/configmanager/manager.go | 13 +- .../cmd/agent/app/configmanager/metrics.go | 13 +- .../buffered_read_transport.go | 14 +- .../jaeger/cmd/agent/app/httpserver/srv.go | 13 +- .../cmd/agent/app/processors/processor.go | 13 +- .../agent/app/processors/thrift_processor.go | 13 +- .../jaeger/cmd/agent/app/servers/server.go | 13 +- .../cmd/agent/app/servers/tbuffered_server.go | 13 +- .../app/servers/thriftudp/socket_buffer.go | 13 +- .../thriftudp/socket_buffer_windows.go | 13 +- .../agent/app/servers/thriftudp/transport.go | 13 +- .../collector/app/sampling/model/sampling.go | 13 +- .../app/sampling/samplingstrategy/factory.go | 13 +- .../sampling/samplingstrategy/interface.go | 13 +- .../jaeger/model/converter/json/doc.go | 13 +- .../model/converter/json/from_domain.go | 13 +- .../model/converter/json/process_hashtable.go | 13 +- .../jaeger/model/converter/json/sampling.go | 13 +- .../model/converter/thrift/jaeger/doc.go | 13 +- .../converter/thrift/jaeger/from_domain.go | 16 +- .../thrift/jaeger/sampling_from_domain.go | 18 +- .../thrift/jaeger/sampling_to_domain.go | 13 +- .../converter/thrift/jaeger/to_domain.go | 39 +- .../converter/thrift/zipkin/deserialize.go | 13 +- .../model/converter/thrift/zipkin/doc.go | 13 +- .../thrift/zipkin/process_hashtable.go | 13 +- .../converter/thrift/zipkin/to_domain.go | 40 +- .../jaeger/model/dependencies.go | 13 +- .../jaegertracing/jaeger/model/doc.go | 13 +- .../jaegertracing/jaeger/model/hash.go | 13 +- .../jaegertracing/jaeger/model/ids.go | 13 +- .../jaegertracing/jaeger/model/json/doc.go | 13 +- .../jaegertracing/jaeger/model/json/model.go | 13 +- .../jaegertracing/jaeger/model/keyvalue.go | 14 +- .../jaegertracing/jaeger/model/process.go | 13 +- .../jaegertracing/jaeger/model/sort.go | 13 +- .../jaegertracing/jaeger/model/span.go | 13 +- .../jaegertracing/jaeger/model/spanref.go | 13 +- .../jaegertracing/jaeger/model/time.go | 17 +- .../jaegertracing/jaeger/model/trace.go | 13 +- .../jaegertracing/jaeger/pkg/cache/cache.go | 13 +- .../jaegertracing/jaeger/pkg/cache/lru.go | 13 +- .../pkg/clientcfg/clientcfghttp/cfgmgr.go | 13 +- .../pkg/clientcfg/clientcfghttp/handler.go | 13 +- .../jaeger/pkg/distributedlock/interface.go | 13 +- .../jaeger/pkg/metrics/counter.go | 13 +- .../jaeger/pkg/metrics/factory.go | 13 +- .../jaegertracing/jaeger/pkg/metrics/gauge.go | 13 +- .../jaeger/pkg/metrics/histogram.go | 13 +- .../jaeger/pkg/metrics/metrics.go | 13 +- .../jaeger/pkg/metrics/package.go | 13 +- .../jaeger/pkg/metrics/stopwatch.go | 13 +- .../jaegertracing/jaeger/pkg/metrics/timer.go | 13 +- .../es/spanstore/dbmodel/from_domain.go | 13 +- .../storage/es/spanstore/dbmodel/model.go | 13 +- .../storage/es/spanstore/dbmodel/to_domain.go | 13 +- .../storage/dependencystore/interface.go | 13 +- .../jaegertracing/jaeger/storage/doc.go | 13 +- .../jaegertracing/jaeger/storage/factory.go | 13 +- .../jaeger/storage/metricsstore/interface.go | 13 +- .../jaeger/storage/samplingstore/interface.go | 13 +- .../jaeger/storage/spanstore/composite.go | 13 +- .../storage/spanstore/downsampling_writer.go | 13 +- .../jaeger/storage/spanstore/interface.go | 13 +- .../klauspost/compress/.goreleaser.yml | 6 +- .../github.com/klauspost/compress/README.md | 7 + .../klauspost/compress/zstd/encoder.go | 26 +- .../klauspost/compress/zstd/zstd.go | 4 + vendor/github.com/knadh/koanf/v2/README.md | 17 +- vendor/github.com/knadh/koanf/v2/go.work.sum | 9 +- .../github.com/leodido/go-syslog/v4/README.md | 4 +- .../go-syslog/v4/octetcounting/parser.go | 4 +- .../go-syslog/v4/octetcounting/scanner.go | 36 +- .../confmap/provider/s3provider/README.md | 2 +- .../awscloudwatchlogsexporter/README.md | 2 +- .../awscloudwatchlogsexporter/config.go | 3 +- .../awscloudwatchlogsexporter/exporter.go | 5 +- .../awscloudwatchlogsexporter/factory.go | 3 +- .../awscloudwatchlogsexporter/metadata.yaml | 2 + .../exporter/awsemfexporter/README.md | 15 +- .../exporter/awsemfexporter/config.go | 14 +- .../exporter/awsemfexporter/datapoint.go | 1 - .../exporter/awsemfexporter/emf_exporter.go | 3 - .../exporter/awsemfexporter/factory.go | 2 +- .../exporter/awsemfexporter/grouped_metric.go | 9 +- .../exporter/awsemfexporter/metadata.yaml | 3 +- .../awsemfexporter/metric_translator.go | 62 +- .../exporter/awsemfexporter/util.go | 2 +- .../exporter/awsxrayexporter/README.md | 2 +- .../exporter/awsxrayexporter/awsxray.go | 2 +- .../internal/translator/aws.go | 4 +- .../internal/translator/cause.go | 21 +- .../internal/translator/http.go | 2 +- .../internal/translator/segment.go | 44 +- .../internal/translator/service.go | 2 +- .../internal/translator/span_links.go | 5 +- .../internal/translator/sql.go | 2 +- .../exporter/datadogexporter/README.md | 8 +- .../exporter/datadogexporter/config.go | 620 +- .../exporter/datadogexporter/factory.go | 99 +- .../exporter/datadogexporter/hostmetadata.go | 1 + .../internal/clientutil/api.go | 3 +- .../internal/clientutil/error_converter.go | 2 +- .../internal/hostmetadata/config.go | 4 + .../internal/hostmetadata/host.go | 1 - .../hostmetadata/internal/azure/provider.go | 6 +- .../internal/hostmetadata/internal/ec2/ec2.go | 10 +- .../hostmetadata/internal/gcp/provider.go | 6 +- .../hostmetadata/internal/k8s/nodename.go | 1 - .../internal/metadata/generated_status.go | 2 +- .../internal/metrics/consumer.go | 8 +- .../internal/metrics/consumer_deprecated.go | 8 +- .../exporter/datadogexporter/metadata.yaml | 5 +- .../datadogexporter/metrics_exporter.go | 62 +- .../datadogexporter/traces_exporter.go | 4 +- .../exporter/fileexporter/README.md | 9 +- .../exporter/fileexporter/buffered_writer.go | 4 +- .../exporter/fileexporter/config.go | 1 - .../exporter/fileexporter/factory.go | 13 +- .../exporter/fileexporter/file_writer.go | 1 - .../fileexporter/grouping_file_exporter.go | 2 +- .../exporter/fileexporter/marshaller.go | 2 + .../exporter/fileexporter/metadata.yaml | 2 +- .../exporter/kafkaexporter/README.md | 12 +- .../exporter/kafkaexporter/config.go | 6 +- .../exporter/kafkaexporter/factory.go | 34 +- .../kafkaexporter/jaeger_marshaler.go | 8 +- .../exporter/kafkaexporter/kafka_exporter.go | 163 +- .../exporter/kafkaexporter/marshaler.go | 72 +- .../exporter/kafkaexporter/pdata_marshaler.go | 5 +- .../exporter/kafkaexporter/raw_marshaler.go | 3 +- .../exporter/loadbalancingexporter/README.md | 110 +- .../exporter/loadbalancingexporter/config.go | 6 + .../consistent_hashing.go | 6 +- .../exporter/loadbalancingexporter/factory.go | 109 +- .../internal/metadata/generated_telemetry.go | 47 +- .../loadbalancingexporter/loadbalancer.go | 6 +- .../loadbalancingexporter/log_exporter.go | 4 +- .../loadbalancingexporter/metadata.yaml | 3 +- .../loadbalancingexporter/metrics_exporter.go | 7 +- .../resolver_aws_cloudmap.go | 2 +- .../loadbalancingexporter/resolver_k8s.go | 3 +- .../resolver_k8s_handler.go | 40 +- .../loadbalancingexporter/trace_exporter.go | 10 +- .../exporter/logzioexporter/README.md | 2 +- .../exporter/logzioexporter/config.go | 20 +- .../exporter/logzioexporter/exporter.go | 18 +- .../exporter/logzioexporter/factory.go | 20 +- .../exporter/prometheusexporter/README.md | 4 +- .../prometheusexporter/accumulator.go | 1 - .../exporter/prometheusexporter/collector.go | 104 +- .../exporter/prometheusexporter/factory.go | 2 +- .../exporter/prometheusexporter/metadata.yaml | 2 +- .../exporter/prometheusexporter/prometheus.go | 16 +- .../prometheusremotewriteexporter/DESIGN.md | 8 +- .../prometheusremotewriteexporter/README.md | 8 +- .../prometheusremotewriteexporter/config.go | 6 +- .../prometheusremotewriteexporter/exporter.go | 41 +- .../prometheusremotewriteexporter/factory.go | 30 +- .../internal/metadata/generated_telemetry.go | 38 +- .../metadata.yaml | 2 +- .../exporter/sapmexporter/README.md | 2 +- .../exporter/sapmexporter/config.go | 7 +- .../exporter/sapmexporter/exporter.go | 22 +- .../exporter/sapmexporter/factory.go | 4 +- .../exporter/sapmexporter/metadata.yaml | 5 - .../exporter/signalfxexporter/README.md | 2 +- .../exporter/signalfxexporter/config.go | 8 +- .../exporter/signalfxexporter/dpclient.go | 8 +- .../exporter/signalfxexporter/eventclient.go | 2 +- .../exporter/signalfxexporter/exporter.go | 5 +- .../exporter/signalfxexporter/factory.go | 30 +- .../internal/apm/correlations/client.go | 18 +- .../internal/apm/correlations/dedup.go | 9 +- .../signalfxexporter/internal/apm/log/log.go | 3 +- .../apm/requests/requestcounter/counter.go | 8 +- .../internal/apm/requests/sender.go | 14 +- .../internal/apm/tracetracker/tracker.go | 2 +- .../internal/correlation/config.go | 6 +- .../internal/correlation/correlation.go | 1 - .../internal/dimensions/dimclient.go | 37 +- .../internal/dimensions/metadata.go | 3 +- .../internal/dimensions/requests.go | 20 +- .../internal/hostmetadata/host.go | 12 +- .../internal/translation/converter.go | 3 +- .../internal/translation/default_metrics.go | 17 +- .../translation/dpfilters/datapoint.go | 1 - .../internal/translation/dpfilters/string.go | 1 - .../translation/logdata_to_signalfxv2.go | 2 + .../internal/translation/translator.go | 10 +- .../extension/awsproxy/README.md | 4 +- .../extension/awsproxy/config.go | 1 - .../extension/awsproxy/extension.go | 1 - .../extension/awsproxy/factory.go | 4 +- .../extension/healthcheckextension/README.md | 9 +- .../extension/healthcheckextension/factory.go | 4 +- .../healthcheckextension.go | 1 - .../healthcheckextension/metadata.yaml | 4 +- .../extension/observer/ecsobserver/README.md | 5 +- .../extension/observer/ecsobserver/config.go | 1 - .../extension/observer/ecsobserver/fetcher.go | 17 +- .../observer/ecsobserver/metadata.yaml | 3 +- .../extension/observer/ecsobserver/sd.go | 2 +- .../extension/observer/ecsobserver/target.go | 4 +- .../extension/pprofextension/README.md | 5 +- .../extension/pprofextension/config.go | 1 - .../extension/pprofextension/metadata.yaml | 2 +- .../extension/sigv4authextension/README.md | 2 +- .../sigv4authextension/metadata.yaml | 5 + .../extension/storage/filestorage/README.md | 10 +- .../extension/storage/filestorage/client.go | 8 +- .../extension/storage/filestorage/config.go | 33 +- .../storage/filestorage/extension.go | 22 +- .../extension/storage/filestorage/factory.go | 6 +- .../storage/filestorage/metadata.yaml | 2 +- .../internal/aws/awsutil/conn.go | 11 +- .../internal/aws/cwlogs/cwlog_client.go | 13 +- .../internal/aws/cwlogs/pusher.go | 20 +- .../internal/aws/ecsutil/metadata_provider.go | 4 +- .../internal/aws/k8s/k8sclient/job.go | 3 +- .../internal/aws/k8s/k8sclient/obj_store.go | 1 - .../internal/aws/k8s/k8sclient/replicaset.go | 3 +- .../internal/aws/metrics/metric_calculator.go | 3 +- .../internal/aws/proxy/cfg.go | 4 +- .../internal/aws/proxy/conn.go | 1 - .../internal/aws/xray/telemetry/nop_sender.go | 3 +- .../internal/aws/xray/xray_client.go | 8 +- .../internal/common/docker/images.go | 4 +- .../common/localhostgate/featuregate.go | 68 - .../internal/common/testutil/testutil.go | 153 + .../coreinternal/aggregateutil/aggregate.go | 27 +- .../coreinternal/attraction/attraction.go | 2 +- .../internal/coreinternal/parseutils/uri.go | 2 +- .../timeutils/internal/ctimefmt/ctimefmt.go | 8 +- .../internal/coreinternal/timeutils/parser.go | 53 +- .../internal/filter/filterlog/filterlog.go | 1 - .../filter/filtermatcher/attributematcher.go | 2 - .../internal/filter/filterottl/filter.go | 15 +- .../internal/filter/filterset/config.go | 4 +- .../internal/filter/filterspan/filterspan.go | 2 +- .../internal/k8sconfig/config.go | 1 - .../internal/kafka/authentication.go | 1 - .../internal/kafka/scram_client.go | 1 - .../internal/kubelet/client.go | 4 +- .../metadataproviders/azure/metadata.go | 2 +- .../metadataproviders/system/metadata.go | 3 +- .../internal/splunk/common.go | 4 +- .../internal/splunk/hostid.go | 2 +- .../batchperresourceattr.go | 12 +- .../pkg/datadog/LICENSE | 201 + .../pkg/datadog/config/config.go | 350 + .../datadog/config}/config_warnings.go | 2 +- .../pkg/datadog/config/host.go | 90 + .../pkg/datadog/config/logs.go | 31 + .../pkg/datadog/config/metrics.go | 243 + .../pkg/datadog/config/traces.go | 167 + .../experimentalmetricmetadata/metadata.yaml | 3 +- .../pkg/kafka/topic/LICENSE | 201 + .../pkg/kafka/topic/Makefile | 1 + .../pkg/kafka/topic/README.md | 4 + .../pkg/kafka/topic/kafka_ctx.go | 19 + .../pkg/kafka/topic/metadata.yaml | 6 + .../pkg/ottl/README.md | 14 +- .../pkg/ottl/boolean_value.go | 1 - .../pkg/ottl/context_inferrer.go | 77 + .../ottl/contexts/ottldatapoint/datapoint.go | 8 +- .../pkg/ottl/contexts/ottllog/log.go | 8 +- .../pkg/ottl/contexts/ottlmetric/metrics.go | 8 +- .../ottl/contexts/ottlresource/resource.go | 6 +- .../pkg/ottl/contexts/ottlscope/scope.go | 8 +- .../pkg/ottl/contexts/ottlspan/span.go | 8 +- .../contexts/ottlspanevent/span_events.go | 10 +- .../pkg/ottl/expression.go | 50 +- .../pkg/ottl/functions.go | 28 +- .../pkg/ottl/grammar.go | 258 +- .../pkg/ottl/ottlfuncs/README.md | 442 +- .../pkg/ottl/ottlfuncs/func_append.go | 1 + .../pkg/ottl/ottlfuncs/func_base64decode.go | 1 - ...func_convert_attributes_to_elements_xml.go | 69 + .../func_convert_text_to_elements_xml.go | 107 + .../pkg/ottl/ottlfuncs/func_duration.go | 1 + .../pkg/ottl/ottlfuncs/func_flatten.go | 8 +- .../pkg/ottl/ottlfuncs/func_fnv.go | 1 - .../pkg/ottl/ottlfuncs/func_get_xml.go | 62 + .../pkg/ottl/ottlfuncs/func_hour.go | 1 + .../pkg/ottl/ottlfuncs/func_hours.go | 1 + .../pkg/ottl/ottlfuncs/func_insert_xml.go | 75 + .../pkg/ottl/ottlfuncs/func_md5.go | 1 - .../pkg/ottl/ottlfuncs/func_microseconds.go | 1 + .../pkg/ottl/ottlfuncs/func_milliseconds.go | 1 + .../pkg/ottl/ottlfuncs/func_minutes.go | 1 + .../pkg/ottl/ottlfuncs/func_nanoseconds.go | 1 + .../pkg/ottl/ottlfuncs/func_parse_json.go | 4 +- .../ottlfuncs/func_parse_simplified_xml.go | 134 + .../pkg/ottl/ottlfuncs/func_remove_xml.go | 95 + .../ottlfuncs/func_replace_all_patterns.go | 2 +- .../pkg/ottl/ottlfuncs/func_seconds.go | 1 + .../pkg/ottl/ottlfuncs/func_sha1.go | 1 - .../pkg/ottl/ottlfuncs/func_sha256.go | 1 - .../pkg/ottl/ottlfuncs/func_sha512.go | 1 - .../pkg/ottl/ottlfuncs/func_slice_to_map.go | 105 + .../pkg/ottl/ottlfuncs/func_time.go | 28 +- .../ottlfuncs/func_to_key_value_string.go | 121 + .../pkg/ottl/ottlfuncs/func_truncate_time.go | 1 + .../pkg/ottl/ottlfuncs/func_unix.go | 1 + .../pkg/ottl/ottlfuncs/func_unix_micro.go | 1 + .../pkg/ottl/ottlfuncs/func_unix_milli.go | 1 + .../pkg/ottl/ottlfuncs/func_unix_nano.go | 1 + .../pkg/ottl/ottlfuncs/func_unix_seconds.go | 1 + .../pkg/ottl/ottlfuncs/functions.go | 8 + .../pkg/ottl/parser.go | 85 +- .../pkg/ottl/paths.go | 32 + .../pkg/sampling/common.go | 8 +- .../pkg/stanza/adapter/converter.go | 54 +- .../pkg/stanza/adapter/factory.go | 44 +- .../pkg/stanza/adapter/receiver.go | 98 +- .../pkg/stanza/adapter/storage.go | 1 - .../pkg/stanza/entry/body_field.go | 2 +- .../pkg/stanza/fileconsumer/attrs/attrs.go | 2 +- .../pkg/stanza/fileconsumer/config.go | 11 +- .../pkg/stanza/fileconsumer/emit/emit.go | 14 +- .../pkg/stanza/fileconsumer/file.go | 29 +- .../internal/checkpoint/checkpoint.go | 6 +- .../fileconsumer/internal/header/config.go | 1 - .../internal/metadata/generated_telemetry.go | 38 +- .../fileconsumer/internal/reader/factory.go | 12 +- .../fileconsumer/internal/reader/reader.go | 124 +- .../internal/reader/reader_other.go | 2 +- .../internal/reader/reader_unix.go | 8 +- .../fileconsumer/internal/tracker/tracker.go | 48 +- .../stanza/fileconsumer/matcher/matcher.go | 43 +- .../pkg/stanza/internal/time/time.go | 6 +- .../pkg/stanza/operator/helper/emitter.go | 51 +- .../pkg/stanza/operator/helper/parser.go | 6 +- .../pkg/stanza/operator/helper/transformer.go | 4 - .../pkg/stanza/operator/input/file/input.go | 9 +- .../pkg/stanza/operator/output/file/config.go | 2 +- .../pkg/stanza/operator/output/file/output.go | 4 +- .../operator/parser/container/config.go | 24 +- .../operator/parser/container/parser.go | 85 +- .../pkg/stanza/operator/parser/syslog/data.go | 2 +- .../stanza/operator/parser/syslog/parser.go | 2 - .../pkg/stanza/operator/persister.go | 2 + .../transformer/retain/transformer.go | 18 +- .../pkg/stanza/pipeline/directed.go | 6 +- .../translator/azure/resourcelogs_to_logs.go | 8 +- .../translator/azure/resources_to_traces.go | 6 +- .../pkg/translator/jaeger/constants.go | 6 +- .../jaeger/traces_to_jaegerproto.go | 8 +- .../pkg/translator/prometheus/metadata.yaml | 2 +- .../translator/prometheus/normalize_label.go | 1 - .../translator/prometheus/normalize_name.go | 3 - .../pkg/translator/prometheus/unit_to_ucum.go | 1 - .../prometheusremotewrite/helper.go | 24 +- .../prometheusremotewrite/histograms.go | 3 +- .../prometheusremotewrite/metrics_to_prw.go | 2 +- .../metrics_to_prw_v2.go | 132 + .../number_data_points.go | 6 +- .../number_data_points_v2.go | 47 + .../otlp_to_openmetrics_metadata.go | 2 +- .../pkg/translator/zipkin/zipkinv1/json.go | 1 - .../zipkin/zipkinv2/from_translator.go | 6 +- .../processor/attributesprocessor/README.md | 12 +- .../attributesprocessor/attributes_metric.go | 1 - .../processor/attributesprocessor/factory.go | 7 +- .../attributesprocessor/metadata.yaml | 4 +- .../cumulativetodeltaprocessor/README.md | 5 +- .../cumulativetodeltaprocessor/factory.go | 2 +- .../internal/tracking/identity.go | 8 +- .../cumulativetodeltaprocessor/metadata.yaml | 2 +- .../cumulativetodeltaprocessor/processor.go | 80 +- .../processor/deltatorateprocessor/README.md | 5 +- .../processor/deltatorateprocessor/config.go | 1 - .../processor/deltatorateprocessor/factory.go | 2 +- .../deltatorateprocessor/metadata.yaml | 2 +- .../deltatorateprocessor/processor.go | 29 +- .../processor/filterprocessor/README.md | 5 +- .../processor/filterprocessor/factory.go | 6 +- .../internal/metadata/generated_telemetry.go | 40 +- .../processor/filterprocessor/logs.go | 7 +- .../processor/filterprocessor/metadata.yaml | 2 +- .../processor/filterprocessor/metrics.go | 7 +- .../processor/filterprocessor/telemetry.go | 51 +- .../processor/filterprocessor/traces.go | 7 +- .../processor/groupbytraceprocessor/README.md | 5 +- .../processor/groupbytraceprocessor/config.go | 1 - .../groupbytraceprocessor/documentation.md | 2 +- .../processor/groupbytraceprocessor/event.go | 12 +- .../groupbytraceprocessor/factory.go | 5 +- .../internal/metadata/generated_telemetry.go | 55 +- .../groupbytraceprocessor/metadata.yaml | 3 +- .../groupbytraceprocessor/storage_memory.go | 1 + .../k8sattributesprocessor/README.md | 33 +- .../k8sattributesprocessor/config.go | 9 +- .../k8sattributesprocessor/documentation.md | 2 +- .../k8sattributesprocessor/factory.go | 66 +- .../internal/kube/client.go | 138 +- .../internal/kube/fake_informer.go | 7 +- .../internal/kube/informer.go | 2 - .../internal/kube/kube.go | 4 +- .../internal/metadata/generated_status.go | 7 +- .../internal/metadata/generated_telemetry.go | 62 +- .../k8sattributesprocessor/metadata.yaml | 9 +- .../k8sattributesprocessor/options.go | 17 + .../k8sattributesprocessor/processor.go | 48 +- .../metricsgenerationprocessor/README.md | 29 +- .../metricsgenerationprocessor/config.go | 1 - .../metricsgenerationprocessor/factory.go | 2 +- .../internal/metadata/generated_status.go | 2 +- .../metricsgenerationprocessor/metadata.yaml | 2 +- .../metricsgenerationprocessor/processor.go | 41 +- .../metricsgenerationprocessor/utils.go | 231 +- .../metricstransformprocessor/README.md | 5 +- .../metricstransformprocessor/config.go | 2 - .../metricstransformprocessor/factory.go | 3 +- .../metricstransformprocessor/metadata.yaml | 2 +- .../metrics_transform_processor_otlp.go | 4 +- .../operation_scale_value.go | 4 +- .../probabilisticsamplerprocessor/README.md | 7 +- .../probabilisticsamplerprocessor/config.go | 1 - .../internal/metadata/generated_telemetry.go | 38 +- .../logsprocessor.go | 3 +- .../metadata.yaml | 2 +- .../sampler_mode.go | 28 +- .../tracesprocessor.go | 2 +- .../resourcedetectionprocessor/README.md | 155 +- .../resourcedetectionprocessor/config.go | 1 - .../resourcedetectionprocessor/factory.go | 39 +- .../internal/aws/ec2/documentation.md | 19 + .../internal/aws/ec2/ec2.go | 3 +- .../internal/aws/ec2/metadata.yaml | 5 - .../internal/aws/ecs/documentation.md | 25 + .../internal/aws/ecs/metadata.yaml | 5 - .../internal/aws/eks/documentation.md | 13 + .../internal/aws/eks/metadata.yaml | 5 - .../aws/elasticbeanstalk/documentation.md | 15 + .../aws/elasticbeanstalk/metadata.yaml | 5 - .../internal/aws/lambda/documentation.md | 19 + .../internal/aws/lambda/metadata.yaml | 5 - .../internal/azure/aks/documentation.md | 13 + .../internal/azure/aks/metadata.yaml | 5 - .../internal/azure/documentation.md | 20 + .../internal/azure/metadata.yaml | 5 - .../internal/consul/config.go | 1 - .../internal/consul/documentation.md | 13 + .../internal/consul/metadata.yaml | 5 - .../internal/docker/documentation.md | 12 + .../internal/docker/metadata.yaml | 5 - .../internal/gcp/documentation.md | 27 + .../internal/gcp/metadata.yaml | 5 - .../internal/heroku/documentation.md | 18 + .../internal/heroku/metadata.yaml | 5 - .../internal/k8snode/documentation.md | 12 + .../internal/k8snode/metadata.yaml | 5 - .../internal/metadata/generated_status.go | 7 +- .../internal/openshift/documentation.md | 14 + .../internal/openshift/metadata.yaml | 5 - .../internal/resourcedetection.go | 3 +- .../internal/system/documentation.md | 23 + .../internal/metadata/resource_int_version.go | 11 - .../internal/system/metadata.yaml | 5 - .../internal/system/system.go | 35 +- .../resourcedetectionprocessor/metadata.yaml | 3 +- .../resourcedetection_processor.go | 13 + .../processor/resourceprocessor/README.md | 5 +- .../processor/resourceprocessor/config.go | 1 - .../processor/resourceprocessor/factory.go | 15 +- .../processor/resourceprocessor/metadata.yaml | 2 +- .../processor/spanprocessor/README.md | 16 +- .../processor/spanprocessor/config.go | 5 + .../processor/spanprocessor/factory.go | 3 +- .../processor/spanprocessor/span.go | 6 +- .../processor/tailsamplingprocessor/README.md | 34 +- .../processor/tailsamplingprocessor/config.go | 13 +- .../internal/metadata/generated_telemetry.go | 64 +- .../internal/sampling/and.go | 2 - .../internal/sampling/boolean_tag_filter.go | 35 +- .../internal/sampling/composite.go | 1 - .../internal/sampling/ottl.go | 5 +- .../tailsamplingprocessor/metadata.yaml | 2 +- .../tailsamplingprocessor/processor.go | 68 +- .../awscontainerinsightreceiver/README.md | 2 +- .../awscontainerinsightreceiver/config.go | 1 - .../awscontainerinsightreceiver/factory.go | 3 +- .../internal/cadvisor/cadvisor_linux.go | 29 +- .../internal/cadvisor/cadvisor_nolinux.go | 3 +- .../cadvisor/container_info_processor.go | 14 +- .../internal/cadvisor/extractors/extractor.go | 7 +- .../cadvisor/extractors/net_extractor.go | 1 - .../internal/ecsInfo/cgroup.go | 5 +- .../internal/ecsInfo/ecs_instance_info.go | 4 +- .../internal/ecsInfo/ecs_task_info.go | 5 +- .../internal/ecsInfo/ecsinfo.go | 4 - .../internal/ecsInfo/utils.go | 4 +- .../internal/host/ebsvolume.go | 3 +- .../internal/host/ec2metadata.go | 3 +- .../internal/host/ec2tags.go | 3 +- .../internal/host/utils.go | 3 +- .../internal/k8sapiserver/k8sapiserver.go | 9 +- .../internal/stores/podstore.go | 11 +- .../internal/stores/store.go | 1 - .../internal/stores/utils.go | 6 +- .../awscontainerinsightreceiver/receiver.go | 6 +- .../awsecscontainermetricsreceiver/README.md | 2 +- .../awsecscontainermetricsreceiver/config.go | 1 - .../awsecscontainermetricsreceiver/factory.go | 2 +- .../awsecscontainermetrics/accumulator.go | 7 - .../awsecscontainermetrics/metrics_helper.go | 1 - .../awsecscontainermetrics/resource.go | 2 +- .../awsecscontainermetrics/translator.go | 2 +- .../receiver.go | 4 +- .../receiver/awsxrayreceiver/README.md | 7 +- .../receiver/awsxrayreceiver/factory.go | 7 +- .../internal/translator/aws.go | 2 +- .../internal/translator/cause.go | 2 +- .../internal/translator/http.go | 3 +- .../internal/translator/sdk.go | 2 +- .../internal/translator/sql.go | 2 +- .../internal/translator/translator.go | 6 +- .../receiver/awsxrayreceiver/receiver.go | 4 +- .../receiver/filelogreceiver/README.md | 16 +- .../receiver/filelogreceiver/filelog.go | 1 + .../receiver/filelogreceiver/metadata.yaml | 2 +- .../receiver/jaegerreceiver/README.md | 7 +- .../receiver/jaegerreceiver/config.go | 15 +- .../receiver/jaegerreceiver/factory.go | 11 +- .../receiver/jaegerreceiver/metadata.yaml | 4 +- .../receiver/jaegerreceiver/trace_receiver.go | 20 +- .../receiver/kafkareceiver/README.md | 3 +- .../receiver/kafkareceiver/factory.go | 4 +- .../kafkareceiver/header_extraction.go | 4 +- .../internal/metadata/generated_telemetry.go | 50 +- .../kafkareceiver/jaeger_unmarshaler.go | 6 +- .../kafkareceiver/json_unmarshaler.go | 3 +- .../receiver/kafkareceiver/kafka_receiver.go | 64 +- .../receiver/kafkareceiver/unmarshaler.go | 12 +- .../receiver/prometheusreceiver/README.md | 5 +- .../receiver/prometheusreceiver/config.go | 22 +- .../prometheusreceiver/internal/appendable.go | 3 +- .../internal/metrics_adjuster.go | 2 +- .../internal/starttimemetricadjuster.go | 1 + .../internal/transaction.go | 7 +- .../receiver/prometheusreceiver/metadata.yaml | 4 +- .../prometheusreceiver/metrics_receiver.go | 2 +- .../targetallocator/config.go | 4 +- .../targetallocator/manager.go | 17 +- .../receiver/statsdreceiver/README.md | 4 +- .../receiver/statsdreceiver/config.go | 23 +- .../receiver/statsdreceiver/factory.go | 4 +- .../internal/metadata/generated_telemetry.go | 36 +- .../internal/protocol/metric_translator.go | 4 +- .../internal/protocol/parser.go | 2 +- .../internal/protocol/statsd_parser.go | 40 +- .../receiver/statsdreceiver/receiver.go | 2 +- .../receiver/zipkinreceiver/README.md | 7 +- .../receiver/zipkinreceiver/factory.go | 4 +- .../receiver/zipkinreceiver/metadata.yaml | 4 +- .../receiver/zipkinreceiver/trace_receiver.go | 7 +- vendor/github.com/openshift/api/LICENSE | 14 +- .../openshift/api/quota/v1/Makefile | 3 - .../openshift/api/quota/v1/generated.pb.go | 1153 ++-- .../openshift/api/quota/v1/generated.proto | 42 +- .../openshift/api/quota/v1/legacy.go | 24 - .../openshift/api/quota/v1/register.go | 52 +- .../openshift/api/quota/v1/types.go | 40 +- ...ated.go => types_swagger_doc_generated.go} | 18 +- .../api/quota/v1/zz_generated.deepcopy.go | 43 +- ..._generated.featuregated-crd-manifests.yaml | 22 - .../prometheus/common/config/headers.go | 43 +- .../prometheus/common/config/http_config.go | 12 +- .../prometheus/common/expfmt/expfmt.go | 23 + .../prometheus/common/expfmt/text_parse.go | 16 +- .../common/model/labelset_string.go | 2 - .../common/model/labelset_string_go120.go | 39 - .../prometheus/common/model/metric.go | 11 +- .../prompb/io/prometheus/write/v2/codec.go | 216 + .../prompb/io/prometheus/write/v2/custom.go | 165 + .../prompb/io/prometheus/write/v2/symbols.go | 83 + .../prompb/io/prometheus/write/v2/types.pb.go | 3241 +++++++++ .../prompb/io/prometheus/write/v2/types.proto | 260 + .../github.com/relvacode/iso8601/.gitignore | 2 + vendor/github.com/relvacode/iso8601/README.md | 22 +- .../github.com/relvacode/iso8601/iso8601.go | 42 +- .../shirou/gopsutil/v4/common/env.go | 15 +- .../shirou/gopsutil/v4/cpu/cpu_darwin.go | 105 +- .../gopsutil/v4/cpu/cpu_darwin_arm64.go | 80 + .../shirou/gopsutil/v4/cpu/cpu_darwin_cgo.go | 111 - .../gopsutil/v4/cpu/cpu_darwin_fallback.go | 13 + .../gopsutil/v4/cpu/cpu_darwin_nocgo.go | 14 - .../shirou/gopsutil/v4/cpu/cpu_netbsd_arm.go | 10 + .../shirou/gopsutil/v4/host/host_linux.go | 2 + .../v4/internal/common/common_darwin.go | 298 + .../v4/internal/common/common_unix.go | 20 - .../shirou/gopsutil/v4/mem/ex_windows.go | 12 + .../shirou/gopsutil/v4/mem/mem_darwin.go | 58 + .../shirou/gopsutil/v4/mem/mem_darwin_cgo.go | 58 - .../gopsutil/v4/mem/mem_darwin_nocgo.go | 89 - .../shirou/gopsutil/v4/mem/mem_windows.go | 2 + .../shirou/gopsutil/v4/process/process.go | 2 +- .../gopsutil/v4/process/process_darwin.go | 283 +- .../v4/process/process_darwin_amd64.go | 21 + .../v4/process/process_darwin_arm64.go | 21 + .../gopsutil/v4/process/process_darwin_cgo.go | 222 - .../v4/process/process_darwin_nocgo.go | 134 - .../gopsutil/v4/process/process_freebsd.go | 18 +- .../gopsutil/v4/process/process_linux.go | 35 +- .../gopsutil/v4/process/process_openbsd.go | 18 +- .../gopsutil/v4/process/process_windows.go | 16 +- .../signalfx/sapm-proto/client/client.go | 5 - .../signalfx/sapm-proto/client/metrics.go | 67 - .../signalfx/sapm-proto/client/worker.go | 6 - .../testify/assert/assertion_compare.go | 35 +- .../testify/assert/assertion_format.go | 34 +- .../testify/assert/assertion_forward.go | 68 +- .../testify/assert/assertion_order.go | 10 +- .../stretchr/testify/assert/assertions.go | 157 +- .../testify/assert/yaml/yaml_custom.go | 25 + .../testify/assert/yaml/yaml_default.go | 37 + .../stretchr/testify/assert/yaml/yaml_fail.go | 18 + .../github.com/stretchr/testify/mock/mock.go | 155 +- .../stretchr/testify/require/require.go | 432 +- .../stretchr/testify/require/require.go.tmpl | 2 +- .../testify/require/require_forward.go | 68 +- .../stretchr/testify/require/requirements.go | 2 +- vendor/github.com/tidwall/wal/README.md | 8 +- vendor/github.com/tidwall/wal/wal.go | 16 +- .../collector/component/component.go | 39 +- .../component/componentprofiles/config.go | 15 - .../component/componentstatus/instance.go | 11 +- .../LICENSE | 0 .../Makefile | 0 .../component/componenttest/configtest.go | 2 - .../component/componenttest/obsreporttest.go | 97 +- .../component/componenttest/otelchecker.go | 173 + .../componenttest/otelprometheuschecker.go | 201 - .../collector/component/config.go | 88 +- .../collector/component/identifiable.go | 67 + .../collector/component/telemetry.go | 5 +- .../configcompression/compressiontype.go | 3 +- .../collector/config/configgrpc/configgrpc.go | 115 +- .../collector/config/confighttp/README.md | 10 +- .../config/confighttp/compress_readcloser.go | 23 + .../config/confighttp/compression.go | 25 +- .../collector/config/confighttp/compressor.go | 10 + .../collector/config/confighttp/confighttp.go | 35 +- .../collector/config/confignet/README.md | 3 +- .../collector/config/configretry/backoff.go | 1 - .../config/configtls/clientcasfilereloader.go | 5 +- .../collector/config/configtls/configtls.go | 12 +- .../collector/config/internal/warning.go | 7 +- .../collector/confmap/confmap.go | 13 +- .../collector/confmap/provider.go | 23 +- .../confmap/provider/envprovider/provider.go | 25 +- .../confmap/provider/httpprovider/README.md | 2 +- .../confmap/provider/httpsprovider/README.md | 2 +- .../configurablehttpprovider/provider.go | 1 - .../collector/connector/connector.go | 304 +- .../connector/connectorprofiles/connector.go | 295 +- .../connectorprofiles/profiles_router.go | 9 +- .../connectortest}/LICENSE | 0 .../connectortest}/Makefile | 0 .../connector/connectortest/connector.go | 20 +- .../collector/connector/internal/connector.go | 19 - .../collector/connector/internal/factory.go | 595 +- .../collector/connector/internal/logs.go | 24 - .../collector/connector/internal/metrics.go | 25 - .../collector/connector/internal/profiles.go | 26 - .../collector/connector/internal/router.go | 17 +- .../collector/connector/internal/traces.go | 26 - .../collector/connector/logs_router.go | 17 +- .../collector/connector/metrics_router.go | 8 +- .../collector/connector/traces_router.go | 8 +- .../collector/consumer/consumer.go | 4 +- .../consumererror}/LICENSE | 0 .../consumererror}/Makefile | 0 .../consumererrorprofiles}/LICENSE | 0 .../consumererrorprofiles/Makefile | 1 + .../consumererrorprofiles/signalerrors.go | 25 + .../consumererror/internal/retryable.go | 31 + .../consumer/consumererror/signalerrors.go | 40 +- .../collector/consumer/consumertest/sink.go | 14 +- .../collector/consumer/internal/consumer.go | 12 +- .../exporter/debugexporter/README.md | 6 +- .../exporter/debugexporter/config.go | 4 +- .../exporter/debugexporter/exporter.go | 55 +- .../exporter/debugexporter/factory.go | 55 +- .../internal/metadata/generated_status.go | 7 +- .../debugexporter/internal/normal/metrics.go | 3 +- .../debugexporter/internal/normal/profiles.go | 49 + .../internal/otlptext/databuffer.go | 163 +- .../internal/otlptext/known_sync_error.go | 2 +- .../otlptext/known_sync_error_other.go | 2 +- .../otlptext/known_sync_error_windows.go | 2 +- .../internal/otlptext/logs.go | 2 +- .../internal/otlptext/metrics.go | 2 +- .../internal/otlptext/profiles.go | 67 + .../internal/otlptext/sync.go | 2 +- .../internal/otlptext/traces.go | 2 +- .../exporter/debugexporter/metadata.yaml | 2 +- .../collector/exporter/exporter.go | 162 +- .../exporter/exporterbatcher/batch_func.go | 24 - .../exporter/exporterhelper/README.md | 1 - .../exporter/exporterhelper/common.go | 316 +- .../exporter/exporterhelper/documentation.md | 22 +- .../exporter/exporterhelper/exporterhelper.go | 6 - .../exporterhelperprofiles/LICENSE | 202 + .../exporterhelperprofiles/Makefile | 1 + .../exporterhelperprofiles/constants.go | 19 + .../exporterhelperprofiles/profiles.go | 162 + .../exporterhelperprofiles/profiles_batch.go | 142 + .../exporterhelper/internal/base_exporter.go | 311 + .../{ => internal}/batch_sender.go | 59 +- .../internal/metadata/generated_telemetry.go | 78 +- .../exporterhelper/internal/obsexporter.go | 170 + .../exporterhelper/internal/obsmetrics.go} | 21 +- .../exporterhelper/internal/queue_sender.go | 174 + .../exporterhelper/internal/request.go | 150 + .../exporterhelper/internal/request_sender.go | 33 + .../exporterhelper/internal/retry_sender.go | 142 + .../exporterhelper/internal/test_util.go | 20 + .../exporterhelper/internal/timeout_sender.go | 52 + .../collector/exporter/exporterhelper/logs.go | 41 +- .../exporter/exporterhelper/logs_batch.go | 18 +- .../exporter/exporterhelper/metadata.yaml | 23 +- .../exporter/exporterhelper/metrics.go | 41 +- .../exporter/exporterhelper/metrics_batch.go | 18 +- .../exporter/exporterhelper/obsexporter.go | 159 - .../exporter/exporterhelper/queue_sender.go | 135 +- .../exporter/exporterhelper/retry_sender.go | 131 +- .../exporter/exporterhelper/timeout_sender.go | 45 +- .../exporter/exporterhelper/traces.go | 49 +- .../exporter/exporterhelper/traces_batch.go | 18 +- .../exporter/exporterprofiles/exporter.go | 98 +- .../exporter/exporterqueue/config.go | 2 +- .../collector/exporter/exporterqueue/queue.go | 31 +- .../collector/exporter/exportertest/LICENSE | 202 + .../collector/exporter/exportertest/Makefile | 1 + .../exporter/exportertest/contract_checker.go | 30 +- .../exporter/exportertest/nop_exporter.go | 26 +- .../exporter/internal/common/factory.go | 84 - .../internal/common/logging_exporter.go | 87 - .../collector/exporter/internal/exporter.go | 15 - .../collector/exporter/internal/factory.go | 189 - .../collector/exporter/internal/logs.go | 15 - .../collector/exporter/internal/metrics.go | 15 - .../collector/exporter/internal/profiles.go | 15 - .../exporter/internal/queue/batcher.go | 96 + .../internal/queue/bounded_memory_queue.go | 17 +- .../exporter/internal/queue/consumers.go | 16 +- .../internal/queue/default_batcher.go | 176 + .../internal/queue/disabled_batcher.go | 51 + .../exporter/internal/queue/mock_storage.go | 160 - .../internal/queue/persistent_queue.go | 137 +- .../exporter/internal/queue/queue.go | 22 +- .../collector/exporter/internal/request.go | 26 +- .../collector/exporter/internal/traces.go | 15 - .../exporter/loggingexporter/README.md | 52 - .../exporter/loggingexporter/config.go | 94 - .../collector/exporter/loggingexporter/doc.go | 7 - .../exporter/loggingexporter/factory.go | 80 - .../internal/metadata/generated_status.go | 18 - .../exporter/loggingexporter/metadata.yaml | 8 - .../collector/exporter/otlpexporter/README.md | 11 +- .../exporter/otlpexporter/cfg-schema.yaml | 6 +- .../collector/exporter/otlpexporter/config.go | 6 +- .../collector/exporter/otlpexporter/doc.go | 2 +- .../exporter/otlpexporter/factory.go | 56 +- .../internal/metadata/generated_status.go | 7 +- .../exporter/otlpexporter/metadata.yaml | 5 +- .../collector/exporter/otlpexporter/otlp.go | 36 +- .../exporter/otlphttpexporter/README.md | 11 +- .../exporter/otlphttpexporter/config.go | 6 +- .../exporter/otlphttpexporter/factory.go | 97 +- .../internal/metadata/generated_status.go | 7 +- .../exporter/otlphttpexporter/metadata.yaml | 5 +- .../exporter/otlphttpexporter/otlp.go | 68 +- .../collector/extension/auth/client.go | 28 +- .../collector/extension/auth/server.go | 24 +- .../extension/ballastextension/README.md | 63 - .../extension/ballastextension/config.go | 28 - .../extension/ballastextension/factory.go | 31 - .../internal/metadata/generated_status.go | 16 - .../ballastextension/memory_ballast.go | 62 - .../extension/ballastextension/metadata.yaml | 8 - .../collector/extension/extension.go | 26 +- .../extensioncapabilities/interfaces.go | 32 +- .../collector/extension/extensiontest/LICENSE | 202 + .../extensiontest}/Makefile | 0 .../extension/internal/interfaces.go | 48 - .../extension/zpagesextension/README.md | 2 +- .../extension/zpagesextension/factory.go | 6 +- .../zpagesextension/zpagesextension.go | 1 - .../collector/featuregate/flag.go | 6 + .../collector/featuregate/registry.go | 4 +- .../collector/internal/fanoutconsumer/LICENSE | 202 + .../internal/fanoutconsumer/Makefile | 1 + .../collector/internal/fanoutconsumer/logs.go | 2 +- .../internal/fanoutconsumer/metrics.go | 2 +- .../internal/fanoutconsumer/profiles.go | 2 +- .../internal/fanoutconsumer/traces.go | 2 +- .../internal/globalgates/globalgates.go | 12 - .../internal/localhostgate/featuregate.go | 68 - .../collector/internal/memorylimiter/LICENSE | 202 + .../collector/internal/memorylimiter/Makefile | 1 + .../{ => memorylimiter}/cgroups/cgroup.go | 2 +- .../{ => memorylimiter}/cgroups/cgroups.go | 6 +- .../{ => memorylimiter}/cgroups/doc.go | 2 +- .../{ => memorylimiter}/cgroups/errors.go | 2 +- .../{ => memorylimiter}/cgroups/mountpoint.go | 2 +- .../{ => memorylimiter}/cgroups/subsys.go | 2 +- .../{ => memorylimiter}/iruntime/mem_info.go | 2 +- .../iruntime/total_memory_linux.go | 5 +- .../iruntime/total_memory_other.go | 2 +- .../internal/memorylimiter/memorylimiter.go | 2 +- .../obsmetrics/obs_processor.go | 22 - .../obsreportconfig/obsmetrics/obs_scraper.go | 22 - .../obsreportconfig/obsmetrics/obsmetrics.go | 11 - .../obsreportconfig/obsreportconfig.go | 24 - .../internal/sharedcomponent/LICENSE | 202 + .../internal/sharedcomponent/Makefile | 1 + .../sharedcomponent/sharedcomponent.go | 5 +- .../collector/otelcol/buffered_core.go | 4 +- .../collector/otelcol/collector.go | 8 +- .../collector/otelcol/collector_windows.go | 20 +- .../collector/otelcol/command_components.go | 21 +- .../collector/otelcol/config.go | 6 +- .../internal/configunmarshaler/configs.go | 4 + .../collector/otelcol/unmarshaler.go | 1 - .../profiles_service.pb.go | 98 +- .../data/protogen/metrics/v1/metrics.pb.go | 25 +- .../profiles.pb.go} | 3532 ++++++---- .../profiles/v1experimental/profiles.pb.go | 1477 ----- .../internal/generated_wrapper_int32slice.go | 34 + .../internal/generated_wrapper_intslice.go | 34 + .../collector/pdata/internal/json/enum.go | 2 +- .../collector/pdata/internal/otlp/profiles.go | 2 +- .../pdata/internal/wrapper_profiles.go | 4 +- .../pdata/pcommon/generated_int32slice.go | 108 + .../pdata/pcommon/generated_intslice.go | 108 + .../collector/pdata/pcommon/map.go | 9 + .../collector/pdata/pcommon/timestamp.go | 2 + .../collector/pdata/pcommon/value.go | 4 +- .../pdata/pprofile/generated_attribute.go | 70 + ...ce.go => generated_attributetableslice.go} | 56 +- .../pdata/pprofile/generated_attributeunit.go | 30 +- .../pprofile/generated_attributeunitslice.go | 36 +- .../pdata/pprofile/generated_function.go | 56 +- .../pdata/pprofile/generated_functionslice.go | 36 +- .../pdata/pprofile/generated_label.go | 99 - .../pdata/pprofile/generated_line.go | 6 +- .../pdata/pprofile/generated_lineslice.go | 36 +- .../pdata/pprofile/generated_link.go | 2 +- .../pdata/pprofile/generated_linkslice.go | 36 +- .../pdata/pprofile/generated_location.go | 55 +- .../pdata/pprofile/generated_locationslice.go | 36 +- .../pdata/pprofile/generated_mapping.go | 60 +- .../pdata/pprofile/generated_mappingslice.go | 36 +- .../pdata/pprofile/generated_profile.go | 145 +- .../pprofile/generated_profilecontainer.go | 113 - ...ersslice.go => generated_profilesslice.go} | 66 +- .../pprofile/generated_resourceprofiles.go | 2 +- .../generated_resourceprofilesslice.go | 2 +- .../pdata/pprofile/generated_sample.go | 54 +- .../pdata/pprofile/generated_sampleslice.go | 36 +- .../pdata/pprofile/generated_scopeprofiles.go | 6 +- .../pprofile/generated_scopeprofilesslice.go | 2 +- .../pdata/pprofile/generated_valuetype.go | 30 +- .../pprofile/generated_valuetypeslice.go | 36 +- .../collector/pdata/pprofile/json.go | 170 +- .../collector/pdata/pprofile/pb.go | 31 + .../generated_exportpartialsuccess.go | 75 + .../pdata/pprofile/pprofileotlp/grpc.go | 91 + .../pdata/pprofile/pprofileotlp/request.go | 79 + .../pdata/pprofile/pprofileotlp/response.go | 87 + .../collector/pdata/pprofile/profile.go | 19 + .../collector/pdata/pprofile/profileid.go | 2 +- .../collector/pdata/pprofile/profiles.go | 6 +- .../collector/pdata/ptrace/json.go | 4 + .../pdata/ptrace/ptraceotlp/response.go | 1 - .../collector/pdata/testdata/profile.go | 32 +- .../collector/pipeline/LICENSE | 202 + .../collector/pipeline/Makefile | 1 + .../pipeline/internal/globalsignal/signal.go | 51 + .../collector/pipeline/pipeline.go | 131 + .../pipeline/pipelineprofiles/LICENSE | 202 + .../pipeline/pipelineprofiles/Makefile | 1 + .../pipeline/pipelineprofiles/config.go | 12 + .../collector/pipeline/signal.go | 22 + .../processor/batchprocessor/README.md | 2 +- .../batchprocessor/batch_processor.go | 304 +- .../processor/batchprocessor/factory.go | 6 +- .../internal/metadata/generated_telemetry.go | 59 +- .../processor/batchprocessor/metadata.yaml | 8 +- .../processor/batchprocessor/metrics.go | 22 +- .../collector/processor/internal/factory.go | 213 - .../collector/processor/internal/logs.go | 15 - .../collector/processor/internal/metrics.go | 15 - .../processor/internal/obsmetrics.go | 13 + .../collector/processor/internal/processor.go | 17 - .../collector/processor/internal/profiles.go | 15 - .../collector/processor/internal/traces.go | 15 - .../memorylimiterprocessor/README.md | 2 +- .../memorylimiterprocessor/documentation.md | 55 + .../memorylimiterprocessor/factory.go | 18 +- .../internal/metadata/generated_telemetry.go | 100 + .../memorylimiterprocessor/memorylimiter.go | 21 +- .../memorylimiterprocessor/metadata.yaml | 68 + .../memorylimiterprocessor/obsreport.go | 57 + .../collector/processor/processor.go | 163 +- .../processorhelper/documentation.md | 140 +- .../internal/metadata/generated_telemetry.go | 168 +- .../processor/processorhelper/logs.go | 27 +- .../processor/processorhelper/metadata.yaml | 146 +- .../processor/processorhelper/metrics.go | 27 +- .../processor/processorhelper/obsreport.go | 159 +- .../processor/processorhelper/processor.go | 28 +- .../processorhelperprofiles/LICENSE | 202 + .../processorhelperprofiles/Makefile | 1 + .../processorhelperprofiles/processor.go | 64 + .../processorhelperprofiles/profiles.go | 61 + .../processor/processorhelper/traces.go | 27 +- .../processor/processorprofiles/processor.go | 103 +- .../collector/processor/processortest/LICENSE | 202 + .../processor/processortest/Makefile | 1 + .../processor/processortest/nop_processor.go | 26 +- .../processortest/shutdown_verifier.go | 13 +- .../processortest/unhealthy_processor.go | 33 +- .../collector/receiver/internal/factory.go | 211 - .../collector/receiver/internal/logs.go | 15 - .../collector/receiver/internal/metrics.go | 15 - .../internal/obsmetrics.go} | 9 +- .../collector/receiver/internal/profiles.go | 15 - .../collector/receiver/internal/receiver.go | 17 - .../collector/receiver/internal/traces.go | 15 - .../collector/receiver/otlpreceiver/README.md | 43 +- .../receiver/otlpreceiver/encoder.go | 23 + .../receiver/otlpreceiver/factory.go | 55 +- .../internal/metadata/generated_status.go | 7 +- .../otlpreceiver/internal/profiles/otlp.go | 48 + .../receiver/otlpreceiver/metadata.yaml | 3 +- .../collector/receiver/otlpreceiver/otlp.go | 38 +- .../receiver/otlpreceiver/otlphttp.go | 32 + .../collector/receiver/receiver.go | 182 +- .../receiver/receiverhelper/documentation.md | 12 +- .../internal/metadata/generated_telemetry.go | 58 +- .../receiver/receiverhelper/metadata.yaml | 15 +- .../receiver/receiverhelper/obsreport.go | 69 +- .../receiver/receiverprofiles/profiles.go | 105 +- .../collector/receiver/receivertest/LICENSE | 202 + .../collector/receiver/receivertest/Makefile | 1 + .../receiver/receivertest/contract_checker.go | 20 +- .../receiver/receivertest/nop_receiver.go | 23 +- .../semconv/v1.12.0/generated_resource.go | 1086 +++ .../semconv/v1.12.0/generated_trace.go | 1805 +++++ .../collector/semconv/v1.12.0/nonstandard.go | 11 + .../collector/semconv/v1.12.0/schema.go | 9 + .../semconv/v1.13.0/generated_resource.go | 4 +- .../semconv/v1.16.0/generated_resource.go | 4 +- .../semconv/v1.17.0/generated_resource.go | 4 +- .../semconv/v1.18.0/generated_resource.go | 4 +- .../semconv/v1.21.0/generated_resource.go | 6 +- .../semconv/v1.22.0/generated_resource.go | 8 +- .../v1.25.0/generated_attribute_group.go | 8 +- .../semconv/v1.26.0}/doc.go | 6 +- .../v1.26.0/generated_attribute_group.go | 5331 +++++++++++++++ .../semconv/v1.26.0/generated_event.go | 10 + .../semconv/v1.26.0/generated_resource.go | 10 + .../semconv/v1.26.0/generated_trace.go | 10 + .../semconv/v1.26.0}/schema.go | 4 +- .../collector/semconv/v1.27.0/doc.go | 9 + .../v1.27.0/generated_attribute_group.go | 5843 +++++++++++++++++ .../semconv/v1.27.0/generated_event.go | 10 + .../semconv/v1.27.0/generated_resource.go | 10 + .../semconv/v1.27.0/generated_trace.go | 10 + .../collector/semconv/v1.27.0/schema.go | 9 + .../semconv/v1.6.1/generated_resource.go | 2 +- .../semconv/v1.8.0/generated_resource.go | 2 +- .../semconv/v1.9.0/generated_resource.go | 2 +- .../collector/service/attributes.go | 27 + .../collector/service/documentation.md | 12 +- .../service/extensions/extensions.go | 16 +- .../collector/service/extensions/graph.go | 2 +- .../service/internal/builders/connector.go | 55 +- .../service/internal/builders/exporter.go | 24 +- .../service/internal/builders/extension.go | 6 +- .../service/internal/builders/processor.go | 23 +- .../service/internal/builders/receiver.go | 24 +- .../capabilityconsumer/capabilities.go | 24 +- .../service/internal/components/loggers.go | 9 +- .../service/internal/graph/capabilities.go | 40 + .../service/internal/graph/connector.go | 220 + .../service/internal/graph/consumer.go | 39 + .../service/internal/graph/exporter.go | 68 + .../service/internal/graph/fanout.go | 31 + .../collector/service/internal/graph/graph.go | 148 +- .../collector/service/internal/graph/host.go | 7 +- .../collector/service/internal/graph/node.go | 22 + .../collector/service/internal/graph/nodes.go | 470 -- .../service/internal/graph/processor.go | 70 + .../service/internal/graph/receiver.go | 81 + .../service/internal/graph/zpages.go | 2 +- .../internal/metadata/generated_telemetry.go | 106 +- .../proctelemetry/process_telemetry.go | 5 + .../service/internal/status/status.go | 21 +- .../collector/service/metadata.yaml | 12 + .../collector/service/pipelines/config.go | 34 +- .../collector/service/service.go | 87 +- .../collector/service/telemetry/attributes.go | 24 - .../collector/service/telemetry/config.go | 69 +- .../collector/service/telemetry/factory.go | 107 +- .../service/telemetry/factory_impl.go | 111 + .../service/telemetry/internal/factory.go | 137 - .../internal/otelinit}/config.go | 76 +- .../collector/service/telemetry/logger.go | 56 +- .../{telemetry.go => telemetry/metrics.go} | 44 +- .../collector/service/telemetry/telemetry.go | 11 - .../collector/service/telemetry/tracer.go | 62 +- .../contrib/bridges/otelzap/LICENSE | 201 + .../contrib/bridges/otelzap/README.md | 3 + .../contrib/bridges/otelzap/core.go | 252 + .../contrib/bridges/otelzap/encoder.go | 329 + .../contrib/config/config.go | 3 - .../grpc/otelgrpc/version.go | 2 +- .../net/http/otelhttp/common.go | 7 - .../net/http/otelhttp/handler.go | 26 +- .../internal/request/resp_writer_wrapper.go | 11 +- .../net/http/otelhttp/internal/semconv/env.go | 80 +- .../http/otelhttp/internal/semconv/v1.20.0.go | 104 +- .../net/http/otelhttp/transport.go | 58 +- .../net/http/otelhttp/version.go | 2 +- .../contrib/propagators/b3/version.go | 2 +- .../contrib/zpages/version.go | 2 +- vendor/go.opentelemetry.io/otel/.gitignore | 8 - vendor/go.opentelemetry.io/otel/.golangci.yml | 13 +- vendor/go.opentelemetry.io/otel/CHANGELOG.md | 103 +- vendor/go.opentelemetry.io/otel/CODEOWNERS | 4 +- .../go.opentelemetry.io/otel/CONTRIBUTING.md | 24 +- vendor/go.opentelemetry.io/otel/Makefile | 11 +- vendor/go.opentelemetry.io/otel/README.md | 11 +- vendor/go.opentelemetry.io/otel/RELEASING.md | 11 - .../go.opentelemetry.io/otel/attribute/set.go | 40 +- .../otel/baggage/baggage.go | 6 +- .../otlp/otlplog/otlploghttp/config.go | 2 +- .../exporters/otlp/otlplog/otlploghttp/doc.go | 2 +- .../otlploghttp/internal/transform/log.go | 104 +- .../otlp/otlplog/otlploghttp/version.go | 2 +- .../otlp/otlpmetric/otlpmetricgrpc/client.go | 7 +- .../otlpmetricgrpc/internal/oconf/options.go | 6 +- .../otlpmetricgrpc/internal/oconf/tls.go | 2 +- .../internal/transform/metricdata.go | 18 +- .../otlp/otlpmetric/otlpmetricgrpc/version.go | 2 +- .../otlp/otlpmetric/otlpmetrichttp/doc.go | 2 +- .../otlpmetrichttp/internal/oconf/options.go | 6 +- .../otlpmetrichttp/internal/oconf/tls.go | 2 +- .../internal/transform/metricdata.go | 18 +- .../otlp/otlpmetric/otlpmetrichttp/version.go | 2 +- .../otlptrace/internal/tracetransform/span.go | 8 +- .../internal/otlpconfig/options.go | 2 +- .../otlp/otlptrace/otlptracehttp/doc.go | 2 +- .../internal/otlpconfig/options.go | 2 +- .../otel/exporters/otlp/otlptrace/version.go | 2 +- .../otel/exporters/prometheus/config.go | 6 +- .../otel/exporters/prometheus/exporter.go | 201 +- .../otel/internal/global/instruments.go | 14 +- .../otel/internal/global/meter.go | 382 +- .../otel/internal/global/trace.go | 8 +- .../otel/internal/rawhelpers.go | 3 +- vendor/go.opentelemetry.io/otel/log/DESIGN.md | 33 +- vendor/go.opentelemetry.io/otel/log/doc.go | 10 +- .../otel/log/global/README.md | 3 + .../otel/log/global/log.go | 49 + .../otel/log/internal/global/log.go | 107 + .../otel/log/internal/global/state.go | 53 + .../go.opentelemetry.io/otel/log/keyvalue.go | 3 +- vendor/go.opentelemetry.io/otel/log/logger.go | 36 +- .../go.opentelemetry.io/otel/log/noop/noop.go | 2 +- vendor/go.opentelemetry.io/otel/log/record.go | 3 + .../otel/metric/asyncfloat64.go | 2 +- .../otel/metric/asyncint64.go | 2 +- .../otel/metric/instrument.go | 2 +- vendor/go.opentelemetry.io/otel/renovate.json | 8 + .../otel/sdk/instrumentation/scope.go | 4 + .../otel/sdk/log/DESIGN.md | 6 +- .../go.opentelemetry.io/otel/sdk/log/batch.go | 21 +- .../otel/sdk/log/internal/x/x.go | 19 +- .../otel/sdk/log/logger.go | 15 +- .../otel/sdk/log/provider.go | 7 +- .../otel/sdk/log/record.go | 4 + .../otel/sdk/log/simple.go | 2 +- .../otel/sdk/metric/config.go | 79 +- .../otel/sdk/metric/exemplar.go | 68 +- .../otel/sdk/metric/exemplar/README.md | 3 + .../sdk/metric/{internal => }/exemplar/doc.go | 2 +- .../{internal => }/exemplar/exemplar.go | 2 +- .../metric/{internal => }/exemplar/filter.go | 11 +- .../fixed_size_reservoir.go} | 118 +- .../metric/exemplar/histogram_reservoir.go | 70 + .../{internal => }/exemplar/reservoir.go | 10 +- .../metric/{internal => }/exemplar/storage.go | 8 +- .../metric/{internal => }/exemplar/value.go | 5 +- .../otel/sdk/metric/instrument.go | 14 +- .../metric/internal/aggregate/aggregate.go | 9 +- .../sdk/metric/internal/aggregate/drop.go | 27 + .../sdk/metric/internal/aggregate/exemplar.go | 3 +- .../aggregate/exponential_histogram.go | 9 +- .../internal/aggregate/filtered_reservoir.go | 50 + .../metric/internal/aggregate/histogram.go | 11 +- .../metric/internal/aggregate/lastvalue.go | 11 +- .../otel/sdk/metric/internal/aggregate/sum.go | 17 +- .../otel/sdk/metric/internal/exemplar/drop.go | 23 - .../internal/exemplar/filtered_reservoir.go | 49 - .../otel/sdk/metric/internal/exemplar/hist.go | 46 - .../otel/sdk/metric/internal/x/x.go | 46 +- .../otel/sdk/metric/manual_reader.go | 9 +- .../otel/sdk/metric/meter.go | 121 +- .../otel/sdk/metric/periodic_reader.go | 9 +- .../otel/sdk/metric/pipeline.go | 132 +- .../otel/sdk/metric/provider.go | 10 +- .../otel/sdk/metric/version.go | 2 +- .../otel/sdk/metric/view.go | 11 +- .../otel/sdk/resource/auto.go | 62 +- .../otel/sdk/resource/builtin.go | 6 +- .../otel/sdk/resource/host_id_windows.go | 7 +- .../otel/sdk/resource/os_windows.go | 1 - .../otel/sdk/trace/batch_span_processor.go | 7 +- .../otel/sdk/trace/evictedqueue.go | 21 +- .../otel/sdk/trace/provider.go | 9 +- .../otel/sdk/trace/span.go | 108 +- .../go.opentelemetry.io/otel/sdk/version.go | 2 +- .../otel/semconv/internal/http.go | 327 - .../otel/semconv/v1.4.0/README.md | 3 - .../otel/semconv/v1.4.0/exception.go | 9 - .../otel/semconv/v1.4.0/http.go | 103 - .../otel/semconv/v1.4.0/resource.go | 895 --- .../otel/semconv/v1.4.0/trace.go | 1367 ---- .../go.opentelemetry.io/otel/trace/context.go | 2 +- vendor/go.opentelemetry.io/otel/trace/doc.go | 2 +- .../otel/verify_examples.sh | 74 - vendor/go.opentelemetry.io/otel/version.go | 2 +- vendor/go.opentelemetry.io/otel/versions.yaml | 15 +- .../x/crypto/chacha20/chacha_noasm.go | 2 +- .../{chacha_ppc64le.go => chacha_ppc64x.go} | 2 +- .../{chacha_ppc64le.s => chacha_ppc64x.s} | 114 +- .../x/crypto/internal/poly1305/mac_noasm.go | 2 +- .../{sum_ppc64le.go => sum_ppc64x.go} | 2 +- .../poly1305/{sum_ppc64le.s => sum_ppc64x.s} | 30 +- vendor/golang.org/x/net/html/atom/atom.go | 78 + vendor/golang.org/x/net/html/atom/table.go | 783 +++ .../golang.org/x/net/html/charset/charset.go | 257 + vendor/golang.org/x/net/html/const.go | 111 + vendor/golang.org/x/net/html/doc.go | 122 + vendor/golang.org/x/net/html/doctype.go | 156 + vendor/golang.org/x/net/html/entity.go | 2253 +++++++ vendor/golang.org/x/net/html/escape.go | 339 + vendor/golang.org/x/net/html/foreign.go | 222 + vendor/golang.org/x/net/html/iter.go | 56 + vendor/golang.org/x/net/html/node.go | 229 + vendor/golang.org/x/net/html/parse.go | 2460 +++++++ vendor/golang.org/x/net/html/render.go | 293 + vendor/golang.org/x/net/html/token.go | 1272 ++++ .../x/net/http2/client_conn_pool.go | 8 +- 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 | 215 +- vendor/golang.org/x/net/http2/transport.go | 385 +- vendor/golang.org/x/net/http2/unencrypted.go | 32 + vendor/golang.org/x/net/http2/write.go | 10 + .../net/internal/socket/zsys_openbsd_ppc64.go | 28 +- .../internal/socket/zsys_openbsd_riscv64.go | 28 +- vendor/golang.org/x/oauth2/token.go | 7 + .../golang.org/x/sys/cpu/asm_darwin_x86_gc.s | 17 + vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go | 61 + vendor/golang.org/x/sys/cpu/cpu_gc_x86.go | 4 +- .../x/sys/cpu/{cpu_x86.s => cpu_gc_x86.s} | 2 +- vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go | 6 - .../golang.org/x/sys/cpu/cpu_linux_arm64.go | 1 - .../cpu/cpu_other_x86.go} | 11 +- vendor/golang.org/x/sys/cpu/cpu_x86.go | 6 +- .../x/sys/cpu/syscall_darwin_x86_gc.go | 98 + vendor/golang.org/x/sys/unix/README.md | 2 +- vendor/golang.org/x/sys/unix/ioctl_linux.go | 96 + vendor/golang.org/x/sys/unix/mkerrors.sh | 16 +- vendor/golang.org/x/sys/unix/syscall_aix.go | 2 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 64 +- .../x/sys/unix/syscall_linux_arm64.go | 2 + .../x/sys/unix/syscall_linux_loong64.go | 2 + .../x/sys/unix/syscall_linux_riscv64.go | 2 + .../x/sys/unix/syscall_zos_s390x.go | 104 +- .../golang.org/x/sys/unix/vgetrandom_linux.go | 13 + .../unix/vgetrandom_unsupported.go} | 11 +- vendor/golang.org/x/sys/unix/zerrors_linux.go | 44 +- .../x/sys/unix/zerrors_linux_386.go | 25 + .../x/sys/unix/zerrors_linux_amd64.go | 25 + .../x/sys/unix/zerrors_linux_arm.go | 25 + .../x/sys/unix/zerrors_linux_arm64.go | 26 + .../x/sys/unix/zerrors_linux_loong64.go | 25 + .../x/sys/unix/zerrors_linux_mips.go | 25 + .../x/sys/unix/zerrors_linux_mips64.go | 25 + .../x/sys/unix/zerrors_linux_mips64le.go | 25 + .../x/sys/unix/zerrors_linux_mipsle.go | 25 + .../x/sys/unix/zerrors_linux_ppc.go | 25 + .../x/sys/unix/zerrors_linux_ppc64.go | 25 + .../x/sys/unix/zerrors_linux_ppc64le.go | 25 + .../x/sys/unix/zerrors_linux_riscv64.go | 25 + .../x/sys/unix/zerrors_linux_s390x.go | 25 + .../x/sys/unix/zerrors_linux_sparc64.go | 25 + .../golang.org/x/sys/unix/zsyscall_linux.go | 27 +- .../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 | 60 + .../x/sys/unix/ztypes_darwin_arm64.go | 60 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 222 +- .../golang.org/x/sys/unix/ztypes_zos_s390x.go | 6 + .../golang.org/x/sys/windows/dll_windows.go | 2 +- .../x/sys/windows/svc/mgr/config.go | 2 +- .../x/sys/windows/svc/mgr/recovery.go | 4 +- .../x/sys/windows/syscall_windows.go | 36 +- .../golang.org/x/sys/windows/types_windows.go | 127 + .../x/sys/windows/zsyscall_windows.go | 71 + vendor/golang.org/x/term/README.md | 11 +- .../x/text/encoding/htmlindex/htmlindex.go | 86 + .../x/text/encoding/htmlindex/map.go | 105 + .../x/text/encoding/htmlindex/tables.go | 362 + vendor/golang.org/x/tools/go/packages/doc.go | 15 +- .../x/tools/go/packages/loadmode_string.go | 69 +- .../x/tools/go/packages/packages.go | 28 +- .../x/tools/go/types/objectpath/objectpath.go | 14 +- .../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 | 2 +- .../x/tools/internal/aliases/aliases_go121.go | 37 - .../x/tools/internal/aliases/aliases_go122.go | 32 +- .../x/tools/internal/gcimporter/bimport.go | 61 - .../x/tools/internal/gcimporter/gcimporter.go | 11 +- .../x/tools/internal/gcimporter/iexport.go | 13 +- .../x/tools/internal/gcimporter/iimport.go | 13 +- .../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 | 16 +- .../x/tools/internal/gocommand/invoke.go | 18 +- .../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 + .../x/tools/internal/typesinternal/recv.go | 8 +- .../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 - .../grpc/balancer/base/balancer.go | 4 +- .../grpc/balancer/pickfirst/pickfirst.go | 2 +- .../grpc/balancer_wrapper.go | 6 +- .../grpc_binarylog_v1/binarylog.pb.go | 22 +- .../grpc/credentials/insecure/insecure.go | 2 +- vendor/google.golang.org/grpc/dialoptions.go | 2 + .../grpc/grpclog/internal/logger.go | 2 +- .../grpc/health/grpc_health_v1/health.pb.go | 8 +- .../grpc/internal/binarylog/method_logger.go | 2 +- .../grpc/internal/channelz/channelmap.go | 7 - .../grpc/internal/channelz/funcs.go | 2 +- .../internal/channelz/syscall_nonlinux.go | 4 +- .../grpc/internal/envconfig/envconfig.go | 2 +- .../grpc/internal/internal.go | 4 +- .../resolver/passthrough/passthrough.go | 2 +- .../grpc/internal/status/status.go | 4 +- .../grpc/internal/syscall/syscall_nonlinux.go | 6 +- .../grpc/internal/transport/controlbuf.go | 7 - .../grpc/internal/transport/handler_server.go | 4 +- .../grpc/internal/transport/http2_client.go | 18 +- .../grpc/internal/transport/http2_server.go | 4 +- .../grpc/internal/transport/http_util.go | 2 +- .../grpc/internal/transport/transport.go | 2 +- .../grpc/keepalive/keepalive.go | 20 +- vendor/google.golang.org/grpc/mem/buffers.go | 4 +- vendor/google.golang.org/grpc/rpc_util.go | 34 +- .../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 +- .../protobuf/types/known/emptypb/empty.pb.go | 24 +- .../types/known/fieldmaskpb/field_mask.pb.go | 24 +- .../types/known/structpb/struct.pb.go | 110 +- .../types/known/timestamppb/timestamp.pb.go | 24 +- .../types/known/wrapperspb/wrappers.pb.go | 200 +- vendor/modules.txt | 731 ++- 2051 files changed, 117999 insertions(+), 29531 deletions(-) create mode 100644 vendor/github.com/DataDog/datadog-agent/comp/core/log/def/LICENSE create mode 100644 vendor/github.com/DataDog/datadog-agent/comp/core/log/def/component.go create mode 100644 vendor/github.com/DataDog/datadog-agent/comp/core/log/def/params.go create mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/config/nodetreemodel/LICENSE create mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/config/nodetreemodel/config.go create mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/config/setup/config_change_checker.go create mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/config/structure/LICENSE create mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/config/structure/unmarshal.go create mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/config/teeconfig/LICENSE create mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/config/teeconfig/teeconfig.go create mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_podman_util.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion_javascript.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion_javascript_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_fetch_uptimes_payload.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_request.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_local_variable_parsing_options_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_device_id.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_step.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_step_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding_items.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding_items_role.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_ci_options.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_config.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments_property_names.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options_monitor_options.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options_monitor_options_notification_preset_name.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_tests_mobile_application.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_tests_mobile_application_reference_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_request_port.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_uptime.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_uptime.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_match.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_match_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_palette.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_all.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_all_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_substring.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_substring_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_rule.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_legacy_live_span.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_live_span_unit.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_fixed_span.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_fixed_span_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_live_span.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_live_span_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_microsoft_teams_integration.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_software_catalog.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_data.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_meta.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_relationships.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_incident.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_oncall.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_raw_schema.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_raw_schema_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity_meta.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_incident_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_oncall_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_oncall_escalation_item.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_schema.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_schema_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_meta.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_incidents.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_oncalls.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_raw_schema.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_related_entities.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_schema.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_api_version.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_code_location_item.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_event_item.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_integration_opsgenie.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_integration_pagerduty.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_log_item.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_performance.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_pipelines.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_datadog.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_kind.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_spec.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_integrations.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_additional_owners_items.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_contacts_items.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_links_items.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_owner.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_datadog.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_kind.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_spec.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_datadog.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_kind.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_spec.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_datadog.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_kind.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_spec.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_include_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response_included_item.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response_links.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_metric_type_category.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response_data.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_request_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_request_data.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_response_data.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handles_response.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_response_attributes.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_response_data.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_create_api_handle_request.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_create_api_handle_response.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_get_channel_by_name_response.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_update_api_handle_request.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_update_api_handle_request_data.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_relation_type.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_relationship_item.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_reference_table.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_request.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_response.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_response_included_item.go create mode 100644 vendor/github.com/DataDog/datadog-api-client-go/v2/repository.datadog.yaml create mode 100644 vendor/github.com/antchfx/xmlquery/.gitignore create mode 100644 vendor/github.com/antchfx/xmlquery/LICENSE create mode 100644 vendor/github.com/antchfx/xmlquery/README.md create mode 100644 vendor/github.com/antchfx/xmlquery/cache.go create mode 100644 vendor/github.com/antchfx/xmlquery/cached_reader.go create mode 100644 vendor/github.com/antchfx/xmlquery/node.go create mode 100644 vendor/github.com/antchfx/xmlquery/options.go create mode 100644 vendor/github.com/antchfx/xmlquery/parse.go create mode 100644 vendor/github.com/antchfx/xmlquery/query.go create mode 100644 vendor/github.com/antchfx/xpath/.gitignore create mode 100644 vendor/github.com/antchfx/xpath/LICENSE create mode 100644 vendor/github.com/antchfx/xpath/README.md create mode 100644 vendor/github.com/antchfx/xpath/build.go create mode 100644 vendor/github.com/antchfx/xpath/cache.go create mode 100644 vendor/github.com/antchfx/xpath/func.go create mode 100644 vendor/github.com/antchfx/xpath/func_go110.go create mode 100644 vendor/github.com/antchfx/xpath/func_pre_go110.go create mode 100644 vendor/github.com/antchfx/xpath/operator.go create mode 100644 vendor/github.com/antchfx/xpath/parse.go create mode 100644 vendor/github.com/antchfx/xpath/query.go create mode 100644 vendor/github.com/antchfx/xpath/xpath.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/service/s3/api_op_CreateBucketMetadataTableConfiguration.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/s3/uri_context.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go create mode 100644 vendor/github.com/aws/smithy-go/transport/http/metrics.go create mode 100644 vendor/github.com/docker/docker/api/types/image/manifest.go create mode 100644 vendor/github.com/ebitengine/purego/.gitignore create mode 100644 vendor/github.com/ebitengine/purego/LICENSE create mode 100644 vendor/github.com/ebitengine/purego/README.md create mode 100644 vendor/github.com/ebitengine/purego/abi_amd64.h create mode 100644 vendor/github.com/ebitengine/purego/abi_arm64.h create mode 100644 vendor/github.com/ebitengine/purego/cgo.go create mode 100644 vendor/github.com/ebitengine/purego/dlerror.go create mode 100644 vendor/github.com/ebitengine/purego/dlfcn.go create mode 100644 vendor/github.com/ebitengine/purego/dlfcn_android.go create mode 100644 vendor/github.com/ebitengine/purego/dlfcn_darwin.go create mode 100644 vendor/github.com/ebitengine/purego/dlfcn_freebsd.go create mode 100644 vendor/github.com/ebitengine/purego/dlfcn_linux.go create mode 100644 vendor/github.com/ebitengine/purego/dlfcn_nocgo_freebsd.go create mode 100644 vendor/github.com/ebitengine/purego/dlfcn_nocgo_linux.go create mode 100644 vendor/github.com/ebitengine/purego/dlfcn_playground.go create mode 100644 vendor/github.com/ebitengine/purego/dlfcn_stubs.s create mode 100644 vendor/github.com/ebitengine/purego/func.go create mode 100644 vendor/github.com/ebitengine/purego/go_runtime.go create mode 100644 vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go create mode 100644 vendor/github.com/ebitengine/purego/internal/cgo/empty.go create mode 100644 vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_amd64.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_arm64.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_amd64.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_arm64.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_amd64.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_arm64.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_darwin.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_freebsd.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_linux.go create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s create mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_stubs.s create mode 100644 vendor/github.com/ebitengine/purego/internal/strings/strings.go create mode 100644 vendor/github.com/ebitengine/purego/is_ios.go create mode 100644 vendor/github.com/ebitengine/purego/nocgo.go create mode 100644 vendor/github.com/ebitengine/purego/struct_amd64.go create mode 100644 vendor/github.com/ebitengine/purego/struct_arm64.go create mode 100644 vendor/github.com/ebitengine/purego/struct_other.go create mode 100644 vendor/github.com/ebitengine/purego/sys_amd64.s create mode 100644 vendor/github.com/ebitengine/purego/sys_arm64.s create mode 100644 vendor/github.com/ebitengine/purego/sys_unix_arm64.s create mode 100644 vendor/github.com/ebitengine/purego/syscall.go create mode 100644 vendor/github.com/ebitengine/purego/syscall_cgo_linux.go create mode 100644 vendor/github.com/ebitengine/purego/syscall_sysv.go create mode 100644 vendor/github.com/ebitengine/purego/syscall_windows.go create mode 100644 vendor/github.com/ebitengine/purego/zcallback_amd64.s create mode 100644 vendor/github.com/ebitengine/purego/zcallback_arm64.s delete mode 100644 vendor/github.com/fsnotify/fsnotify/.editorconfig delete mode 100644 vendor/github.com/fsnotify/fsnotify/.gitattributes create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/darwin.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_linux.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_solaris.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_windows.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/freebsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/internal.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/unix.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/unix2.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/windows.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/mkdoc.zsh delete mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate/featuregate.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil/testutil.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/LICENSE create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/config.go rename vendor/github.com/open-telemetry/opentelemetry-collector-contrib/{exporter/datadogexporter => pkg/datadog/config}/config_warnings.go (95%) create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/host.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/logs.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/metrics.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/traces.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/LICENSE create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/Makefile create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/README.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/kafka_ctx.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/metadata.yaml create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/context_inferrer.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_convert_attributes_to_elements_xml.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_convert_text_to_elements_xml.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_get_xml.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_insert_xml.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_parse_simplified_xml.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_remove_xml.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_slice_to_map.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_to_key_value_string.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/paths.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite/metrics_to_prw_v2.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite/number_data_points_v2.go create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ecs/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/eks/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/lambda/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure/aks/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/azure/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/consul/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/docker/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/gcp/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/heroku/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/k8snode/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/openshift/documentation.md create mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/system/documentation.md delete mode 100644 vendor/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/system/internal/metadata/resource_int_version.go delete mode 100644 vendor/github.com/openshift/api/quota/v1/Makefile delete mode 100644 vendor/github.com/openshift/api/quota/v1/legacy.go rename vendor/github.com/openshift/api/quota/v1/{zz_generated.swagger_doc_generated.go => types_swagger_doc_generated.go} (75%) delete mode 100644 vendor/github.com/openshift/api/quota/v1/zz_generated.featuregated-crd-manifests.yaml delete mode 100644 vendor/github.com/prometheus/common/model/labelset_string_go120.go create mode 100644 vendor/github.com/prometheus/prometheus/prompb/io/prometheus/write/v2/codec.go create mode 100644 vendor/github.com/prometheus/prometheus/prompb/io/prometheus/write/v2/custom.go create mode 100644 vendor/github.com/prometheus/prometheus/prompb/io/prometheus/write/v2/symbols.go create mode 100644 vendor/github.com/prometheus/prometheus/prompb/io/prometheus/write/v2/types.pb.go create mode 100644 vendor/github.com/prometheus/prometheus/prompb/io/prometheus/write/v2/types.proto create mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_cgo.go create mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_fallback.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_nocgo.go create mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_darwin_cgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_darwin_nocgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_darwin_cgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_darwin_nocgo.go delete mode 100644 vendor/github.com/signalfx/sapm-proto/client/metrics.go create mode 100644 vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go create mode 100644 vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go create mode 100644 vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go delete mode 100644 vendor/go.opentelemetry.io/collector/component/componentprofiles/config.go rename vendor/go.opentelemetry.io/collector/component/{componentprofiles => componenttest}/LICENSE (100%) rename vendor/go.opentelemetry.io/collector/component/{componentprofiles => componenttest}/Makefile (100%) create mode 100644 vendor/go.opentelemetry.io/collector/component/componenttest/otelchecker.go delete mode 100644 vendor/go.opentelemetry.io/collector/component/componenttest/otelprometheuschecker.go create mode 100644 vendor/go.opentelemetry.io/collector/config/confighttp/compress_readcloser.go rename vendor/go.opentelemetry.io/collector/{exporter/loggingexporter => connector/connectortest}/LICENSE (100%) rename vendor/go.opentelemetry.io/collector/{exporter/loggingexporter => connector/connectortest}/Makefile (100%) delete mode 100644 vendor/go.opentelemetry.io/collector/connector/internal/connector.go delete mode 100644 vendor/go.opentelemetry.io/collector/connector/internal/logs.go delete mode 100644 vendor/go.opentelemetry.io/collector/connector/internal/metrics.go delete mode 100644 vendor/go.opentelemetry.io/collector/connector/internal/profiles.go delete mode 100644 vendor/go.opentelemetry.io/collector/connector/internal/traces.go rename vendor/go.opentelemetry.io/collector/{extension/ballastextension => consumer/consumererror}/LICENSE (100%) rename vendor/go.opentelemetry.io/collector/{extension/ballastextension => consumer/consumererror}/Makefile (100%) rename vendor/go.opentelemetry.io/collector/{internal/globalgates => consumer/consumererror/consumererrorprofiles}/LICENSE (100%) create mode 100644 vendor/go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles/Makefile create mode 100644 vendor/go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles/signalerrors.go create mode 100644 vendor/go.opentelemetry.io/collector/consumer/consumererror/internal/retryable.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/debugexporter/internal/normal/profiles.go rename vendor/go.opentelemetry.io/collector/exporter/{ => debugexporter}/internal/otlptext/databuffer.go (64%) rename vendor/go.opentelemetry.io/collector/exporter/{ => debugexporter}/internal/otlptext/known_sync_error.go (95%) rename vendor/go.opentelemetry.io/collector/exporter/{ => debugexporter}/internal/otlptext/known_sync_error_other.go (90%) rename vendor/go.opentelemetry.io/collector/exporter/{ => debugexporter}/internal/otlptext/known_sync_error_windows.go (92%) rename vendor/go.opentelemetry.io/collector/exporter/{ => debugexporter}/internal/otlptext/logs.go (97%) rename vendor/go.opentelemetry.io/collector/exporter/{ => debugexporter}/internal/otlptext/metrics.go (97%) create mode 100644 vendor/go.opentelemetry.io/collector/exporter/debugexporter/internal/otlptext/profiles.go rename vendor/go.opentelemetry.io/collector/exporter/{ => debugexporter}/internal/otlptext/sync.go (94%) rename vendor/go.opentelemetry.io/collector/exporter/{ => debugexporter}/internal/otlptext/traces.go (98%) delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterbatcher/batch_func.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles/Makefile create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles/constants.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles/profiles.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles/profiles_batch.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/base_exporter.go rename vendor/go.opentelemetry.io/collector/exporter/exporterhelper/{ => internal}/batch_sender.go (78%) create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/obsexporter.go rename vendor/go.opentelemetry.io/collector/{internal/obsreportconfig/obsmetrics/obs_exporter.go => exporter/exporterhelper/internal/obsmetrics.go} (61%) create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/queue_sender.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/request.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/request_sender.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/retry_sender.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/test_util.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/timeout_sender.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/exporterhelper/obsexporter.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exportertest/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/exporter/exportertest/Makefile delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/common/factory.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/common/logging_exporter.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/exporter.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/factory.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/logs.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/metrics.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/profiles.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/queue/batcher.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/queue/default_batcher.go create mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/queue/disabled_batcher.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/internal/traces.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/loggingexporter/README.md delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/loggingexporter/config.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/loggingexporter/doc.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/loggingexporter/factory.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/loggingexporter/internal/metadata/generated_status.go delete mode 100644 vendor/go.opentelemetry.io/collector/exporter/loggingexporter/metadata.yaml delete mode 100644 vendor/go.opentelemetry.io/collector/extension/ballastextension/README.md delete mode 100644 vendor/go.opentelemetry.io/collector/extension/ballastextension/config.go delete mode 100644 vendor/go.opentelemetry.io/collector/extension/ballastextension/factory.go delete mode 100644 vendor/go.opentelemetry.io/collector/extension/ballastextension/internal/metadata/generated_status.go delete mode 100644 vendor/go.opentelemetry.io/collector/extension/ballastextension/memory_ballast.go delete mode 100644 vendor/go.opentelemetry.io/collector/extension/ballastextension/metadata.yaml create mode 100644 vendor/go.opentelemetry.io/collector/extension/extensiontest/LICENSE rename vendor/go.opentelemetry.io/collector/{internal/globalgates => extension/extensiontest}/Makefile (100%) delete mode 100644 vendor/go.opentelemetry.io/collector/extension/internal/interfaces.go create mode 100644 vendor/go.opentelemetry.io/collector/internal/fanoutconsumer/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/internal/fanoutconsumer/Makefile delete mode 100644 vendor/go.opentelemetry.io/collector/internal/globalgates/globalgates.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/localhostgate/featuregate.go create mode 100644 vendor/go.opentelemetry.io/collector/internal/memorylimiter/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/internal/memorylimiter/Makefile rename vendor/go.opentelemetry.io/collector/internal/{ => memorylimiter}/cgroups/cgroup.go (99%) rename vendor/go.opentelemetry.io/collector/internal/{ => memorylimiter}/cgroups/cgroups.go (98%) rename vendor/go.opentelemetry.io/collector/internal/{ => memorylimiter}/cgroups/doc.go (98%) rename vendor/go.opentelemetry.io/collector/internal/{ => memorylimiter}/cgroups/errors.go (98%) rename vendor/go.opentelemetry.io/collector/internal/{ => memorylimiter}/cgroups/mountpoint.go (99%) rename vendor/go.opentelemetry.io/collector/internal/{ => memorylimiter}/cgroups/subsys.go (99%) rename vendor/go.opentelemetry.io/collector/internal/{ => memorylimiter}/iruntime/mem_info.go (93%) rename vendor/go.opentelemetry.io/collector/internal/{ => memorylimiter}/iruntime/total_memory_linux.go (91%) rename vendor/go.opentelemetry.io/collector/internal/{ => memorylimiter}/iruntime/total_memory_other.go (91%) delete mode 100644 vendor/go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics/obs_processor.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics/obs_scraper.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics/obsmetrics.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/obsreportconfig/obsreportconfig.go create mode 100644 vendor/go.opentelemetry.io/collector/internal/sharedcomponent/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/internal/sharedcomponent/Makefile rename vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/{v1experimental => v1development}/profiles_service.pb.go (84%) rename vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/{v1experimental/pprofextended.pb.go => v1development/profiles.pb.go} (55%) delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental/profiles.pb.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int32slice.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_intslice.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int32slice.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_intslice.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/pprofile/generated_attribute.go rename vendor/go.opentelemetry.io/collector/pdata/pprofile/{generated_labelslice.go => generated_attributetableslice.go} (61%) delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pprofile/generated_label.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pprofile/generated_profilecontainer.go rename vendor/go.opentelemetry.io/collector/pdata/pprofile/{generated_profilescontainersslice.go => generated_profilesslice.go} (57%) create mode 100644 vendor/go.opentelemetry.io/collector/pdata/pprofile/pb.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/pprofile/pprofileotlp/generated_exportpartialsuccess.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/pprofile/pprofileotlp/grpc.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/pprofile/pprofileotlp/request.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/pprofile/pprofileotlp/response.go create mode 100644 vendor/go.opentelemetry.io/collector/pdata/pprofile/profile.go create mode 100644 vendor/go.opentelemetry.io/collector/pipeline/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/pipeline/Makefile create mode 100644 vendor/go.opentelemetry.io/collector/pipeline/internal/globalsignal/signal.go create mode 100644 vendor/go.opentelemetry.io/collector/pipeline/pipeline.go create mode 100644 vendor/go.opentelemetry.io/collector/pipeline/pipelineprofiles/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/pipeline/pipelineprofiles/Makefile create mode 100644 vendor/go.opentelemetry.io/collector/pipeline/pipelineprofiles/config.go create mode 100644 vendor/go.opentelemetry.io/collector/pipeline/signal.go delete mode 100644 vendor/go.opentelemetry.io/collector/processor/internal/factory.go delete mode 100644 vendor/go.opentelemetry.io/collector/processor/internal/logs.go delete mode 100644 vendor/go.opentelemetry.io/collector/processor/internal/metrics.go create mode 100644 vendor/go.opentelemetry.io/collector/processor/internal/obsmetrics.go delete mode 100644 vendor/go.opentelemetry.io/collector/processor/internal/processor.go delete mode 100644 vendor/go.opentelemetry.io/collector/processor/internal/profiles.go delete mode 100644 vendor/go.opentelemetry.io/collector/processor/internal/traces.go create mode 100644 vendor/go.opentelemetry.io/collector/processor/memorylimiterprocessor/documentation.md create mode 100644 vendor/go.opentelemetry.io/collector/processor/memorylimiterprocessor/internal/metadata/generated_telemetry.go create mode 100644 vendor/go.opentelemetry.io/collector/processor/memorylimiterprocessor/obsreport.go create mode 100644 vendor/go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles/Makefile create mode 100644 vendor/go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles/processor.go create mode 100644 vendor/go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles/profiles.go create mode 100644 vendor/go.opentelemetry.io/collector/processor/processortest/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/processor/processortest/Makefile delete mode 100644 vendor/go.opentelemetry.io/collector/receiver/internal/factory.go delete mode 100644 vendor/go.opentelemetry.io/collector/receiver/internal/logs.go delete mode 100644 vendor/go.opentelemetry.io/collector/receiver/internal/metrics.go rename vendor/go.opentelemetry.io/collector/{internal/obsreportconfig/obsmetrics/obs_receiver.go => receiver/internal/obsmetrics.go} (85%) delete mode 100644 vendor/go.opentelemetry.io/collector/receiver/internal/profiles.go delete mode 100644 vendor/go.opentelemetry.io/collector/receiver/internal/receiver.go delete mode 100644 vendor/go.opentelemetry.io/collector/receiver/internal/traces.go create mode 100644 vendor/go.opentelemetry.io/collector/receiver/otlpreceiver/internal/profiles/otlp.go create mode 100644 vendor/go.opentelemetry.io/collector/receiver/receivertest/LICENSE create mode 100644 vendor/go.opentelemetry.io/collector/receiver/receivertest/Makefile create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.12.0/generated_resource.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.12.0/generated_trace.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.12.0/nonstandard.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.12.0/schema.go rename vendor/go.opentelemetry.io/{otel/semconv/v1.4.0 => collector/semconv/v1.26.0}/doc.go (65%) create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_attribute_group.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_event.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_resource.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_trace.go rename vendor/go.opentelemetry.io/{otel/semconv/v1.4.0 => collector/semconv/v1.26.0}/schema.go (70%) create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/doc.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_attribute_group.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_event.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_resource.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_trace.go create mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/schema.go create mode 100644 vendor/go.opentelemetry.io/collector/service/attributes.go create mode 100644 vendor/go.opentelemetry.io/collector/service/internal/graph/capabilities.go create mode 100644 vendor/go.opentelemetry.io/collector/service/internal/graph/connector.go create mode 100644 vendor/go.opentelemetry.io/collector/service/internal/graph/consumer.go create mode 100644 vendor/go.opentelemetry.io/collector/service/internal/graph/exporter.go create mode 100644 vendor/go.opentelemetry.io/collector/service/internal/graph/fanout.go create mode 100644 vendor/go.opentelemetry.io/collector/service/internal/graph/node.go delete mode 100644 vendor/go.opentelemetry.io/collector/service/internal/graph/nodes.go create mode 100644 vendor/go.opentelemetry.io/collector/service/internal/graph/processor.go create mode 100644 vendor/go.opentelemetry.io/collector/service/internal/graph/receiver.go delete mode 100644 vendor/go.opentelemetry.io/collector/service/telemetry/attributes.go create mode 100644 vendor/go.opentelemetry.io/collector/service/telemetry/factory_impl.go delete mode 100644 vendor/go.opentelemetry.io/collector/service/telemetry/internal/factory.go rename vendor/go.opentelemetry.io/collector/service/{internal/proctelemetry => telemetry/internal/otelinit}/config.go (83%) rename vendor/go.opentelemetry.io/collector/service/{telemetry.go => telemetry/metrics.go} (63%) delete mode 100644 vendor/go.opentelemetry.io/collector/service/telemetry/telemetry.go create mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/LICENSE create mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/README.md create mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/core.go create mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/encoder.go create mode 100644 vendor/go.opentelemetry.io/otel/log/global/README.md create mode 100644 vendor/go.opentelemetry.io/otel/log/global/log.go create mode 100644 vendor/go.opentelemetry.io/otel/log/internal/global/log.go create mode 100644 vendor/go.opentelemetry.io/otel/log/internal/global/state.go create mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/README.md rename vendor/go.opentelemetry.io/otel/sdk/metric/{internal => }/exemplar/doc.go (93%) rename vendor/go.opentelemetry.io/otel/sdk/metric/{internal => }/exemplar/exemplar.go (98%) rename vendor/go.opentelemetry.io/otel/sdk/metric/{internal => }/exemplar/filter.go (75%) rename vendor/go.opentelemetry.io/otel/sdk/metric/{internal/exemplar/rand.go => exemplar/fixed_size_reservoir.go} (73%) create mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/histogram_reservoir.go rename vendor/go.opentelemetry.io/otel/sdk/metric/{internal => }/exemplar/reservoir.go (73%) rename vendor/go.opentelemetry.io/otel/sdk/metric/{internal => }/exemplar/storage.go (94%) rename vendor/go.opentelemetry.io/otel/sdk/metric/{internal => }/exemplar/value.go (91%) create mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/drop.go create mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/filtered_reservoir.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/drop.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/filtered_reservoir.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/hist.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/internal/http.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.4.0/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.4.0/exception.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.4.0/http.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.4.0/resource.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.4.0/trace.go delete mode 100644 vendor/go.opentelemetry.io/otel/verify_examples.sh rename vendor/golang.org/x/crypto/chacha20/{chacha_ppc64le.go => chacha_ppc64x.go} (89%) rename vendor/golang.org/x/crypto/chacha20/{chacha_ppc64le.s => chacha_ppc64x.s} (76%) rename vendor/golang.org/x/crypto/internal/poly1305/{sum_ppc64le.go => sum_ppc64x.go} (95%) rename vendor/golang.org/x/crypto/internal/poly1305/{sum_ppc64le.s => sum_ppc64x.s} (89%) create mode 100644 vendor/golang.org/x/net/html/atom/atom.go create mode 100644 vendor/golang.org/x/net/html/atom/table.go create mode 100644 vendor/golang.org/x/net/html/charset/charset.go create mode 100644 vendor/golang.org/x/net/html/const.go create mode 100644 vendor/golang.org/x/net/html/doc.go create mode 100644 vendor/golang.org/x/net/html/doctype.go create mode 100644 vendor/golang.org/x/net/html/entity.go create mode 100644 vendor/golang.org/x/net/html/escape.go create mode 100644 vendor/golang.org/x/net/html/foreign.go create mode 100644 vendor/golang.org/x/net/html/iter.go create mode 100644 vendor/golang.org/x/net/html/node.go create mode 100644 vendor/golang.org/x/net/html/parse.go create mode 100644 vendor/golang.org/x/net/html/render.go create mode 100644 vendor/golang.org/x/net/html/token.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/net/http2/unencrypted.go create mode 100644 vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s create mode 100644 vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go rename vendor/golang.org/x/sys/cpu/{cpu_x86.s => cpu_gc_x86.s} (94%) rename vendor/golang.org/x/{tools/internal/versions/toolchain_go121.go => sys/cpu/cpu_other_x86.go} (50%) create mode 100644 vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.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%) create mode 100644 vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go create mode 100644 vendor/golang.org/x/text/encoding/htmlindex/map.go create mode 100644 vendor/golang.org/x/text/encoding/htmlindex/tables.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/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 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 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/README.md b/README.md index adc9c11f68..4a00509e9e 100644 --- a/README.md +++ b/README.md @@ -31,11 +31,11 @@ This table represents the supported components of the ADOT Collector. The highli | [prometheusreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver#prometheus-receiver) | [attributesprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/attributesprocessor#attributes-processor) | [`awsxrayexporter`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awsxrayexporter) | [healthcheckextension](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/healthcheckextension#health-check) | | [otlpreceiver](https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver#otlp-receiver) | [resourceprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourceprocessor#resource-processor) | [`awsemfexporter`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awsemfexporter) | [pprofextension](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/pprofextension#performance-profiler) | | [`awsecscontainermetricsreceiver`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awsecscontainermetricsreceiver) | [batchprocessor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor#batch-processor) | [prometheusremotewriteexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter#prometheus-remote-write-exporter) | [zpagesextension](https://github.com/open-telemetry/opentelemetry-collector/tree/main/extension/zpagesextension#zpages) | -| [`awsxrayreceiver`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awsxrayreceiver) | [memorylimiterprocessor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor#memory-limiter-processor) | [loggingexporter](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.109.0/exporter/loggingexporter#logging-exporter) | [`ecsobserver`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/observer/ecsobserver) | +| [`awsxrayreceiver`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awsxrayreceiver) | [memorylimiterprocessor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor#memory-limiter-processor) | [debugexporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/debugexporter) | [`ecsobserver`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/observer/ecsobserver) | | [statsdreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/statsdreceiver#statsd-receiver) | [probabilisticsamplerprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/probabilisticsamplerprocessor#probabilistic-sampling-processor) | [otlpexporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter) | [`awsproxy`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/awsproxy) | -| [zipkinreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver#zipkin-receiver) | [metricstransformprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor#metrics-transform-processor) | [fileexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/fileexporter#file-exporter) | [ballastextension](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.108.1/extension/ballastextension#memory-ballast) | -| [jaegerreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jaegerreceiver#jaeger-receiver) | [spanprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/spanprocessor#span-processor) | [otlphttpexporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter#otlphttp-exporter) | [`sigv4authextension`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/sigv4authextension) | -| [`awscontainerinsightreceiver`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awscontainerinsightreceiver) | [filterprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/filterprocessor#filter-processor) | [prometheusexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusexporter#prometheus-exporter) | [filestorage](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage/filestorage#file-storage) | +| [zipkinreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver#zipkin-receiver) | [metricstransformprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor#metrics-transform-processor) | [fileexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/fileexporter#file-exporter) | [`sigv4authextension`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/sigv4authextension) | +| [jaegerreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jaegerreceiver#jaeger-receiver) | [spanprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/spanprocessor#span-processor) | [otlphttpexporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter#otlphttp-exporter) | [filestorage](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage/filestorage#file-storage) | +| [`awscontainerinsightreceiver`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awscontainerinsightreceiver) | [filterprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/filterprocessor#filter-processor) | [prometheusexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusexporter#prometheus-exporter) | | | [kafka](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kafkareceiver) | [resourcedetectionprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor#resource-detection-processor) | [datadogexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/datadogexporter#datadog-exporter) | | | [filelogreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver#filelog-receiver) | [metricsgenerationprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricsgenerationprocessor#metrics-generation-processor) | [sapmexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sapmexporter#sapm-exporter) | | | | [cumulativetodeltaprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/cumulativetodeltaprocessor#cumulative-to-delta-processor) | [signalfxexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/signalfxexporter#signalfx-metrics-exporter) | | @@ -43,7 +43,6 @@ This table represents the supported components of the ADOT Collector. The highli | | [groupbytraceprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/groupbytraceprocessor) | [kafka](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/kafkaexporter) | | | | [tailsamplingprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/tailsamplingprocessor) | [loadbalancingexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/loadbalancingexporter) | | | | [k8sattributesprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor) | [awscloudwatchlogsexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awscloudwatchlogsexporter) | | -| | | [debugexporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/debugexporter) | | Besides the components that interact with telemetry signals directly from the previous table, there is also support to the following confmap providers: diff --git a/go.mod b/go.mod index 2240ad79b2..4c91d5df8e 100644 --- a/go.mod +++ b/go.mod @@ -5,76 +5,74 @@ go 1.22.0 toolchain go1.22.2 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.109.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.109.0 + github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.115.0 github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.109.0 - go.opentelemetry.io/collector/confmap v1.15.0 - go.opentelemetry.io/collector/confmap/provider/envprovider v1.15.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v1.15.0 - go.opentelemetry.io/collector/confmap/provider/httpprovider v0.109.0 - go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.109.0 - go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.109.0 - go.opentelemetry.io/collector/exporter v0.109.0 - go.opentelemetry.io/collector/exporter/debugexporter v0.109.0 - go.opentelemetry.io/collector/exporter/loggingexporter v0.109.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.109.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.109.0 - go.opentelemetry.io/collector/extension v0.109.0 - go.opentelemetry.io/collector/extension/ballastextension v0.108.1 - go.opentelemetry.io/collector/extension/zpagesextension v0.109.0 - go.opentelemetry.io/collector/featuregate v1.15.0 - go.opentelemetry.io/collector/otelcol v0.109.0 - go.opentelemetry.io/collector/processor v0.109.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.109.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.109.0 - go.opentelemetry.io/collector/receiver v0.109.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.109.0 + github.com/stretchr/testify v1.10.0 + go.opentelemetry.io/collector/component v0.115.0 + go.opentelemetry.io/collector/confmap v1.21.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v1.21.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v1.21.0 + go.opentelemetry.io/collector/confmap/provider/httpprovider v1.21.0 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.21.0 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.21.0 + go.opentelemetry.io/collector/exporter v0.115.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.115.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.115.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.115.0 + go.opentelemetry.io/collector/extension v0.115.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.115.0 + go.opentelemetry.io/collector/featuregate v1.21.0 + go.opentelemetry.io/collector/otelcol v0.115.0 + go.opentelemetry.io/collector/processor v0.115.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.115.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.115.0 + go.opentelemetry.io/collector/receiver v0.115.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.115.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/sys v0.25.0 + golang.org/x/sys v0.28.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 ) @@ -89,109 +87,115 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/Code-Hex/go-generics-cache v1.5.1 // indirect - github.com/DataDog/agent-payload/v5 v5.0.132 // indirect - github.com/DataDog/datadog-agent/comp/core/config v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/core/flare/builder v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/core/flare/types v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.56.2 // indirect + github.com/DataDog/agent-payload/v5 v5.0.136 // indirect + github.com/DataDog/datadog-agent/comp/core/config v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/flare/builder v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/flare/types v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.59.0 // indirect github.com/DataDog/datadog-agent/comp/core/log v0.56.2 // indirect - github.com/DataDog/datadog-agent/comp/core/secrets v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/core/telemetry v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/def v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/logs/agent/config v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.56.2 // indirect - github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.56.2 // indirect - github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.2 // indirect - github.com/DataDog/datadog-agent/comp/trace/compression/def v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/env v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/mock v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/model v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/setup v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/utils v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/logs/auditor v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/client v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/message v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/logs/metrics v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/processor v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/sds v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/sender v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/sources v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/proto v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/status/health v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/telemetry v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/executable v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/fxutil v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/http v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/optional v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/statstracker v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/system/socket v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/version v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-api-client-go/v2 v2.29.0 // indirect + github.com/DataDog/datadog-agent/comp/core/log/def v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/secrets v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/telemetry v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/def v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/logs/agent/config v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.61.0-devel.0.20241118141418-5b899217c342 // indirect + github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/trace/compression/def v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/env v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/setup v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/utils v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/auditor v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/client v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/message v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/metrics v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/processor v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/sds v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/sender v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/sources v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/proto v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/status/health v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/telemetry v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/trace v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/backoff v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/cgroups v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/http v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/optional v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/startstop v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/statstracker v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/version v0.59.0 // indirect + github.com/DataDog/datadog-api-client-go/v2 v2.31.0 // indirect github.com/DataDog/datadog-go/v5 v5.5.0 // indirect github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240906125328-9899f57f27be // indirect - github.com/DataDog/go-sqllexer v0.0.14 // indirect + github.com/DataDog/go-sqllexer v0.0.15 // indirect github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.20.0 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.20.0 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.20.0 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.19.0 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.19.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.21.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.21.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.21.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.21.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.21.0 // indirect github.com/DataDog/sketches-go v1.4.6 // indirect github.com/DataDog/viper v1.13.5 // indirect github.com/DataDog/zstd v1.5.6 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect github.com/IBM/sarama v1.43.3 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/alecthomas/participle/v2 v2.1.1 // indirect github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect - github.com/apache/thrift v0.20.0 // indirect + github.com/antchfx/xmlquery v1.4.2 // indirect + github.com/antchfx/xpath v1.3.2 // indirect + github.com/apache/thrift v0.21.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.55.5 // indirect - github.com/aws/aws-sdk-go-v2 v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.37 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.35 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect + github.com/aws/aws-sdk-go-v2 v1.32.6 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect + github.com/aws/aws-sdk-go-v2/config v1.28.6 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.47 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3 // indirect - github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.31.1 // indirect - github.com/aws/smithy-go v1.21.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.25 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.6 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.6 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.71.0 // indirect + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.33.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 // indirect + github.com/aws/smithy-go v1.22.1 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect + github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect github.com/briandowns/spinner v1.23.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect @@ -210,23 +214,24 @@ require ( github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.118.0 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v27.1.2+incompatible // indirect + github.com/docker/docker v27.3.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/eapache/go-resiliency v1.7.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect + github.com/ebitengine/purego v0.8.1 // indirect github.com/elastic/go-grok v0.3.1 // indirect github.com/elastic/lunes v0.1.0 // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect - github.com/envoyproxy/go-control-plane v0.12.1-0.20240621013728-1eb8caab5155 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect + github.com/envoyproxy/go-control-plane v0.13.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect github.com/expr-lang/expr v1.16.9 // indirect github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -237,7 +242,7 @@ require ( github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-resty/resty/v2 v2.13.1 // indirect - github.com/go-viper/mapstructure/v2 v2.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/go-zookeeper/zk v1.0.4 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.3 // indirect @@ -262,8 +267,8 @@ require ( github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect - github.com/hashicorp/consul/api v1.29.4 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect + github.com/hashicorp/consul/api v1.30.0 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -285,7 +290,7 @@ require ( github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ionos-cloud/sdk-go/v6 v6.1.11 // indirect - github.com/jaegertracing/jaeger v1.60.0 // indirect + github.com/jaegertracing/jaeger v1.62.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.7.6 // indirect @@ -298,12 +303,12 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect github.com/karrick/godirwalk v1.17.0 // indirect - github.com/klauspost/compress v1.17.10 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/knadh/koanf v1.5.0 // indirect - github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/knadh/koanf/v2 v2.1.2 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/leodido/go-syslog/v4 v4.1.0 // indirect + github.com/leodido/go-syslog/v4 v4.2.0 // indirect github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b // indirect github.com/lightstep/go-expohisto v1.0.0 // indirect github.com/linode/linodego v1.37.0 // indirect @@ -328,44 +333,46 @@ require ( github.com/mrunalp/fileutils v0.5.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.109.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.115.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.14 // indirect github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/opencontainers/selinux v1.11.0 // indirect - github.com/openshift/api v0.0.0-20240919193929-2669d1ebc910 // indirect + github.com/openshift/api v3.9.0+incompatible // indirect github.com/openshift/client-go v0.0.0-20240918182115-6a8ead8397fd // indirect github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/outcaste-io/ristretto v0.2.3 // indirect @@ -378,23 +385,23 @@ require ( github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect - github.com/prometheus/client_golang v1.20.4 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.57.0 // indirect + github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/relvacode/iso8601 v1.4.0 // indirect + github.com/relvacode/iso8601 v1.6.0 // indirect github.com/rs/cors v1.11.1 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30 // indirect github.com/seccomp/libseccomp-golang v0.10.0 // indirect github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect - github.com/shirou/gopsutil/v4 v4.24.8 // indirect + github.com/shirou/gopsutil/v4 v4.24.11 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect - github.com/signalfx/sapm-proto v0.14.0 // indirect + github.com/signalfx/sapm-proto v0.17.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect @@ -406,7 +413,7 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/tinylru v1.2.1 // indirect - github.com/tidwall/wal v1.1.7 // indirect + github.com/tidwall/wal v1.1.8 // indirect github.com/tinylib/msgp v1.1.9 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.8.0 // indirect @@ -422,118 +429,121 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.etcd.io/bbolt v1.3.11 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.109.0 // indirect - go.opentelemetry.io/collector/client v1.15.0 // indirect - go.opentelemetry.io/collector/component/componentprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/component/componentstatus v0.109.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.109.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.15.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.109.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.109.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.109.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.15.0 // indirect - go.opentelemetry.io/collector/config/configretry v1.15.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.109.0 // indirect - go.opentelemetry.io/collector/config/configtls v1.15.0 // indirect - go.opentelemetry.io/collector/config/internal v0.109.0 // indirect - go.opentelemetry.io/collector/connector v0.109.0 // indirect - go.opentelemetry.io/collector/connector/connectorprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/consumer v0.109.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.109.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.109.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.109.0 // indirect - go.opentelemetry.io/collector/extension/extensioncapabilities v0.109.0 // indirect - go.opentelemetry.io/collector/internal/globalgates v0.109.0 // indirect - go.opentelemetry.io/collector/pdata v1.15.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.109.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.109.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/semconv v0.109.0 // indirect - go.opentelemetry.io/collector/service v0.109.0 // indirect - go.opentelemetry.io/contrib/config v0.9.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.29.0 // indirect - go.opentelemetry.io/contrib/zpages v0.54.0 // indirect - go.opentelemetry.io/otel v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.5.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.51.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.5.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0 // indirect - go.opentelemetry.io/otel/log v0.5.0 // indirect - go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.29.0 // indirect - go.opentelemetry.io/otel/sdk/log v0.5.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect - go.opentelemetry.io/otel/trace v1.29.0 // indirect + go.opentelemetry.io/collector v0.115.0 // indirect + go.opentelemetry.io/collector/client v1.21.0 // indirect + go.opentelemetry.io/collector/component/componentstatus v0.115.0 // indirect + go.opentelemetry.io/collector/component/componenttest v0.115.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.115.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.21.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.115.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.115.0 // indirect + go.opentelemetry.io/collector/config/confignet v1.21.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.21.0 // indirect + go.opentelemetry.io/collector/config/configretry v1.21.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.115.0 // indirect + go.opentelemetry.io/collector/config/configtls v1.21.0 // indirect + go.opentelemetry.io/collector/config/internal v0.115.0 // indirect + go.opentelemetry.io/collector/connector v0.115.0 // indirect + go.opentelemetry.io/collector/connector/connectorprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/connector/connectortest v0.115.0 // indirect + go.opentelemetry.io/collector/consumer v1.21.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror v0.115.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.115.0 // indirect + go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/exporter/exportertest v0.115.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.115.0 // indirect + go.opentelemetry.io/collector/extension/experimental/storage v0.115.0 // indirect + go.opentelemetry.io/collector/extension/extensioncapabilities v0.115.0 // indirect + go.opentelemetry.io/collector/extension/extensiontest v0.115.0 // indirect + go.opentelemetry.io/collector/internal/fanoutconsumer v0.115.0 // indirect + go.opentelemetry.io/collector/internal/memorylimiter v0.115.0 // indirect + go.opentelemetry.io/collector/internal/sharedcomponent v0.115.0 // indirect + go.opentelemetry.io/collector/pdata v1.21.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.115.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.115.0 // indirect + go.opentelemetry.io/collector/pipeline v0.115.0 // indirect + go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/processor/processorprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/processor/processortest v0.115.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/receiver/receivertest v0.115.0 // indirect + go.opentelemetry.io/collector/semconv v0.115.0 // indirect + go.opentelemetry.io/collector/service v0.115.0 // indirect + go.opentelemetry.io/contrib/bridges/otelzap v0.6.0 // indirect + go.opentelemetry.io/contrib/config v0.10.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.31.0 // indirect + go.opentelemetry.io/contrib/zpages v0.56.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.54.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 // indirect + go.opentelemetry.io/otel/log v0.8.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.7.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/dig v1.18.0 // indirect go.uber.org/fx v1.22.2 // indirect - golang.org/x/crypto v0.27.0 // indirect - golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/crypto v0.29.0 // indirect + golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/term v0.24.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.6.0 // indirect - golang.org/x/tools v0.25.0 // indirect + golang.org/x/tools v0.26.0 // indirect gonum.org/v1/gonum v0.15.1 // indirect google.golang.org/api v0.188.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.66.2 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 // indirect - k8s.io/api v0.31.1 // indirect - k8s.io/apimachinery v0.31.1 // indirect - k8s.io/client-go v0.31.1 // indirect + k8s.io/api v0.31.3 // indirect + k8s.io/apimachinery v0.31.3 // indirect + k8s.io/client-go v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect - sigs.k8s.io/controller-runtime v0.19.0 // indirect + sigs.k8s.io/controller-runtime v0.19.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) -// https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/4433 -exclude github.com/StackExchange/wmi v1.2.0 - -// https://github.com/google/flatbuffers/issues/6466 -exclude github.com/google/flatbuffers v1.12.0 - -// see https://github.com/aws-observability/aws-otel-collector/issues/977 +// see https://github.com/aws-observability/aws-otel-collector/issues/977 and https://github.com/distribution/distribution/issues/3590 exclude github.com/docker/distribution v2.8.0+incompatible -replace github.com/go-chi/chi/v4 => github.com/go-chi/chi v4.0.0+incompatible - // see https://github.com/ionos-cloud/sdk-go/issues/27 exclude github.com/ionos-cloud/sdk-go/v6 v6.0.5851 // https://github.com/go-openapi/spec/issues/156 exclude github.com/go-openapi/spec v0.20.5 -// excluded as DataDog/agent-payload/v5 v5.0.59 has been removed from source directory but is still present in proxy package -exclude github.com/DataDog/agent-payload/v5 v5.0.59 // indirect - // openshift removed all tags from their repo, use the pseudoversion from the release-3.9 branch HEAD -exclude github.com/openshift/api v3.9.0+incompatible +replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 -// checksun mismatch issue for cadvisor - https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32381 -exclude github.com/google/cadvisor v0.49.1 +// https://groups.google.com/g/golang-announce/c/-nPEi39gI4Q/m/cGVPJCqdAQAJ?pli=1 +replace golang.org/x/crypto v0.29.0 => golang.org/x/crypto v0.31.0 diff --git a/go.sum b/go.sum index 4cab79e7e4..8499d26ce3 100644 --- a/go.sum +++ b/go.sum @@ -59,169 +59,179 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= -github.com/DataDog/agent-payload/v5 v5.0.132 h1:F9wy+iyAgN2QmkEsOlPp3RrQ4vOb4T6k3BXhjSpELS4= -github.com/DataDog/agent-payload/v5 v5.0.132/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= -github.com/DataDog/datadog-agent/cmd/agent/common/path v0.58.0-rc.5 h1:Bk0QtWKnSaToaBIYS+/1ewmjdtXxlLsf1o+W10PMKoo= -github.com/DataDog/datadog-agent/cmd/agent/common/path v0.58.0-rc.5/go.mod h1:Jk2JF4S8w+INLwADIxmZfziB8x+JQ7wlvcKIk6WJVgY= -github.com/DataDog/datadog-agent/comp/api/api/def v0.58.0-rc.5 h1:qNklfxblOd+rhwTmZ8yMsTR3RzVhlhy4XXsdT2LCzSg= -github.com/DataDog/datadog-agent/comp/api/api/def v0.58.0-rc.5/go.mod h1:9vuv+8TTwPN8fCdKeHztCViIZI0PE3JPNb7mrSkN6YI= -github.com/DataDog/datadog-agent/comp/core/config v0.58.0-rc.5 h1:/8taGNHUN/pDCBKYi8w2X7uFzNNEbSautEYCyYN0Az8= -github.com/DataDog/datadog-agent/comp/core/config v0.58.0-rc.5/go.mod h1:FmK6NSLtOTAk4uzuEgummvi77uU4V3dm/6yfjGbc6N4= -github.com/DataDog/datadog-agent/comp/core/flare/builder v0.58.0-rc.5 h1:FmiJyMP8Z4SbHtRo92XZuJZIZrIiVM0Nv0B1XhuCEDw= -github.com/DataDog/datadog-agent/comp/core/flare/builder v0.58.0-rc.5/go.mod h1:lE05LMk+uwj0r5uSPWpWvFMfjERuWJXozMjvVyx/JsE= -github.com/DataDog/datadog-agent/comp/core/flare/types v0.58.0-rc.5 h1:nVFqaEh9j3rYxi3a5VadQopJ5w0WS9OvXV0/orQBgxg= -github.com/DataDog/datadog-agent/comp/core/flare/types v0.58.0-rc.5/go.mod h1:ln2CY53hfV3LY7Mz3SE7SHxqf3an5gnM2Z9H7CeyfCs= -github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.56.2 h1:t+w11Lqi5XvUpqKGx1GKzlc//1it9H31JOUiJViWUpA= -github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.56.2/go.mod h1:YJDw2LKcZMO8aSsCrLZm7ZYSOyc/1sNfSE2xv+T5pu4= +github.com/DataDog/agent-payload/v5 v5.0.136 h1:PJG6B4p+iGZaPl28LIQ/DlAw9673I3iCZ59zYUPEu1E= +github.com/DataDog/agent-payload/v5 v5.0.136/go.mod h1:lxh9lb5xYrBXjblpIWYUi4deJqVbkIfkjwesi5nskDc= +github.com/DataDog/datadog-agent/cmd/agent/common/path v0.59.0 h1:PolEv4Se/H2jBCKdiOPNELEG5OuXWKrqpsxZMUQ4g14= +github.com/DataDog/datadog-agent/cmd/agent/common/path v0.59.0/go.mod h1:ve34W4f7PGC5zbot0HB+W3xkNZN7obINz89o8N/biP8= +github.com/DataDog/datadog-agent/comp/api/api/def v0.59.0 h1:zfXuUtnet+GWssR+Zi4lns5iIqlYQWiKXtKWb+6dJ+g= +github.com/DataDog/datadog-agent/comp/api/api/def v0.59.0/go.mod h1:gsXkdySqo/hjJmw/b4W9VYiGcRTJaq0uOVwMFAukl4U= +github.com/DataDog/datadog-agent/comp/core/config v0.59.0 h1:SxZsc9E6+d+Gb5fCfo/HnvRi8qTrTcLFE0//lX9+pM8= +github.com/DataDog/datadog-agent/comp/core/config v0.59.0/go.mod h1:2vRyHTEIHey2fsN9JO8z8bj7SSpC5VewuZsHJAA9k6I= +github.com/DataDog/datadog-agent/comp/core/flare/builder v0.59.0 h1:qpvXvXK+Az2dKgzx3pPaAvS/tsrl1QXI4FndDtcjgvY= +github.com/DataDog/datadog-agent/comp/core/flare/builder v0.59.0/go.mod h1:cg7JgU501CDIZNiyEfnwbBbk9nOsUy2nsKADIAdRnmk= +github.com/DataDog/datadog-agent/comp/core/flare/types v0.59.0 h1:Kz5NUsZFT4pTUh4P/A2bBiBTNkfT80ZfHig8LOuHBiY= +github.com/DataDog/datadog-agent/comp/core/flare/types v0.59.0/go.mod h1:n32X+eH1UMvlfZOwu70t6ySopwbN1yBfaVcpNgaCkG4= +github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.59.0 h1:m939bF+E/+nPZ1jGU1J9ZVeI3fCk8nbAjl9H9MMz2A0= +github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.59.0/go.mod h1:jjiRtHmQcGwHmP4l4T49t4i2fU2NM097LEG6VaI8CIk= github.com/DataDog/datadog-agent/comp/core/log v0.56.2 h1:qvBT+FfjKGqimyEvmsNHCZKbTfBJAdUZSVy2IZQ8HS4= github.com/DataDog/datadog-agent/comp/core/log v0.56.2/go.mod h1:ivJ/RMZjTNkoPPNDX+v/nnBwABLCiMv1vQA5tk/HCR4= -github.com/DataDog/datadog-agent/comp/core/secrets v0.58.0-rc.5 h1:fYPQHxMGPLAekLTpSxdwOnfMm6xM8oHo9W7apg9U1sI= -github.com/DataDog/datadog-agent/comp/core/secrets v0.58.0-rc.5/go.mod h1:8NBvv0meyB79xEC1Z3PhNpiDKov1xRtCKyk2PkIQdHo= -github.com/DataDog/datadog-agent/comp/core/telemetry v0.58.0-rc.5 h1:mKSEz2RLcQ5bc8ZdCF+5RAUnh2ntVhb3nXPhAwFuX3s= -github.com/DataDog/datadog-agent/comp/core/telemetry v0.58.0-rc.5/go.mod h1:bh9paiLvqTIdIgtt5psCG5XWbDS5kvD7NOBpCABw56U= -github.com/DataDog/datadog-agent/comp/def v0.58.0-rc.5 h1:GbRlPR+ii/wn4WCOshQUkPhA5Jx4zmGR9Kt41QQQpDI= -github.com/DataDog/datadog-agent/comp/def v0.58.0-rc.5/go.mod h1:2xorAm6FmIl275/ayDZSUg53Hz4oQ/X8ELyp7I1N3fM= -github.com/DataDog/datadog-agent/comp/logs/agent/config v0.58.0-rc.5 h1:2BT4IO6Q7eR21aBmmgQDGHXjnkOnXjV7TLBS32lKu6Y= -github.com/DataDog/datadog-agent/comp/logs/agent/config v0.58.0-rc.5/go.mod h1:Z0tA/Ca/bwdV322A3wUhJ0RN+0o+UwO+5ir4tHix4E8= -github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.56.2 h1:SXJCwx6giD8IeQLyVX62gRysBEHx3vczkprPmln1knk= -github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.56.2/go.mod h1:0o4qKCsmoFkYSgOTKL5UMR1/Ig0pX4bA6gJZjuu8/K4= -github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.56.2 h1:P1u8lJDnCHiWc0vvvvm9JB36fRFJ2eSvD9ajVo0x1r8= -github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.56.2/go.mod h1:hruCkJ5hCU6LZ5jkdnST3BHanHeQ73ewPAWIW/oZVmw= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.58.0-rc.5 h1:dvwf5osrsWL4LKm5KSAjEcpfmhW74U+UmzMHMVfWrxg= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.58.0-rc.5/go.mod h1:plyNeTeF9TqlX98jZKL470+sabFlfAL/uFzxCdF+l/8= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.2 h1:TmEsHhs1mcKsiWTK08aYvZrNZqlbs51FwN6yQVMe7No= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.2/go.mod h1:D56XSQiApc7kNzkF2FCJG/6D/8SV3jhdWqe0dDSRGoM= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/statsprocessor v0.56.2 h1:WTK6fTNgSCuVrz3dngS7R82rq9SVI+E8oQehd/2eEU0= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/statsprocessor v0.56.2/go.mod h1:tXejTCnqylzUGUBmFF8tcinp+nPCeMqL350Nl/qV5DU= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.58.0-rc.5 h1:JVKQiSFX0YmPb+TqAavKK3XS/B3qU9jeTqqDIamX9ww= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.58.0-rc.5/go.mod h1:dkAKHpW6s3L6NKTbtCbvJt8T/BOC9MMncfjMs7iRIXg= -github.com/DataDog/datadog-agent/comp/trace/compression/def v0.58.0-rc.5 h1:Oo/+XHgCCs2tOFMSbAKfTJH7rsW3kA3O1rOZ61pGte0= -github.com/DataDog/datadog-agent/comp/trace/compression/def v0.58.0-rc.5/go.mod h1:samFXdP0HVSwD223LPLzcPKUjRQ6/uwr/1wMPo2HhRg= -github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.58.0-rc.5 h1:XZC8WdLMSdOIdPkM6Idyzyf9+g/dj72DbE0wEkrp4n8= -github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.58.0-rc.5/go.mod h1:VV312wfivCQbEHwDOGSNl8Gm9aGwnfMFPm0qaOu0r7w= -github.com/DataDog/datadog-agent/comp/trace/compression/impl-zstd v0.58.0-rc.5 h1:LBPhAHKmCRDT9bNjeqE5PszCSWeiDimdv48onpFqGnU= -github.com/DataDog/datadog-agent/comp/trace/compression/impl-zstd v0.58.0-rc.5/go.mod h1:1KSRA+PaP74jM7Gi0rPRZ4JSND4XwJ8ehN6/m2H3AcY= -github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.58.0-rc.5 h1:cMsiA1hiY4Iwyb2zadRwcMnbgw5FDoVLkzyGclZ6ew8= -github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.58.0-rc.5/go.mod h1:s9QBNtoBURzy/0FeBInQ7kawNj04OnBNUo8xYr26z3E= -github.com/DataDog/datadog-agent/pkg/config/env v0.58.0-rc.5 h1:nY0tGwQWas8m+NoCsFZXleZWbkOfW/qQ2iyVKLjbAOg= -github.com/DataDog/datadog-agent/pkg/config/env v0.58.0-rc.5/go.mod h1:x4gZBfze8+pm+jZjGvG5z2sL7gA0KJzLv8DgjIrgyls= -github.com/DataDog/datadog-agent/pkg/config/logs v0.56.2 h1:sgipVv0WUoKO9RNSYFhNXH4wicevfU+yti8+rZDClFo= -github.com/DataDog/datadog-agent/pkg/config/logs v0.56.2/go.mod h1:RA+h+P2M7BlBeU+XVuZXhTj8lzjXdEoCLP28EkcYV8s= -github.com/DataDog/datadog-agent/pkg/config/mock v0.58.0-rc.5 h1:276FQAlFpPnvUg43nHdef1TD1jMd24O20T8qkX6ba94= -github.com/DataDog/datadog-agent/pkg/config/mock v0.58.0-rc.5/go.mod h1:PfqVWNpQMnvhN9bt8+9MUnOwLt6i4sMtos840qJqnCQ= -github.com/DataDog/datadog-agent/pkg/config/model v0.58.0-rc.5 h1:G49MbVTNnm+NTISu+C+IpP9wAPKO8ctqTBlqb+3VBI0= -github.com/DataDog/datadog-agent/pkg/config/model v0.58.0-rc.5/go.mod h1:kw+xggYf7ckTqiKwIxfeg8dW++DomRQt9ZDvDDrjeS0= -github.com/DataDog/datadog-agent/pkg/config/setup v0.58.0-rc.5 h1:J+2iMS6w0akUI06Mn38o3NBp4i2fm0OwoLc3s1DFxuo= -github.com/DataDog/datadog-agent/pkg/config/setup v0.58.0-rc.5/go.mod h1:5WGIHhRW7PRanmG5B28W9Xt0Y/TSZTvN+gmy2DP3NRQ= -github.com/DataDog/datadog-agent/pkg/config/utils v0.58.0-rc.5 h1:GDMivEtseE9g+Iul22lwUptf4IYZrQb8qKlLC5U0ROk= -github.com/DataDog/datadog-agent/pkg/config/utils v0.58.0-rc.5/go.mod h1:C2a4ixPEnVNNzhex1HGrIRTPFF8BdeRr7qpRIzTRklo= -github.com/DataDog/datadog-agent/pkg/logs/auditor v0.56.2 h1:VIlQd7UBq3oUoUbpRmiwIlkDZuGvAXS/wUXU6xmezwk= -github.com/DataDog/datadog-agent/pkg/logs/auditor v0.56.2/go.mod h1:Vm8HdkHHpEwZhixY0oPWsx0+EidhSaMTF7tN9yuMPFY= -github.com/DataDog/datadog-agent/pkg/logs/client v0.56.2 h1:1qg4WagIl2qtKcq9cVL2fRBhqvYQ5DuYaY7cFJ+293k= -github.com/DataDog/datadog-agent/pkg/logs/client v0.56.2/go.mod h1:Wb8Rxw8BdbLQPzwNXtpWUO9+bBfZhyB63/8oYFLv/GQ= -github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.56.2 h1:0AF1X1OabT8vCTYK3Aim122xkg6bAMUJXYTcH/RL7pQ= -github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.56.2/go.mod h1:AFPiROajOY3I6akR+WsKwGIriBPiTHRBfx8tmw8hGRw= -github.com/DataDog/datadog-agent/pkg/logs/message v0.58.0-rc.5 h1:TXLg/v8UwXJwfyLjDQDHcNCu+FmcXGtV/3R9dMXyqhU= -github.com/DataDog/datadog-agent/pkg/logs/message v0.58.0-rc.5/go.mod h1:JBtaVe3aQT5x30m2uF3EIPEzG2AkETvB8v2A9tLTF10= -github.com/DataDog/datadog-agent/pkg/logs/metrics v0.56.2 h1:0aETddrtn7SOZqCX9tOEiRgPgKKG2u9X9YMnNaboQYM= -github.com/DataDog/datadog-agent/pkg/logs/metrics v0.56.2/go.mod h1:mVRXyOp9oiPkj43jRt3r/iTL+XuScLKJjv3MzDvB5eQ= -github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.56.2 h1:vuZjsCYaGwAazLKiLSHqCm/fsGeRmONN/rIneQWEXBE= -github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.56.2/go.mod h1:YX4mkRMvBjp3/X+8Lf39g/AntSZurqL6UIYdJdK2k/M= -github.com/DataDog/datadog-agent/pkg/logs/processor v0.56.2 h1:AJoG4f9WoOgYnzmk12gY5TjPsS+lZTg9wK90oWEhtlU= -github.com/DataDog/datadog-agent/pkg/logs/processor v0.56.2/go.mod h1:9XZDNW8LRR1yk/H8QvVmHNAEkrtEDXrsgEKd7WdU3pc= -github.com/DataDog/datadog-agent/pkg/logs/sds v0.56.2 h1:coxL4HfNDRh9KCIHod9vMT5iBkmU0LV3U4xcHmZ9YCk= -github.com/DataDog/datadog-agent/pkg/logs/sds v0.56.2/go.mod h1:vBywuPyeY7FAW+bpIqAoVKIBxX4JoIQ2GDaAtVgMk24= -github.com/DataDog/datadog-agent/pkg/logs/sender v0.56.2 h1:Ky5KX2o++a7hGkyiNBwqDGODrhBI7LmLZXtnFCjS8Ic= -github.com/DataDog/datadog-agent/pkg/logs/sender v0.56.2/go.mod h1:IhlLrrI3hWySfPYFMqtlY9kNg4ECz7ojpviXJhdILbQ= -github.com/DataDog/datadog-agent/pkg/logs/sources v0.58.0-rc.5 h1:KHnRdN3HQGdrhTR2ApRhYw4J8IPvbqNFD33H7nfIDKU= -github.com/DataDog/datadog-agent/pkg/logs/sources v0.58.0-rc.5/go.mod h1:3CLAy1a1oK+QRdIy3IM/RFuXFJMcuf7WGIDfslz9OYQ= -github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.56.2 h1:DLgBADfWqBrhM8n5DRg9UvrnxYqU+BW3QvvUGAqkpRA= -github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.56.2/go.mod h1:PaduNrh0GJ3UEKG30VMu0M6hi7KuYf3VviLdIG9xV9k= -github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.58.0-rc.5 h1:Cwa3JspehMwfGhxL3VjKUZXUVDhOqGIIG9eCZaXb+fg= -github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.58.0-rc.5/go.mod h1:p2NTG+cIhVGlKELJfRteGCec37ICptIpeB2x/MsRkbw= -github.com/DataDog/datadog-agent/pkg/logs/util/testutils v0.56.2 h1:GhiXTsuUbGloQh7Um5AX0JmggwDn9/x0icWOTNEjovI= -github.com/DataDog/datadog-agent/pkg/logs/util/testutils v0.56.2/go.mod h1:Ple3tPG2mBALotrP7KH/A6CY7M+3npX6+/Zl5bwY7EM= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.58.0-rc.5 h1:O5pf611gwn0YqjohY92rSOQAnXpvRzyvdKMO3VJItc8= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.58.0-rc.5/go.mod h1:MfDvphBMmEMwE3a30h27AtPO7OzmvdoVTiGY1alEmo4= -github.com/DataDog/datadog-agent/pkg/proto v0.58.0-rc.5 h1:WGT6AzzPCcfGgXcQTrQLYJ3sCuMxHhKWe9Tnla4JVWc= -github.com/DataDog/datadog-agent/pkg/proto v0.58.0-rc.5/go.mod h1:0wLYojGxRZZFQ+SBbFjay9Igg0zbP88l03TfZaVZ6Dc= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.58.0-rc.5 h1:NiIPBqn/egaogAy8+u/vSfp4DIUGVqTKDTGjQlcI5qQ= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.58.0-rc.5/go.mod h1:jN5BsZI+VilHJV1Wac/efGxS4TPtXa1Lh9SiUyv93F4= -github.com/DataDog/datadog-agent/pkg/status/health v0.56.2 h1:XbVTbfBXqCnr48Yg3yFfBRzP3B/Y1yS5pqpKJX59RU0= -github.com/DataDog/datadog-agent/pkg/status/health v0.56.2/go.mod h1:EkC/SgFR03BKwBitVV4dIuP+ofwPlUCkVi5K5k1Dh2Y= -github.com/DataDog/datadog-agent/pkg/telemetry v0.56.2 h1:jda5gGyoU/lXVqQsr1xv+z8K8ujLX4MppiMNtMH5chQ= -github.com/DataDog/datadog-agent/pkg/telemetry v0.56.2/go.mod h1:u6BWbLlCuVOu77ntX0x5af1qNISD0wtMj5c6ojfHQyk= -github.com/DataDog/datadog-agent/pkg/trace v0.58.0-rc.5 h1:XphD3IyjWDyV/+Xw5Pgipt9EmeT/gsjyWH5X/gDg29M= -github.com/DataDog/datadog-agent/pkg/trace v0.58.0-rc.5/go.mod h1:rgME1pnFo0ZIoshEfr4/589U/k4uhc2HempA79HJ4I8= -github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.2 h1:AWmZSmqPmm2QHsQtmB6MiNaq0ssp9/4fhq4aiGqJ1Sg= -github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.2/go.mod h1:2RMfdYkKyeh8hXs6WgaamkkEyK35Xo55C4rFG4dO1k8= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.58.0-rc.5 h1:sHx1AqE2vRdH6/Y+nmozFVVOpoflnQZHvHCopiUzxvc= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.58.0-rc.5/go.mod h1:pIoMzSVRcK56D3o3H/eus+xUuIFjFR09qsKgL716GUM= -github.com/DataDog/datadog-agent/pkg/util/executable v0.58.0-rc.5 h1:XQnMyE2vxSRGRdnvH6tFI3AGCWMBfn5Ln7USJVhCT5U= -github.com/DataDog/datadog-agent/pkg/util/executable v0.58.0-rc.5/go.mod h1:mSSn2OzsdgoUnPyBmF8rEDU+ee1RFp+H6LFsJSteN9o= -github.com/DataDog/datadog-agent/pkg/util/filesystem v0.58.0-rc.5 h1:rnN+wH7kCIHyJJmmcxGFcNgOho6scUvmyVcVK0PEPEM= -github.com/DataDog/datadog-agent/pkg/util/filesystem v0.58.0-rc.5/go.mod h1:LgAbVM72AFz8SFcbyblr0wrkLVwcNF09adRHyZxsgIw= -github.com/DataDog/datadog-agent/pkg/util/fxutil v0.58.0-rc.5 h1:3O4TJrgNu6xjg9nTGwRBPY8/rD4zDTvHYcFfg9Gvmfw= -github.com/DataDog/datadog-agent/pkg/util/fxutil v0.58.0-rc.5/go.mod h1:qQb+geWifSCQGWg2SiM1vklU2MH0qiC+6/zYk89r1Kc= -github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.58.0-rc.5 h1:zx7gUIV3SlE/HBYN+gvGClSk60Tt8ej2t+YoXY+jQsM= -github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.58.0-rc.5/go.mod h1:TtGpu9IMJjNRytJXO9QT9lsTgxnr55vSt99ZuHIKFrY= -github.com/DataDog/datadog-agent/pkg/util/http v0.56.2 h1:yu88zoYRzyd0EK4F7bJ39D8ibJa82y+x4u0JHeeQoxE= -github.com/DataDog/datadog-agent/pkg/util/http v0.56.2/go.mod h1:jVsNYokuDBLoj/5SMCrjmtZc+yfiBBfHN7Nkhw9VJdI= -github.com/DataDog/datadog-agent/pkg/util/log v0.58.0-rc.5 h1:SikjhQmkzAJZnItVdRTFeDuvmDSUH1tnMBQNhHS8u3A= -github.com/DataDog/datadog-agent/pkg/util/log v0.58.0-rc.5/go.mod h1:Yizy9x7thBrprolGjWDOZTK2OLsr9jjY0sRzZ+kTB1w= -github.com/DataDog/datadog-agent/pkg/util/optional v0.58.0-rc.5 h1:vvId2Y0SdXz0NnUdSkiIBhfTIH8FvvO5VYeH3fBjWiU= -github.com/DataDog/datadog-agent/pkg/util/optional v0.58.0-rc.5/go.mod h1:xWT/KJdJg2/0pZyAKZ6XmIiE5sM+AyUo4qvKuPHQ17U= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.58.0-rc.5 h1:J1bjQLTIQxYCx/Ei0z4sZmM51iywGnn8CQ7YOh3PaG8= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.58.0-rc.5/go.mod h1:t1DlnUEMltkvwPLc7zCtP1u5cBDu+30daR2VhQO5bvA= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.58.0-rc.5 h1:v6Q5WAGMYJzp68W1CojmTdKIcDSi1Qqb4JpJQktxQ3Y= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.58.0-rc.5/go.mod h1:krOxbYZc4KKE7bdEDu10lLSQBjdeSFS/XDSclsaSf1Y= -github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.2 h1:9oHsY5RiebLoONStzy1OTG168WvPMnF8rU9TCgn/v+Y= -github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.2/go.mod h1:IkqOyNbrg9hXqCMyL+g+Ldhz4q6VVOPqbHQxS4lLiRs= -github.com/DataDog/datadog-agent/pkg/util/statstracker v0.58.0-rc.5 h1:HyiE7ebky9p1pjmzB3U8kTXti5UhoLcFBrbEEejqaZA= -github.com/DataDog/datadog-agent/pkg/util/statstracker v0.58.0-rc.5/go.mod h1:Et2HSDjQvMhgs9ZdH7T5I4q04g5Fj23EtmeIaen/9/M= -github.com/DataDog/datadog-agent/pkg/util/system v0.58.0-rc.5 h1:xaK8pTC4cYvuwojJotx4f5nU3LYN8baI/hv5Zjk3VgQ= -github.com/DataDog/datadog-agent/pkg/util/system v0.58.0-rc.5/go.mod h1:JsVOZB3Zv29IcSb+NUImqCIuwMjZSmCJovUO/5SW0x8= -github.com/DataDog/datadog-agent/pkg/util/system/socket v0.58.0-rc.5 h1:xVqkEHnk5xIxSU9HC44x/5WY0pRTABaN3dtOhFL/s9c= -github.com/DataDog/datadog-agent/pkg/util/system/socket v0.58.0-rc.5/go.mod h1:Hp16ayANpEIMDhh2bQtHzUZKp3CbnK58+UkClmaEyYg= -github.com/DataDog/datadog-agent/pkg/util/testutil v0.58.0-rc.5 h1:BtbetlPrMjVBDFyQuGHPr6qxUJ9gVKXsbxiFZCfS2OQ= -github.com/DataDog/datadog-agent/pkg/util/testutil v0.58.0-rc.5/go.mod h1:m/uWLdpGEi3x/5gybZFeYNEnIdKhGtWW8kFZuM+GSFA= -github.com/DataDog/datadog-agent/pkg/util/winutil v0.58.0-rc.5 h1:gSRcD5Dd91Sg6woiHSp1C8mcBB7cZqs+n2/xCwfJolU= -github.com/DataDog/datadog-agent/pkg/util/winutil v0.58.0-rc.5/go.mod h1:V5962xkfb41l5mPn6qaHqYPrJrGY2MVF2DK934DZyaI= -github.com/DataDog/datadog-agent/pkg/version v0.58.0-rc.5 h1:E2dJIBLKW5K2jPwbZqaV5ftQBoF5MpzEnWI2FoWSozY= -github.com/DataDog/datadog-agent/pkg/version v0.58.0-rc.5/go.mod h1:rcA7LtIB5WLpxsems/bWO1iXkyGEgHHje7vJ0b20ZpU= -github.com/DataDog/datadog-api-client-go/v2 v2.29.0 h1:b0vTasEPUc7FuCKaRFqbJB+88IdWL/f7LdKcasMV8Vo= -github.com/DataDog/datadog-api-client-go/v2 v2.29.0/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= +github.com/DataDog/datadog-agent/comp/core/log/def v0.59.0 h1:4je3YuTFhqmw0a0oksSsVPglNT4b37gosaRv9T/TLYQ= +github.com/DataDog/datadog-agent/comp/core/log/def v0.59.0/go.mod h1:uFF83DUAQYoQKKdddr6ptnCPiRik/lr9y+B2JxgLWRs= +github.com/DataDog/datadog-agent/comp/core/log/mock v0.59.0 h1:ndq+1XRChjuYIgfLuRuGQ5trGtq/Qpa/vnTG/6r9bKs= +github.com/DataDog/datadog-agent/comp/core/log/mock v0.59.0/go.mod h1:Ii6q5lgyvXKRmt8Puaan94V5iOiX4xOd+1OU7ZX8Lo4= +github.com/DataDog/datadog-agent/comp/core/secrets v0.59.0 h1:RS7z5/VuZtPc2NLdFRerDubYtZgWbgf1dOZpdhclgb8= +github.com/DataDog/datadog-agent/comp/core/secrets v0.59.0/go.mod h1:hKbelRO2zUJbU4KI1NumVvBIYq45RtQ3JC2LJvJU/y8= +github.com/DataDog/datadog-agent/comp/core/telemetry v0.59.0 h1:ApJD+u0a5anQZkmCw3y2ljhMC56BcjlT6klAZaoXLYk= +github.com/DataDog/datadog-agent/comp/core/telemetry v0.59.0/go.mod h1:mNPruKhnFUe7xiFMnPIMweb7O1HkTh0C78Llhd+Y9xA= +github.com/DataDog/datadog-agent/comp/def v0.59.0 h1:AO1oQ4/ZqYtzklm7glhYqQLyr4me4qg34sf4HRzyMcQ= +github.com/DataDog/datadog-agent/comp/def v0.59.0/go.mod h1:2xorAm6FmIl275/ayDZSUg53Hz4oQ/X8ELyp7I1N3fM= +github.com/DataDog/datadog-agent/comp/logs/agent/config v0.59.0 h1:olhlCNtCG5BKHsRJrwR4i7XZkeMbTRKz4OFayLrvD6o= +github.com/DataDog/datadog-agent/comp/logs/agent/config v0.59.0/go.mod h1:QrNGc1TWXhNagr1/nVSiUI+n8SFczoS8vpZdKtASxnQ= +github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.59.0 h1:kM1pYOA1EmlT47b8Buxvlm6EVykG9T72gUuQL+Uur8s= +github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.59.0/go.mod h1:2SrdlZ37IBATRjnPhNs4qBqaZCZ7HkEb4DNWXn/DsXY= +github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.59.0 h1:SJhZCcJDZEEHzR2p9dGQ56jIy08ZfqajiBIBgLShtzU= +github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.59.0/go.mod h1:uyfsYUV6L7W4duN9rlFrEN+r3REPPwCSE4Nj8WjDhDE= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.61.0-devel.0.20241118141418-5b899217c342 h1:4JNPjWCjqwTqGJcdJGURGDAJDS5N9wW+g7PwNYCygYs= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.61.0-devel.0.20241118141418-5b899217c342/go.mod h1:Z7BRzEr/tg3DjSf2MgQobKbtjKv4iavZJyhh/7OGTWA= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.59.0 h1:LyhDLcabmvRZk2ehGlZYXuW2MpA7RoR87C6jQ7gUQ24= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.59.0/go.mod h1:tG+1FklWteENGZb3gE/13Sn80YfMEI6APmZxY8nSQHo= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/statsprocessor v0.59.0 h1:3eTrUZGpI5EjzIINZhilZXRUd6ND7W98bUUe4UF+arE= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/statsprocessor v0.59.0/go.mod h1:Dp1J09BVqtGHR3yj82q4mCVNq5qkhDs/cTI5/DlvJxk= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.57.0-devel.0.20240718200853-81bf3b2e412d h1:wdjJ+/tBYiFLwno+lBPP66rm5jIf6ycGPRr21ogBBzE= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.57.0-devel.0.20240718200853-81bf3b2e412d/go.mod h1:CHa8CY2k0/wZkx/4KPi/WU/0m5YCfWZI1SAs1imElMA= +github.com/DataDog/datadog-agent/comp/trace/compression/def v0.59.0 h1:u/IbNqKfYodJIprc/rkpcwLz/5OFox95ujemwR9AHuo= +github.com/DataDog/datadog-agent/comp/trace/compression/def v0.59.0/go.mod h1:samFXdP0HVSwD223LPLzcPKUjRQ6/uwr/1wMPo2HhRg= +github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.59.0 h1:Z/fqQiBYwTTt27IIBdX6oivtIxfqm0o0gNqA1zoATm4= +github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.59.0/go.mod h1:x1xzklye6fB16nIh4HrvbOYN/WP4OJNJpvZylelI3tI= +github.com/DataDog/datadog-agent/comp/trace/compression/impl-zstd v0.59.0 h1:m9wM1fLNndxJWVXwZegwQ2wAp6CK0uFqF/sh/5Rw1PY= +github.com/DataDog/datadog-agent/comp/trace/compression/impl-zstd v0.59.0/go.mod h1:t1BtP+u27pjTeOX/5otD7klkUIHB0Mh4ToeeeHs+oRY= +github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.59.0 h1:Etckua/+tAA9nA6Ssbgx+sKDIdgiobVFuhRvQWDAGHQ= +github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.59.0/go.mod h1:s9QBNtoBURzy/0FeBInQ7kawNj04OnBNUo8xYr26z3E= +github.com/DataDog/datadog-agent/pkg/config/env v0.59.0 h1:8oHEWArrc7dYJunz5ZtLzSVsGkW4JUk+v/QLgcUuvRI= +github.com/DataDog/datadog-agent/pkg/config/env v0.59.0/go.mod h1:8DoSDz72MFB3o09Tn90OUnUiQ60kDvObWh9xmaG+4cI= +github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0 h1:bg/anB+tp85oaFKvdMrbaYO0idWbErtm8i4rp4dra5k= +github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0/go.mod h1:xVhwIc1BVvXN7UUM+604EOyoSRIF9B84Vn6Xn5n3GXE= +github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 h1:8x6VWgK/mrG++vU1QkbfVI3YBWy2AyQHgOVyFYwX4lE= +github.com/DataDog/datadog-agent/pkg/config/model v0.59.0/go.mod h1:+IfFsWw9OM26lwDmTfy6RVF5LhEmFC8LgO4OGajyuvk= +github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.59.0 h1:8MTR7i4xNFoVp0gyzHghn2s7AZcuu25GJDQvTGwtGC8= +github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.59.0/go.mod h1:aYSdawfzI8vX0YlS19KKxpLR8oG1Rqp2rH+wFPv4MFs= +github.com/DataDog/datadog-agent/pkg/config/setup v0.59.0 h1:6cNxX6N7HIZqGVSKD4Fzh30Ldky8ckaQnd7B4bXzErg= +github.com/DataDog/datadog-agent/pkg/config/setup v0.59.0/go.mod h1:JEO3nqqPJn1lh8tSabgRqXHOth2l++ZYEfzRRYGUji0= +github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 h1:U7+yV+Ul/Cmvt7HKuf6TXkwq9/RhaaWNOX+xReUgqwQ= +github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0/go.mod h1:rdbxYVSC1Xjh8RODr06j8Mbku7dXnRr3SWxi5wsl9pA= +github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 h1:8iCSoIKcNqiX/QEmWbjRcH5za/Aj06QtIfT8JNJZXDU= +github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0/go.mod h1:oi5YMuCZKA98ACJz5cx/lXM+pZ4HAUgc5bSP73M4G3w= +github.com/DataDog/datadog-agent/pkg/config/utils v0.59.0 h1:ZA4WUpcb23Ts/BQ2fEDodGd45QtQFuJ0xSrvxME8JBQ= +github.com/DataDog/datadog-agent/pkg/config/utils v0.59.0/go.mod h1:n8JbD8n9omhs/MWZij6yA6RgHAOYx54BXMTRR2v+32A= +github.com/DataDog/datadog-agent/pkg/logs/auditor v0.59.0 h1:5PDZmH8KW0PYSfywoNlHkjoTNSYefq4N6X55CBqiCeU= +github.com/DataDog/datadog-agent/pkg/logs/auditor v0.59.0/go.mod h1:mcWSkLVkuJmhqr4GkwHbhuELNxn46VNg487xL33LAQQ= +github.com/DataDog/datadog-agent/pkg/logs/client v0.59.0 h1:GC6gjPzImitUI26X9X23G4WuDyv/+KKjYHLoxmIllJ8= +github.com/DataDog/datadog-agent/pkg/logs/client v0.59.0/go.mod h1:EE6EkO4YH+hQlhQAPrcTxT3Ye72fOFwQxqyQsOFr2fk= +github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.59.0 h1:a/2kYMMKo9um9Dla5QExkvors05CFgyfrPkxClZz8L0= +github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.59.0/go.mod h1:Mc9HEEgXpsQEZKEtb7I42Yg5ShZyNXxJShdVslkhW2g= +github.com/DataDog/datadog-agent/pkg/logs/message v0.59.0 h1:hv2fiwwX53r4tdzv0YHbBDoGBLJcKrA4ErqC01XnCrY= +github.com/DataDog/datadog-agent/pkg/logs/message v0.59.0/go.mod h1:RS8UIJB31rymy8W5va8I1EFkd4hbSAbHUWPZYzfwH+M= +github.com/DataDog/datadog-agent/pkg/logs/metrics v0.59.0 h1:mQzAZGQaYlnQVyralxBs2KxYAm8Gb8IL45eimmX0Zr4= +github.com/DataDog/datadog-agent/pkg/logs/metrics v0.59.0/go.mod h1:liRnSv3VpZpv/rHGiYYBCBlkx2Sy98rw2/5hu9g1T/E= +github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.59.0 h1:3i0bNOq5IwPKKYpKl2zgkwOecvfxl2/mFZ5M4q8un7U= +github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.59.0/go.mod h1:xVtael5+vGMu08nvdlnqB7IhbwjTYCLHuXMjVodVFM8= +github.com/DataDog/datadog-agent/pkg/logs/processor v0.59.0 h1:F71SRQbj2bqLHAw8+R/fqMQCTiDjusD36u13/yK55Bo= +github.com/DataDog/datadog-agent/pkg/logs/processor v0.59.0/go.mod h1:XuBR8eeLrxNOI5ex2BlH67P4lmOZIs5p9Vnse/71zVY= +github.com/DataDog/datadog-agent/pkg/logs/sds v0.59.0 h1:CPxkTGZuir7z6ZnEXovdUNQE0nAHmXAtBLvFMppxHvs= +github.com/DataDog/datadog-agent/pkg/logs/sds v0.59.0/go.mod h1:MOhCsu2zQMIwT2NBQYWjXzHgNYCKZwPJu08TKlBa1IU= +github.com/DataDog/datadog-agent/pkg/logs/sender v0.59.0 h1:fd2pUQXyxV8Zvw2axC0/IzBRwaEWeOYuItvo3NnS0eY= +github.com/DataDog/datadog-agent/pkg/logs/sender v0.59.0/go.mod h1:iVtgk6B4bl7HggNx5TECj4LIj8PYmoDIf1Hn1lL61cA= +github.com/DataDog/datadog-agent/pkg/logs/sources v0.59.0 h1:odwHx0k2Hod6wrsnt/P5dI2deVCwVaMNKSSxpsOvHR8= +github.com/DataDog/datadog-agent/pkg/logs/sources v0.59.0/go.mod h1:t95T+iw+/9VP40ymxXrrLIMJ+MiFJm0vIZml3KpwuyI= +github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.59.0 h1:th5J71WmJpXVcY+yR5YalOzrLjoYEDn/HT+allWEInQ= +github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.59.0/go.mod h1:PaduNrh0GJ3UEKG30VMu0M6hi7KuYf3VviLdIG9xV9k= +github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.59.0 h1:BvvXnKJjZfLUcwcTnj8gWoJAlFfTd8q5Rh39SV97VFM= +github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.59.0/go.mod h1:p2NTG+cIhVGlKELJfRteGCec37ICptIpeB2x/MsRkbw= +github.com/DataDog/datadog-agent/pkg/logs/util/testutils v0.59.0 h1:Lx1CcCOi+Wgvjxzj8pEz1HtxWuZpjIkHyrBXidzU9Hw= +github.com/DataDog/datadog-agent/pkg/logs/util/testutils v0.59.0/go.mod h1:+uqKrMsDA16MMC98rqDkp7Jn8cpYLI/JPAVcno8MEmE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.59.0 h1:uX6/XoKMS7KYXe+R+vwgw+eRdmn16xfa9PDF5dxgumE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.59.0/go.mod h1:ATVw8kr3U1Eqz3qBz9kS6WFDKji9XyoAsHKSlj3hPTM= +github.com/DataDog/datadog-agent/pkg/proto v0.59.0 h1:hHgSABsmMpA3IatWlnYRAKlfqBACsWyqsLCEcUA8BCs= +github.com/DataDog/datadog-agent/pkg/proto v0.59.0/go.mod h1:weaq7HP9vUa7YAMcvMs7bhT7pmHk3sq7XRBQOcaSUak= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.59.0 h1:9C8TVNz0IiNoD6tuEKPY/vMIUjB7kN0OaLyImhatWjg= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.59.0/go.mod h1:c4th0IFaP0Q1ofRa0GcPB9hJWN+cmUoEfOI1Ub0O50A= +github.com/DataDog/datadog-agent/pkg/status/health v0.59.0 h1:gDeDYddUBwkzeNRxeRceIB46YvxB/2+KoCFcN4qvVag= +github.com/DataDog/datadog-agent/pkg/status/health v0.59.0/go.mod h1:EkC/SgFR03BKwBitVV4dIuP+ofwPlUCkVi5K5k1Dh2Y= +github.com/DataDog/datadog-agent/pkg/telemetry v0.59.0 h1:4WEY5NILyM/WFXwzgvgdju1rfO4cru2SXJyU1JLgFyc= +github.com/DataDog/datadog-agent/pkg/telemetry v0.59.0/go.mod h1:DmEXCX0hBizZpdpbS64o9sPj47iiUzh9F7uGUazF+ZA= +github.com/DataDog/datadog-agent/pkg/trace v0.59.0 h1:LHfmBEfidWE6R5onNLIFnX3jc4MRBwdqJ6XLQxvBAG0= +github.com/DataDog/datadog-agent/pkg/trace v0.59.0/go.mod h1:6XfyUYonzDI1qy9tZBUgMgGYJarHDxIZtfs6PNRbf/w= +github.com/DataDog/datadog-agent/pkg/util/backoff v0.59.0 h1:EaTwOrTRpMEdomryGVMfHyN0wEsKkaL3/Tw9qRt9SSY= +github.com/DataDog/datadog-agent/pkg/util/backoff v0.59.0/go.mod h1:2RMfdYkKyeh8hXs6WgaamkkEyK35Xo55C4rFG4dO1k8= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.59.0 h1:uV3oUyl0uQN8anXZXQiw+hbQ8UNNtSkrnDCDklhAjeI= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.59.0/go.mod h1:+51MjREuUnHTYSnI9zBqv2aVOF4dlhDwQiCMeZyY7Z0= +github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 h1:24sLjJ4p4Co/82weJsqkNxWZjG8zdS7yeJBGVOqjHxM= +github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0/go.mod h1:mSSn2OzsdgoUnPyBmF8rEDU+ee1RFp+H6LFsJSteN9o= +github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 h1:VV/SYXyZirAaUxMsWUpmZYcX9AIgbGadElznJZXPCig= +github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0/go.mod h1:1Oy0TNkovXuDB0Uu8OzszIuDezYSPg8qFCEyx02ipc4= +github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0 h1:b4sUQuXnE+M+1ToTViNGelw8yfaXRuhOqBSczdQ8wEM= +github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0/go.mod h1:vl91pbe6A2L9kqNEmSDrS8vlj4cADSBq3Z3YRQ1rpKY= +github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 h1:8qlROMBQixtDVQwjvttGSM8hTmN3tnFQugOyh614ACc= +github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0/go.mod h1:4EPWYAplHgdaLZsP/NuLEfh21NuvF+JdVtwttTqQlUY= +github.com/DataDog/datadog-agent/pkg/util/http v0.59.0 h1:6Dshh+6K5NGV2TdHsZeeDRsBrgvQ0rJw8OhMWonMFu4= +github.com/DataDog/datadog-agent/pkg/util/http v0.59.0/go.mod h1:Cf5xtpWzHGn7rvEAM4fdw1OUABXLbA/Bqf3dCt/0qtM= +github.com/DataDog/datadog-agent/pkg/util/log v0.59.0 h1:0JwuSc9Pr/kHAYIEzbdeYKLxgDViNlA6e/bB+7IvFtE= +github.com/DataDog/datadog-agent/pkg/util/log v0.59.0/go.mod h1:pH5Vs7I0fwUU4dUtiQ/oEC//+xzPAgUlhH5+MG5eseg= +github.com/DataDog/datadog-agent/pkg/util/log/setup v0.59.0 h1:1gQ81041dHofvio6mn0EnmAG8hYR52VOlCjONIvpkks= +github.com/DataDog/datadog-agent/pkg/util/log/setup v0.59.0/go.mod h1:9aftpZaZs8Z7EWHGQO3+biYHVRxN/V4WELSK6P5c0DY= +github.com/DataDog/datadog-agent/pkg/util/optional v0.59.0 h1:IOZeoApM4NI6dw+Sdo4PalVU1Z6uoY3vuKdl5Jm6g2M= +github.com/DataDog/datadog-agent/pkg/util/optional v0.59.0/go.mod h1:xWT/KJdJg2/0pZyAKZ6XmIiE5sM+AyUo4qvKuPHQ17U= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 h1:K/3aHtAsvlAIbw0/3ah66f1glnpdLNm69XSYXdcnDtw= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0/go.mod h1:t1DlnUEMltkvwPLc7zCtP1u5cBDu+30daR2VhQO5bvA= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.0 h1:p4uZow1IE/ve590aKqTsS+/5P7fPi+abHN9TWFi+bhE= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.0/go.mod h1:krOxbYZc4KKE7bdEDu10lLSQBjdeSFS/XDSclsaSf1Y= +github.com/DataDog/datadog-agent/pkg/util/startstop v0.59.0 h1:zPO6AX/UcbMCuGjnrK0cuDgULbOyzZFYvuxf/qbZjGg= +github.com/DataDog/datadog-agent/pkg/util/startstop v0.59.0/go.mod h1:IkqOyNbrg9hXqCMyL+g+Ldhz4q6VVOPqbHQxS4lLiRs= +github.com/DataDog/datadog-agent/pkg/util/statstracker v0.59.0 h1:CYY4C03mcJCqB04DKttAbNPrQouJLSL94m/KLaURv3Y= +github.com/DataDog/datadog-agent/pkg/util/statstracker v0.59.0/go.mod h1:Et2HSDjQvMhgs9ZdH7T5I4q04g5Fj23EtmeIaen/9/M= +github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 h1:9fpWOSJyuBHdpzQkUYFoyC57Bv+umHeMMSQmwmm900k= +github.com/DataDog/datadog-agent/pkg/util/system v0.59.0/go.mod h1:rdBzS773XYudLd/IH2mUzz3+kJ2N2PcFWEdRGEGYlP0= +github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 h1:8l2FgdcIUNPyI4J+w5OaY3k2byB11HqZ/mcg2AcJSSI= +github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0/go.mod h1:C63BEsAoSlfoB4WadEMO1guB+dvfl95zQaMLw394zNM= +github.com/DataDog/datadog-agent/pkg/util/testutil v0.59.0 h1:f6EtElJXr8UN6FftNEeqIyT2jzvAtldQI+eb7qaYvrA= +github.com/DataDog/datadog-agent/pkg/util/testutil v0.59.0/go.mod h1:m/uWLdpGEi3x/5gybZFeYNEnIdKhGtWW8kFZuM+GSFA= +github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.0 h1:1tJjvbVq3aMXAb4OaRkotzH1Xqu0mXrpRM/yPoDdH3w= +github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.0/go.mod h1:m/A1yu3JBnUlq6zrWJUQZbsqdDikEacbXCGcdtYmUPs= +github.com/DataDog/datadog-agent/pkg/version v0.59.0 h1:pwCYymut9ltNcNtYXEMXEEUjEE1+GGcrQ6xibMtM2gk= +github.com/DataDog/datadog-agent/pkg/version v0.59.0/go.mod h1:rcA7LtIB5WLpxsems/bWO1iXkyGEgHHje7vJ0b20ZpU= +github.com/DataDog/datadog-api-client-go/v2 v2.31.0 h1:JfJhYlHfLzvauI8u6h23smTooWYe6quNhhg9gpTszWY= +github.com/DataDog/datadog-api-client-go/v2 v2.31.0/go.mod h1:d3tOEgUd2kfsr9uuHQdY+nXrWp4uikgTgVCPdKNK30U= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240906125328-9899f57f27be h1:PAwwowQxp4ESwXn2MIEAq/cA8jeLhnRV06M8Op+gEvY= github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240906125328-9899f57f27be/go.mod h1:TX7CTOQ3LbQjfAi4SwqUoR5gY1zfUk7VRBDTuArjaDc= -github.com/DataDog/go-sqllexer v0.0.14 h1:xUQh2tLr/95LGxDzLmttLgTo/1gzFeOyuwrQa/Iig4Q= -github.com/DataDog/go-sqllexer v0.0.14/go.mod h1:KwkYhpFEVIq+BfobkTC1vfqm4gTi65skV/DpDBXtexc= +github.com/DataDog/go-sqllexer v0.0.15 h1:rUUu52dP8EQhJLnUw0MIAxZp0BQx2fOTuMztr3vtHUU= +github.com/DataDog/go-sqllexer v0.0.15/go.mod h1:KwkYhpFEVIq+BfobkTC1vfqm4gTi65skV/DpDBXtexc= github.com/DataDog/go-tuf v1.1.0-0.5.2 h1:4CagiIekonLSfL8GMHRHcHudo1fQnxELS9g4tiAupQ4= github.com/DataDog/go-tuf v1.1.0-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee h1:tXibLZk3G6HncIFJKaNItsdzcrk4YqILNDZlXPTNt4k= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee/go.mod h1:nTot/Iy0kW16bXgXr6blEc8gFeAS7vTqYlhAxh+dbc0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.20.0 h1:jdsuH8u4rxfvy3ZHoSLk5NAZrQMNZqyJwhM15FpEswE= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.20.0/go.mod h1:KI5I5JhJNOQWeE4vs+qk+BY/9PVSDwNmSjrCUrmuZKw= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.19.0 h1:rP4hnNCufRM2OsnFy0Tf00r6mu19fcQxfVN4E1rD5mY= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.19.0/go.mod h1:66XlN7QpQKqIvw8e2UbCXV5X8wGnEw851nT9BjJ75dY= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.20.0 h1:fKv05WFWHCXQmUTehW1eEZvXJP65Qv00W4V01B1EqSA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.20.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.20.0 h1:JLpKc1QpkaUXEFgN68/Q9XgF0XgbVl/IXd8S1KUcEV4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.20.0/go.mod h1:VJtgUHCz38obs58oEjNjEre6IaHmR+s7o4DvX74knq4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.19.0 h1:JnRJqpnG0tDVTsD9uU6Xk9Nh/ozuLa4emyR+t7WxIto= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.19.0/go.mod h1:OEECw1sTZq5HfYzpl5C8Md/8wjsnmxF5lxFmv3Ey2CA= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.19.0 h1:SAczemPbq9qyzyi8Crd8MvEjYQXwsTUxR8tJlXLqnmk= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.19.0/go.mod h1:Rhxlru6B8yfLZ4VSjuAuMnWdPgP8X60kvRjrdt84iNU= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.21.0 h1:U+p1i7+upWb4qOIOOvjS/92iMUGlSzEC1tRxVo0Lg8Y= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.21.0/go.mod h1:dOjp1lg4jwYyIbpnqW+DoOV8qD+70C+lgpINFvUqasQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.21.0 h1:VS4NTqwczwezMVvI6A7xYR3ugPmMUJ4FcdFrsdnZI2I= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.21.0/go.mod h1:66XlN7QpQKqIvw8e2UbCXV5X8wGnEw851nT9BjJ75dY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.21.0 h1:hgbTFS6SkqbzOiWSfP58dZ/Jpjlmv6dpD4+V4LDHm2Q= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.21.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.21.0 h1:XD9Kd+baO66+tfbdanOFSMGEfwWfnrn/IxG/Dc5bv5I= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.21.0/go.mod h1:9ByLz9jISc176DzjIdaRfRKwaitqF8ie6RTvfP8Aufo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.21.0 h1:8nW8jfcCIWzxWrpI31C0QYoOjTaUGp6USCwiRbP5Fp4= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.21.0/go.mod h1:wuatEozcLYinJ0WYf0MlVTFtTzEmf+qyJet0H9foVAs= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.21.0 h1:/Dp1WBvekdusS9Tw9pLE7RG04eluNktQ29arLS4SpGM= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.21.0/go.mod h1:asNuwNy1O2HbadkcZVuqmFGonfEzXS/SBvOo8V1MJvQ= github.com/DataDog/sketches-go v1.4.6 h1:acd5fb+QdUzGrosfNLwrIhqyrbMORpvBy7mE+vHlT3I= github.com/DataDog/sketches-go v1.4.6/go.mod h1:7Y8GN8Jf66DLyDhc94zuWA3uHEt/7ttt8jHOBWWrSOg= github.com/DataDog/viper v1.13.5 h1:SZMcyMknYQN2jRY/40A16gUXexlNJOI8sDs1cWZnI64= github.com/DataDog/viper v1.13.5/go.mod h1:wDdUVJ2SHaMaPrCZrlRCObwkubsX8j5sme3LaR/SGTc= github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY= github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.2 h1:cZpsGsWTIFKymTA0je7IIvi1O7Es7apb9CF3EQlOcfE= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.2/go.mod h1:itPGVDKf9cC/ov4MdvJ2QZ0khw4bfoo9jzwTJlaxy2k= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0/go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/IBM/sarama v1.43.3 h1:Yj6L2IaNvb2mRBop39N7mmJAHBVY3dTPncr3qGVkxPA= @@ -245,10 +255,14 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 h1:t3eaIm0rUkzbrIewtiFmMK5RXHej2XnoXNhxVsAYUfg= github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= +github.com/antchfx/xmlquery v1.4.2 h1:MZKd9+wblwxfQ1zd1AdrTsqVaMjMCwow3IqkCSe00KA= +github.com/antchfx/xmlquery v1.4.2/go.mod h1:QXhvf5ldTuGqhd1SHNvvtlhhdQLks4dD0awIVhXIDTA= +github.com/antchfx/xpath v1.3.2 h1:LNjzlsSjinu3bQpw9hWMY9ocB80oLOWuQqFvO6xt51U= +github.com/antchfx/xpath v1.3.2/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.20.0 h1:631+KvYbsBZxmuJjYwhezVsrfc/TbqtZV4QcxOX1fOI= -github.com/apache/thrift v0.20.0/go.mod h1:hOk1BQqcp2OLzGsyVXdfMk7YFlMxK3aoEVhjD06QhB8= +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/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -260,53 +274,53 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z 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.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= -github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 h1:xDAuZTn4IMm8o1LnBZvmrL8JA1io4o3YWNXgohbf20g= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5/go.mod h1:wYSv6iDS621sEFLfKvpPE2ugjTuGlAG7iROg0hLOkfc= +github.com/aws/aws-sdk-go-v2 v1.32.6 h1:7BokKRgRPuGmKkFMhEg/jSul+tB9VvXhcViILtfG8b4= +github.com/aws/aws-sdk-go-v2 v1.32.6/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.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= -github.com/aws/aws-sdk-go-v2/config v1.27.37 h1:xaoIwzHVuRWRHFI0jhgEdEGc8xE1l91KaeRDsWEIncU= -github.com/aws/aws-sdk-go-v2/config v1.27.37/go.mod h1:S2e3ax9/8KnMSyRVNd3sWTKs+1clJ2f1U6nE0lpvQRg= +github.com/aws/aws-sdk-go-v2/config v1.28.6 h1:D89IKtGrs/I3QXOLNTH93NJYtDhm8SYa9Q5CsPShmyo= +github.com/aws/aws-sdk-go-v2/config v1.28.6/go.mod h1:GDzxJ5wyyFSCoLkS+UhGB0dArhb9mI+Co4dHtoTxbko= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.35 h1:7QknrZhYySEB1lEXJxGAmuD5sWwys5ZXNr4m5oEz0IE= -github.com/aws/aws-sdk-go-v2/credentials v1.17.35/go.mod h1:8Vy4kk7at4aPSmibr7K+nLTzG6qUQAUO4tW49fzUV4E= +github.com/aws/aws-sdk-go-v2/credentials v1.17.47 h1:48bA+3/fCdi2yAwVt+3COvmatZ6jUDNkDTIsqDiMUdw= +github.com/aws/aws-sdk-go-v2/credentials v1.17.47/go.mod h1:+KdckOejLW3Ks3b0E3b5rHsr2f9yuORBum0WPnE5o5w= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 h1:AmoU1pziydclFT/xRV+xXE/Vb8fttJCLRPv8oAkprc0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21/go.mod h1:AjUdLYe4Tgs6kpH4Bv7uMZo7pottoyHMn4eTcIcneaY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 h1:s/fF4+yDQDoElYhfIVvSNyeCydfbuTKzhxSXDXCPasU= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25/go.mod h1:IgPfDv5jqFIzQSNbUEMoitNooSMXjRSDkhXv8jiROvU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 h1:ZntTCl5EsYnhN/IygQEUugpdwbhdkom9uHcbCftiGgA= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25/go.mod h1:DBdPrgeocww+CSl1C8cEV8PN1mHMBhuCDLpXezyvWkE= github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= 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.18 h1:OWYvKL53l1rbsUmW7bQyJVsYU/Ii3bbAAQIIFNbM0Tk= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18/go.mod h1:CUx0G1v3wG6l01tUB+j7Y8kclA8NSqK4ef0YG79a4cg= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.25 h1:r67ps7oHCYnflpgDy2LZU0MAQtQbYIOqNNnqGO6xQkE= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.25/go.mod h1:GrGY+Q4fIokYLtjCVB/aFfCVL6hhGUFl8inD18fDalE= github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20 h1:rTWjG6AvWekO2B1LHeM3ktU7MqyX9rzWQ7hgzneZW7E= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20/go.mod h1:RGW2DDpVc8hu6Y6yG8G5CHVmVOAn1oV8rNKOHRJyswg= +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.6 h1:HCpPsWqmYQieU7SS6E9HXfdAMSud0pteVXieJmcpIRI= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.6/go.mod h1:ngUiVRCco++u+soRRVBIvBZxSMMvOVMXA4PJ36JLfSw= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18 h1:eb+tFOIl9ZsUe2259/BKPeniKuz4/02zZFH/i4Nf8Rg= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18/go.mod h1:GVCC2IJNJTmdlyEsSmofEy7EfJncP7DNnXDzRjJ5Keg= -github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3 h1:O/rjUvLED2dWzrSY6wv3njBjJlH4LT2xYRnUm402ovI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3/go.mod h1:5FmD/Dqq57gP+XwaUnd5WFPipAuzrf0HmupX27Gvjvc= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8 h1:lR2PZfD1YNEPq0TSljh1Zfxmr53FaKZOTf90hQKmH/4= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8/go.mod h1:JsD+G3R0ZMWqjt7VDggNsc5SFl4hw+Sk8KQaRN1sltI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 h1:50+XsN70RS7dwJ2CkVNXzj7U2L1HKP8nqTd3XWEXBN4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6/go.mod h1:WqgLmwY7so32kG01zD8CPTJWVWM+TzJoOVHwTg4aPug= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.6 h1:BbGDtTi0T1DYlmjBiCr/le3wzhA37O8QTC5/Ab8+EXk= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.6/go.mod h1:hLMJt7Q8ePgViKupeymbqI0la+t9/iYFBjxQCFwuAwI= +github.com/aws/aws-sdk-go-v2/service/s3 v1.71.0 h1:nyuzXooUNJexRT0Oy0UQY6AhOzxPxhtt4DcBIHyCnmw= +github.com/aws/aws-sdk-go-v2/service/s3 v1.71.0/go.mod h1:sT/iQz8JK3u/5gZkT+Hmr7GzVZehUMkRZpOaAwYXeGY= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.33.7 h1:GfXWwM9/iEJVcWQaMu22YzBeGQnY6zjiZD556awNJBA= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.33.7/go.mod h1:YMM+e0OfZQVBpTJs+WNZWP/hdodeWnepXgancR5NFFw= github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= -github.com/aws/aws-sdk-go-v2/service/sso v1.23.1 h1:2jrVsMHqdLD1+PA4BA6Nh1eZp0Gsy3mFSB5MxDvcJtU= -github.com/aws/aws-sdk-go-v2/service/sso v1.23.1/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.1 h1:0L7yGCg3Hb3YQqnSgBTZM5wepougtL1aEccdcdYhHME= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.1/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 h1:rLnYAfXQ3YAccocshIH5mzNNwZBkBo+bP6EhIxak6Hw= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.7/go.mod h1:ZHtuQJ6t9A/+YDuxOLnbryAmITtr8UysSny3qcyvJTc= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 h1:JnhTZR3PiYDNKlXy50/pNeix9aGMo6lLpXwJ1mw8MD4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6/go.mod h1:URronUEGfXZN1VpdktPSD1EkAL9mfrV+2F4sjH38qOY= github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= -github.com/aws/aws-sdk-go-v2/service/sts v1.31.1 h1:8K0UNOkZiK9Uh3HIF6Bx0rcNCftqGCeKmOaR7Gp5BSo= -github.com/aws/aws-sdk-go-v2/service/sts v1.31.1/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 h1:s4074ZO1Hk8qv65GqNXqDjmkf4HSQqJukaLuuW0TpDA= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.2/go.mod h1:mVggCnIWoM09jP71Wh+ea7+5gAp53q+49wDFs1SW5z8= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= -github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +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/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= @@ -318,8 +332,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= -github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q= +github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/briandowns/spinner v1.23.1 h1:t5fDPmScwUjozhDj4FA46p5acZWIPXYE30qW2Ptu650= github.com/briandowns/spinner v1.23.1/go.mod h1:LaZeM4wm2Ywy6vO571mvhQNRcWfRUnXOs0RcKV0wYKM= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -390,8 +404,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/docker v27.1.2+incompatible h1:AhGzR1xaQIy53qCkxARaFluI00WPGtXn0AJuoQsVYTY= -github.com/docker/docker v27.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= +github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -405,6 +419,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4A github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE= +github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/go-grok v0.3.1 h1:WEhUxe2KrwycMnlvMimJXvzRa7DoByJB4PVUIE1ZD/U= github.com/elastic/go-grok v0.3.1/go.mod h1:n38ls8ZgOboZRgKcjMY8eFeZFMmcL9n2lP0iHhIDk64= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= @@ -415,11 +431,11 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.12.1-0.20240621013728-1eb8caab5155 h1:IgJPqnrlY2Mr4pYB6oaMKvFvwJ9H+X6CCY5x1vCTcpc= -github.com/envoyproxy/go-control-plane v0.12.1-0.20240621013728-1eb8caab5155/go.mod h1:5Wkq+JduFtdAXihLmeTJf+tRYIT4KBc2vPXDhwVo1pA= +github.com/envoyproxy/go-control-plane v0.13.0 h1:HzkeUz1Knt+3bK+8LG1bxOO/jzWZmdxpwC51i202les= +github.com/envoyproxy/go-control-plane v0.13.0/go.mod h1:GRaKG3dwvFoTg4nj7aXdZnvMg4d7nvT/wl9WgVXn3Q8= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= +github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/euank/go-kmsg-parser v2.0.0+incompatible h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= @@ -441,8 +457,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -483,8 +499,8 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEe github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= -github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.4 h1:DPzxraQx7OrPyXq2phlGlNSIyWEsAox0RJmjTseMV6I= github.com/go-zookeeper/zk v1.0.4/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -615,13 +631,11 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.13.0/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= -github.com/hashicorp/consul/api v1.29.4 h1:P6slzxDLBOxUSj3fWo2o65VuKtbtOXFi7TSSgtXutuE= -github.com/hashicorp/consul/api v1.29.4/go.mod h1:HUlfw+l2Zy68ceJavv2zAyArl2fqhGWnMycyt56sBgg= -github.com/hashicorp/consul/proto-public v0.6.2 h1:+DA/3g/IiKlJZb88NBn0ZgXrxJp2NlvCZdEyl+qxvL0= -github.com/hashicorp/consul/proto-public v0.6.2/go.mod h1:cXXbOg74KBNGajC+o8RlA502Esf0R9prcoJgiOX/2Tg= +github.com/hashicorp/consul/api v1.30.0 h1:ArHVMMILb1nQv8vZSGIwwQd2gtc+oSQZ6CalyiyH2XQ= +github.com/hashicorp/consul/api v1.30.0/go.mod h1:B2uGchvaXVW2JhFoS8nqTxMD5PBykr4ebY4JWHTTeLM= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/consul/sdk v0.16.1 h1:V8TxTnImoPD5cj0U9Spl0TUxcytjcbbJeADFF07KdHg= github.com/hashicorp/consul/sdk v0.16.1/go.mod h1:fSXvwxB2hmh1FMZCNl6PwX0Q/1wdWtHJcZ7Ea5tns0s= @@ -708,8 +722,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= -github.com/jaegertracing/jaeger v1.60.0 h1:6fswbNydmXJNH7uz2smy2fFs9KKRpLrFXdW0u/hud4o= -github.com/jaegertracing/jaeger v1.60.0/go.mod h1:CMrmMLIWn7xLP0IwBgpbxtgIuOT6TF/7bpTUBaOUaXo= +github.com/jaegertracing/jaeger v1.62.0 h1:YoaJ2e8oVz5sqGGlVAKSUCED8DzJ1q7PojBmZFNKoJA= +github.com/jaegertracing/jaeger v1.62.0/go.mod h1:jhEIHazwyb+a6xlRBi+p96BAvTYTSmGkghcwdQfV7FM= github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -755,12 +769,12 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0= -github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= -github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= -github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.2 h1:I2rtLRqXRy1p01m/utEtpZSSA6dcJbgGVuE27kW2PzQ= +github.com/knadh/koanf/v2 v2.1.2/go.mod h1:Gphfaen0q1Fc1HTgJgSTC4oRX9R2R5ErYMZJy8fLJBo= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -776,8 +790,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-syslog/v4 v4.1.0 h1:Wsl194qyWXr7V6DrGWC3xmxA9Ra6XgWO+toNt2fmCaI= -github.com/leodido/go-syslog/v4 v4.1.0/go.mod h1:eJ8rUfDN5OS6dOkCOBYlg2a+hbAg6pJa99QXXgMrd98= +github.com/leodido/go-syslog/v4 v4.2.0 h1:A7vpbYxsO4e2E8udaurkLlxP5LDpDbmPMsGnuhb7jVk= +github.com/leodido/go-syslog/v4 v4.2.0/go.mod h1:eJ8rUfDN5OS6dOkCOBYlg2a+hbAg6pJa99QXXgMrd98= github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b h1:11UHH39z1RhZ5dc4y4r/4koJo6IYFgTRMe/LlwRTEw0= github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= @@ -874,176 +888,180 @@ github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.109.0 h1:xkOwFlkeP4w5gUh/8eIvBo7jytde3KBFbtBJyWvT8ho= -github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.109.0/go.mod h1:P37TUvGKnfA5+WK3RE9cAg98sDVwmGNAxe8iEQRzsZ0= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.109.0 h1:EH4cLE0KHcCmea2MFkfhmGKfLrDJTiFbn/IHjMdJ7TM= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.109.0/go.mod h1:lKrkI/0VRl4P2qEy8bbDR24syOa+kF2ZGYgPO+uQ2iE= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.109.0 h1:B+xkxaFTJ8Jj7Y353hz+uVwlnGIKzKolywtMcJX3M8M= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.109.0/go.mod h1:CFGnLIsGBMsxGCtZ7q6J6TXFKwv/DBA7R0sZ9x/4PdQ= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.109.0 h1:TRXkisoS6MBUFAHtujn5K35vpgfNvCTcOb5AoDN/dJg= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.109.0/go.mod h1:y3f47NY05fYFdjyqq8Ok/GfCjr510aX86m/YL2/lIjs= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.109.0 h1:WT73VsXduQ2K3Cb30taGrtGdBlNEh3Sgv4YsZ5827e0= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.109.0/go.mod h1:GHYXINETDNgt5EKne3T1QQtLdrJDjpboyFXK06+tRHQ= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.109.0 h1:1s6kdIbGaeU2vLA34Gx2+UAXHHStwQH3u82ESVwrg1s= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.109.0/go.mod h1:IMQxJ9SP0i/OR+AmLZF20SZCCG0LxpyAQLiLL8FAtpE= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.109.0 h1:TgBo/7rAKp22Vqm5pUKUdTD6+QS90DwhnjtauZ+QMB0= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.109.0/go.mod h1:bl6y/IzY4GNleG1Wz9r3h90NpwbQu6Cka2h4VPpf31E= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.109.0 h1:pSYU/6kmokT0JToSsqnH4gnNgrAZo5AGMIrUz5krp1M= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.109.0/go.mod h1:bf6P70hOyXE2V7rTYkJkM1FacPc8rUi8nmpTXH2QbVY= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.109.0 h1:bHUwpHq7l9Hog0wH3z/MXCMYX3zOMajgt/9a5/FnxXw= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.109.0/go.mod h1:VzTL/4uMpH3/FQqPR+pQCG2JIAWPP16WH03FPOP09+Y= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.109.0 h1:hVDLcOMwtMochOkKpy+BSSyx1XAfqfxFXnspEHMSvTc= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.109.0/go.mod h1:zc7HTchYEn5tpDC3QiBHqFnN/VbPQ/x87lZAylA4rvs= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.109.0 h1:OtaualMWSMRRgy5ZrHLVTpe+wGmxBE614ZPIGeQ9iIY= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.109.0/go.mod h1:e3V6Tg6d4M/e7N5ge24HcfcbUXEe6QSjg/CJoHhOeps= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.109.0 h1:3pOBB7MIHs0CempWSjZLekRKt9Oc3OO2lr2eE7R/IeQ= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.109.0/go.mod h1:keP8lTqP228+Bj2C0we9/risZU3jMxI1vS9L5fkyxoE= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.109.0 h1:oR9H6WbwqtvfssPfS1PfquDQxt0P+AORJyfKRNl7o0Q= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.109.0/go.mod h1:0TrXcZw+Uu7Fq9jwMu2fNvRmjQUk+uU7QCYdlhwP2iM= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.109.0 h1:lAuNItoR/qG+da55i8YywcWHq/O7K1HRgBUdS3v+ZoU= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.109.0/go.mod h1:W0PBtJmNTOrR2KDladC0yfazkBjaQU/lC1QDSxYWxYA= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.109.0 h1:hiiQb39FuPgBPLsBs98jNwpqzzmUP103VBwK3E03X5E= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.109.0/go.mod h1:3+JymB/fh5iNHZtZ4y9T6NtAODjkUXQQcfgF8HZCEHo= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.109.0 h1:9NPEO7Z8V/moQza/uUGIABsSc48Va3tfstZGk/FG75c= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.109.0/go.mod h1:pYD2hFzbXdGy8DRap60WTXlMNkcF7b3vyd37mctxhB8= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.109.0 h1:u65BxxXX9tAqjwFnvwL7yqKWHiOFDHG9jKM0UthAL18= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.109.0/go.mod h1:UKEwVBxPn/wRMKelq+9pdYlnkVFQ8h8yh5c8k2tRjNU= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.109.0 h1:/DYYZTFiMLxmx2XKzCepDT/VDv3u9gIgdzUQvdL2gtM= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.109.0/go.mod h1:ydMgguz0dLWUQnIK3ogZQaoFKXGeLI37KqAtpsJAI6s= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.109.0 h1:jbMuFwmDCRm3ycSJXLZAWmJQQWkcrotgcCB/dic99XE= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.109.0/go.mod h1:BSE5GPIaG+Qltwsrq/2YmbzU0YmEfW5+PK3wOUvARZI= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.109.0 h1:LEpo+3dMUJ7cAoX2xqQXmLuCGlA5OVSQl1c/Os3ZhYk= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.109.0/go.mod h1:1gBYb3ohJNGVaMD2N5GPhpKU8W9jvPI3uHPIgmUGcyM= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.109.0 h1:wXorKr/8dt2A1x0DGW+Uh53sX1ERdJp6IUMmUaagR20= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.109.0/go.mod h1:3riREDwyXx+8g+IK27BaqVxMqRaGU6jpeBZ+RPNBB0w= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.109.0 h1:49eU82qM9YhubCPh4o9z+6t8sw9ytS3sfPi/1Yzf0UQ= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.109.0/go.mod h1:t+2SQm0yPa+1GYpoOg7/lzZ4cHgk3os6uqALvnBA1aU= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.109.0 h1:g79FG4aNXwnpatYBoEfSm+ngQF6gJ7MHBL9z2uzqQa4= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.109.0/go.mod h1:x2dYB6tEOSc/kRl3r8v1XkY7GtpRy6Y1Mlu+NqAb2WU= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.109.0 h1:AMFYxEvaUWFW1N7rCJIfySAnY0JTSiLS/XECBH+aviY= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.109.0/go.mod h1:FBiMYL2c0lLjfRsKg83lH4zYQ8F5nGypfkU1+g4mOaU= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.109.0 h1:peFxYtLPPVgPWM6saX78XevfXka5uhIfK+gaucW6xYc= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.109.0/go.mod h1:xXLGSqdvZBSfdLY2cd746mpL1duEplCv7NwIiZrhUTI= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.109.0 h1:M3YhZ2WUp0komYWsPtL+JwRJAX7zEbN7CcOedTshIwo= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.109.0/go.mod h1:dRdivclTOOynN53U/Zq1jmBsmuDnb816rK+1soZi4uY= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.109.0 h1:3xF0NCiKKo0YMYU13IHJKh7RsTYnFFrQ/SKTixgk6rk= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.109.0/go.mod h1:bVlcMosKm9dggU6oShhawR/bmvpcaYXygPK/+eKLLqo= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.109.0 h1:Kn/Jrre9qF1vwm4vCWlsMFKhxMolN07887nu/qMA/sk= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.109.0/go.mod h1:8kGP/qIM+YlJQswkRIEXK67xN8iwKdO7CYhcH2jDRp0= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.109.0 h1:/W1CXipt//oFJHhfD/Cx6sMaNS0MOA7kx9Lwy+U2LV4= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.109.0/go.mod h1:acwSKQ96VjeiDCFY8RcPMExsG4g9gT2MHVOQPydEig8= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.109.0 h1:WpfAVQNwHmZiAHRxx0syKeWPaZCAGCuxqjMunwYGRSs= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.109.0/go.mod h1:6sxRueshlefujFPBWct+wkbHq+OKmvvMLIx06DVZU5U= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.109.0 h1:MDcIm8CBGtkN9dYfNefnRygEeE/j2F3TJAY8eJgTURo= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.109.0/go.mod h1:OCI7nOzM2mqOI0dW0n4O9zktDyWH48KL7YCA3GWFQhM= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.109.0 h1:3a/Y3/uaLVdu/1QHjxgaCZu8dI6VLffI9N6j80oiAbw= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.109.0/go.mod h1:kIh6tdityVjMYBjsLld/44IEcr7vnNQ6kfH9KYym74Y= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.109.0 h1:4VBRgtyh3hHSgAVGgs4bvNwJd0oUGyxVA3eQO2ujNsA= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.109.0/go.mod h1:9MGQCqxdCNBhdD+7QBZ6hH9HipXe5CajMafVKglD5f0= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.109.0 h1:pocaWd91oGCG+Uhrj7b8I7YrWFsJZrn/ov6woY9Y//Y= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.109.0/go.mod h1:aJOHFecWxgPmIukTajRKxQ7Q4DAmcUKmDL66wnu9JGQ= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.109.0 h1:v4kj/Hs6Sjea3oUa1IyHR75baxfbw60JqYE8pqj9H3k= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.109.0/go.mod h1:mkuZ8eCQ+J7JiV5XfX77LcpoIKFxsCB0LaGaKbyUX44= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.109.0 h1:Gyi5ZiTvHGnoxHvezi3YAzWWQVTbdAObn/+Y4zXa9a4= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.109.0/go.mod h1:k79qpGNMPMGjB8XjESL599Wa7/5CrO8JtmuExTfT4yM= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.109.0 h1:o7TuN2pH3dybzsIlcqDK0aGvHZBXc5yVxQMcu0MXsGw= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.109.0/go.mod h1:Zf2QUXo/u8CEhls+KnhqZtU3CKzYCenGW76RP8JOnsE= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.109.0 h1:xZbqAiVl85GtCOXEuRvGNNziHrzuAyVC2pxt50WAfYA= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.109.0/go.mod h1:pf03X7fpCGS1StUBdhmdB3/uW8cKmil0AFzYyZcbsoE= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.109.0 h1:Y+xoX6s/x8xRoMSTkOlzB4cbxoilUUjJT13jNbdX+zI= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.109.0/go.mod h1:UTJmyseH3oxqGGfGWwLKjgX1nvJFWOuHk6589Qes75U= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.109.0 h1:p7wfdyUDeXOcOZreLFIzCw+EwoqoE9oun5pGk/dGKPc= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.109.0/go.mod h1:f+CLQl2qzwahULQeqlXWLjmn8S3lyOxT9C660CJsdO8= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.109.0 h1:/DbqqTwfln/LSu6TcryMl8ursWEvLXi9oa3YEdx53ZI= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.109.0/go.mod h1:zQcK9/0M58biBHlcjYAHB3DEQiWS4RpAp95ZRBKe5xc= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.109.0 h1:A2YjC0zAh4oe8rBV94hUCwq0NEWA6TsVkKnwMa5TF10= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.109.0/go.mod h1:Qz5ugyCxgcAiGjvp6UkJqMVtco6+d8VXj/6J6U7JVlo= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.109.0 h1:TmQ3+bkiAqWVfrkCZtB7m6adAVSXCUG2xiNpbo8cNnM= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.109.0/go.mod h1:VfAZTjcmn57mtI6McDC52+6LrioOu/ZR8helqsxHtyw= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.109.0 h1:3bhPg1t5iPi9Xbw6eVH6hFioSn8wmPFYLh19T0oszec= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.109.0/go.mod h1:h6WzA6ttU+iN1FL+BuqBIAxMf8e2RN6VoJ71p1VEezE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.109.0 h1:J7GI62EoqpI4qSgDI2CVJYaHCbQpSD1HIvUf6IMqHjk= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.109.0/go.mod h1:tmmrCWxZW7SHgLX+hg66ctE07idjb5fr/cvSirVBbfI= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.109.0 h1:szUDJ/1ZmaTH+Azt68pko10MXTIJtFm/orBD2MuxlGc= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.109.0/go.mod h1:1aJ+q3jFR+UVsitJF03xKrJ/+N8QyHIs9yWoRS85498= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.109.0 h1:T6rvvaY1PW5Oqwb3fhFy89UARRoveqtSLh6t5uvktes= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.109.0/go.mod h1:EWEI4jcMr9jXlBWTG77rqknzc3K+QObImve7y5vdnjs= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.109.0 h1:9mStsYv/9nnav/mftmHxEA6fp7c7mfd5CgU2802frjE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.109.0/go.mod h1:P7e6ch+uoSfxK+lMwfcndkHE6gWUqvWKpr7mD04KIAA= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.109.0 h1:k7uHhrznH4dYvzbaCRz5VgFyHzhd1NGow1s6504r6tA= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.109.0/go.mod h1:LfwqmbImTBZW5psp7tCyZPHIPy3Imwexq+K/A1NAhEY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.109.0 h1:Mi0qKcH4VjyyZsbaWYG038drk5FCFL7igVM8abEL4ZY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.109.0/go.mod h1:KvJWxR0bDk9Qh0ktw4gOFsd/ZrJ7p5KTAQueEJsaK9Q= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.109.0 h1:3kXFgdEEKw37ftdRC7SmXAiZuLahVavqOYRhlJVMLc8= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.109.0/go.mod h1:HtaWI5WJKJkBhHz2R7Xb2n7R3fdBPhfKieYcQajNCTo= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.109.0 h1:q3rHsRNnB97Xw2rjTBW1qpw6y+LP2xWSRbmTJtPIyQM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.109.0/go.mod h1:vo39/3CexkMcF+T0T8Ic/Oer/ErrSMiD+MWNBYo9VYE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.109.0 h1:YQB8+grNfmaLqiavbv4VKhBw1NF8O6pSmbLC+FjMrKM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.109.0/go.mod h1:XOuilD83ZQWc0Te2B7+X0dRm9Z19M4h480UXTPO41Xc= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.109.0 h1:mr94+h1RarvcZbsHOz8dzqIBwIEAoxbBBlsuguQyZTU= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.109.0/go.mod h1:/cJjT1Tsh3onIjeZlKH4Tc94HOvs7gDcdDwK3KKRUC4= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.109.0 h1:aBX4V/3T7gT16EnrpSO1lMGNFfhhAtDYJ336ELImLHo= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.109.0/go.mod h1:RjSpcrHZdWvZNyBQBxdgQmccuNAcoXc0WCuvyFghVr4= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.109.0 h1:CSYFxtxCBTF7BHbITx3g5ilxsjAI2Mn5nDHotnU4KXg= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.109.0/go.mod h1:D0jbiFn1iOXtc/lfotbBKayP3KWUIYdc00GmTFcsWds= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.109.0 h1:MXfuYf9ygtz77RvORnGPcD8WwcyBq0LOCv1mdJ89UsE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.109.0/go.mod h1:T+WCLIq5mgjeliV9fBkkGIID4b132RZ9INtR8xv8nhY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.109.0 h1:r5mfEkON7NXqpf7Thch60nnhJVan7BdVKCx3Q5jB7fA= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.109.0/go.mod h1:i/U2BmC/pXlFsYIr1A8HjfNxnGVNy3EZpz8MTklbFPw= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.109.0 h1:kvkD4WCqpiix0XLkgw2oNcQCKIhnxEzXYRWvdzGThBk= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.109.0/go.mod h1:5Yd9ez2MklFD5BAhiA0bvbNwK/YbhCYzS305xvwGMLk= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.109.0 h1:D3L1PMvyZfzEDHOTNOmpCEqS67WZvrSS/GVxdWxWkaM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.109.0/go.mod h1:RVKq4ulQ7Rn6qP1eHM2wM++oKnmapRtkCQusAYxuxRk= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.109.0 h1:zGGn5F0WWcJ463P3lnt4r9KL/2A2QuP4hxa/tkWXKtM= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.109.0/go.mod h1:c/QB5T/ayynIPqx/yTAbUfaYH3uq8z+fMlmAHipqhfo= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.109.0 h1:rAYFkHgTrlxjWmO0TstlaKnG8D8ZkAhvgX66o72chBY= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.109.0/go.mod h1:e7aupeNVkFNxZy7KJxp+KkUPF4hq0X1/IfN6wKru2Lc= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.109.0 h1:pLMLndOzGLyE5WuN2a19My6ySYr6N/UtoM7IllRKKbw= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.109.0/go.mod h1:5954rquV2MrYB3VYIPmQhPdyOoxDKJfr0ymv0nF6kCY= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.109.0 h1:uKbTGjuQL9M7VTDuTxHC9UhrzDLLDxadotPtcBJwMBo= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.109.0/go.mod h1:57oMySxf38b9oXDLf4faUGTh62f5+nn3Gs1tIE2achI= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.109.0 h1:DtK1ww+a4GUwj5B/2qen45ePJG/VbdnrIuy3D7nmGGI= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.109.0/go.mod h1:fg599JS4SNwUzbWo16Cl36T2cvIPI7NYOX13cWkJga8= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.109.0 h1:lkAPT2Wje/4WnYYVajW4bv4Fbuajcw+9WzYb+C9ZpHc= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.109.0/go.mod h1:jwDh0L2ybXkAPmG4Rf5RYIAskfW81JX256s6HA9sAe8= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.109.0 h1:FvsCAzInSpYMQcC5yQQ0XDB5TzrX3UzvbIwcNqQVXyM= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.109.0/go.mod h1:7dkKbLs3o40JyLlwPdWRnD20VzlTBM4jPoFGxYAfT/k= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.109.0 h1:ZgXYukH/b3zlPBGNCsK/8AIiaRTAmYop2cRcnKCjJ4Y= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.109.0/go.mod h1:H6fo0u3QqJ25Yldpc5hfuiMHdc9s12InGdaUgF8rGd8= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.109.0 h1:WDxAwaifiK2/WxlfnQmMTrYrm34/izpAV7IqObwpK8Q= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.109.0/go.mod h1:bi0B5Ft+9EU7mX3N1PfXRFKIfe0ZCM7heU6oXLRVpD4= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.109.0 h1:98hBdWb8kcGefIuHmwfetnLfJEYeI3NzKJ5/O77OPCM= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.109.0/go.mod h1:aI6kcLfBi4eeqfDwdrHT7E1fhuxRRjeqwbQFitx2kP4= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.109.0 h1:nT8dSBamRSR8hLEtgjsKSyCX+rbU/i4ABYOuQpf8Nxw= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.109.0/go.mod h1:iP63ZUZIoPMqtPd9mE5d6/poECyKrrLggnEVIErJCGM= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.109.0 h1:gCEoavcQ0yVjA1CiYZlhnzeOdZ5bPsgFFwCoC/UUywA= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.109.0/go.mod h1:dpSIBopcBa4qZq7q7yxjp1xePzX+DAYPzZPYqp7oLSU= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.109.0 h1:+kh354oE1KoCUU0yDLFLnvO4twmSe8FJtiii6DbtTsY= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.109.0/go.mod h1:yByl4iylR4JKNVoW1erfSf844Wn89xN8Ajqz8Qqr2RA= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.109.0 h1:1Gk/rNb21b/1fUrhEeI4h1deoFtsBff6GU9WwaqUUYY= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.109.0/go.mod h1:VzghNte3h6Z8QH7JDkgQahFOFjD7n0K3/mxa0rp5ytc= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.109.0 h1:yci3vACUIsA6Jo5RssuZttfKx6ZIKMQoFZnVKON1KbM= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.109.0/go.mod h1:AEoTTctPV4aZKj29+Kcndz17DIRhQFIZJBBy89q7wlU= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.109.0 h1:PBg8KwyndTvJF+cvx1DS+u4tZsqA6lGy5DNW/aXe6x4= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.109.0/go.mod h1:FSU+HErJyo9pAxY0HJBEvsADFDFCLTO/cZArw8mKC4E= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.109.0 h1:6Q29ciD/uF5eLesRIjc1LvqjS1bK4FfK71Dy1kZLEts= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.109.0/go.mod h1:zFgCYFBzdn3DVWYtQHGTwr4uWPH5/cz+K08VxHU0stc= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.109.0 h1:mJ/ADh7dfCBbo29Fo7BLZJ/aqLgaRPsJjPK+TRyxy7U= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.109.0/go.mod h1:6L541PkRlJq0MZkhcTyjBrtOI+KJXK4L7bdM7u2ay6E= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.109.0 h1:u4U+FR12TRThRT2TicKpJCOeXUuhmvhWjMwcqO/Ae9k= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.109.0/go.mod h1:PsKl5xT4Dsdzi5jZq03mfsJy3+9yRiZ1Ee0HdDDlSp0= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.109.0 h1:144F040xjSRvDmI7mvFjUzGTtYPG7TPah5zV7oG8qso= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.109.0/go.mod h1:LSXi23XBct5lxebBI7Dgl1g8G/A6bhJV6LdmomRQ7qo= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.109.0 h1:Z+0zxNfJ5W9IJ7DPoNgdVbscjNofM5NbMWM67ib2kBU= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.109.0/go.mod h1:bJcA0uNjmLpmVzH4mKCJqggEYZT8rbtU8xvDT6e54Co= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.109.0 h1:dFqyHd6kB706+lkpOmMg+RMbKkErHVi2I43hWMNyvzA= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.109.0/go.mod h1:oObkutfPm64G6XUXsnrcLOlYb/yGOZ2TYLYypdom3zc= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.109.0 h1:nJ1SAA9FyUSPT86BTP6kSSe/fVYNy3LOMw9C1EcU6uo= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.109.0/go.mod h1:x0MZ9pwQnFBwP/yI9vSDbRWPRlB5vnaZ8ll2RO5k6Eg= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.109.0 h1:EsDmXd9q2yUUAWxplZWG5aOZdthquilbKtNprPokOeA= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.109.0/go.mod h1:sqwjLyjFSZyXzJGQ863KiPuStN/9Ho/oUNjjLMbBTcE= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.109.0 h1:KtBPQWaKCS9nmG1cTbl1xROcd31+ziqrv28zlKwkiyo= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.109.0/go.mod h1:pRMfAbGQceDlttlVc15J5ushw+7QDhpJY9VT3SB6bQs= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.115.0 h1:JtJAM3lGGhl+zeiBns5jDEn5Jh8Sa+mK+sjxfQ7GoTg= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.115.0/go.mod h1:94ysWOTLNMMFeK8ccu3rx1RPV4CQjCnCIGI0pgrDeJ0= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.115.0 h1:Xkfl44ZRgkz1EoCCYgwPomQkV+BrYOPvv9v1Kd1gZE4= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.115.0/go.mod h1:Sr/upBdJeJ7nxDfmCFCl9iHosXiPoQCPHkCJslDyoUA= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.115.0 h1:u9QX4X0qZB3iyNZNZwf4YH8/dmGav+rEywnZdWcJdDk= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.115.0/go.mod h1:FuK6l/Il/8J0Df0p1jKVYAYiUBrWzxFZk2PQky6XvQE= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.115.0 h1:lkILPVa9OqVxPtCXdU5M0cg6BTta4XtIjTeH957Tsik= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.115.0/go.mod h1:XXKU0wGYRnJ0MZWmXJYdRQC8utZDFOhi8CRrKcI8DIA= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.115.0 h1:clj+zH4LIEddgVUuc7eqwDcatWVbE4wiQWFn+XCBFvk= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.115.0/go.mod h1:8Zx+0wnC6S/kV53H8Ki0lq+oY+in0RQGnskgkJ02Nd4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.115.0 h1:qtct9PsKONY6YOMc+QGBE/uGs8KMBcF6mvYJbyFHFt8= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.115.0/go.mod h1:OR9DKWrSRpfc3+CxwsL2QTOuHD03S9w0Jubi3EhTcy4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.115.0 h1:sVfc/ND4/Bp+r1U3zCucxz4U4kG0D4DpHnkJh8SCcxs= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.115.0/go.mod h1:X32RUqZJR51cpTFxrnNvRQaS9zRW3BA8+ul+CzlvGUU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.115.0 h1:ERZZn6Z3/nQVyzIWCSfGSH8im5v+NS3eOjc+F24ljvs= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.115.0/go.mod h1:PetcN/RbgdGEXdKy543/rwr/Vw1grrWJW1Fnf9szf6U= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.115.0 h1:hYFqbhrWi1vMPor3xZnKUHVdVjkkCzMe2pZlWa4sd3g= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.115.0/go.mod h1:NO3B0zn2KdZFVlOWQpV8kdHPoBz/2TKrOcIticasu5o= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.115.0 h1:s6wXer6CvXH856ezICs8+DcBG2ETOlY6AzrhN6v5qio= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.115.0/go.mod h1:TW+4e/jFKDx0DolzSb47J6SZ8VQi8E9JC2WXju6jIno= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.115.0 h1:+chjfzq/LX6e5KLBoOH5cMH0abARKdZZAR4Esl6i/N4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.115.0/go.mod h1:e6VtbMpfBlKdpjAgwyP4AG9sG1k8JqpMyK7DOMHg5nU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.115.0 h1:u7Ht+E1ghQESffcjyaxWrXGsfSWa1VE9LKC4f2PPx84= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.115.0/go.mod h1:r3iS2mDYu+cnGjgNc8TgvuUUAN6A6/1BvR1e1YJBrqM= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.115.0 h1:RXYLbv2uTJlJTJcEa5H8/fLdX419XUlbn6mjzEgTWxc= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.115.0/go.mod h1:ngeyITKu+koaagA/sFpnuT+x0nFVBNdWq60/h5buSr4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.115.0 h1:OKZ7621PLOPS60NR793joAlPp6OVyrR0bQiBOymmFYM= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.115.0/go.mod h1:19AqiOGBL0OqT9Y36cvTsq3pynqPX3Eber86jJvDv8c= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.115.0 h1:tn4uJaBcj2HdCpnz4uFstgXFjaf3yGAw6ngawWTzy+A= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.115.0/go.mod h1:3M7eR1pUQxnJVJu+Nk1xdQ+ZScdS+KSmelpq6cjAKJo= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.115.0 h1:cmSOl8dexYz8/ZQGSYyGmeNgo3bxxDFuWQQ+XazbmL8= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.115.0/go.mod h1:qP0oNxkFOJqFZY6uGFJarhWziI+aqsov/0IRJkL85vg= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.115.0 h1:OmwyS3i+UFENIQizvmeC9kBtT1Rdchbeo0Ksl8ZNcGQ= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.115.0/go.mod h1:Z3VC/J++bjSNkzOJ2yDbBUBxA+nYi7Juk3p1dCsiKE4= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.115.0 h1:51D/x3xIAnWgVrY0lgdU+b+yb2aWd72uDqu9GhjRcNI= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.115.0/go.mod h1:nLau1YUdjhtLrk4jXLPb2l9riQ1Ap4xytTLl7MBedBg= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.115.0 h1:BtYrSkQSYGJufsmbqqrpzb+BJXH2S4CKL14i1bxOFCU= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.115.0/go.mod h1:4LQ1S3eBu+MyCNaCkBk0hIoAhvJJS851i/tY45FtDf4= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.115.0 h1:HVGG31WeB6Fn2+il2/ycWj9tDP0fxOeOqD1rKCjsBSc= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.115.0/go.mod h1:2hYojHs5daPVWECuZsPViKwty0ojuHUEmk8GEuaFqO0= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.115.0 h1:pZcKgTxza29XcYkfT4fwIRhg+ASz7kY64R3CVCohqIQ= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.115.0/go.mod h1:tAZJhSdNKRnR4kVXnoVc3IlOl2RuE8tK+uv60ez5Q1E= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.115.0 h1:4Ycg73pYVdiF+oq+BmUq7Dkg0WKeKvBSk9AOKvBe4LU= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.115.0/go.mod h1:l2Q+MmYk2ZRDSbhX9GlJYvBXC51AqhDJAj2ne290Xik= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.115.0 h1:Jh3XgGs4YBz0zCj6HU49gspyAjJUHf5DVCQTyw69FDw= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.115.0/go.mod h1:biiJzDxPevfbrnGaTZOU2I0f1zT3DWUGkpXdH/+uQ8k= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.115.0 h1:qfUo0NYFcKo3bK63o2FbGBmFWd7iHlXtwOEMgvb5RaM= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.115.0/go.mod h1:CCMkr9ZFAzjSY1SqRqXmpBjcY2qPYzu3dTPS72wBZwU= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.115.0 h1:DceAGbtG1BVqnA9kOsHDIs+o1ER+J51ayyDpu5c+B/M= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.115.0/go.mod h1:4HebVM9TmMpsxZAXLX5om998dTm1JUndjcpmhrnGkx4= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.115.0 h1:e8YcdSlrjt7RE6a9Fk+lNlqei8qv7l0TP/+7RlvDm7o= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.115.0/go.mod h1:sCx+2x6y1jjWGcXbgyP97Q+Himx84LlPZ9yWLgcV4vo= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.115.0 h1:SF3gOOEkfntE3zEhY80yO7BVQ5CkaK8ecic2U2AZPHE= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.115.0/go.mod h1:jeBzX5m8O9X0LQxiryV9sJUIrn+QAwOnCBE2wZWIltQ= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.115.0 h1:F34g3Vkkd+D7JS7oQT9epXjTR06Dpb8pblvSW0P0hkk= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.115.0/go.mod h1:kxuPS8JKnLVWie4PnL8iCoFx/mr89yR4VYFvJhlQfpY= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.115.0 h1:FjVyTJm0UQBMhWeuYOmK3BJtf93AbDKRScKGZ9Fk9ek= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.115.0/go.mod h1:G56rS4nL0VypkD7a94UaQmIjO5t0kffVcjbhpvSogww= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.115.0 h1:1iaHJTr8vp0M5PS/sEc+SspvfDcEKQ/hxg+y6zeUTqs= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.115.0/go.mod h1:wU2kNdrmD4b+5oTTCxOgMNPaG2yFYWk3Ab4fmj66LME= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.115.0 h1:m7SqhbTvMDKmO1Bw9ASfUYsiSmNa7vx/7/uSUYu5DCs= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.115.0/go.mod h1:F9ypvos3ttBxyH2uI23KXnUr2TnSpSRkQrnNMzEA0sI= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.115.0 h1:vRQQFD4YpasQFUAdF030UWtaflSYFXK542bfWMGhOK0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.115.0/go.mod h1:BZ7DT+0VkKR7P3I9PGEDfVa0GdB0ty41eEcejIUXF9A= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.115.0 h1:a36EJz/mb83f6ieX0v4fNDJ1jXqpeaM6DVQXeFDvdhw= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.115.0/go.mod h1:r5/40YO1eSP5ZreOmRzVOUtDr7YG39ZIUcVjHd+9Izc= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.115.0 h1:xITYM8BkEgs2Wf+PczOrVv0b1Fk4N929/xR9YtxLpkw= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.115.0/go.mod h1:m+5tYnZKfNDtnZKknOfssYSXBEL5Yqse4CJMpaY5kMk= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.115.0 h1:tFUm48xxdtuk3AgY5AY90DJ6UnxRW5k/HBpA24blCAo= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.115.0/go.mod h1:EI5GXHQVRNLx78DSyqSU8ZzIxQayUN7KlaeVChk5rJc= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.115.0 h1:h6zEsBtuZalQu7lKYf6ZCcj8fTocT+zxdmuOou9515Q= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.115.0/go.mod h1:6QU/K0dGCGYorkOvJmhbDFCspy4RPxRkFjf9I64y6I0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0 h1:f/HrZgTf6TF97v67uEZB3v2UtBT9aQojBvnloD3LOm4= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0/go.mod h1:Hp9uSq3qNJqdxu24u7RWyuPT9x1GgEUSx9US1LLeLi0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.115.0 h1:vXDJE8YHfAoYIAlPRtODchlqb6lWnGhJxPaT2ljvN7I= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.115.0/go.mod h1:f3IgMFHIjEUEI/I+5e3KWMPq9h2PSMy9WovmvPdmlb0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.115.0 h1:yXfwbXOAOEjaICnOb2raWD17jy9fwTXNoblS+3dBYZc= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.115.0/go.mod h1:5kMXT8uFeGzsIIocU1PjfzYwakbCbQquiferXmkw38g= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.115.0 h1:HURmseqTSAs8bTS6mQ+GyHsiI/C0lZHBYzOIKiaBXlw= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.115.0/go.mod h1:Ou5GidMD1Y1rZkXeeBKjGymsPs6vaB8ouY3z7lpMKDA= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.115.0 h1:4RoU3SlcNe6Dxyxfv8JVsrN8QgjBQ44Pkt9FLKK095I= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.115.0/go.mod h1:jfPlBpZT+hvp52Ldcx+srxaqyYuKxBkxOd3KtxbveCU= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.115.0 h1:8A+iBT5G23zvBPqYx32Qh4800jHFo4X9T1fpQKVQ+4E= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.115.0/go.mod h1:AhdPvwYKu7G8LKRWzHTNQYBq27RinsMm5qSanwSA/rU= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.115.0 h1:MuyDWyVoCty8HyP2CAYoRZXwINiThHovcC1Bj3+H8lk= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.115.0/go.mod h1:asekVnrdzYsMJBaJtIyXOt8p07l1x0xs8X3h00sZyf0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.115.0 h1:6GIJOSEIWBt9bprARMtTjRlENrwNsJl2UzbtjOBk7A0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.115.0/go.mod h1:/Fg/itwlAzDjyM0Sjenup9TbdOT+aVNPSqXsF80M8hw= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.115.0 h1:l4NBxl2AELPlyqupLu1IVAjtbGOEovaKEyt0UGMsuq8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.115.0/go.mod h1:j1qF1hE/Qcy2I655yXbf2ItezXok61OW+9AAxbH2ORw= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.115.0 h1:5mo0RdP0Hs3/QLoTwf9ilHc8x0CsfdQzGzMoGdDxiSQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.115.0/go.mod h1:iYgX5DFrPGvWSmKy4jOUanlsS3Rf/pV5vdX0jNFqs4s= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog v0.115.0 h1:WOqt8NpU/JPGYDR4CiWx7g/sHV6Oe9FChzhushwmVdo= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog v0.115.0/go.mod h1:wV/+iU7MyXcyTaY8K5Qx+1Z3yUzrxA40nydPQA476Iw= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.115.0 h1:l9AsnVHr3Sp4lAGFlBJ6Ochl7mlPE0d5MNd70o4qKEM= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.115.0/go.mod h1:kARk81QZpcX6L8x4fLo4Nr/z/+jpo5PxXtugBxF2DyE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.115.0 h1:Z9p78zj9Qblw472mGkPieuX7mqduAp47rzMbFfq5evI= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.115.0/go.mod h1:mtxUxJEIQy27MaGR1yzcn/OK8NoddEgb7fumpEbKYss= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.115.0 h1:7wjWEkvtP1oU2TNZzjo+5sY3GRvwhMhOJ9zFAeGGgo8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.115.0/go.mod h1:1q/L2R/28emNCz0EHfxEw853I6lPxTcHTqS+UrMea0k= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.115.0 h1:qdZ9EqmdM19pWhPoFA7VivBTdzP2HvNwXa3CCMHYoDQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.115.0/go.mod h1:mrL1MNrcg0zYAJ+aK9WtOH062dl2wN9DDG7mZk9H8v4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.115.0 h1:MerLKMrkM4YoGF6Di0D9yMXO02yCX8mrZAi/+jJVVeI= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.115.0/go.mod h1:R8AkVWe9G5Q0oMOapvm9HNS076E3Min8SVlmhBL3QD0= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.115.0 h1:WEqcnWSy9dNSlGb8pYRBX7zhaz2ReyaeImlenbzNTB4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.115.0/go.mod h1:6Mk71CakHUA3I6oM9hARDiyQypYyOolvb+4PFYyVEFg= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.115.0 h1:eoapW0JBablApkdv4C1RUuOKfz0U6SwuKMYYSAJH6fE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.115.0/go.mod h1:hW2AaybTRcwxJySGLC3Fh1vd2VDaQhRBfa7O7w30NS8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.115.0 h1:R9MRrO+dSkAHBQLZjuwjv2RHXHQqF2Wtm1Ki0VKD5cs= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.115.0/go.mod h1:rKXLXmwdUVcUHwTilroKSejbg3KSwLeYzNPSpkIEnv4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.115.0 h1:7tQ+WjojXhtWDFTJlwCvkjpvdTed5YkVKVQKVAu1alg= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.115.0/go.mod h1:iqgJP7+N03pOIOqYaKjVWYoIKweNdFivsvWJfFw6MTQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.115.0 h1:PmYiiOKopMdXl/WA0SxBEZFTiJVBuIpZrmRi4xvDzHI= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.115.0/go.mod h1:qBPBqhO1kCBCCu05bTbWCxAUNDqzPn6oALLIrQyHmZE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.115.0 h1:rrIm0dyEdaHmQo6udPK1V3opkzEKa0PrZzSdY5oGqmQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.115.0/go.mod h1:AMeisxL/9gs0bzozaymUqI1/EJ9GPvtnLh/BtqtjSF8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.115.0 h1:KghgAubxdDqP4eUQ+d2GzHXUAwtFxpSDToqFVnax0XA= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.115.0/go.mod h1:cW/BaYE6Uo7ZYHbmT0wVBktHP0SfeLqGHMf0qks7rOE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.115.0 h1:ioGiKiO0WqT3PxkzanuJsPVA24FItH6nTJeDeSMFpYA= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.115.0/go.mod h1:x1W4J+pzK/Bi9jjYBYESTsPq0nRJJLZoN7cPNd0vYSU= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.115.0 h1:y+Ystow5wnNQg/5yxx2AnWwtdUrKBTtdzTS3M+d1o8U= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.115.0/go.mod h1:UNQYkrGC0fQYoGCU/9ReJwWtTUCg3b37qrQj8BCWKOE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.115.0 h1:A9zqBtUJZ5J/0VI+B1dxuQhc2iVYpD9c54SgaKtFIN8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.115.0/go.mod h1:hG7GOrBBux/cg1fAUzvSlzYY02ekxjF9IvH4ls/nGXA= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.115.0 h1:hAsK9I081ShnSDSKPVEHB3TLawyOmbR6bPDiQEkgo2Y= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.115.0/go.mod h1:z8XdvlhXSYVboxS3TPGembE9kfxLAYH2PxPLMvf8wTk= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.115.0 h1:t3BGnPpmeuxW51vISSu51PrAs49ACBCa1Yl1NfZGE5Y= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.115.0/go.mod h1:jQLYyroEYEV1kWJApmGBgVuGUd73v+Q6EUJ6Wy7N508= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.115.0 h1:X6rEs7IxDpcDDBOCmkA3xHmc373UxHchH7BykK3Ao+o= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.115.0/go.mod h1:fmLLh7jL0uK/t8op9TieOz7pwxItl4hdFo2fX7U0Etg= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.115.0 h1:ficXJmB6l6kfiu+R6CmggtnlQWMHUNzu2csDYA4CFSs= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.115.0/go.mod h1:ykraxSeEVCuA43oqlMWnex78+vNQ+1dBTJUeInkqIpA= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.115.0 h1:QlisfzozR6a7wF+iIIjJC9YG1/btqrJANhrwUc3JiWI= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.115.0/go.mod h1:2DNBNDZbbk0rp3VDp1QcOfc5etsM1DnpFb7011rr2gg= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.115.0 h1:6RGhDlZkekmp12EvK6JV9fiIwrdZBOJID6/Ts9tXzL4= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.115.0/go.mod h1:qZRQtGr/DAjuBqAuKJMN2cWvc9RI94lB0Oq8UyGAduo= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.115.0 h1:XUstEF2/Rrx4aWwyke0QbXxyMsD/dN3Ej8sxxz3bE1g= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.115.0/go.mod h1:JnloihIXG9SsX8ITiGsNqviZvZTi2WBO23NVtdrVrks= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.115.0 h1:4qQKdEV5b2Mr6U1FYdOHY5ewVnNyNok/unHXPznwYXA= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.115.0/go.mod h1:FF5YKDPWjQp/D7jLSgs5fl1iAJ51gZ8eegR1yfieGRM= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.115.0 h1:vwZQ7k8oqlK0bdZYTsjP/59zjQQfjSD4fNsWIWsTu2w= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.115.0/go.mod h1:5ObSa9amrbzbYTdAK1Qhv3D/YqCxxnQhP0sk2eWB7Oo= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.115.0 h1:jQ6mIXhWqXhl8MPun9soNynsQ0lpOpOYQyAnQ28F014= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.115.0/go.mod h1:oRxNwm6HN7ckp4aJOAFC8BVBPa0UDhB8vNGTFL3QBJg= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.115.0 h1:KbfjEsr2d/5TGWHvcaBC3lOpYAnquEraLXcis4IamAs= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.115.0/go.mod h1:fmtZPK5RIz+2Lcm9xQZuwiM+M8/juSSeJufSxUT+J9w= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.115.0 h1:iT04H54PeygRCV/pUe3Rndai2Uf3LyiXsjueeEaq3vU= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.115.0/go.mod h1:9mCy+uOqybQlQSuR+KGxWFgdk+/YzHvHMz/k/ph1ncE= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.115.0 h1:olyiml73slGYORDjZNViW3nKiysC+K+h5yPsSBjUxQ4= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.115.0/go.mod h1:N00k1mTxzfS2clqxSP4Dxk7iX8GWbbuCq6LF8/ECk/M= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.115.0 h1:sLRTfXUFiqJ5Qe/NN5MUJxTaFt46E0Y/xjSY+KesCQc= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.115.0/go.mod h1:361IqXD4jnfs6G+Yn7978uv1UNozhZo4yBYy4p6Nqzc= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.115.0 h1:veprz/l+6CLoLVPcml4jp9tYC7qZOngILn9WxUlJN1g= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.115.0/go.mod h1:xr5dRxiVr/46rSiAEn8Y5V8+0n8crZsV9QuWR9VBfME= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.115.0 h1:9UHE7iTYDxUjKVd56bPqeMcci8T8M12RuAZZpijkQu0= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.115.0/go.mod h1:LDlwPxalBANVRNnAqHJfIp0XQ8TrQC9tuTKcYAl1Ns4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.115.0 h1:jBA6xZq8nPrbiEbROFlCaJC7JOR1OfqzY3hg80IZQHI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.115.0/go.mod h1:r1QANrkY2hGAQssHsGmt8+wvKZT3q41wQNQJI430T7I= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.115.0 h1:uAtUoqKIFVvmRCQ8y/rJjT3cPakcVIE1pruI1elmliA= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.115.0/go.mod h1:Q0EZ2e/xqleucMQk/+xf2m86yxkcTV6Zfwyz9bvrDA0= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.115.0 h1:JSFnfWwlVGLul8p9DE6Sk6E0zaqCvbys7CqvJQD4MIs= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.115.0/go.mod h1:cw0qzwXzKKxM7QyDcNSp9OSDLySVXyaSrgdqWPqlDk8= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.115.0 h1:XDlXWa6pdAp02kdfZdzZ0cjeZMNHjI7dj2dNgKdzOfo= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.115.0/go.mod h1:Zo6YARAWAMCdlUmyKBq0EcuKmLjxfC2hUNd3jIAFsWE= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.115.0 h1:hYNlyUj3F43cuv1ap19NlEEchQfs91vYeNoQ1+nswLo= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.115.0/go.mod h1:1o6wF5HJdpb2hd2eGMoQhGuTKb4F2+j/IHBJJSPdM2w= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.115.0 h1:satJaDP5SjwFKLPa5UxBg3MIUJQ2NQ+4bTO88n0SW0g= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.115.0/go.mod h1:1NZE+dWHRux5kN0fI1w57AbHzqL4xVniD0X6HPeFwHU= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.115.0 h1:GIyMUiud3T8nyCJP9KVhxVKvfcNQRBCde5uTCl6K/i0= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.115.0/go.mod h1:x4hCznyUolxGt5cE/uXWRCckdIDrUYqH5hJddvdKZd4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.115.0 h1:zBzHPDgDHLmFyJzjiBq7Z7IwbcHiotmnBJNP29Hxm1Q= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.115.0/go.mod h1:Utdu9cbK7qZ1cDsvBCttJyoEe12fx62GbzCB6/hl4FQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.115.0 h1:h/HAHLIZnIyu85l8wOeggOyiI8z8citNAqxQktVKUpk= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.115.0/go.mod h1:iEU0NA/i2sUREqD19JYmjKwrjMUTcddad/h1LGdSMHw= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -1054,8 +1072,8 @@ github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= -github.com/openshift/api v0.0.0-20240919193929-2669d1ebc910 h1:8pA9Ugq0hhUbVaVWi5lgF4PGaV1ozpTI1NYn/QWqspg= -github.com/openshift/api v0.0.0-20240919193929-2669d1ebc910/go.mod h1:OOh6Qopf21pSzqNVCB5gomomBXb8o5sGKZxG2KNpaXM= +github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= +github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/client-go v0.0.0-20240918182115-6a8ead8397fd h1:Gd0+bYdcfGIsDOJ8BwTJJjQeXoziyIsTwqp/s38rKyM= github.com/openshift/client-go v0.0.0-20240918182115-6a8ead8397fd/go.mod h1:EB7GeA/vpf9AHklMgnnT0+uG6l/3f8cChtCFbJFrk4g= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1107,8 +1125,8 @@ github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= -github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1122,8 +1140,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.57.0 h1:Ro/rKjwdq9mZn1K5QPctzh+MA4Lp0BuYk5ZZEVhoNcY= -github.com/prometheus/common v0.57.0/go.mod h1:7uRPFSUTbfZWsJ7MHY56sqt7hLQu3bxXHDnNhl8E9qI= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1139,14 +1157,14 @@ github.com/prometheus/prometheus v0.54.1/go.mod h1:xlLByHhk2g3ycakQGrMaU8K7OySZx github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/relvacode/iso8601 v1.4.0 h1:GsInVSEJfkYuirYFxa80nMLbH2aydgZpIf52gYZXUJs= -github.com/relvacode/iso8601 v1.4.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= +github.com/relvacode/iso8601 v1.6.0 h1:eFXUhMJN3Gz8Rcq82f9DTMW0svjtAVuIEULglM7QHTU= +github.com/relvacode/iso8601 v1.6.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1168,16 +1186,16 @@ github.com/secure-systems-lab/go-securesystemslib v0.8.0/go.mod h1:UH2VZVuJfCYR8 github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.11 h1:WaU9xqGFKvFfsUv94SXcUPD7rCkU0vr/asVdQOBZNj8= +github.com/shirou/gopsutil/v4 v4.24.11/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= -github.com/signalfx/sapm-proto v0.14.0 h1:KWh3I5E4EkelB19aP1/54Ik8khSioC/RVRW/riOfRGg= -github.com/signalfx/sapm-proto v0.14.0/go.mod h1:Km6PskZh966cqNoUn3AmRyGRix5VfwnxVBvn2vjRC9U= +github.com/signalfx/sapm-proto v0.17.0 h1:KY+9zm/yDOq6uzaguI1RmrJcWxzbkGv0zE6GplA3ytc= +github.com/signalfx/sapm-proto v0.17.0/go.mod h1:c8fGx9DjGP7Hqif7g6Zy6E+BCMXK/dERFU2b3faA0gk= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -1226,8 +1244,9 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= @@ -1244,8 +1263,8 @@ github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhso github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= github.com/tidwall/tinylru v1.2.1 h1:VgBr72c2IEr+V+pCdkPZUwiQ0KJknnWIYbhxAVkYfQk= github.com/tidwall/tinylru v1.2.1/go.mod h1:9bQnEduwB6inr2Y7AkBP7JPgCkyrhTV/ZpX0oOOpBI4= -github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= -github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= +github.com/tidwall/wal v1.1.8 h1:2qDSGdAdjaY3PEvHRva+9UFqgk+ef7cOiW1Qn5JH1y0= +github.com/tidwall/wal v1.1.8/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= @@ -1308,160 +1327,188 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector v0.109.0 h1:ULnMWuwcy4ix1oP5RFFRcmpEbaU5YabW6nWcLMQQRo0= -go.opentelemetry.io/collector v0.109.0/go.mod h1:gheyquSOc5E9Y+xsPmpA+PBrpPc+msVsIalY76/ZvnQ= -go.opentelemetry.io/collector/client v1.15.0 h1:SMUKTntljRmFvB8nCVf6KjbEQ/qm63wi+huDx+Bc/po= -go.opentelemetry.io/collector/client v1.15.0/go.mod h1:m0MdKbzRIVgyGu70qbJ6TwBmKtblk7cmPqspM45a5yY= -go.opentelemetry.io/collector/component v0.109.0 h1:AU6eubP1htO8Fvm86uWn66Kw0DMSFhgcRM2cZZTYfII= -go.opentelemetry.io/collector/component v0.109.0/go.mod h1:jRVFY86GY6JZ61SXvUN69n7CZoTjDTqWyNC+wJJvzOw= -go.opentelemetry.io/collector/component/componentprofiles v0.109.0 h1:W+IHaK1SdExcp3lmb454Y6v+JArsWHD0gsoBiX+dKNY= -go.opentelemetry.io/collector/component/componentprofiles v0.109.0/go.mod h1:rmD8l1mpJULa3UFi/2c62Mij3QNH00BzQ05ZkfQqNYc= -go.opentelemetry.io/collector/component/componentstatus v0.109.0 h1:LiyJOvkv1lVUqBECvolifM2lsXFEgVXHcIw0MWRf/1I= -go.opentelemetry.io/collector/component/componentstatus v0.109.0/go.mod h1:TBx2Leggcw1c1tM+Gt/rDYbqN9Unr3fMxHh2TbxLizI= -go.opentelemetry.io/collector/config/configauth v0.109.0 h1:6I2g1dcXD7KCmzXWHaL09I6RSmiCER4b+UARYkmMw3U= -go.opentelemetry.io/collector/config/configauth v0.109.0/go.mod h1:i36T9K3m7pLSlqMFdy+npY7JxfxSg3wQc8bHNpykLLE= -go.opentelemetry.io/collector/config/configcompression v1.15.0 h1:HHzus/ahJW2dA6h4S4vs1MwlbOck27Ivk/L3o0V94UA= -go.opentelemetry.io/collector/config/configcompression v1.15.0/go.mod h1:pnxkFCLUZLKWzYJvfSwZnPrnm0twX14CYj2ADth5xiU= -go.opentelemetry.io/collector/config/configgrpc v0.109.0 h1:LyaX6l7QhxaBzHJRNuZxtQ7P4iSu0/5pY9lt6En0RwQ= -go.opentelemetry.io/collector/config/configgrpc v0.109.0/go.mod h1:nrwFbaSSrRRb3VJPign40ALOZQ3LH4fOCYLJRZU4/1k= -go.opentelemetry.io/collector/config/confighttp v0.109.0 h1:6R2+zI1LqFarEnCL4k+1DCsFi+aVeUTbfFOQBk0JBh0= -go.opentelemetry.io/collector/config/confighttp v0.109.0/go.mod h1:fzvAO2nCnP9XRUiaCBh1AZ2whUf99iQTkEVFCyH+URk= -go.opentelemetry.io/collector/config/confignet v0.109.0 h1:/sBkAzkNtVFLWb38bfgkmkJXIBi4idayDmP4xaA2BDk= -go.opentelemetry.io/collector/config/confignet v0.109.0/go.mod h1:o3v4joAEjvLwntqexg5ixMqRrU1+Vst+jWuCUaBNgOg= -go.opentelemetry.io/collector/config/configopaque v1.15.0 h1:J1rmPR1WGro7BNCgni3o+VDoyB7ZqH2/SG1YK+6ujCw= -go.opentelemetry.io/collector/config/configopaque v1.15.0/go.mod h1:6zlLIyOoRpJJ+0bEKrlZOZon3rOp5Jrz9fMdR4twOS4= -go.opentelemetry.io/collector/config/configretry v1.15.0 h1:4ZUPrWWh4wiwdlGnss2lZDhvf1xkt8uwHEqmuqovMEs= -go.opentelemetry.io/collector/config/configretry v1.15.0/go.mod h1:KvQF5cfphq1rQm1dKR4eLDNQYw6iI2fY72NMZVa+0N0= -go.opentelemetry.io/collector/config/configtelemetry v0.109.0 h1:ItbYw3tgFMU+TqGcDVEOqJLKbbOpfQg3AHD8b22ygl8= -go.opentelemetry.io/collector/config/configtelemetry v0.109.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= -go.opentelemetry.io/collector/config/configtls v1.15.0 h1:imUIYDu6lo7juxxgpJhoMQ+LJRxqQzKvjOcWTo4u0IY= -go.opentelemetry.io/collector/config/configtls v1.15.0/go.mod h1:T3pOF5UemLzmYgY7QpiZuDRrihJ8lyXB0cDe6j1F1Ek= -go.opentelemetry.io/collector/config/internal v0.109.0 h1:uAlmO9Gu4Ff5wXXWWn+7XRZKEBjwGE8YdkdJxOlodns= -go.opentelemetry.io/collector/config/internal v0.109.0/go.mod h1:JJJGJTz1hILaaT+01FxbCFcDvPf2otXqMcWk/s2KvlA= -go.opentelemetry.io/collector/confmap v1.15.0 h1:KaNVG6fBJXNqEI+/MgZasH0+aShAU1yAkSYunk6xC4E= -go.opentelemetry.io/collector/confmap v1.15.0/go.mod h1:GrIZ12P/9DPOuTpe2PIS51a0P/ZM6iKtByVee1Uf3+k= -go.opentelemetry.io/collector/confmap/provider/envprovider v1.15.0 h1:QK4S0CY3l7aJ3EJdrM1Bm4fVQoF285RgdrXdKKpMz1U= -go.opentelemetry.io/collector/confmap/provider/envprovider v1.15.0/go.mod h1:/syocs/ODZitkUDojxDNPSPWfEC84q+XGzrXq1bkb9k= -go.opentelemetry.io/collector/confmap/provider/fileprovider v1.15.0 h1:qO9sgYUYHeASlH+hqf9uUj6NcN+WjB2ZglhsU1VPb6M= -go.opentelemetry.io/collector/confmap/provider/fileprovider v1.15.0/go.mod h1:mPK7NOS3NCLpPM+g9vul6esU5bYttauDNi3lcC47jG8= -go.opentelemetry.io/collector/confmap/provider/httpprovider v0.109.0 h1:AXb7Sr5xKaQt3MPCvbpk2gv3cmjHZuQhhAbpjpMNod8= -go.opentelemetry.io/collector/confmap/provider/httpprovider v0.109.0/go.mod h1:TY9njdV+TW5jRUvCZUPOboKUNEr1xzB/e4ZjEPIPdTc= -go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.109.0 h1:7jusCkgboh3fx4zKk3HcL3pcEPa9zNwpLkQiv11YCSE= -go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.109.0/go.mod h1:OtdA/HxoRbcnn/Qx3pj14hRlBTcK9O51Yy1F/IaY+Z0= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.109.0 h1:5COuB/kJZM/O5Vb3UmKkRr7g3E69tP+ePvNmY+Au+Es= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.109.0/go.mod h1:QKnaYuai5C5wDRoPVtLSkaz9ruH+HAnUzr3zOG2hgKU= -go.opentelemetry.io/collector/connector v0.109.0 h1:5U6uJETP4x9pkYAJTJsN4S9c4cjmd0tLZwzdZ/8Mscc= -go.opentelemetry.io/collector/connector v0.109.0/go.mod h1:/OXMHga1Cu9wNp+AOxxgekMQeccMN42Q73xScm+C62M= -go.opentelemetry.io/collector/connector/connectorprofiles v0.109.0 h1:v0fl+nxF5AEC91v8jLgLZ07D4vv5lgJ9jGJdVyIMx10= -go.opentelemetry.io/collector/connector/connectorprofiles v0.109.0/go.mod h1:s+qrtOxWWsh631GmD5rhMAgWA0DWaOk0F310leKqN4Y= -go.opentelemetry.io/collector/consumer v0.109.0 h1:fdXlJi5Rat/poHPiznM2mLiXjcv1gPy3fyqqeirri58= -go.opentelemetry.io/collector/consumer v0.109.0/go.mod h1:E7PZHnVe1DY9hYy37toNxr9/hnsO7+LmnsixW8akLQI= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.109.0 h1:+WZ6MEWQRC6so3IRrW916XK58rI9NnrFHKW/P19jQvc= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.109.0/go.mod h1:spZ9Dn1MRMPDHHThdXZA5TrFhdOL1wsl0Dw45EBVoVo= -go.opentelemetry.io/collector/consumer/consumertest v0.109.0 h1:v4w9G2MXGJ/eabCmX1DvQYmxzdysC8UqIxa/BWz7ACo= -go.opentelemetry.io/collector/consumer/consumertest v0.109.0/go.mod h1:lECt0qOrx118wLJbGijtqNz855XfvJv0xx9GSoJ8qSE= -go.opentelemetry.io/collector/exporter v0.109.0 h1:LsZ8/EB8cYvdgap3a8HWCEHYpVyH9A4d53Hy0W6n9KY= -go.opentelemetry.io/collector/exporter v0.109.0/go.mod h1:yk+qAB1ZJYoUYretkzbNt/onpy/VyQdTpPhvIbyh3Us= -go.opentelemetry.io/collector/exporter/debugexporter v0.109.0 h1:w/bKcIFy5HwjbtjyLtZ8lcKfKUs+E2o8Dk8qQcJrzpI= -go.opentelemetry.io/collector/exporter/debugexporter v0.109.0/go.mod h1:KN7xarQB/PgxQ0LazfWtx/ODmRVFNIoFFuWJWRZl2+k= -go.opentelemetry.io/collector/exporter/exporterprofiles v0.109.0 h1:px+iViqF0JB6+COJL6cTSa0HLpJRNlPmFUA6zjOCKMk= -go.opentelemetry.io/collector/exporter/exporterprofiles v0.109.0/go.mod h1:Zs5z/fdsRN3v9mChU2aYNGzUAJgY+2D+T7ZRGiZ3lmY= -go.opentelemetry.io/collector/exporter/loggingexporter v0.109.0 h1:AXcQt90JHLhd4ZsQhPcCm3gbduttqPTRHCAEdFNslW8= -go.opentelemetry.io/collector/exporter/loggingexporter v0.109.0/go.mod h1:Tf7wYjg8EGk5AlteOyfBfxAs6sXtNfGaBUWEau9sZ0w= -go.opentelemetry.io/collector/exporter/otlpexporter v0.109.0 h1:T0yQXSxFnl0mN8tUpR9i3bgDWFQqXRg7N3VCvYQIFcc= -go.opentelemetry.io/collector/exporter/otlpexporter v0.109.0/go.mod h1:5UWl8qL4EbNqTFGvJ9y0GjYTap03UtJbMhuJO9LJGfM= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.109.0 h1:FTN1KRg4vZt5ZArEjHINTieHCX36kEk/QFHXo1Xs+/Q= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.109.0/go.mod h1:ejCuRQHv6D++sKco4K76nJwfS3gAqiZZQuStJ2y9TE4= -go.opentelemetry.io/collector/extension v0.109.0 h1:r/WkSCYGF1B/IpUgbrKTyJHcfn7+A5+mYfp5W7+B4U0= -go.opentelemetry.io/collector/extension v0.109.0/go.mod h1:WDE4fhiZnt2haxqSgF/2cqrr5H+QjgslN5tEnTBZuXc= -go.opentelemetry.io/collector/extension/auth v0.109.0 h1:yKUMCUG3IkjuOnHriNj0nqFU2DRdZn3Tvn9eqCI0eTg= -go.opentelemetry.io/collector/extension/auth v0.109.0/go.mod h1:wOIv49JhXIfol8CRmQvLve05ft3nZQUnTfcnuZKxdbo= -go.opentelemetry.io/collector/extension/ballastextension v0.108.1 h1:HmuvkGN2s5hnviVZ62CRM7XbGOWcVjlp3L6VOZEvaTc= -go.opentelemetry.io/collector/extension/ballastextension v0.108.1/go.mod h1:Yu2jtjK7RD8Ie13N06rQMtGbLqWySmPEPEZoJdS9DT4= -go.opentelemetry.io/collector/extension/experimental/storage v0.109.0 h1:kIJiOXHHBgMCvuDNA602dS39PJKB+ryiclLE3V5DIvM= -go.opentelemetry.io/collector/extension/experimental/storage v0.109.0/go.mod h1:6cGr7MxnF72lAiA7nbkSC8wnfIk+L9CtMzJWaaII9vs= -go.opentelemetry.io/collector/extension/extensioncapabilities v0.109.0 h1:gwLiFySAlYvaaITqmF3EkblrxwcfaDxntUmflf3YdrA= -go.opentelemetry.io/collector/extension/extensioncapabilities v0.109.0/go.mod h1:4zf6xx0Qtv9OHJg599Ah48URgpNCPP6tiSakwIRcRfk= -go.opentelemetry.io/collector/extension/zpagesextension v0.109.0 h1:ckD3J8GIMagfAxwNOhwvdvZIK9ve5lXjWhauk/knSbo= -go.opentelemetry.io/collector/extension/zpagesextension v0.109.0/go.mod h1:bp2ZFqesXpE0omutODQoRaHcMsY+SjNAScfQurUb1lM= -go.opentelemetry.io/collector/featuregate v1.15.0 h1:8KRWaZaE9hLlyMXnMTvnWtUJnzrBuTI0aLIvxqe8QP0= -go.opentelemetry.io/collector/featuregate v1.15.0/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= -go.opentelemetry.io/collector/filter v0.109.0 h1:kXRV/YzGH4+Udy3sZYm5AooazqZx8tChGE+mL2DQEBU= -go.opentelemetry.io/collector/filter v0.109.0/go.mod h1:KowpGOq69yMhlC9mjEMjgWPUeZ/aCPXV1ConIcpqUQo= -go.opentelemetry.io/collector/internal/globalgates v0.109.0 h1:hBnxv0qtYJtsxZKr5evieX+VKZ7DcC22p5KFxeX1cGM= -go.opentelemetry.io/collector/internal/globalgates v0.109.0/go.mod h1:R5E97bZTG+IimHwxKbZBXMvooDXVboUjUMG1omkQti8= -go.opentelemetry.io/collector/otelcol v0.109.0 h1:x7hcrV3lnCg7Ub0Q5haLRFWmqS3mPiqEPOLkOS18VNg= -go.opentelemetry.io/collector/otelcol v0.109.0/go.mod h1:LR2qca0GFWd2yZFBaSTpTIPqnAXJM3gmes++nZNx4ms= -go.opentelemetry.io/collector/otelcol/otelcoltest v0.109.0 h1:j1jEq+iBfzc2XrFZphQOz2VoYlsOLqZFnBTWZfTq+yU= -go.opentelemetry.io/collector/otelcol/otelcoltest v0.109.0/go.mod h1:Fcacbap4v39ymbW6AlgZQUqcQm+YMo2rO9izv66IpwQ= -go.opentelemetry.io/collector/pdata v1.15.0 h1:q/T1sFpRKJnjDrUsHdJ6mq4uSqViR/f92yvGwDby/gY= -go.opentelemetry.io/collector/pdata v1.15.0/go.mod h1:2wcsTIiLAJSbqBq/XUUYbi+cP+N87d0jEJzmb9nT19U= -go.opentelemetry.io/collector/pdata/pprofile v0.109.0 h1:5lobQKeHk8p4WC7KYbzL6ZqqX3eSizsdmp5vM8pQFBs= -go.opentelemetry.io/collector/pdata/pprofile v0.109.0/go.mod h1:lXIifCdtR5ewO17JAYTUsclMqRp6h6dCowoXHhGyw8Y= -go.opentelemetry.io/collector/pdata/testdata v0.109.0 h1:gvIqy6juvqFET/6zi+zUOH1KZY/vtEDZW55u7gJ/hEo= -go.opentelemetry.io/collector/pdata/testdata v0.109.0/go.mod h1:zRttU/F5QMQ6ZXBMXCoSVG3EORTZLTK+UUS0VoMoT44= -go.opentelemetry.io/collector/processor v0.109.0 h1:Pgo9hib4ae1FSA47RB7TUUS26nConIlXcltzbxrjFg8= -go.opentelemetry.io/collector/processor v0.109.0/go.mod h1:Td43GwGMRCXin5JM/zAzMtLieobHTVVrD4Y7jSvsMtg= -go.opentelemetry.io/collector/processor/batchprocessor v0.109.0 h1:WqFGXId61sX91Og0VC7WjeR58Qv+YCsbLt3/Q1w3H8k= -go.opentelemetry.io/collector/processor/batchprocessor v0.109.0/go.mod h1:+aZMsL25etcyFTF6jIJwVv99OYE2JfnxQXGIKjIOY3M= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.109.0 h1:wXMvSe4OizuOPbp59xGj4CYYvvqGZaFcTtZSJ7RRnGw= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.109.0/go.mod h1:ewP8+ghUVT0O5+A6VU7SIlU5uDxkeiVwt/aI4Gbbpzs= -go.opentelemetry.io/collector/processor/processorprofiles v0.109.0 h1:+w0vqF30eOskfpcIuZLAJb1dCWcayBlGWoQCOUWKzf4= -go.opentelemetry.io/collector/processor/processorprofiles v0.109.0/go.mod h1:k7pJ76mOeU1Fx1hoVEJExMK9mhMre8xdSS3+cOKvdM4= -go.opentelemetry.io/collector/receiver v0.109.0 h1:DTOM7xaDl7FUGQIjvjmWZn03JUE+aG4mJzWWfb7S8zw= -go.opentelemetry.io/collector/receiver v0.109.0/go.mod h1:jeiCHaf3PE6aXoZfHF5Uexg7aztu+Vkn9LVw0YDKm6g= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.109.0 h1:zqDh6B9hgrrU5gnv7GBg5mvIcgYNc5plKcUzSm8ZvmU= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.109.0/go.mod h1:lRRYeYtzzNrY/Sy9FD59Hcw+RH3k+Wq110DYS5bfxgQ= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.109.0 h1:KKzdIixE/XJWvqdCcNWAOtsEhNKu4waLKJjawjhnPLw= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.109.0/go.mod h1:FKU+RFkSLWWB3tUUB6vifapZdFp1FoqVYVQ22jpHc8w= -go.opentelemetry.io/collector/semconv v0.109.0 h1:6CStOFOVhdrzlHg51kXpcPHRKPh5RtV7z/wz+c1TG1g= -go.opentelemetry.io/collector/semconv v0.109.0/go.mod h1:zCJ5njhWpejR+A40kiEoeFm1xq1uzyZwMnRNX6/D82A= -go.opentelemetry.io/collector/service v0.109.0 h1:kL0qiY1AJSpQgFdLSAZXb/vsyauWhNaBrQ3Uk/xAx3Q= -go.opentelemetry.io/collector/service v0.109.0/go.mod h1:lpOCtSftIcuiTZleqGPHWU2g7hpsJPrlwBT1a16sBew= -go.opentelemetry.io/contrib/config v0.9.0 h1:AJ1c6+vJ6SxvqBBhsi2RhLFMlc6SnJOg81Jp4toFyNw= -go.opentelemetry.io/contrib/config v0.9.0/go.mod h1:u/u2L6y/c8GKrq/AP51sfXV4Eu24btVlC3A5f867xwg= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= -go.opentelemetry.io/contrib/propagators/b3 v1.29.0 h1:hNjyoRsAACnhoOLWupItUjABzeYmX3GTTZLzwJluJlk= -go.opentelemetry.io/contrib/propagators/b3 v1.29.0/go.mod h1:E76MTitU1Niwo5NSN+mVxkyLu4h4h7Dp/yh38F2WuIU= -go.opentelemetry.io/contrib/zpages v0.54.0 h1:tSfm/LEK5E46sd5qx/Y9o4iQ65ipLubV0Una7veXFlA= -go.opentelemetry.io/contrib/zpages v0.54.0/go.mod h1:sbe4/RH3CFKkdM5zuGwfziKjvkqUOK9hSgLFckiVZUI= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.5.0 h1:4d++HQ+Ihdl+53zSjtsCUFDmNMju2FC9qFkUlTxPLqo= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.5.0/go.mod h1:mQX5dTO3Mh5ZF7bPKDkt5c/7C41u/SiDr9XgTpzXXn8= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.29.0 h1:k6fQVDQexDE+3jG2SfCQjnHS7OamcP73YMoxEVq5B6k= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.29.0/go.mod h1:t4BrYLHU450Zo9fnydWlIuswB1bm7rM8havDpWOJeDo= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.29.0 h1:xvhQxJ/C9+RTnAj5DpTg7LSM1vbbMTiXt7e9hsfqHNw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.29.0/go.mod h1:Fcvs2Bz1jkDM+Wf5/ozBGmi3tQ/c9zPKLnsipnfhGAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 h1:dIIDULZJpgdiHz5tXrTgKIMLkus6jEFa7x5SOKcyR7E= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0/go.mod h1:jlRVBe7+Z1wyxFSUs48L6OBQZ5JwH2Hg/Vbl+t9rAgI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0 h1:nSiV3s7wiCam610XcLbYOmMfJxB9gO4uK3Xgv5gmTgg= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0/go.mod h1:hKn/e/Nmd19/x1gvIHwtOwVWM+VhuITSWip3JUDghj0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 h1:JAv0Jwtl01UFiyWZEMiJZBiTlv5A50zNs8lsthXqIio= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0/go.mod h1:QNKLmUEAq2QUbPQUfvw4fmv0bgbK7UlOSFCnXyfvSNc= -go.opentelemetry.io/otel/exporters/prometheus v0.51.0 h1:G7uexXb/K3T+T9fNLCCKncweEtNEBMTO+46hKX5EdKw= -go.opentelemetry.io/otel/exporters/prometheus v0.51.0/go.mod h1:v0mFe5Kk7woIh938mrZBJBmENYquyA0IICrlYm4Y0t4= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.5.0 h1:ThVXnEsdwNcxdBO+r96ci1xbF+PgNjwlk457VNuJODo= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.5.0/go.mod h1:rHWcSmC4q2h3gje/yOq6sAOaq8+UHxN/Ru3BbmDXOfY= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0 h1:X3ZjNp36/WlkSYx0ul2jw4PtbNEDDeLskw3VPsrpYM0= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0/go.mod h1:2uL/xnOXh0CHOBFCWXz5u1A4GXLiW+0IQIzVbeOEQ0U= -go.opentelemetry.io/otel/log v0.5.0 h1:x1Pr6Y3gnXgl1iFBwtGy1W/mnzENoK0w0ZoaeOI3i30= -go.opentelemetry.io/otel/log v0.5.0/go.mod h1:NU/ozXeGuOR5/mjCRXYbTC00NFJ3NYuraV/7O78F0rE= -go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= -go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= -go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= -go.opentelemetry.io/otel/sdk/log v0.5.0 h1:A+9lSjlZGxkQOr7QSBJcuyyYBw79CufQ69saiJLey7o= -go.opentelemetry.io/otel/sdk/log v0.5.0/go.mod h1:zjxIW7sw1IHolZL2KlSAtrUi8JHttoeiQy43Yl3WuVQ= -go.opentelemetry.io/otel/sdk/metric v1.29.0 h1:K2CfmJohnRgvZ9UAj2/FhIf/okdWcNdBwe1m8xFXiSY= -go.opentelemetry.io/otel/sdk/metric v1.29.0/go.mod h1:6zZLdCl2fkauYoZIOn/soQIDSWFmNSRcICarHfuhNJQ= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +go.opentelemetry.io/collector v0.115.0 h1:qUZ0bTeNBudMxNQ7FJKS//TxTjeJ7tfU/z22mcFavWU= +go.opentelemetry.io/collector v0.115.0/go.mod h1:66qx0xKnVvdwq60e1DEfb4e+zmM9szhPsv2hxZ/Mpj4= +go.opentelemetry.io/collector/client v1.21.0 h1:3Kes8lOFMYVxoxeAmX+DTEAkuS1iTA3NkSfqzGmygJA= +go.opentelemetry.io/collector/client v1.21.0/go.mod h1:jYJGiL0UA975OOyHmjbQSokNWt1OiviI5KjPOMUMGwc= +go.opentelemetry.io/collector/component v0.115.0 h1:iLte1oCiXzjiCnaOBKdsXacfFiECecpWxW3/LeriMoo= +go.opentelemetry.io/collector/component v0.115.0/go.mod h1:oIUFiH7w1eOimdeYhFI+gAIxYSiLDocKVJ0PTvX7d6s= +go.opentelemetry.io/collector/component/componentstatus v0.115.0 h1:pbpUIL+uKDfEiSgKK+S5nuSL6MDIIQYsp4b65ZGVb9M= +go.opentelemetry.io/collector/component/componentstatus v0.115.0/go.mod h1:36A+9XSiOz0Cdhq+UwwPRlEr5CYuSkEnVO9om4BH7d0= +go.opentelemetry.io/collector/component/componenttest v0.115.0 h1:9URDJ9VyP6tuij+YHjp/kSSMecnZOd7oGvzu+rw9SJY= +go.opentelemetry.io/collector/component/componenttest v0.115.0/go.mod h1:PzXvNqKLCiSADZGZFKH+IOHMkaQ0GTHuzysfVbTPKYY= +go.opentelemetry.io/collector/config/configauth v0.115.0 h1:xa+ALdyPgva3rZnLBh1H2oS5MsHP6JxSqMtQmcELnys= +go.opentelemetry.io/collector/config/configauth v0.115.0/go.mod h1:C7anpb3Rf4KswMT+dgOzkW9UX0z/65PLORpUw3p0VYc= +go.opentelemetry.io/collector/config/configcompression v1.21.0 h1:0zbPdZAgPFMAarwJEC4gaR6f/JBP686A3TYSgb3oa+E= +go.opentelemetry.io/collector/config/configcompression v1.21.0/go.mod h1:LvYG00tbPTv0NOLoZN0wXq1F5thcxvukO8INq7xyfWU= +go.opentelemetry.io/collector/config/configgrpc v0.115.0 h1:gZzXSFe6hB3RUcEeAYqk1yT+TBa+X9tp6/1x29Yg2yk= +go.opentelemetry.io/collector/config/configgrpc v0.115.0/go.mod h1:107lRZ5LdQPMdGJGd4m1GhyKxyH0az2cUOqrJgTEN8E= +go.opentelemetry.io/collector/config/confighttp v0.115.0 h1:BIy394oNXnqySJwrCqgAJu4gWgAV5aQUDD6k1hy6C8o= +go.opentelemetry.io/collector/config/confighttp v0.115.0/go.mod h1:Wr50ut12NmCEAl4bWLJryw2EjUmJTtYRg89560Q51wc= +go.opentelemetry.io/collector/config/confignet v1.21.0 h1:PeQ5YrMnfftysFL/WVaSrjPOWjD6DfeABY50pf9CZxU= +go.opentelemetry.io/collector/config/confignet v1.21.0/go.mod h1:ZppUH1hgUJOubawEsxsQ9MzEYFytqo2GnVSS7d4CVxc= +go.opentelemetry.io/collector/config/configopaque v1.21.0 h1:PcvRGkBk4Px8BQM7tX+kw4i3jBsfAHGoGQbtZg6Ox7U= +go.opentelemetry.io/collector/config/configopaque v1.21.0/go.mod h1:sW0t0iI/VfRL9VYX7Ik6XzVgPcR+Y5kejTLsYcMyDWs= +go.opentelemetry.io/collector/config/configretry v1.21.0 h1:ZHoOvAkEcv5BBeaJn8IQ6rQ4GMPZWW4S+W7R4QTEbZU= +go.opentelemetry.io/collector/config/configretry v1.21.0/go.mod h1:cleBc9I0DIWpTiiHfu9v83FUaCTqcPXmebpLxjEIqro= +go.opentelemetry.io/collector/config/configtelemetry v0.115.0 h1:U07FinCDop+r2RjWQ3aP9ZWONC7r7kQIp1GkXQi6nsI= +go.opentelemetry.io/collector/config/configtelemetry v0.115.0/go.mod h1:SlBEwQg0qly75rXZ6W1Ig8jN25KBVBkFIIAUI1GiAAE= +go.opentelemetry.io/collector/config/configtls v1.21.0 h1:ZfrlAYgBD8lzp04W0GxwiDmUbrvKsvDYJi+wkyiXlpA= +go.opentelemetry.io/collector/config/configtls v1.21.0/go.mod h1:5EsNefPfVCMOTlOrr3wyj7LrsOgY7V8iqRl8oFZEqtw= +go.opentelemetry.io/collector/config/internal v0.115.0 h1:eVk57iufZpUXyPJFKTb1Ebx5tmcCyroIlt427r5pxS8= +go.opentelemetry.io/collector/config/internal v0.115.0/go.mod h1:OVkadRWlKAoWjHslqjWtBLAne8ceQm8WYT71ZcBWLFc= +go.opentelemetry.io/collector/confmap v1.21.0 h1:1tIcx2/Suwg8VhuPmQw87ba0ludPmumpFCFRZZa6RXA= +go.opentelemetry.io/collector/confmap v1.21.0/go.mod h1:Rrhs+MWoaP6AswZp+ReQ2VO9dfOfcUjdjiSHBsG+nec= +go.opentelemetry.io/collector/confmap/provider/envprovider v1.21.0 h1:YLf++Z8CMp86AanfOCWUiE7vKbb1kSjgC3a9VJoxbD4= +go.opentelemetry.io/collector/confmap/provider/envprovider v1.21.0/go.mod h1:aSWLYcmgZZJDNtWN1M8JKQuehoGgOxibl1KuvKTar4M= +go.opentelemetry.io/collector/confmap/provider/fileprovider v1.21.0 h1:+zukkM+3l426iGoJkXTpLB2Z8QnZFu26TkGPjh5Rn/4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v1.21.0/go.mod h1:BXBpQhF3n4CNLYO2n/mWZPd2U9ekpbLXLRGZrun1VfI= +go.opentelemetry.io/collector/confmap/provider/httpprovider v1.21.0 h1:NYYGM+SgIlTuNGjd8eGzDr8DkvOe4q7cXon8djF9yyI= +go.opentelemetry.io/collector/confmap/provider/httpprovider v1.21.0/go.mod h1:XRYbuwqq1awFuNhLDUv4aSvn6MzqX+abcevx1O+APJI= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.21.0 h1:2EEUI2DzA2DvrvCImMWRSNqIHdRJ6+qbgvZL44Zb2ac= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.21.0/go.mod h1:axezjjQWY4kZc5pr/+wOKAuqSYMhea/tWzP5S30h+dc= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.21.0 h1:P3Q9RytCMY76ORPCnkkjOa4fkuFqmZiQRor+F/nPlYE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.21.0/go.mod h1:xhYhHK3yLQ78tsoaKPIGUfFulgy961ImOe2gATH3RQc= +go.opentelemetry.io/collector/connector v0.115.0 h1:4Kkm3HQFzNT1eliMOB8FbIn+PLMRJ2qQku5Vmy3V8Ko= +go.opentelemetry.io/collector/connector v0.115.0/go.mod h1:+ByuAmYLrYHoKh9B+LGqUc0N2kXcN2l8Dea8Mp6brZ8= +go.opentelemetry.io/collector/connector/connectorprofiles v0.115.0 h1:aW1f4Az0I+QJyImFccNWAXqik80bnNu27aQqi2hFfD8= +go.opentelemetry.io/collector/connector/connectorprofiles v0.115.0/go.mod h1:lmynB1CucydOsHa8RSSBh5roUZPfuiv65imXhtNzClM= +go.opentelemetry.io/collector/connector/connectortest v0.115.0 h1:GjtourFr0MJmlbtEPAZ/1BZCxkNAeJ0aMTlrxwftJ0k= +go.opentelemetry.io/collector/connector/connectortest v0.115.0/go.mod h1:f3KQXXNlh/XuV8elmnuVVyfY92dJCAovz10gD72OH0k= +go.opentelemetry.io/collector/consumer v1.21.0 h1:THKZ2Vbi6GkamjTBI2hFq5Dc4kINZTWGwQNa8d/Ty9g= +go.opentelemetry.io/collector/consumer v1.21.0/go.mod h1:FQcC4ThMtRYY41dv+IPNK8POLLhAFY3r1YR5fuP7iiY= +go.opentelemetry.io/collector/consumer/consumererror v0.115.0 h1:yli//xBCQMPZKXNgNlXemo4dvqhnFrAmCZ11DvQgmcY= +go.opentelemetry.io/collector/consumer/consumererror v0.115.0/go.mod h1:LwVzAvQ6ZVNG7mbOvurbAo+W/rKws0IcjOwriuZXqPE= +go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.115.0 h1:gaIhzpaGFWauiyznrQ3f++TbcdXxA5rpsX3L9uGjMM8= +go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.115.0/go.mod h1:7oXvuGBSawS5bc413lh1KEMcXkqBcrCqZQahOdnE24U= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0 h1:H3fDuyQW1t2HWHkz96WMBQJKUevypOCjBqnqtaAWyoA= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0/go.mod h1:IzEmZ91Tp7TBxVDq8Cc9xvLsmO7H08njr6Pu9P5d9ns= +go.opentelemetry.io/collector/consumer/consumertest v0.115.0 h1:hru0I2447y0TluCdwlKYFFtgcpyCnlM+LiOK1JZyA70= +go.opentelemetry.io/collector/consumer/consumertest v0.115.0/go.mod h1:ybjALRJWR6aKNOzEMy1T1ruCULVDEjj4omtOJMrH/kU= +go.opentelemetry.io/collector/exporter v0.115.0 h1:JnxfpOnsuqhTPKJXVKJLS1Cv3BiVrVLzpHOjJEQw+xw= +go.opentelemetry.io/collector/exporter v0.115.0/go.mod h1:xof3fHQK8wADhaKLIJcQ7ChZaFLNC+haRdPN0wgl6kY= +go.opentelemetry.io/collector/exporter/debugexporter v0.115.0 h1:gb9VMQhcbvYqp0SJ4Hp8R9XqOLNLsoTgNJCPKpNEaVc= +go.opentelemetry.io/collector/exporter/debugexporter v0.115.0/go.mod h1:H/HS1UJlcZPNBbOcrsGZc2sPdQDHtbOjHOxMtJkmlcU= +go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.115.0 h1:fetbc740pODH6JW+H49SW0hiAJwQE+/B0SbuIlaY2rg= +go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.115.0/go.mod h1:oEKZ/d5BeaCK6Made9iwaeqmlT4lRbJSlW9nhIn/TwM= +go.opentelemetry.io/collector/exporter/exporterprofiles v0.115.0 h1:lSQEleCn/q9eFufcuK61NdFKU70ZlgI9dBjPCO/4CrE= +go.opentelemetry.io/collector/exporter/exporterprofiles v0.115.0/go.mod h1:7l5K2AecimX2kx+nZC1gKG3QkP247CO1+SodmJ4fFkQ= +go.opentelemetry.io/collector/exporter/exportertest v0.115.0 h1:P9SMTUXQOtcaq40bGtnnAe14zRmR4/yUgj/Tb2BEf/k= +go.opentelemetry.io/collector/exporter/exportertest v0.115.0/go.mod h1:1jMZ9gFGXglb8wfNrBZIgd+RvpZhSyFwdfE+Jtf9w4U= +go.opentelemetry.io/collector/exporter/otlpexporter v0.115.0 h1:Kqr31VFrQvgEMzeg8T1JSXWacjUQoZph39efKN8jBpY= +go.opentelemetry.io/collector/exporter/otlpexporter v0.115.0/go.mod h1:5uy/gduFx2mH0GxJ84sY75NfzQJb9xYmgiL9Pf0dKF8= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.115.0 h1:I0qzSWGbgph+iva5/jU8tkeUTkkqqcj8+UzMxg5ubF8= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.115.0/go.mod h1:cUrv5EG12iOs5MXaecfi9K+ZATEELefpyZY6Hj4NlUo= +go.opentelemetry.io/collector/extension v0.115.0 h1:/cBb8AUdD0KMWC6V3lvCC16eP9Fg0wd1Upcp5rgvuGI= +go.opentelemetry.io/collector/extension v0.115.0/go.mod h1:HI7Ak6loyi6ZrZPsQJW1OO1wbaAW8OqXLFNQlTZnreQ= +go.opentelemetry.io/collector/extension/auth v0.115.0 h1:TTMokbBsSHZRFH48PvGSJmgSS8F3Rkr9MWGHZn8eJDk= +go.opentelemetry.io/collector/extension/auth v0.115.0/go.mod h1:3w+2mzeb2OYNOO4Bi41TUo4jr32ap2y7AOq64IDpxQo= +go.opentelemetry.io/collector/extension/auth/authtest v0.115.0 h1:OZe7dKbZ01qodSpZU0ZYzI6zpmmzJ3UvfdBSFAbSgDw= +go.opentelemetry.io/collector/extension/auth/authtest v0.115.0/go.mod h1:fk9WCXP0x91Q64Z8HZKWTHh9PWtgoWE1KXe3n2Bff3U= +go.opentelemetry.io/collector/extension/experimental/storage v0.115.0 h1:sZXw0+77092pq24CkUoTRoHQPLQUsDq6HFRNB0g5yR4= +go.opentelemetry.io/collector/extension/experimental/storage v0.115.0/go.mod h1:qjFH7Y3QYYs88By2ZB5GMSUN5k3ul4Brrq2J6lKACA0= +go.opentelemetry.io/collector/extension/extensioncapabilities v0.115.0 h1:/g25Hp5aoCNKdDjIb3Fc7XRglO8yaBRFLO/IUNPnqNI= +go.opentelemetry.io/collector/extension/extensioncapabilities v0.115.0/go.mod h1:EQx7ETiy330O6q05S2KRZsRNDg0aQEeJmVl7Ipx+Fcw= +go.opentelemetry.io/collector/extension/extensiontest v0.115.0 h1:GBVFxFEskR8jSdu9uaQh2qpXnN5VNXhXjpJ2UjxtE8I= +go.opentelemetry.io/collector/extension/extensiontest v0.115.0/go.mod h1:eu1ecbz5mT+cHoH2H3GmD/rOO0WsicSJD2RLrYuOmRA= +go.opentelemetry.io/collector/extension/zpagesextension v0.115.0 h1:zYrZZocc7n0ZuDyXNkIaX0P0qk2fjMQj7NegwBJZA4k= +go.opentelemetry.io/collector/extension/zpagesextension v0.115.0/go.mod h1:OaXwNHF3MAcInBzCXrhXbTNHfIi9b7YGhXjtCFZqxNY= +go.opentelemetry.io/collector/featuregate v1.21.0 h1:+EULHPJDLMipcwAGZVp9Nm8NriRvoBBMxp7MSiIZVMI= +go.opentelemetry.io/collector/featuregate v1.21.0/go.mod h1:3GaXqflNDVwWndNGBJ1+XJFy3Fv/XrFgjMN60N3z7yg= +go.opentelemetry.io/collector/filter v0.115.0 h1:pYnHUFDSHSjEIFZit+CU09itVkDXgV+WcV2HOkjvQcE= +go.opentelemetry.io/collector/filter v0.115.0/go.mod h1:aewQ+jmvpH88gPVWpNXiWSm+wwJVxTK4f23ex2NMd2c= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.115.0 h1:6DRiSECeApFq6Jj5ug77rG53R6FzJEZBfygkyMEXdpg= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.115.0/go.mod h1:vgQf5HQdmLQqpDHpDq2S3nTRoUuKtRcZpRTsy+UiwYw= +go.opentelemetry.io/collector/internal/memorylimiter v0.115.0 h1:U07IJxyHZXM6eLn8cOq/Lycx6DhQZhpDOuYtIRw/d6I= +go.opentelemetry.io/collector/internal/memorylimiter v0.115.0/go.mod h1:KNcU8WVpW5y7Ij6CGnsefb7q1UZT7VvrTDhe5FKNOA4= +go.opentelemetry.io/collector/internal/sharedcomponent v0.115.0 h1:9TL6T6ALqDpumUJ0tYIuPIg5LGo4r6eoqlNArYX116o= +go.opentelemetry.io/collector/internal/sharedcomponent v0.115.0/go.mod h1:SgBLKMh11bOTPR1bdDZbi5MlqsoDBBFI3uBIwnei+0k= +go.opentelemetry.io/collector/otelcol v0.115.0 h1:wZhFGrSCZcTQ4qw4ePjI2PaSrOCejoQKAjprKD/xavs= +go.opentelemetry.io/collector/otelcol v0.115.0/go.mod h1:iK8DPvaizirIYKDl1zZG7DDYUj6GkkH4KHifVVM88vk= +go.opentelemetry.io/collector/otelcol/otelcoltest v0.115.0 h1:HNlFpQujlnvawBk8nvMGxzjDHWDCfSprxem/EpQn4u8= +go.opentelemetry.io/collector/otelcol/otelcoltest v0.115.0/go.mod h1:WsMbqYl2rm3nPFbdxQqyLXf4iu97nYLeuQ1seZIpV3Y= +go.opentelemetry.io/collector/pdata v1.21.0 h1:PG+UbiFMJ35X/WcAR7Rf/PWmWtRdW0aHlOidsR6c5MA= +go.opentelemetry.io/collector/pdata v1.21.0/go.mod h1:GKb1/zocKJMvxKbS+sl0W85lxhYBTFJ6h6I1tphVyDU= +go.opentelemetry.io/collector/pdata/pprofile v0.115.0 h1:NI89hy13vNDw7EOnQf7Jtitks4HJFO0SUWznTssmP94= +go.opentelemetry.io/collector/pdata/pprofile v0.115.0/go.mod h1:jGzdNfO0XTtfLjXCL/uCC1livg1LlfR+ix2WE/z3RpQ= +go.opentelemetry.io/collector/pdata/testdata v0.115.0 h1:Rblz+AKXdo3fG626jS+KSd0OSA4uMXcTQfpwed6P8LI= +go.opentelemetry.io/collector/pdata/testdata v0.115.0/go.mod h1:inNnRt6S2Nn260EfCBEcjesjlKOSsr0jPwkPqpBkt4s= +go.opentelemetry.io/collector/pipeline v0.115.0 h1:bmACBqb0e8U9ag+vGGHUP7kCfAO7HHROdtzIEg8ulus= +go.opentelemetry.io/collector/pipeline v0.115.0/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= +go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.115.0 h1:3l9ruCAOrssTUDnyChKNzHWOdTtfThnYaoPZ1/+5sD0= +go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.115.0/go.mod h1:2Myg+law/5lcezo9PhhZ0wjCaLYdGK24s1jDWbSW9VY= +go.opentelemetry.io/collector/processor v0.115.0 h1:+fveHGRe24PZPv/F5taahGuZ9HdNW44hgNWEJhIUdyc= +go.opentelemetry.io/collector/processor v0.115.0/go.mod h1:/oLHBlLsm7tFb7zOIrA5C0j14yBtjXKAgxJJ2Bktyk4= +go.opentelemetry.io/collector/processor/batchprocessor v0.115.0 h1:dgw1jcE/YVFTs41b3Y7SerU3BBSyMEE93AYV+BAxR8E= +go.opentelemetry.io/collector/processor/batchprocessor v0.115.0/go.mod h1:imG1kDEq14UGlxyCjSCf1TUEFdSWRvF7tLoYX9nixEQ= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.115.0 h1:LCA2jwxy1PRc7X/AtRJfMdOANh5rVLdwo5PAM+gAuyo= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.115.0/go.mod h1:gPcHyza7Rek3jfrQFxw99fcWBDkkRqBaMHcUz9yYv5I= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.0 h1:r1UF8LPICTRXBL0685zV/CC8J4sWg/qm1g+sHOYMq2Y= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.0/go.mod h1:3erq5umu5a7DKXo4PBm4I5yJjc6r0aJNvBV2nVSPDuE= +go.opentelemetry.io/collector/processor/processorprofiles v0.115.0 h1:cCZAs+FXaebZPppqAN3m+X3etoSBL6NvyQo8l0hOZoo= +go.opentelemetry.io/collector/processor/processorprofiles v0.115.0/go.mod h1:kMxF0gknlWX4duuAJFi2/HuIRi6C3w95tOenRa0GKOY= +go.opentelemetry.io/collector/processor/processortest v0.115.0 h1:j9HEaYFOeOB6VYl9zGhBnhQbTkqGBa2udUvu5NTh6hc= +go.opentelemetry.io/collector/processor/processortest v0.115.0/go.mod h1:Gws+VEnp/eW3qAqPpqbKsrbnnxxNfyDjqrfUXbZfZic= +go.opentelemetry.io/collector/receiver v0.115.0 h1:55Q3Jvj6zHCIA1psKqi/3kEMJO4OqUF5tNAEYNdB1U8= +go.opentelemetry.io/collector/receiver v0.115.0/go.mod h1:nBSCh2O/WUcfgpJ+Jpz+B0z0Hn5jHeRvF2WmLij5EIY= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.115.0 h1:NqMWsGuVy6y6VKTaPeJS7NZ9KAxhE/xyGUC7GaLYm/o= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.115.0/go.mod h1:9ituzngnjsh/YvO+Phayq9BTk/nw0rgK5ZVvX1oxULk= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.115.0 h1:R9JLaj2Al93smIPUkbJshAkb/cY0H5JBOxIx+Zu0NG4= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.115.0/go.mod h1:05E5hGujWeeXJmzKZwTdHyZ/+rRyrQlQB5p5Q2XY39M= +go.opentelemetry.io/collector/receiver/receivertest v0.115.0 h1:OiB684SbHQi6/Pd3ZH0cXjYvCpBS9ilQBfTQx0wVXHg= +go.opentelemetry.io/collector/receiver/receivertest v0.115.0/go.mod h1:Y8Z9U/bz9Xpyt8GI8DxZZgryw3mnnIw+AeKVLTD2cP8= +go.opentelemetry.io/collector/scraper v0.115.0 h1:hbfebO7x1Xm96OwqeuLz5w7QAaB3ZMlwOkUo0XzPadc= +go.opentelemetry.io/collector/scraper v0.115.0/go.mod h1:7YoCO6/4PeExLiX1FokcydJGCQUa7lUqZsqXokJ5VZ4= +go.opentelemetry.io/collector/semconv v0.115.0 h1:SoqMvg4ZEB3mz2EdAb6XYa+TuMo5Mir5FRBr3nVFUDY= +go.opentelemetry.io/collector/semconv v0.115.0/go.mod h1:N6XE8Q0JKgBN2fAhkUQtqK9LT7rEGR6+Wu/Rtbal1iI= +go.opentelemetry.io/collector/service v0.115.0 h1:k4GAOiI5tZgB2QKgwA6c3TeAVr7QL/ft5cOQbzUr8Iw= +go.opentelemetry.io/collector/service v0.115.0/go.mod h1:DKde9LMhNebdREecDSsqiTFLI2wRc+IoV4/wGxU6goY= +go.opentelemetry.io/contrib/bridges/otelzap v0.6.0 h1:j8icMXyyqNf6HGuwlYhniPnVsbJIq7n+WirDu3VAJdQ= +go.opentelemetry.io/contrib/bridges/otelzap v0.6.0/go.mod h1:evIOZpl+kAlU5IsaYX2Siw+IbpacAZvXemVsgt70uvw= +go.opentelemetry.io/contrib/config v0.10.0 h1:2JknAzMaYjxrHkTnZh3eOme/Y2P5eHE2SWfhfV6Xd6c= +go.opentelemetry.io/contrib/config v0.10.0/go.mod h1:aND2M6/KfNkntI5cyvHriR/zvZgPf8j9yETdSmvpfmc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 h1:yMkBS9yViCc7U7yeLzJPM2XizlfdVvBRSmsQDWu6qc0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0/go.mod h1:n8MR6/liuGB5EmTETUBeU5ZgqMOlqKRxUaqPQBOANZ8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= +go.opentelemetry.io/contrib/propagators/b3 v1.31.0 h1:PQPXYscmwbCp76QDvO4hMngF2j8Bx/OTV86laEl8uqo= +go.opentelemetry.io/contrib/propagators/b3 v1.31.0/go.mod h1:jbqfV8wDdqSDrAYxVpXQnpM0XFMq2FtDesblJ7blOwQ= +go.opentelemetry.io/contrib/zpages v0.56.0 h1:W7vP6s3juzL5KiHpr41zLNmsJ0QAZudYu8ay0zGAoko= +go.opentelemetry.io/contrib/zpages v0.56.0/go.mod h1:IxPRP4TYHw9jLeaEOSDIiA9zmyJNZNO6sbW55iMvSXs= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 h1:mMOmtYie9Fx6TSVzw4W+NTpvoaS1JWWga37oI1a/4qQ= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0/go.mod h1:yy7nDsMMBUkD+jeekJ36ur5f3jJIrmCwUrY67VFhNpA= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 h1:j7ZSD+5yn+lo3sGV69nW04rRR0jhYnBwjuX3r0HvnK0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0/go.mod h1:WXbYJTUaZXAbYd8lbgGuvih0yuCfOFC5RJoYnoLcGz8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 h1:t/Qur3vKSkUCcDVaSumWF2PKHt85pc7fRvFuoVT8qFU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0/go.mod h1:Rl61tySSdcOJWoEgYZVtmnKdA0GeKrSqkHC1t+91CH8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0/go.mod h1:TMu73/k1CP8nBUpDLc71Wj/Kf7ZS9FK5b53VapRsP9o= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 h1:lUsI2TYsQw2r1IASwoROaCnjdj2cvC2+Jbxvk6nHnWU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0/go.mod h1:2HpZxxQurfGxJlJDblybejHB6RX6pmExPNe517hREw4= +go.opentelemetry.io/otel/exporters/prometheus v0.54.0 h1:rFwzp68QMgtzu9PgP3jm9XaMICI6TsofWWPcBDKwlsU= +go.opentelemetry.io/otel/exporters/prometheus v0.54.0/go.mod h1:QyjcV9qDP6VeK5qPyKETvNjmaaEc7+gqjh4SS0ZYzDU= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 h1:TwmL3O3fRR80m8EshBrd8YydEZMcUCsZXzOUlnFohwM= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0/go.mod h1:tH98dDv5KPmPThswbXA0fr0Lwfs+OhK8HgaCo7PjRrk= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 h1:SZmDnHcgp3zwlPBS2JX2urGYe/jBKEIT6ZedHRUyCz8= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0/go.mod h1:fdWW0HtZJ7+jNpTKUR0GpMEDP69nR8YBJQxNiVCE3jk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6BmckTU+9Rxn04m2bD3gD6Mk0OIOCPk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= +go.opentelemetry.io/otel/log v0.8.0 h1:egZ8vV5atrUWUbnSsHn6vB8R21G2wrKqNiDt3iWertk= +go.opentelemetry.io/otel/log v0.8.0/go.mod h1:M9qvDdUTRCopJcGRKg57+JSQ9LgLBrwwfC32epk5NX8= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/log v0.7.0 h1:dXkeI2S0MLc5g0/AwxTZv6EUEjctiH8aG14Am56NTmQ= +go.opentelemetry.io/otel/sdk/log v0.7.0/go.mod h1:oIRXpW+WD6M8BuGj5rtS0aRu/86cbDV/dAfNaZBIjYM= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1499,8 +1546,8 @@ golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1511,8 +1558,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw= +golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1584,16 +1631,16 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= -golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.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-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1607,8 +1654,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ 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.1.0/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.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1684,16 +1731,16 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.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.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1708,8 +1755,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1768,8 +1815,8 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= -golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= +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= @@ -1835,10 +1882,10 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -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/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1858,8 +1905,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= -google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= 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= @@ -1873,8 +1920,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.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/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1919,12 +1966,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= -k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= -k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= @@ -1934,8 +1981,8 @@ k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= -sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= +sigs.k8s.io/controller-runtime v0.19.3 h1:XO2GvC9OPftRst6xWCpTgBZO04S2cbp0Qqkj8bX1sPw= +sigs.k8s.io/controller-runtime v0.19.3/go.mod h1:j4j87DqtsThvwTv5/Tc5NFRyyF/RF0ip4+62tbTSIUM= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/pkg/defaultcomponents/defaults.go b/pkg/defaultcomponents/defaults.go index 677a2998d9..db937702a3 100644 --- a/pkg/defaultcomponents/defaults.go +++ b/pkg/defaultcomponents/defaults.go @@ -58,11 +58,9 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/debugexporter" - "go.opentelemetry.io/collector/exporter/loggingexporter" "go.opentelemetry.io/collector/exporter/otlpexporter" "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" - "go.opentelemetry.io/collector/extension/ballastextension" "go.opentelemetry.io/collector/extension/zpagesextension" "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/otelcol" @@ -100,7 +98,6 @@ func Components() (otelcol.Factories, error) { pprofextension.NewFactory(), sigv4authextension.NewFactory(), zpagesextension.NewFactory(), - ballastextension.NewFactory(), filestorage.NewFactory(), } @@ -160,7 +157,6 @@ func Components() (otelcol.Factories, error) { fileexporter.NewFactory(), kafkaexporter.NewFactory(), debugexporter.NewFactory(), - loggingexporter.NewFactory(), otlpexporter.NewFactory(), otlphttpexporter.NewFactory(), awsxrayexporter.NewFactory(), diff --git a/pkg/defaultcomponents/defaults_test.go b/pkg/defaultcomponents/defaults_test.go index e8875ba20b..c0ff62d50b 100644 --- a/pkg/defaultcomponents/defaults_test.go +++ b/pkg/defaultcomponents/defaults_test.go @@ -25,9 +25,9 @@ import ( ) const ( - exportersCount = 16 + exportersCount = 15 receiversCount = 10 - extensionsCount = 8 + extensionsCount = 7 processorCount = 15 ) @@ -42,7 +42,6 @@ func TestComponents(t *testing.T) { assert.NotNil(t, exporters[component.MustNewType("awsemf")]) // core exporters assert.NotNil(t, exporters[component.MustNewType("debug")]) - assert.NotNil(t, exporters[component.MustNewType("logging")]) assert.NotNil(t, exporters[component.MustNewType("otlp")]) assert.NotNil(t, exporters[component.MustNewType("otlphttp")]) // other exporters @@ -78,7 +77,6 @@ func TestComponents(t *testing.T) { assert.NotNil(t, extensions[component.MustNewType("sigv4auth")]) // core extensions assert.NotNil(t, extensions[component.MustNewType("zpages")]) - assert.NotNil(t, extensions[component.MustNewType("memory_ballast")]) // other extensions assert.NotNil(t, extensions[component.MustNewType("pprof")]) assert.NotNil(t, extensions[component.MustNewType("health_check")]) @@ -87,7 +85,7 @@ func TestComponents(t *testing.T) { processors := factories.Processors assert.Len(t, processors, processorCount) // aws processors - assert.NotNil(t, processors[component.MustNewType("experimental_metricsgeneration")]) + assert.NotNil(t, processors[component.MustNewType("metricsgeneration")]) // core processors assert.NotNil(t, processors[component.MustNewType("batch")]) assert.NotNil(t, processors[component.MustNewType("memory_limiter")]) diff --git a/testbed/go.mod b/testbed/go.mod index d558dfbe59..687a4090a0 100644 --- a/testbed/go.mod +++ b/testbed/go.mod @@ -5,10 +5,10 @@ go 1.22.0 toolchain go1.22.2 require ( - github.com/aws-observability/aws-otel-collector v0.40.2 - github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.109.0 - github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/pdata v1.15.0 + github.com/aws-observability/aws-otel-collector v0.42.0 + github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.115.0 + github.com/stretchr/testify v1.10.0 + go.opentelemetry.io/collector/pdata v1.21.0 ) require ( @@ -22,105 +22,111 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/Code-Hex/go-generics-cache v1.5.1 // indirect - github.com/DataDog/agent-payload/v5 v5.0.132 // indirect - github.com/DataDog/datadog-agent/comp/core/config v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/core/flare/builder v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/core/flare/types v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.56.2 // indirect + github.com/DataDog/agent-payload/v5 v5.0.136 // indirect + github.com/DataDog/datadog-agent/comp/core/config v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/flare/builder v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/flare/types v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.59.0 // indirect github.com/DataDog/datadog-agent/comp/core/log v0.56.2 // indirect - github.com/DataDog/datadog-agent/comp/core/secrets v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/core/telemetry v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/def v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/logs/agent/config v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.56.2 // indirect - github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.56.2 // indirect - github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.2 // indirect - github.com/DataDog/datadog-agent/comp/trace/compression/def v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/env v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/mock v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/model v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/setup v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/config/utils v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/logs/auditor v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/client v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/message v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/logs/metrics v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/processor v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/sds v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/sender v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/sources v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/proto v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/status/health v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/telemetry v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.58.0-rc.5 // indirect + github.com/DataDog/datadog-agent/comp/core/log/def v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/secrets v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/core/telemetry v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/def v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/logs/agent/config v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.61.0-devel.0.20241118141418-5b899217c342 // indirect + github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/trace/compression/def v0.59.0 // indirect + github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/env v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/setup v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/config/utils v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/auditor v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/client v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/message v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/metrics v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/processor v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/sds v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/sender v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/sources v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/proto v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/status/health v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/telemetry v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/trace v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/trace/exportable v0.0.0-20201016145401-4646cf596b02 // indirect - github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/cgroups v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/executable v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/filesystem v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/fxutil v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/http v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/optional v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/pointer v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.2 // indirect - github.com/DataDog/datadog-agent/pkg/util/statstracker v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/system v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/system/socket v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/util/winutil v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-agent/pkg/version v0.58.0-rc.5 // indirect - github.com/DataDog/datadog-api-client-go/v2 v2.29.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/backoff v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/cgroups v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/http v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/log v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/optional v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/startstop v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/statstracker v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.0 // indirect + github.com/DataDog/datadog-agent/pkg/version v0.59.0 // indirect + github.com/DataDog/datadog-api-client-go/v2 v2.31.0 // indirect github.com/DataDog/datadog-go/v5 v5.5.0 // indirect github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240906125328-9899f57f27be // indirect - github.com/DataDog/go-sqllexer v0.0.14 // indirect + github.com/DataDog/go-sqllexer v0.0.15 // indirect github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.20.0 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.20.0 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.20.0 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.19.0 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.19.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.21.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.21.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.21.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.21.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.21.0 // indirect github.com/DataDog/sketches-go v1.4.6 // indirect github.com/DataDog/viper v1.13.5 // indirect github.com/DataDog/zstd v1.5.6 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect github.com/IBM/sarama v1.43.3 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/alecthomas/participle/v2 v2.1.1 // indirect github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect - github.com/apache/thrift v0.20.0 // indirect + github.com/antchfx/xmlquery v1.4.2 // indirect + github.com/antchfx/xpath v1.3.2 // indirect + github.com/apache/thrift v0.21.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.55.5 // indirect - github.com/aws/aws-sdk-go-v2 v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.37 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.35 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect + github.com/aws/aws-sdk-go-v2 v1.32.6 // indirect + github.com/aws/aws-sdk-go-v2/config v1.28.6 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.47 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect - github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.31.1 // indirect - github.com/aws/smithy-go v1.21.0 // 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.6 // indirect + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.33.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 // indirect + github.com/aws/smithy-go v1.22.1 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect + github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect github.com/briandowns/spinner v1.23.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect @@ -140,24 +146,25 @@ require ( github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.118.0 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v27.1.2+incompatible // indirect + github.com/docker/docker v27.3.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/eapache/go-resiliency v1.7.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect + github.com/ebitengine/purego v0.8.1 // indirect github.com/elastic/go-grok v0.3.1 // indirect github.com/elastic/lunes v0.1.0 // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect - github.com/envoyproxy/go-control-plane v0.12.1-0.20240621013728-1eb8caab5155 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect + github.com/envoyproxy/go-control-plane v0.13.0 // indirect + github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect github.com/expr-lang/expr v1.16.9 // indirect github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fluent/fluent-logger-golang v1.9.0 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -168,7 +175,7 @@ require ( github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-resty/resty/v2 v2.13.1 // indirect - github.com/go-viper/mapstructure/v2 v2.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/go-zookeeper/zk v1.0.4 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.3 // indirect @@ -193,8 +200,8 @@ require ( github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect - github.com/hashicorp/consul/api v1.29.4 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect + github.com/hashicorp/consul/api v1.30.0 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -216,7 +223,7 @@ require ( github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ionos-cloud/sdk-go/v6 v6.1.11 // indirect - github.com/jaegertracing/jaeger v1.60.0 // indirect + github.com/jaegertracing/jaeger v1.62.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.7.6 // indirect @@ -229,12 +236,12 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect github.com/karrick/godirwalk v1.17.0 // indirect - github.com/klauspost/compress v1.17.10 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/knadh/koanf v1.5.0 // indirect - github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/knadh/koanf/v2 v2.1.2 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/leodido/go-syslog/v4 v4.1.0 // indirect + github.com/leodido/go-syslog/v4 v4.2.0 // indirect github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b // indirect github.com/lightstep/go-expohisto v1.0.0 // indirect github.com/linode/linodego v1.37.0 // indirect @@ -259,96 +266,98 @@ require ( github.com/mrunalp/fileutils v0.5.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.109.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/testbed/mockdatasenders/mockdatadogagentexporter v0.109.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.115.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/testbed/mockdatasenders/mockdatadogagentexporter v0.115.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.14 // indirect @@ -361,30 +370,30 @@ require ( github.com/ovh/go-ovh v1.6.0 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect - github.com/prometheus/client_golang v1.20.4 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.57.0 // indirect + github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/relvacode/iso8601 v1.4.0 // indirect + github.com/relvacode/iso8601 v1.6.0 // indirect github.com/rs/cors v1.11.1 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30 // indirect github.com/seccomp/libseccomp-golang v0.10.0 // indirect github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect - github.com/shirou/gopsutil/v4 v4.24.8 // indirect + github.com/shirou/gopsutil/v4 v4.24.11 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect - github.com/signalfx/sapm-proto v0.14.0 // indirect + github.com/signalfx/sapm-proto v0.17.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/spf13/afero v1.11.0 // indirect @@ -399,8 +408,8 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/tinylru v1.2.1 // indirect - github.com/tidwall/wal v1.1.7 // indirect - github.com/tinylib/msgp v1.2.0 // indirect + github.com/tidwall/wal v1.1.8 // indirect + github.com/tinylib/msgp v1.2.4 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.8.0 // indirect github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 // indirect @@ -415,112 +424,124 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.etcd.io/bbolt v1.3.11 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.109.0 // indirect - go.opentelemetry.io/collector/client v1.15.0 // indirect - go.opentelemetry.io/collector/component v0.109.0 // indirect - go.opentelemetry.io/collector/component/componentprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/component/componentstatus v0.109.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.109.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.15.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.109.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.109.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.109.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.15.0 // indirect - go.opentelemetry.io/collector/config/configretry v1.15.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.109.0 // indirect - go.opentelemetry.io/collector/config/configtls v1.15.0 // indirect - go.opentelemetry.io/collector/config/internal v0.109.0 // indirect - go.opentelemetry.io/collector/confmap v1.15.0 // indirect - go.opentelemetry.io/collector/confmap/provider/fileprovider v1.15.0 // indirect - go.opentelemetry.io/collector/connector v0.109.0 // indirect - go.opentelemetry.io/collector/connector/connectorprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/consumer v0.109.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.109.0 // indirect - go.opentelemetry.io/collector/exporter v0.109.0 // indirect - go.opentelemetry.io/collector/exporter/debugexporter v0.109.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/exporter/loggingexporter v0.109.0 // indirect - go.opentelemetry.io/collector/exporter/otlpexporter v0.109.0 // indirect - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.109.0 // indirect - go.opentelemetry.io/collector/extension v0.109.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.109.0 // indirect - go.opentelemetry.io/collector/extension/ballastextension v0.108.1 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.109.0 // indirect - go.opentelemetry.io/collector/extension/extensioncapabilities v0.109.0 // indirect - go.opentelemetry.io/collector/extension/zpagesextension v0.109.0 // indirect - go.opentelemetry.io/collector/featuregate v1.15.0 // indirect - go.opentelemetry.io/collector/internal/globalgates v0.109.0 // indirect - go.opentelemetry.io/collector/otelcol v0.109.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.109.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.109.0 // indirect - go.opentelemetry.io/collector/processor v0.109.0 // indirect - go.opentelemetry.io/collector/processor/batchprocessor v0.109.0 // indirect - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.109.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/receiver v0.109.0 // indirect - go.opentelemetry.io/collector/receiver/otlpreceiver v0.109.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.109.0 // indirect - go.opentelemetry.io/collector/semconv v0.109.0 // indirect - go.opentelemetry.io/collector/service v0.109.0 // indirect - go.opentelemetry.io/contrib/config v0.9.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.29.0 // indirect - go.opentelemetry.io/contrib/zpages v0.54.0 // indirect - go.opentelemetry.io/otel v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.5.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.51.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.5.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0 // indirect - go.opentelemetry.io/otel/log v0.5.0 // indirect - go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.29.0 // indirect - go.opentelemetry.io/otel/sdk/log v0.5.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect - go.opentelemetry.io/otel/trace v1.29.0 // indirect + go.opentelemetry.io/collector v0.115.0 // indirect + go.opentelemetry.io/collector/client v1.21.0 // indirect + go.opentelemetry.io/collector/component v0.115.0 // indirect + go.opentelemetry.io/collector/component/componentstatus v0.115.0 // indirect + go.opentelemetry.io/collector/component/componenttest v0.115.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.115.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.21.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.115.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.115.0 // indirect + go.opentelemetry.io/collector/config/confignet v1.21.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.21.0 // indirect + go.opentelemetry.io/collector/config/configretry v1.21.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.115.0 // indirect + go.opentelemetry.io/collector/config/configtls v1.21.0 // indirect + go.opentelemetry.io/collector/config/internal v0.115.0 // indirect + go.opentelemetry.io/collector/confmap v1.21.0 // indirect + go.opentelemetry.io/collector/confmap/provider/fileprovider v1.21.0 // indirect + go.opentelemetry.io/collector/connector v0.115.0 // indirect + go.opentelemetry.io/collector/connector/connectorprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/connector/connectortest v0.115.0 // indirect + go.opentelemetry.io/collector/consumer v1.21.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror v0.115.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.115.0 // indirect + go.opentelemetry.io/collector/exporter v0.115.0 // indirect + go.opentelemetry.io/collector/exporter/debugexporter v0.115.0 // indirect + go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/exporter/exportertest v0.115.0 // indirect + go.opentelemetry.io/collector/exporter/otlpexporter v0.115.0 // indirect + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.115.0 // indirect + go.opentelemetry.io/collector/extension v0.115.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.115.0 // indirect + go.opentelemetry.io/collector/extension/experimental/storage v0.115.0 // indirect + go.opentelemetry.io/collector/extension/extensioncapabilities v0.115.0 // indirect + go.opentelemetry.io/collector/extension/extensiontest v0.115.0 // indirect + go.opentelemetry.io/collector/extension/zpagesextension v0.115.0 // indirect + go.opentelemetry.io/collector/featuregate v1.21.0 // indirect + go.opentelemetry.io/collector/internal/fanoutconsumer v0.115.0 // indirect + go.opentelemetry.io/collector/internal/memorylimiter v0.115.0 // indirect + go.opentelemetry.io/collector/internal/sharedcomponent v0.115.0 // indirect + go.opentelemetry.io/collector/otelcol v0.115.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.115.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.115.0 // indirect + go.opentelemetry.io/collector/pipeline v0.115.0 // indirect + go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/processor v0.115.0 // indirect + go.opentelemetry.io/collector/processor/batchprocessor v0.115.0 // indirect + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.115.0 // indirect + go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/processor/processorprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/processor/processortest v0.115.0 // indirect + go.opentelemetry.io/collector/receiver v0.115.0 // indirect + go.opentelemetry.io/collector/receiver/otlpreceiver v0.115.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.115.0 // indirect + go.opentelemetry.io/collector/receiver/receivertest v0.115.0 // indirect + go.opentelemetry.io/collector/semconv v0.115.0 // indirect + go.opentelemetry.io/collector/service v0.115.0 // indirect + go.opentelemetry.io/contrib/bridges/otelzap v0.6.0 // indirect + go.opentelemetry.io/contrib/config v0.10.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.31.0 // indirect + go.opentelemetry.io/contrib/zpages v0.56.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.54.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 // indirect + go.opentelemetry.io/otel/log v0.8.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.7.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/dig v1.18.0 // indirect go.uber.org/fx v1.22.2 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.27.0 // indirect - golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/crypto v0.29.0 // indirect + golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/term v0.24.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.6.0 // indirect - golang.org/x/tools v0.25.0 // indirect + golang.org/x/tools v0.26.0 // indirect gonum.org/v1/gonum v0.15.1 // indirect google.golang.org/api v0.188.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.66.2 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 // indirect - k8s.io/api v0.31.1 // indirect - k8s.io/apimachinery v0.31.1 // indirect - k8s.io/client-go v0.31.1 // indirect + k8s.io/api v0.31.3 // indirect + k8s.io/apimachinery v0.31.3 // indirect + k8s.io/client-go v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect - sigs.k8s.io/controller-runtime v0.19.0 // indirect + sigs.k8s.io/controller-runtime v0.19.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect @@ -532,6 +553,3 @@ exclude github.com/go-openapi/spec v0.20.5 exclude github.com/openshift/api v3.9.0+incompatible replace github.com/aws-observability/aws-otel-collector => ../ - -// checksun mismatch issue for cadvisor - https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32381 -exclude github.com/google/cadvisor v0.49.1 diff --git a/testbed/go.sum b/testbed/go.sum index 95f0a630e0..e0df5271f4 100644 --- a/testbed/go.sum +++ b/testbed/go.sum @@ -59,175 +59,185 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= -github.com/DataDog/agent-payload/v5 v5.0.132 h1:F9wy+iyAgN2QmkEsOlPp3RrQ4vOb4T6k3BXhjSpELS4= -github.com/DataDog/agent-payload/v5 v5.0.132/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= -github.com/DataDog/datadog-agent/cmd/agent/common/path v0.58.0-rc.5 h1:Bk0QtWKnSaToaBIYS+/1ewmjdtXxlLsf1o+W10PMKoo= -github.com/DataDog/datadog-agent/cmd/agent/common/path v0.58.0-rc.5/go.mod h1:Jk2JF4S8w+INLwADIxmZfziB8x+JQ7wlvcKIk6WJVgY= -github.com/DataDog/datadog-agent/comp/api/api/def v0.58.0-rc.5 h1:qNklfxblOd+rhwTmZ8yMsTR3RzVhlhy4XXsdT2LCzSg= -github.com/DataDog/datadog-agent/comp/api/api/def v0.58.0-rc.5/go.mod h1:9vuv+8TTwPN8fCdKeHztCViIZI0PE3JPNb7mrSkN6YI= -github.com/DataDog/datadog-agent/comp/core/config v0.58.0-rc.5 h1:/8taGNHUN/pDCBKYi8w2X7uFzNNEbSautEYCyYN0Az8= -github.com/DataDog/datadog-agent/comp/core/config v0.58.0-rc.5/go.mod h1:FmK6NSLtOTAk4uzuEgummvi77uU4V3dm/6yfjGbc6N4= -github.com/DataDog/datadog-agent/comp/core/flare/builder v0.58.0-rc.5 h1:FmiJyMP8Z4SbHtRo92XZuJZIZrIiVM0Nv0B1XhuCEDw= -github.com/DataDog/datadog-agent/comp/core/flare/builder v0.58.0-rc.5/go.mod h1:lE05LMk+uwj0r5uSPWpWvFMfjERuWJXozMjvVyx/JsE= -github.com/DataDog/datadog-agent/comp/core/flare/types v0.58.0-rc.5 h1:nVFqaEh9j3rYxi3a5VadQopJ5w0WS9OvXV0/orQBgxg= -github.com/DataDog/datadog-agent/comp/core/flare/types v0.58.0-rc.5/go.mod h1:ln2CY53hfV3LY7Mz3SE7SHxqf3an5gnM2Z9H7CeyfCs= -github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.56.2 h1:t+w11Lqi5XvUpqKGx1GKzlc//1it9H31JOUiJViWUpA= -github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.56.2/go.mod h1:YJDw2LKcZMO8aSsCrLZm7ZYSOyc/1sNfSE2xv+T5pu4= +github.com/DataDog/agent-payload/v5 v5.0.136 h1:PJG6B4p+iGZaPl28LIQ/DlAw9673I3iCZ59zYUPEu1E= +github.com/DataDog/agent-payload/v5 v5.0.136/go.mod h1:lxh9lb5xYrBXjblpIWYUi4deJqVbkIfkjwesi5nskDc= +github.com/DataDog/datadog-agent/cmd/agent/common/path v0.59.0 h1:PolEv4Se/H2jBCKdiOPNELEG5OuXWKrqpsxZMUQ4g14= +github.com/DataDog/datadog-agent/cmd/agent/common/path v0.59.0/go.mod h1:ve34W4f7PGC5zbot0HB+W3xkNZN7obINz89o8N/biP8= +github.com/DataDog/datadog-agent/comp/api/api/def v0.59.0 h1:zfXuUtnet+GWssR+Zi4lns5iIqlYQWiKXtKWb+6dJ+g= +github.com/DataDog/datadog-agent/comp/api/api/def v0.59.0/go.mod h1:gsXkdySqo/hjJmw/b4W9VYiGcRTJaq0uOVwMFAukl4U= +github.com/DataDog/datadog-agent/comp/core/config v0.59.0 h1:SxZsc9E6+d+Gb5fCfo/HnvRi8qTrTcLFE0//lX9+pM8= +github.com/DataDog/datadog-agent/comp/core/config v0.59.0/go.mod h1:2vRyHTEIHey2fsN9JO8z8bj7SSpC5VewuZsHJAA9k6I= +github.com/DataDog/datadog-agent/comp/core/flare/builder v0.59.0 h1:qpvXvXK+Az2dKgzx3pPaAvS/tsrl1QXI4FndDtcjgvY= +github.com/DataDog/datadog-agent/comp/core/flare/builder v0.59.0/go.mod h1:cg7JgU501CDIZNiyEfnwbBbk9nOsUy2nsKADIAdRnmk= +github.com/DataDog/datadog-agent/comp/core/flare/types v0.59.0 h1:Kz5NUsZFT4pTUh4P/A2bBiBTNkfT80ZfHig8LOuHBiY= +github.com/DataDog/datadog-agent/comp/core/flare/types v0.59.0/go.mod h1:n32X+eH1UMvlfZOwu70t6ySopwbN1yBfaVcpNgaCkG4= +github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.59.0 h1:m939bF+E/+nPZ1jGU1J9ZVeI3fCk8nbAjl9H9MMz2A0= +github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.59.0/go.mod h1:jjiRtHmQcGwHmP4l4T49t4i2fU2NM097LEG6VaI8CIk= github.com/DataDog/datadog-agent/comp/core/log v0.56.2 h1:qvBT+FfjKGqimyEvmsNHCZKbTfBJAdUZSVy2IZQ8HS4= github.com/DataDog/datadog-agent/comp/core/log v0.56.2/go.mod h1:ivJ/RMZjTNkoPPNDX+v/nnBwABLCiMv1vQA5tk/HCR4= -github.com/DataDog/datadog-agent/comp/core/secrets v0.58.0-rc.5 h1:fYPQHxMGPLAekLTpSxdwOnfMm6xM8oHo9W7apg9U1sI= -github.com/DataDog/datadog-agent/comp/core/secrets v0.58.0-rc.5/go.mod h1:8NBvv0meyB79xEC1Z3PhNpiDKov1xRtCKyk2PkIQdHo= -github.com/DataDog/datadog-agent/comp/core/telemetry v0.58.0-rc.5 h1:mKSEz2RLcQ5bc8ZdCF+5RAUnh2ntVhb3nXPhAwFuX3s= -github.com/DataDog/datadog-agent/comp/core/telemetry v0.58.0-rc.5/go.mod h1:bh9paiLvqTIdIgtt5psCG5XWbDS5kvD7NOBpCABw56U= -github.com/DataDog/datadog-agent/comp/def v0.58.0-rc.5 h1:GbRlPR+ii/wn4WCOshQUkPhA5Jx4zmGR9Kt41QQQpDI= -github.com/DataDog/datadog-agent/comp/def v0.58.0-rc.5/go.mod h1:2xorAm6FmIl275/ayDZSUg53Hz4oQ/X8ELyp7I1N3fM= -github.com/DataDog/datadog-agent/comp/logs/agent/config v0.58.0-rc.5 h1:2BT4IO6Q7eR21aBmmgQDGHXjnkOnXjV7TLBS32lKu6Y= -github.com/DataDog/datadog-agent/comp/logs/agent/config v0.58.0-rc.5/go.mod h1:Z0tA/Ca/bwdV322A3wUhJ0RN+0o+UwO+5ir4tHix4E8= -github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.56.2 h1:SXJCwx6giD8IeQLyVX62gRysBEHx3vczkprPmln1knk= -github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.56.2/go.mod h1:0o4qKCsmoFkYSgOTKL5UMR1/Ig0pX4bA6gJZjuu8/K4= -github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.56.2 h1:P1u8lJDnCHiWc0vvvvm9JB36fRFJ2eSvD9ajVo0x1r8= -github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.56.2/go.mod h1:hruCkJ5hCU6LZ5jkdnST3BHanHeQ73ewPAWIW/oZVmw= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.58.0-rc.5 h1:dvwf5osrsWL4LKm5KSAjEcpfmhW74U+UmzMHMVfWrxg= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.58.0-rc.5/go.mod h1:plyNeTeF9TqlX98jZKL470+sabFlfAL/uFzxCdF+l/8= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.2 h1:TmEsHhs1mcKsiWTK08aYvZrNZqlbs51FwN6yQVMe7No= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.2/go.mod h1:D56XSQiApc7kNzkF2FCJG/6D/8SV3jhdWqe0dDSRGoM= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/statsprocessor v0.56.2 h1:WTK6fTNgSCuVrz3dngS7R82rq9SVI+E8oQehd/2eEU0= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/statsprocessor v0.56.2/go.mod h1:tXejTCnqylzUGUBmFF8tcinp+nPCeMqL350Nl/qV5DU= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.58.0-rc.5 h1:JVKQiSFX0YmPb+TqAavKK3XS/B3qU9jeTqqDIamX9ww= -github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.58.0-rc.5/go.mod h1:dkAKHpW6s3L6NKTbtCbvJt8T/BOC9MMncfjMs7iRIXg= -github.com/DataDog/datadog-agent/comp/trace/compression/def v0.58.0-rc.5 h1:Oo/+XHgCCs2tOFMSbAKfTJH7rsW3kA3O1rOZ61pGte0= -github.com/DataDog/datadog-agent/comp/trace/compression/def v0.58.0-rc.5/go.mod h1:samFXdP0HVSwD223LPLzcPKUjRQ6/uwr/1wMPo2HhRg= -github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.58.0-rc.5 h1:XZC8WdLMSdOIdPkM6Idyzyf9+g/dj72DbE0wEkrp4n8= -github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.58.0-rc.5/go.mod h1:VV312wfivCQbEHwDOGSNl8Gm9aGwnfMFPm0qaOu0r7w= -github.com/DataDog/datadog-agent/comp/trace/compression/impl-zstd v0.58.0-rc.5 h1:LBPhAHKmCRDT9bNjeqE5PszCSWeiDimdv48onpFqGnU= -github.com/DataDog/datadog-agent/comp/trace/compression/impl-zstd v0.58.0-rc.5/go.mod h1:1KSRA+PaP74jM7Gi0rPRZ4JSND4XwJ8ehN6/m2H3AcY= -github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.58.0-rc.5 h1:cMsiA1hiY4Iwyb2zadRwcMnbgw5FDoVLkzyGclZ6ew8= -github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.58.0-rc.5/go.mod h1:s9QBNtoBURzy/0FeBInQ7kawNj04OnBNUo8xYr26z3E= -github.com/DataDog/datadog-agent/pkg/config/env v0.58.0-rc.5 h1:nY0tGwQWas8m+NoCsFZXleZWbkOfW/qQ2iyVKLjbAOg= -github.com/DataDog/datadog-agent/pkg/config/env v0.58.0-rc.5/go.mod h1:x4gZBfze8+pm+jZjGvG5z2sL7gA0KJzLv8DgjIrgyls= -github.com/DataDog/datadog-agent/pkg/config/logs v0.56.2 h1:sgipVv0WUoKO9RNSYFhNXH4wicevfU+yti8+rZDClFo= -github.com/DataDog/datadog-agent/pkg/config/logs v0.56.2/go.mod h1:RA+h+P2M7BlBeU+XVuZXhTj8lzjXdEoCLP28EkcYV8s= -github.com/DataDog/datadog-agent/pkg/config/mock v0.58.0-rc.5 h1:276FQAlFpPnvUg43nHdef1TD1jMd24O20T8qkX6ba94= -github.com/DataDog/datadog-agent/pkg/config/mock v0.58.0-rc.5/go.mod h1:PfqVWNpQMnvhN9bt8+9MUnOwLt6i4sMtos840qJqnCQ= -github.com/DataDog/datadog-agent/pkg/config/model v0.58.0-rc.5 h1:G49MbVTNnm+NTISu+C+IpP9wAPKO8ctqTBlqb+3VBI0= -github.com/DataDog/datadog-agent/pkg/config/model v0.58.0-rc.5/go.mod h1:kw+xggYf7ckTqiKwIxfeg8dW++DomRQt9ZDvDDrjeS0= -github.com/DataDog/datadog-agent/pkg/config/setup v0.58.0-rc.5 h1:J+2iMS6w0akUI06Mn38o3NBp4i2fm0OwoLc3s1DFxuo= -github.com/DataDog/datadog-agent/pkg/config/setup v0.58.0-rc.5/go.mod h1:5WGIHhRW7PRanmG5B28W9Xt0Y/TSZTvN+gmy2DP3NRQ= -github.com/DataDog/datadog-agent/pkg/config/utils v0.58.0-rc.5 h1:GDMivEtseE9g+Iul22lwUptf4IYZrQb8qKlLC5U0ROk= -github.com/DataDog/datadog-agent/pkg/config/utils v0.58.0-rc.5/go.mod h1:C2a4ixPEnVNNzhex1HGrIRTPFF8BdeRr7qpRIzTRklo= -github.com/DataDog/datadog-agent/pkg/logs/auditor v0.56.2 h1:VIlQd7UBq3oUoUbpRmiwIlkDZuGvAXS/wUXU6xmezwk= -github.com/DataDog/datadog-agent/pkg/logs/auditor v0.56.2/go.mod h1:Vm8HdkHHpEwZhixY0oPWsx0+EidhSaMTF7tN9yuMPFY= -github.com/DataDog/datadog-agent/pkg/logs/client v0.56.2 h1:1qg4WagIl2qtKcq9cVL2fRBhqvYQ5DuYaY7cFJ+293k= -github.com/DataDog/datadog-agent/pkg/logs/client v0.56.2/go.mod h1:Wb8Rxw8BdbLQPzwNXtpWUO9+bBfZhyB63/8oYFLv/GQ= -github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.56.2 h1:0AF1X1OabT8vCTYK3Aim122xkg6bAMUJXYTcH/RL7pQ= -github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.56.2/go.mod h1:AFPiROajOY3I6akR+WsKwGIriBPiTHRBfx8tmw8hGRw= -github.com/DataDog/datadog-agent/pkg/logs/message v0.58.0-rc.5 h1:TXLg/v8UwXJwfyLjDQDHcNCu+FmcXGtV/3R9dMXyqhU= -github.com/DataDog/datadog-agent/pkg/logs/message v0.58.0-rc.5/go.mod h1:JBtaVe3aQT5x30m2uF3EIPEzG2AkETvB8v2A9tLTF10= -github.com/DataDog/datadog-agent/pkg/logs/metrics v0.56.2 h1:0aETddrtn7SOZqCX9tOEiRgPgKKG2u9X9YMnNaboQYM= -github.com/DataDog/datadog-agent/pkg/logs/metrics v0.56.2/go.mod h1:mVRXyOp9oiPkj43jRt3r/iTL+XuScLKJjv3MzDvB5eQ= -github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.56.2 h1:vuZjsCYaGwAazLKiLSHqCm/fsGeRmONN/rIneQWEXBE= -github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.56.2/go.mod h1:YX4mkRMvBjp3/X+8Lf39g/AntSZurqL6UIYdJdK2k/M= -github.com/DataDog/datadog-agent/pkg/logs/processor v0.56.2 h1:AJoG4f9WoOgYnzmk12gY5TjPsS+lZTg9wK90oWEhtlU= -github.com/DataDog/datadog-agent/pkg/logs/processor v0.56.2/go.mod h1:9XZDNW8LRR1yk/H8QvVmHNAEkrtEDXrsgEKd7WdU3pc= -github.com/DataDog/datadog-agent/pkg/logs/sds v0.56.2 h1:coxL4HfNDRh9KCIHod9vMT5iBkmU0LV3U4xcHmZ9YCk= -github.com/DataDog/datadog-agent/pkg/logs/sds v0.56.2/go.mod h1:vBywuPyeY7FAW+bpIqAoVKIBxX4JoIQ2GDaAtVgMk24= -github.com/DataDog/datadog-agent/pkg/logs/sender v0.56.2 h1:Ky5KX2o++a7hGkyiNBwqDGODrhBI7LmLZXtnFCjS8Ic= -github.com/DataDog/datadog-agent/pkg/logs/sender v0.56.2/go.mod h1:IhlLrrI3hWySfPYFMqtlY9kNg4ECz7ojpviXJhdILbQ= -github.com/DataDog/datadog-agent/pkg/logs/sources v0.58.0-rc.5 h1:KHnRdN3HQGdrhTR2ApRhYw4J8IPvbqNFD33H7nfIDKU= -github.com/DataDog/datadog-agent/pkg/logs/sources v0.58.0-rc.5/go.mod h1:3CLAy1a1oK+QRdIy3IM/RFuXFJMcuf7WGIDfslz9OYQ= -github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.56.2 h1:DLgBADfWqBrhM8n5DRg9UvrnxYqU+BW3QvvUGAqkpRA= -github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.56.2/go.mod h1:PaduNrh0GJ3UEKG30VMu0M6hi7KuYf3VviLdIG9xV9k= -github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.58.0-rc.5 h1:Cwa3JspehMwfGhxL3VjKUZXUVDhOqGIIG9eCZaXb+fg= -github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.58.0-rc.5/go.mod h1:p2NTG+cIhVGlKELJfRteGCec37ICptIpeB2x/MsRkbw= -github.com/DataDog/datadog-agent/pkg/logs/util/testutils v0.56.2 h1:GhiXTsuUbGloQh7Um5AX0JmggwDn9/x0icWOTNEjovI= -github.com/DataDog/datadog-agent/pkg/logs/util/testutils v0.56.2/go.mod h1:Ple3tPG2mBALotrP7KH/A6CY7M+3npX6+/Zl5bwY7EM= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.58.0-rc.5 h1:O5pf611gwn0YqjohY92rSOQAnXpvRzyvdKMO3VJItc8= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.58.0-rc.5/go.mod h1:MfDvphBMmEMwE3a30h27AtPO7OzmvdoVTiGY1alEmo4= -github.com/DataDog/datadog-agent/pkg/proto v0.58.0-rc.5 h1:WGT6AzzPCcfGgXcQTrQLYJ3sCuMxHhKWe9Tnla4JVWc= -github.com/DataDog/datadog-agent/pkg/proto v0.58.0-rc.5/go.mod h1:0wLYojGxRZZFQ+SBbFjay9Igg0zbP88l03TfZaVZ6Dc= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.58.0-rc.5 h1:NiIPBqn/egaogAy8+u/vSfp4DIUGVqTKDTGjQlcI5qQ= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.58.0-rc.5/go.mod h1:jN5BsZI+VilHJV1Wac/efGxS4TPtXa1Lh9SiUyv93F4= -github.com/DataDog/datadog-agent/pkg/status/health v0.56.2 h1:XbVTbfBXqCnr48Yg3yFfBRzP3B/Y1yS5pqpKJX59RU0= -github.com/DataDog/datadog-agent/pkg/status/health v0.56.2/go.mod h1:EkC/SgFR03BKwBitVV4dIuP+ofwPlUCkVi5K5k1Dh2Y= -github.com/DataDog/datadog-agent/pkg/telemetry v0.56.2 h1:jda5gGyoU/lXVqQsr1xv+z8K8ujLX4MppiMNtMH5chQ= -github.com/DataDog/datadog-agent/pkg/telemetry v0.56.2/go.mod h1:u6BWbLlCuVOu77ntX0x5af1qNISD0wtMj5c6ojfHQyk= -github.com/DataDog/datadog-agent/pkg/trace v0.58.0-rc.5 h1:XphD3IyjWDyV/+Xw5Pgipt9EmeT/gsjyWH5X/gDg29M= -github.com/DataDog/datadog-agent/pkg/trace v0.58.0-rc.5/go.mod h1:rgME1pnFo0ZIoshEfr4/589U/k4uhc2HempA79HJ4I8= +github.com/DataDog/datadog-agent/comp/core/log/def v0.59.0 h1:4je3YuTFhqmw0a0oksSsVPglNT4b37gosaRv9T/TLYQ= +github.com/DataDog/datadog-agent/comp/core/log/def v0.59.0/go.mod h1:uFF83DUAQYoQKKdddr6ptnCPiRik/lr9y+B2JxgLWRs= +github.com/DataDog/datadog-agent/comp/core/log/mock v0.59.0 h1:ndq+1XRChjuYIgfLuRuGQ5trGtq/Qpa/vnTG/6r9bKs= +github.com/DataDog/datadog-agent/comp/core/log/mock v0.59.0/go.mod h1:Ii6q5lgyvXKRmt8Puaan94V5iOiX4xOd+1OU7ZX8Lo4= +github.com/DataDog/datadog-agent/comp/core/secrets v0.59.0 h1:RS7z5/VuZtPc2NLdFRerDubYtZgWbgf1dOZpdhclgb8= +github.com/DataDog/datadog-agent/comp/core/secrets v0.59.0/go.mod h1:hKbelRO2zUJbU4KI1NumVvBIYq45RtQ3JC2LJvJU/y8= +github.com/DataDog/datadog-agent/comp/core/telemetry v0.59.0 h1:ApJD+u0a5anQZkmCw3y2ljhMC56BcjlT6klAZaoXLYk= +github.com/DataDog/datadog-agent/comp/core/telemetry v0.59.0/go.mod h1:mNPruKhnFUe7xiFMnPIMweb7O1HkTh0C78Llhd+Y9xA= +github.com/DataDog/datadog-agent/comp/def v0.59.0 h1:AO1oQ4/ZqYtzklm7glhYqQLyr4me4qg34sf4HRzyMcQ= +github.com/DataDog/datadog-agent/comp/def v0.59.0/go.mod h1:2xorAm6FmIl275/ayDZSUg53Hz4oQ/X8ELyp7I1N3fM= +github.com/DataDog/datadog-agent/comp/logs/agent/config v0.59.0 h1:olhlCNtCG5BKHsRJrwR4i7XZkeMbTRKz4OFayLrvD6o= +github.com/DataDog/datadog-agent/comp/logs/agent/config v0.59.0/go.mod h1:QrNGc1TWXhNagr1/nVSiUI+n8SFczoS8vpZdKtASxnQ= +github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.59.0 h1:kM1pYOA1EmlT47b8Buxvlm6EVykG9T72gUuQL+Uur8s= +github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.59.0/go.mod h1:2SrdlZ37IBATRjnPhNs4qBqaZCZ7HkEb4DNWXn/DsXY= +github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.59.0 h1:SJhZCcJDZEEHzR2p9dGQ56jIy08ZfqajiBIBgLShtzU= +github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.59.0/go.mod h1:uyfsYUV6L7W4duN9rlFrEN+r3REPPwCSE4Nj8WjDhDE= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.61.0-devel.0.20241118141418-5b899217c342 h1:4JNPjWCjqwTqGJcdJGURGDAJDS5N9wW+g7PwNYCygYs= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.61.0-devel.0.20241118141418-5b899217c342/go.mod h1:Z7BRzEr/tg3DjSf2MgQobKbtjKv4iavZJyhh/7OGTWA= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.59.0 h1:LyhDLcabmvRZk2ehGlZYXuW2MpA7RoR87C6jQ7gUQ24= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.59.0/go.mod h1:tG+1FklWteENGZb3gE/13Sn80YfMEI6APmZxY8nSQHo= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/statsprocessor v0.59.0 h1:3eTrUZGpI5EjzIINZhilZXRUd6ND7W98bUUe4UF+arE= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/statsprocessor v0.59.0/go.mod h1:Dp1J09BVqtGHR3yj82q4mCVNq5qkhDs/cTI5/DlvJxk= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.57.0-devel.0.20240718200853-81bf3b2e412d h1:wdjJ+/tBYiFLwno+lBPP66rm5jIf6ycGPRr21ogBBzE= +github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.57.0-devel.0.20240718200853-81bf3b2e412d/go.mod h1:CHa8CY2k0/wZkx/4KPi/WU/0m5YCfWZI1SAs1imElMA= +github.com/DataDog/datadog-agent/comp/trace/compression/def v0.59.0 h1:u/IbNqKfYodJIprc/rkpcwLz/5OFox95ujemwR9AHuo= +github.com/DataDog/datadog-agent/comp/trace/compression/def v0.59.0/go.mod h1:samFXdP0HVSwD223LPLzcPKUjRQ6/uwr/1wMPo2HhRg= +github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.59.0 h1:Z/fqQiBYwTTt27IIBdX6oivtIxfqm0o0gNqA1zoATm4= +github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.59.0/go.mod h1:x1xzklye6fB16nIh4HrvbOYN/WP4OJNJpvZylelI3tI= +github.com/DataDog/datadog-agent/comp/trace/compression/impl-zstd v0.59.0 h1:m9wM1fLNndxJWVXwZegwQ2wAp6CK0uFqF/sh/5Rw1PY= +github.com/DataDog/datadog-agent/comp/trace/compression/impl-zstd v0.59.0/go.mod h1:t1BtP+u27pjTeOX/5otD7klkUIHB0Mh4ToeeeHs+oRY= +github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.59.0 h1:Etckua/+tAA9nA6Ssbgx+sKDIdgiobVFuhRvQWDAGHQ= +github.com/DataDog/datadog-agent/pkg/collector/check/defaults v0.59.0/go.mod h1:s9QBNtoBURzy/0FeBInQ7kawNj04OnBNUo8xYr26z3E= +github.com/DataDog/datadog-agent/pkg/config/env v0.59.0 h1:8oHEWArrc7dYJunz5ZtLzSVsGkW4JUk+v/QLgcUuvRI= +github.com/DataDog/datadog-agent/pkg/config/env v0.59.0/go.mod h1:8DoSDz72MFB3o09Tn90OUnUiQ60kDvObWh9xmaG+4cI= +github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0 h1:bg/anB+tp85oaFKvdMrbaYO0idWbErtm8i4rp4dra5k= +github.com/DataDog/datadog-agent/pkg/config/mock v0.59.0/go.mod h1:xVhwIc1BVvXN7UUM+604EOyoSRIF9B84Vn6Xn5n3GXE= +github.com/DataDog/datadog-agent/pkg/config/model v0.59.0 h1:8x6VWgK/mrG++vU1QkbfVI3YBWy2AyQHgOVyFYwX4lE= +github.com/DataDog/datadog-agent/pkg/config/model v0.59.0/go.mod h1:+IfFsWw9OM26lwDmTfy6RVF5LhEmFC8LgO4OGajyuvk= +github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.59.0 h1:8MTR7i4xNFoVp0gyzHghn2s7AZcuu25GJDQvTGwtGC8= +github.com/DataDog/datadog-agent/pkg/config/nodetreemodel v0.59.0/go.mod h1:aYSdawfzI8vX0YlS19KKxpLR8oG1Rqp2rH+wFPv4MFs= +github.com/DataDog/datadog-agent/pkg/config/setup v0.59.0 h1:6cNxX6N7HIZqGVSKD4Fzh30Ldky8ckaQnd7B4bXzErg= +github.com/DataDog/datadog-agent/pkg/config/setup v0.59.0/go.mod h1:JEO3nqqPJn1lh8tSabgRqXHOth2l++ZYEfzRRYGUji0= +github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0 h1:U7+yV+Ul/Cmvt7HKuf6TXkwq9/RhaaWNOX+xReUgqwQ= +github.com/DataDog/datadog-agent/pkg/config/structure v0.59.0/go.mod h1:rdbxYVSC1Xjh8RODr06j8Mbku7dXnRr3SWxi5wsl9pA= +github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0 h1:8iCSoIKcNqiX/QEmWbjRcH5za/Aj06QtIfT8JNJZXDU= +github.com/DataDog/datadog-agent/pkg/config/teeconfig v0.59.0/go.mod h1:oi5YMuCZKA98ACJz5cx/lXM+pZ4HAUgc5bSP73M4G3w= +github.com/DataDog/datadog-agent/pkg/config/utils v0.59.0 h1:ZA4WUpcb23Ts/BQ2fEDodGd45QtQFuJ0xSrvxME8JBQ= +github.com/DataDog/datadog-agent/pkg/config/utils v0.59.0/go.mod h1:n8JbD8n9omhs/MWZij6yA6RgHAOYx54BXMTRR2v+32A= +github.com/DataDog/datadog-agent/pkg/logs/auditor v0.59.0 h1:5PDZmH8KW0PYSfywoNlHkjoTNSYefq4N6X55CBqiCeU= +github.com/DataDog/datadog-agent/pkg/logs/auditor v0.59.0/go.mod h1:mcWSkLVkuJmhqr4GkwHbhuELNxn46VNg487xL33LAQQ= +github.com/DataDog/datadog-agent/pkg/logs/client v0.59.0 h1:GC6gjPzImitUI26X9X23G4WuDyv/+KKjYHLoxmIllJ8= +github.com/DataDog/datadog-agent/pkg/logs/client v0.59.0/go.mod h1:EE6EkO4YH+hQlhQAPrcTxT3Ye72fOFwQxqyQsOFr2fk= +github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.59.0 h1:a/2kYMMKo9um9Dla5QExkvors05CFgyfrPkxClZz8L0= +github.com/DataDog/datadog-agent/pkg/logs/diagnostic v0.59.0/go.mod h1:Mc9HEEgXpsQEZKEtb7I42Yg5ShZyNXxJShdVslkhW2g= +github.com/DataDog/datadog-agent/pkg/logs/message v0.59.0 h1:hv2fiwwX53r4tdzv0YHbBDoGBLJcKrA4ErqC01XnCrY= +github.com/DataDog/datadog-agent/pkg/logs/message v0.59.0/go.mod h1:RS8UIJB31rymy8W5va8I1EFkd4hbSAbHUWPZYzfwH+M= +github.com/DataDog/datadog-agent/pkg/logs/metrics v0.59.0 h1:mQzAZGQaYlnQVyralxBs2KxYAm8Gb8IL45eimmX0Zr4= +github.com/DataDog/datadog-agent/pkg/logs/metrics v0.59.0/go.mod h1:liRnSv3VpZpv/rHGiYYBCBlkx2Sy98rw2/5hu9g1T/E= +github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.59.0 h1:3i0bNOq5IwPKKYpKl2zgkwOecvfxl2/mFZ5M4q8un7U= +github.com/DataDog/datadog-agent/pkg/logs/pipeline v0.59.0/go.mod h1:xVtael5+vGMu08nvdlnqB7IhbwjTYCLHuXMjVodVFM8= +github.com/DataDog/datadog-agent/pkg/logs/processor v0.59.0 h1:F71SRQbj2bqLHAw8+R/fqMQCTiDjusD36u13/yK55Bo= +github.com/DataDog/datadog-agent/pkg/logs/processor v0.59.0/go.mod h1:XuBR8eeLrxNOI5ex2BlH67P4lmOZIs5p9Vnse/71zVY= +github.com/DataDog/datadog-agent/pkg/logs/sds v0.59.0 h1:CPxkTGZuir7z6ZnEXovdUNQE0nAHmXAtBLvFMppxHvs= +github.com/DataDog/datadog-agent/pkg/logs/sds v0.59.0/go.mod h1:MOhCsu2zQMIwT2NBQYWjXzHgNYCKZwPJu08TKlBa1IU= +github.com/DataDog/datadog-agent/pkg/logs/sender v0.59.0 h1:fd2pUQXyxV8Zvw2axC0/IzBRwaEWeOYuItvo3NnS0eY= +github.com/DataDog/datadog-agent/pkg/logs/sender v0.59.0/go.mod h1:iVtgk6B4bl7HggNx5TECj4LIj8PYmoDIf1Hn1lL61cA= +github.com/DataDog/datadog-agent/pkg/logs/sources v0.59.0 h1:odwHx0k2Hod6wrsnt/P5dI2deVCwVaMNKSSxpsOvHR8= +github.com/DataDog/datadog-agent/pkg/logs/sources v0.59.0/go.mod h1:t95T+iw+/9VP40ymxXrrLIMJ+MiFJm0vIZml3KpwuyI= +github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.59.0 h1:th5J71WmJpXVcY+yR5YalOzrLjoYEDn/HT+allWEInQ= +github.com/DataDog/datadog-agent/pkg/logs/status/statusinterface v0.59.0/go.mod h1:PaduNrh0GJ3UEKG30VMu0M6hi7KuYf3VviLdIG9xV9k= +github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.59.0 h1:BvvXnKJjZfLUcwcTnj8gWoJAlFfTd8q5Rh39SV97VFM= +github.com/DataDog/datadog-agent/pkg/logs/status/utils v0.59.0/go.mod h1:p2NTG+cIhVGlKELJfRteGCec37ICptIpeB2x/MsRkbw= +github.com/DataDog/datadog-agent/pkg/logs/util/testutils v0.59.0 h1:Lx1CcCOi+Wgvjxzj8pEz1HtxWuZpjIkHyrBXidzU9Hw= +github.com/DataDog/datadog-agent/pkg/logs/util/testutils v0.59.0/go.mod h1:+uqKrMsDA16MMC98rqDkp7Jn8cpYLI/JPAVcno8MEmE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.59.0 h1:uX6/XoKMS7KYXe+R+vwgw+eRdmn16xfa9PDF5dxgumE= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.59.0/go.mod h1:ATVw8kr3U1Eqz3qBz9kS6WFDKji9XyoAsHKSlj3hPTM= +github.com/DataDog/datadog-agent/pkg/proto v0.59.0 h1:hHgSABsmMpA3IatWlnYRAKlfqBACsWyqsLCEcUA8BCs= +github.com/DataDog/datadog-agent/pkg/proto v0.59.0/go.mod h1:weaq7HP9vUa7YAMcvMs7bhT7pmHk3sq7XRBQOcaSUak= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.59.0 h1:9C8TVNz0IiNoD6tuEKPY/vMIUjB7kN0OaLyImhatWjg= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.59.0/go.mod h1:c4th0IFaP0Q1ofRa0GcPB9hJWN+cmUoEfOI1Ub0O50A= +github.com/DataDog/datadog-agent/pkg/status/health v0.59.0 h1:gDeDYddUBwkzeNRxeRceIB46YvxB/2+KoCFcN4qvVag= +github.com/DataDog/datadog-agent/pkg/status/health v0.59.0/go.mod h1:EkC/SgFR03BKwBitVV4dIuP+ofwPlUCkVi5K5k1Dh2Y= +github.com/DataDog/datadog-agent/pkg/telemetry v0.59.0 h1:4WEY5NILyM/WFXwzgvgdju1rfO4cru2SXJyU1JLgFyc= +github.com/DataDog/datadog-agent/pkg/telemetry v0.59.0/go.mod h1:DmEXCX0hBizZpdpbS64o9sPj47iiUzh9F7uGUazF+ZA= +github.com/DataDog/datadog-agent/pkg/trace v0.59.0 h1:LHfmBEfidWE6R5onNLIFnX3jc4MRBwdqJ6XLQxvBAG0= +github.com/DataDog/datadog-agent/pkg/trace v0.59.0/go.mod h1:6XfyUYonzDI1qy9tZBUgMgGYJarHDxIZtfs6PNRbf/w= github.com/DataDog/datadog-agent/pkg/trace/exportable v0.0.0-20201016145401-4646cf596b02 h1:N2BRKjJ/c+ipDwt5b+ijqEc2EsmK3zXq2lNeIPnSwMI= github.com/DataDog/datadog-agent/pkg/trace/exportable v0.0.0-20201016145401-4646cf596b02/go.mod h1:EalMiS87Guu6PkLdxz7gmWqi+dRs9sjYLTOyTrM/aVU= -github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.2 h1:AWmZSmqPmm2QHsQtmB6MiNaq0ssp9/4fhq4aiGqJ1Sg= -github.com/DataDog/datadog-agent/pkg/util/backoff v0.56.2/go.mod h1:2RMfdYkKyeh8hXs6WgaamkkEyK35Xo55C4rFG4dO1k8= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.58.0-rc.5 h1:sHx1AqE2vRdH6/Y+nmozFVVOpoflnQZHvHCopiUzxvc= -github.com/DataDog/datadog-agent/pkg/util/cgroups v0.58.0-rc.5/go.mod h1:pIoMzSVRcK56D3o3H/eus+xUuIFjFR09qsKgL716GUM= -github.com/DataDog/datadog-agent/pkg/util/executable v0.58.0-rc.5 h1:XQnMyE2vxSRGRdnvH6tFI3AGCWMBfn5Ln7USJVhCT5U= -github.com/DataDog/datadog-agent/pkg/util/executable v0.58.0-rc.5/go.mod h1:mSSn2OzsdgoUnPyBmF8rEDU+ee1RFp+H6LFsJSteN9o= -github.com/DataDog/datadog-agent/pkg/util/filesystem v0.58.0-rc.5 h1:rnN+wH7kCIHyJJmmcxGFcNgOho6scUvmyVcVK0PEPEM= -github.com/DataDog/datadog-agent/pkg/util/filesystem v0.58.0-rc.5/go.mod h1:LgAbVM72AFz8SFcbyblr0wrkLVwcNF09adRHyZxsgIw= -github.com/DataDog/datadog-agent/pkg/util/fxutil v0.58.0-rc.5 h1:3O4TJrgNu6xjg9nTGwRBPY8/rD4zDTvHYcFfg9Gvmfw= -github.com/DataDog/datadog-agent/pkg/util/fxutil v0.58.0-rc.5/go.mod h1:qQb+geWifSCQGWg2SiM1vklU2MH0qiC+6/zYk89r1Kc= -github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.58.0-rc.5 h1:zx7gUIV3SlE/HBYN+gvGClSk60Tt8ej2t+YoXY+jQsM= -github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.58.0-rc.5/go.mod h1:TtGpu9IMJjNRytJXO9QT9lsTgxnr55vSt99ZuHIKFrY= -github.com/DataDog/datadog-agent/pkg/util/http v0.56.2 h1:yu88zoYRzyd0EK4F7bJ39D8ibJa82y+x4u0JHeeQoxE= -github.com/DataDog/datadog-agent/pkg/util/http v0.56.2/go.mod h1:jVsNYokuDBLoj/5SMCrjmtZc+yfiBBfHN7Nkhw9VJdI= +github.com/DataDog/datadog-agent/pkg/util/backoff v0.59.0 h1:EaTwOrTRpMEdomryGVMfHyN0wEsKkaL3/Tw9qRt9SSY= +github.com/DataDog/datadog-agent/pkg/util/backoff v0.59.0/go.mod h1:2RMfdYkKyeh8hXs6WgaamkkEyK35Xo55C4rFG4dO1k8= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.59.0 h1:uV3oUyl0uQN8anXZXQiw+hbQ8UNNtSkrnDCDklhAjeI= +github.com/DataDog/datadog-agent/pkg/util/cgroups v0.59.0/go.mod h1:+51MjREuUnHTYSnI9zBqv2aVOF4dlhDwQiCMeZyY7Z0= +github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0 h1:24sLjJ4p4Co/82weJsqkNxWZjG8zdS7yeJBGVOqjHxM= +github.com/DataDog/datadog-agent/pkg/util/executable v0.59.0/go.mod h1:mSSn2OzsdgoUnPyBmF8rEDU+ee1RFp+H6LFsJSteN9o= +github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0 h1:VV/SYXyZirAaUxMsWUpmZYcX9AIgbGadElznJZXPCig= +github.com/DataDog/datadog-agent/pkg/util/filesystem v0.59.0/go.mod h1:1Oy0TNkovXuDB0Uu8OzszIuDezYSPg8qFCEyx02ipc4= +github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0 h1:b4sUQuXnE+M+1ToTViNGelw8yfaXRuhOqBSczdQ8wEM= +github.com/DataDog/datadog-agent/pkg/util/fxutil v0.59.0/go.mod h1:vl91pbe6A2L9kqNEmSDrS8vlj4cADSBq3Z3YRQ1rpKY= +github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 h1:8qlROMBQixtDVQwjvttGSM8hTmN3tnFQugOyh614ACc= +github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0/go.mod h1:4EPWYAplHgdaLZsP/NuLEfh21NuvF+JdVtwttTqQlUY= +github.com/DataDog/datadog-agent/pkg/util/http v0.59.0 h1:6Dshh+6K5NGV2TdHsZeeDRsBrgvQ0rJw8OhMWonMFu4= +github.com/DataDog/datadog-agent/pkg/util/http v0.59.0/go.mod h1:Cf5xtpWzHGn7rvEAM4fdw1OUABXLbA/Bqf3dCt/0qtM= github.com/DataDog/datadog-agent/pkg/util/log v0.0.0-20201009091607-ce4e57cdf8f4/go.mod h1:cRy7lwapA3jcjnX74kU6NFkXaRGQyB0l/QZA0IwYGEQ= github.com/DataDog/datadog-agent/pkg/util/log v0.0.0-20201009092105-58e18918b2db/go.mod h1:cRy7lwapA3jcjnX74kU6NFkXaRGQyB0l/QZA0IwYGEQ= -github.com/DataDog/datadog-agent/pkg/util/log v0.58.0-rc.5 h1:SikjhQmkzAJZnItVdRTFeDuvmDSUH1tnMBQNhHS8u3A= -github.com/DataDog/datadog-agent/pkg/util/log v0.58.0-rc.5/go.mod h1:Yizy9x7thBrprolGjWDOZTK2OLsr9jjY0sRzZ+kTB1w= -github.com/DataDog/datadog-agent/pkg/util/optional v0.58.0-rc.5 h1:vvId2Y0SdXz0NnUdSkiIBhfTIH8FvvO5VYeH3fBjWiU= -github.com/DataDog/datadog-agent/pkg/util/optional v0.58.0-rc.5/go.mod h1:xWT/KJdJg2/0pZyAKZ6XmIiE5sM+AyUo4qvKuPHQ17U= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.58.0-rc.5 h1:J1bjQLTIQxYCx/Ei0z4sZmM51iywGnn8CQ7YOh3PaG8= -github.com/DataDog/datadog-agent/pkg/util/pointer v0.58.0-rc.5/go.mod h1:t1DlnUEMltkvwPLc7zCtP1u5cBDu+30daR2VhQO5bvA= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.58.0-rc.5 h1:v6Q5WAGMYJzp68W1CojmTdKIcDSi1Qqb4JpJQktxQ3Y= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.58.0-rc.5/go.mod h1:krOxbYZc4KKE7bdEDu10lLSQBjdeSFS/XDSclsaSf1Y= -github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.2 h1:9oHsY5RiebLoONStzy1OTG168WvPMnF8rU9TCgn/v+Y= -github.com/DataDog/datadog-agent/pkg/util/startstop v0.56.2/go.mod h1:IkqOyNbrg9hXqCMyL+g+Ldhz4q6VVOPqbHQxS4lLiRs= -github.com/DataDog/datadog-agent/pkg/util/statstracker v0.58.0-rc.5 h1:HyiE7ebky9p1pjmzB3U8kTXti5UhoLcFBrbEEejqaZA= -github.com/DataDog/datadog-agent/pkg/util/statstracker v0.58.0-rc.5/go.mod h1:Et2HSDjQvMhgs9ZdH7T5I4q04g5Fj23EtmeIaen/9/M= -github.com/DataDog/datadog-agent/pkg/util/system v0.58.0-rc.5 h1:xaK8pTC4cYvuwojJotx4f5nU3LYN8baI/hv5Zjk3VgQ= -github.com/DataDog/datadog-agent/pkg/util/system v0.58.0-rc.5/go.mod h1:JsVOZB3Zv29IcSb+NUImqCIuwMjZSmCJovUO/5SW0x8= -github.com/DataDog/datadog-agent/pkg/util/system/socket v0.58.0-rc.5 h1:xVqkEHnk5xIxSU9HC44x/5WY0pRTABaN3dtOhFL/s9c= -github.com/DataDog/datadog-agent/pkg/util/system/socket v0.58.0-rc.5/go.mod h1:Hp16ayANpEIMDhh2bQtHzUZKp3CbnK58+UkClmaEyYg= -github.com/DataDog/datadog-agent/pkg/util/testutil v0.58.0-rc.5 h1:BtbetlPrMjVBDFyQuGHPr6qxUJ9gVKXsbxiFZCfS2OQ= -github.com/DataDog/datadog-agent/pkg/util/testutil v0.58.0-rc.5/go.mod h1:m/uWLdpGEi3x/5gybZFeYNEnIdKhGtWW8kFZuM+GSFA= +github.com/DataDog/datadog-agent/pkg/util/log v0.59.0 h1:0JwuSc9Pr/kHAYIEzbdeYKLxgDViNlA6e/bB+7IvFtE= +github.com/DataDog/datadog-agent/pkg/util/log v0.59.0/go.mod h1:pH5Vs7I0fwUU4dUtiQ/oEC//+xzPAgUlhH5+MG5eseg= +github.com/DataDog/datadog-agent/pkg/util/log/setup v0.59.0 h1:1gQ81041dHofvio6mn0EnmAG8hYR52VOlCjONIvpkks= +github.com/DataDog/datadog-agent/pkg/util/log/setup v0.59.0/go.mod h1:9aftpZaZs8Z7EWHGQO3+biYHVRxN/V4WELSK6P5c0DY= +github.com/DataDog/datadog-agent/pkg/util/optional v0.59.0 h1:IOZeoApM4NI6dw+Sdo4PalVU1Z6uoY3vuKdl5Jm6g2M= +github.com/DataDog/datadog-agent/pkg/util/optional v0.59.0/go.mod h1:xWT/KJdJg2/0pZyAKZ6XmIiE5sM+AyUo4qvKuPHQ17U= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0 h1:K/3aHtAsvlAIbw0/3ah66f1glnpdLNm69XSYXdcnDtw= +github.com/DataDog/datadog-agent/pkg/util/pointer v0.59.0/go.mod h1:t1DlnUEMltkvwPLc7zCtP1u5cBDu+30daR2VhQO5bvA= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.0 h1:p4uZow1IE/ve590aKqTsS+/5P7fPi+abHN9TWFi+bhE= +github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.0/go.mod h1:krOxbYZc4KKE7bdEDu10lLSQBjdeSFS/XDSclsaSf1Y= +github.com/DataDog/datadog-agent/pkg/util/startstop v0.59.0 h1:zPO6AX/UcbMCuGjnrK0cuDgULbOyzZFYvuxf/qbZjGg= +github.com/DataDog/datadog-agent/pkg/util/startstop v0.59.0/go.mod h1:IkqOyNbrg9hXqCMyL+g+Ldhz4q6VVOPqbHQxS4lLiRs= +github.com/DataDog/datadog-agent/pkg/util/statstracker v0.59.0 h1:CYY4C03mcJCqB04DKttAbNPrQouJLSL94m/KLaURv3Y= +github.com/DataDog/datadog-agent/pkg/util/statstracker v0.59.0/go.mod h1:Et2HSDjQvMhgs9ZdH7T5I4q04g5Fj23EtmeIaen/9/M= +github.com/DataDog/datadog-agent/pkg/util/system v0.59.0 h1:9fpWOSJyuBHdpzQkUYFoyC57Bv+umHeMMSQmwmm900k= +github.com/DataDog/datadog-agent/pkg/util/system v0.59.0/go.mod h1:rdBzS773XYudLd/IH2mUzz3+kJ2N2PcFWEdRGEGYlP0= +github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0 h1:8l2FgdcIUNPyI4J+w5OaY3k2byB11HqZ/mcg2AcJSSI= +github.com/DataDog/datadog-agent/pkg/util/system/socket v0.59.0/go.mod h1:C63BEsAoSlfoB4WadEMO1guB+dvfl95zQaMLw394zNM= +github.com/DataDog/datadog-agent/pkg/util/testutil v0.59.0 h1:f6EtElJXr8UN6FftNEeqIyT2jzvAtldQI+eb7qaYvrA= +github.com/DataDog/datadog-agent/pkg/util/testutil v0.59.0/go.mod h1:m/uWLdpGEi3x/5gybZFeYNEnIdKhGtWW8kFZuM+GSFA= github.com/DataDog/datadog-agent/pkg/util/winutil v0.0.0-20201009092105-58e18918b2db/go.mod h1:EtS4X73GXAyrpVddkLQ4SewSQX+zv284e8iIkVBXgtk= -github.com/DataDog/datadog-agent/pkg/util/winutil v0.58.0-rc.5 h1:gSRcD5Dd91Sg6woiHSp1C8mcBB7cZqs+n2/xCwfJolU= -github.com/DataDog/datadog-agent/pkg/util/winutil v0.58.0-rc.5/go.mod h1:V5962xkfb41l5mPn6qaHqYPrJrGY2MVF2DK934DZyaI= -github.com/DataDog/datadog-agent/pkg/version v0.58.0-rc.5 h1:E2dJIBLKW5K2jPwbZqaV5ftQBoF5MpzEnWI2FoWSozY= -github.com/DataDog/datadog-agent/pkg/version v0.58.0-rc.5/go.mod h1:rcA7LtIB5WLpxsems/bWO1iXkyGEgHHje7vJ0b20ZpU= -github.com/DataDog/datadog-api-client-go/v2 v2.29.0 h1:b0vTasEPUc7FuCKaRFqbJB+88IdWL/f7LdKcasMV8Vo= -github.com/DataDog/datadog-api-client-go/v2 v2.29.0/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= +github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.0 h1:1tJjvbVq3aMXAb4OaRkotzH1Xqu0mXrpRM/yPoDdH3w= +github.com/DataDog/datadog-agent/pkg/util/winutil v0.59.0/go.mod h1:m/A1yu3JBnUlq6zrWJUQZbsqdDikEacbXCGcdtYmUPs= +github.com/DataDog/datadog-agent/pkg/version v0.59.0 h1:pwCYymut9ltNcNtYXEMXEEUjEE1+GGcrQ6xibMtM2gk= +github.com/DataDog/datadog-agent/pkg/version v0.59.0/go.mod h1:rcA7LtIB5WLpxsems/bWO1iXkyGEgHHje7vJ0b20ZpU= +github.com/DataDog/datadog-api-client-go/v2 v2.31.0 h1:JfJhYlHfLzvauI8u6h23smTooWYe6quNhhg9gpTszWY= +github.com/DataDog/datadog-api-client-go/v2 v2.31.0/go.mod h1:d3tOEgUd2kfsr9uuHQdY+nXrWp4uikgTgVCPdKNK30U= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.5.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI6LDrKU= github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240906125328-9899f57f27be h1:PAwwowQxp4ESwXn2MIEAq/cA8jeLhnRV06M8Op+gEvY= github.com/DataDog/dd-sensitive-data-scanner/sds-go/go v0.0.0-20240906125328-9899f57f27be/go.mod h1:TX7CTOQ3LbQjfAi4SwqUoR5gY1zfUk7VRBDTuArjaDc= -github.com/DataDog/go-sqllexer v0.0.14 h1:xUQh2tLr/95LGxDzLmttLgTo/1gzFeOyuwrQa/Iig4Q= -github.com/DataDog/go-sqllexer v0.0.14/go.mod h1:KwkYhpFEVIq+BfobkTC1vfqm4gTi65skV/DpDBXtexc= +github.com/DataDog/go-sqllexer v0.0.15 h1:rUUu52dP8EQhJLnUw0MIAxZp0BQx2fOTuMztr3vtHUU= +github.com/DataDog/go-sqllexer v0.0.15/go.mod h1:KwkYhpFEVIq+BfobkTC1vfqm4gTi65skV/DpDBXtexc= github.com/DataDog/go-tuf v1.1.0-0.5.2 h1:4CagiIekonLSfL8GMHRHcHudo1fQnxELS9g4tiAupQ4= github.com/DataDog/go-tuf v1.1.0-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee h1:tXibLZk3G6HncIFJKaNItsdzcrk4YqILNDZlXPTNt4k= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee/go.mod h1:nTot/Iy0kW16bXgXr6blEc8gFeAS7vTqYlhAxh+dbc0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.20.0 h1:jdsuH8u4rxfvy3ZHoSLk5NAZrQMNZqyJwhM15FpEswE= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.20.0/go.mod h1:KI5I5JhJNOQWeE4vs+qk+BY/9PVSDwNmSjrCUrmuZKw= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.19.0 h1:rP4hnNCufRM2OsnFy0Tf00r6mu19fcQxfVN4E1rD5mY= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.19.0/go.mod h1:66XlN7QpQKqIvw8e2UbCXV5X8wGnEw851nT9BjJ75dY= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.20.0 h1:fKv05WFWHCXQmUTehW1eEZvXJP65Qv00W4V01B1EqSA= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.20.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.20.0 h1:JLpKc1QpkaUXEFgN68/Q9XgF0XgbVl/IXd8S1KUcEV4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.20.0/go.mod h1:VJtgUHCz38obs58oEjNjEre6IaHmR+s7o4DvX74knq4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.19.0 h1:JnRJqpnG0tDVTsD9uU6Xk9Nh/ozuLa4emyR+t7WxIto= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.19.0/go.mod h1:OEECw1sTZq5HfYzpl5C8Md/8wjsnmxF5lxFmv3Ey2CA= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.19.0 h1:SAczemPbq9qyzyi8Crd8MvEjYQXwsTUxR8tJlXLqnmk= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.19.0/go.mod h1:Rhxlru6B8yfLZ4VSjuAuMnWdPgP8X60kvRjrdt84iNU= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.21.0 h1:U+p1i7+upWb4qOIOOvjS/92iMUGlSzEC1tRxVo0Lg8Y= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.21.0/go.mod h1:dOjp1lg4jwYyIbpnqW+DoOV8qD+70C+lgpINFvUqasQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.21.0 h1:VS4NTqwczwezMVvI6A7xYR3ugPmMUJ4FcdFrsdnZI2I= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.21.0/go.mod h1:66XlN7QpQKqIvw8e2UbCXV5X8wGnEw851nT9BjJ75dY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.21.0 h1:hgbTFS6SkqbzOiWSfP58dZ/Jpjlmv6dpD4+V4LDHm2Q= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.21.0/go.mod h1:dvIWN9pA2zWNTw5rhDWZgzZnhcfpH++d+8d1SWW6xkY= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.21.0 h1:XD9Kd+baO66+tfbdanOFSMGEfwWfnrn/IxG/Dc5bv5I= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.21.0/go.mod h1:9ByLz9jISc176DzjIdaRfRKwaitqF8ie6RTvfP8Aufo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.21.0 h1:8nW8jfcCIWzxWrpI31C0QYoOjTaUGp6USCwiRbP5Fp4= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.21.0/go.mod h1:wuatEozcLYinJ0WYf0MlVTFtTzEmf+qyJet0H9foVAs= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.21.0 h1:/Dp1WBvekdusS9Tw9pLE7RG04eluNktQ29arLS4SpGM= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.21.0/go.mod h1:asNuwNy1O2HbadkcZVuqmFGonfEzXS/SBvOo8V1MJvQ= github.com/DataDog/sketches-go v1.4.6 h1:acd5fb+QdUzGrosfNLwrIhqyrbMORpvBy7mE+vHlT3I= github.com/DataDog/sketches-go v1.4.6/go.mod h1:7Y8GN8Jf66DLyDhc94zuWA3uHEt/7ttt8jHOBWWrSOg= github.com/DataDog/viper v1.13.5 h1:SZMcyMknYQN2jRY/40A16gUXexlNJOI8sDs1cWZnI64= github.com/DataDog/viper v1.13.5/go.mod h1:wDdUVJ2SHaMaPrCZrlRCObwkubsX8j5sme3LaR/SGTc= github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY= github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.2 h1:cZpsGsWTIFKymTA0je7IIvi1O7Es7apb9CF3EQlOcfE= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.2/go.mod h1:itPGVDKf9cC/ov4MdvJ2QZ0khw4bfoo9jzwTJlaxy2k= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0/go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/IBM/sarama v1.43.3 h1:Yj6L2IaNvb2mRBop39N7mmJAHBVY3dTPncr3qGVkxPA= @@ -252,10 +262,14 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 h1:t3eaIm0rUkzbrIewtiFmMK5RXHej2XnoXNhxVsAYUfg= github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= +github.com/antchfx/xmlquery v1.4.2 h1:MZKd9+wblwxfQ1zd1AdrTsqVaMjMCwow3IqkCSe00KA= +github.com/antchfx/xmlquery v1.4.2/go.mod h1:QXhvf5ldTuGqhd1SHNvvtlhhdQLks4dD0awIVhXIDTA= +github.com/antchfx/xpath v1.3.2 h1:LNjzlsSjinu3bQpw9hWMY9ocB80oLOWuQqFvO6xt51U= +github.com/antchfx/xpath v1.3.2/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.20.0 h1:631+KvYbsBZxmuJjYwhezVsrfc/TbqtZV4QcxOX1fOI= -github.com/apache/thrift v0.20.0/go.mod h1:hOk1BQqcp2OLzGsyVXdfMk7YFlMxK3aoEVhjD06QhB8= +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/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -267,43 +281,43 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z 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.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= -github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2 v1.32.6 h1:7BokKRgRPuGmKkFMhEg/jSul+tB9VvXhcViILtfG8b4= +github.com/aws/aws-sdk-go-v2 v1.32.6/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= -github.com/aws/aws-sdk-go-v2/config v1.27.37 h1:xaoIwzHVuRWRHFI0jhgEdEGc8xE1l91KaeRDsWEIncU= -github.com/aws/aws-sdk-go-v2/config v1.27.37/go.mod h1:S2e3ax9/8KnMSyRVNd3sWTKs+1clJ2f1U6nE0lpvQRg= +github.com/aws/aws-sdk-go-v2/config v1.28.6 h1:D89IKtGrs/I3QXOLNTH93NJYtDhm8SYa9Q5CsPShmyo= +github.com/aws/aws-sdk-go-v2/config v1.28.6/go.mod h1:GDzxJ5wyyFSCoLkS+UhGB0dArhb9mI+Co4dHtoTxbko= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.35 h1:7QknrZhYySEB1lEXJxGAmuD5sWwys5ZXNr4m5oEz0IE= -github.com/aws/aws-sdk-go-v2/credentials v1.17.35/go.mod h1:8Vy4kk7at4aPSmibr7K+nLTzG6qUQAUO4tW49fzUV4E= +github.com/aws/aws-sdk-go-v2/credentials v1.17.47 h1:48bA+3/fCdi2yAwVt+3COvmatZ6jUDNkDTIsqDiMUdw= +github.com/aws/aws-sdk-go-v2/credentials v1.17.47/go.mod h1:+KdckOejLW3Ks3b0E3b5rHsr2f9yuORBum0WPnE5o5w= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 h1:AmoU1pziydclFT/xRV+xXE/Vb8fttJCLRPv8oAkprc0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21/go.mod h1:AjUdLYe4Tgs6kpH4Bv7uMZo7pottoyHMn4eTcIcneaY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 h1:s/fF4+yDQDoElYhfIVvSNyeCydfbuTKzhxSXDXCPasU= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25/go.mod h1:IgPfDv5jqFIzQSNbUEMoitNooSMXjRSDkhXv8jiROvU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 h1:ZntTCl5EsYnhN/IygQEUugpdwbhdkom9uHcbCftiGgA= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25/go.mod h1:DBdPrgeocww+CSl1C8cEV8PN1mHMBhuCDLpXezyvWkE= github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= 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/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= +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/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8 h1:lR2PZfD1YNEPq0TSljh1Zfxmr53FaKZOTf90hQKmH/4= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8/go.mod h1:JsD+G3R0ZMWqjt7VDggNsc5SFl4hw+Sk8KQaRN1sltI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 h1:50+XsN70RS7dwJ2CkVNXzj7U2L1HKP8nqTd3XWEXBN4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6/go.mod h1:WqgLmwY7so32kG01zD8CPTJWVWM+TzJoOVHwTg4aPug= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.33.7 h1:GfXWwM9/iEJVcWQaMu22YzBeGQnY6zjiZD556awNJBA= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.33.7/go.mod h1:YMM+e0OfZQVBpTJs+WNZWP/hdodeWnepXgancR5NFFw= github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= -github.com/aws/aws-sdk-go-v2/service/sso v1.23.1 h1:2jrVsMHqdLD1+PA4BA6Nh1eZp0Gsy3mFSB5MxDvcJtU= -github.com/aws/aws-sdk-go-v2/service/sso v1.23.1/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.1 h1:0L7yGCg3Hb3YQqnSgBTZM5wepougtL1aEccdcdYhHME= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.1/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 h1:rLnYAfXQ3YAccocshIH5mzNNwZBkBo+bP6EhIxak6Hw= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.7/go.mod h1:ZHtuQJ6t9A/+YDuxOLnbryAmITtr8UysSny3qcyvJTc= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 h1:JnhTZR3PiYDNKlXy50/pNeix9aGMo6lLpXwJ1mw8MD4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6/go.mod h1:URronUEGfXZN1VpdktPSD1EkAL9mfrV+2F4sjH38qOY= github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= -github.com/aws/aws-sdk-go-v2/service/sts v1.31.1 h1:8K0UNOkZiK9Uh3HIF6Bx0rcNCftqGCeKmOaR7Gp5BSo= -github.com/aws/aws-sdk-go-v2/service/sts v1.31.1/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 h1:s4074ZO1Hk8qv65GqNXqDjmkf4HSQqJukaLuuW0TpDA= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.2/go.mod h1:mVggCnIWoM09jP71Wh+ea7+5gAp53q+49wDFs1SW5z8= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= -github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +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/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= @@ -315,8 +329,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= -github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q= +github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/briandowns/spinner v1.23.1 h1:t5fDPmScwUjozhDj4FA46p5acZWIPXYE30qW2Ptu650= @@ -392,8 +406,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/docker v27.1.2+incompatible h1:AhGzR1xaQIy53qCkxARaFluI00WPGtXn0AJuoQsVYTY= -github.com/docker/docker v27.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= +github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -407,6 +421,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4A github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE= +github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/go-grok v0.3.1 h1:WEhUxe2KrwycMnlvMimJXvzRa7DoByJB4PVUIE1ZD/U= github.com/elastic/go-grok v0.3.1/go.mod h1:n38ls8ZgOboZRgKcjMY8eFeZFMmcL9n2lP0iHhIDk64= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= @@ -417,11 +433,11 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.12.1-0.20240621013728-1eb8caab5155 h1:IgJPqnrlY2Mr4pYB6oaMKvFvwJ9H+X6CCY5x1vCTcpc= -github.com/envoyproxy/go-control-plane v0.12.1-0.20240621013728-1eb8caab5155/go.mod h1:5Wkq+JduFtdAXihLmeTJf+tRYIT4KBc2vPXDhwVo1pA= +github.com/envoyproxy/go-control-plane v0.13.0 h1:HzkeUz1Knt+3bK+8LG1bxOO/jzWZmdxpwC51i202les= +github.com/envoyproxy/go-control-plane v0.13.0/go.mod h1:GRaKG3dwvFoTg4nj7aXdZnvMg4d7nvT/wl9WgVXn3Q8= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= +github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/euank/go-kmsg-parser v2.0.0+incompatible h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= @@ -445,8 +461,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -488,8 +504,8 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEe github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= -github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.4 h1:DPzxraQx7OrPyXq2phlGlNSIyWEsAox0RJmjTseMV6I= github.com/go-zookeeper/zk v1.0.4/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -620,13 +636,11 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.13.0/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= -github.com/hashicorp/consul/api v1.29.4 h1:P6slzxDLBOxUSj3fWo2o65VuKtbtOXFi7TSSgtXutuE= -github.com/hashicorp/consul/api v1.29.4/go.mod h1:HUlfw+l2Zy68ceJavv2zAyArl2fqhGWnMycyt56sBgg= -github.com/hashicorp/consul/proto-public v0.6.2 h1:+DA/3g/IiKlJZb88NBn0ZgXrxJp2NlvCZdEyl+qxvL0= -github.com/hashicorp/consul/proto-public v0.6.2/go.mod h1:cXXbOg74KBNGajC+o8RlA502Esf0R9prcoJgiOX/2Tg= +github.com/hashicorp/consul/api v1.30.0 h1:ArHVMMILb1nQv8vZSGIwwQd2gtc+oSQZ6CalyiyH2XQ= +github.com/hashicorp/consul/api v1.30.0/go.mod h1:B2uGchvaXVW2JhFoS8nqTxMD5PBykr4ebY4JWHTTeLM= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/consul/sdk v0.16.1 h1:V8TxTnImoPD5cj0U9Spl0TUxcytjcbbJeADFF07KdHg= github.com/hashicorp/consul/sdk v0.16.1/go.mod h1:fSXvwxB2hmh1FMZCNl6PwX0Q/1wdWtHJcZ7Ea5tns0s= @@ -713,8 +727,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ionos-cloud/sdk-go/v6 v6.1.11 h1:J/uRN4UWO3wCyGOeDdMKv8LWRzKu6UIkLEaes38Kzh8= github.com/ionos-cloud/sdk-go/v6 v6.1.11/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= -github.com/jaegertracing/jaeger v1.60.0 h1:6fswbNydmXJNH7uz2smy2fFs9KKRpLrFXdW0u/hud4o= -github.com/jaegertracing/jaeger v1.60.0/go.mod h1:CMrmMLIWn7xLP0IwBgpbxtgIuOT6TF/7bpTUBaOUaXo= +github.com/jaegertracing/jaeger v1.62.0 h1:YoaJ2e8oVz5sqGGlVAKSUCED8DzJ1q7PojBmZFNKoJA= +github.com/jaegertracing/jaeger v1.62.0/go.mod h1:jhEIHazwyb+a6xlRBi+p96BAvTYTSmGkghcwdQfV7FM= github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -760,12 +774,12 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0= -github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= -github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= -github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.2 h1:I2rtLRqXRy1p01m/utEtpZSSA6dcJbgGVuE27kW2PzQ= +github.com/knadh/koanf/v2 v2.1.2/go.mod h1:Gphfaen0q1Fc1HTgJgSTC4oRX9R2R5ErYMZJy8fLJBo= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -781,8 +795,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-syslog/v4 v4.1.0 h1:Wsl194qyWXr7V6DrGWC3xmxA9Ra6XgWO+toNt2fmCaI= -github.com/leodido/go-syslog/v4 v4.1.0/go.mod h1:eJ8rUfDN5OS6dOkCOBYlg2a+hbAg6pJa99QXXgMrd98= +github.com/leodido/go-syslog/v4 v4.2.0 h1:A7vpbYxsO4e2E8udaurkLlxP5LDpDbmPMsGnuhb7jVk= +github.com/leodido/go-syslog/v4 v4.2.0/go.mod h1:eJ8rUfDN5OS6dOkCOBYlg2a+hbAg6pJa99QXXgMrd98= github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b h1:11UHH39z1RhZ5dc4y4r/4koJo6IYFgTRMe/LlwRTEw0= github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/lightstep/go-expohisto v1.0.0 h1:UPtTS1rGdtehbbAF7o/dhkWLTDI73UifG8LbfQI7cA4= @@ -879,210 +893,214 @@ github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.109.0 h1:EH4cLE0KHcCmea2MFkfhmGKfLrDJTiFbn/IHjMdJ7TM= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.109.0/go.mod h1:lKrkI/0VRl4P2qEy8bbDR24syOa+kF2ZGYgPO+uQ2iE= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.109.0 h1:SbIIvqyEQ8tpoKkTZy0tWbP7YDiH3fx0qk15Rf2daMI= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.109.0/go.mod h1:Komv9YJFy/CIAJu1VtZDIkLNg0Ng0ffGBrMAxOYyT+Y= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.109.0 h1:d/eNSZeGwocYCxTGUT05xExxg2FdGtNylPeU/MbmFPE= -github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.109.0/go.mod h1:AHXtu7UsgawW1p5N7h46yImYhAco4wzCUlAJcdkxvI4= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.109.0 h1:B+xkxaFTJ8Jj7Y353hz+uVwlnGIKzKolywtMcJX3M8M= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.109.0/go.mod h1:CFGnLIsGBMsxGCtZ7q6J6TXFKwv/DBA7R0sZ9x/4PdQ= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.109.0 h1:TRXkisoS6MBUFAHtujn5K35vpgfNvCTcOb5AoDN/dJg= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.109.0/go.mod h1:y3f47NY05fYFdjyqq8Ok/GfCjr510aX86m/YL2/lIjs= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.109.0 h1:WT73VsXduQ2K3Cb30taGrtGdBlNEh3Sgv4YsZ5827e0= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.109.0/go.mod h1:GHYXINETDNgt5EKne3T1QQtLdrJDjpboyFXK06+tRHQ= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.109.0 h1:8IeKHO4QHxJ0kEAq7zm2NGa6YXQ5mhGlsFnsvsAaVQI= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.109.0/go.mod h1:nyRc/0qGRKySZFizu1FbLWptYWPi0JCA0sUBxEMiUHY= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.109.0 h1:1s6kdIbGaeU2vLA34Gx2+UAXHHStwQH3u82ESVwrg1s= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.109.0/go.mod h1:IMQxJ9SP0i/OR+AmLZF20SZCCG0LxpyAQLiLL8FAtpE= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.109.0 h1:TgBo/7rAKp22Vqm5pUKUdTD6+QS90DwhnjtauZ+QMB0= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.109.0/go.mod h1:bl6y/IzY4GNleG1Wz9r3h90NpwbQu6Cka2h4VPpf31E= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.109.0 h1:pSYU/6kmokT0JToSsqnH4gnNgrAZo5AGMIrUz5krp1M= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.109.0/go.mod h1:bf6P70hOyXE2V7rTYkJkM1FacPc8rUi8nmpTXH2QbVY= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.109.0 h1:bHUwpHq7l9Hog0wH3z/MXCMYX3zOMajgt/9a5/FnxXw= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.109.0/go.mod h1:VzTL/4uMpH3/FQqPR+pQCG2JIAWPP16WH03FPOP09+Y= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.109.0 h1:hVDLcOMwtMochOkKpy+BSSyx1XAfqfxFXnspEHMSvTc= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.109.0/go.mod h1:zc7HTchYEn5tpDC3QiBHqFnN/VbPQ/x87lZAylA4rvs= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.109.0 h1:bzv/eTiOJITmg0TR2dNe981gPspkRYqGCC8iwWE2sq8= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.109.0/go.mod h1:QbvjeUXKxrmoEnqCnTxq6U8D3VVeMZna/Cd4VFJ327M= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.109.0 h1:OtaualMWSMRRgy5ZrHLVTpe+wGmxBE614ZPIGeQ9iIY= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.109.0/go.mod h1:e3V6Tg6d4M/e7N5ge24HcfcbUXEe6QSjg/CJoHhOeps= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.109.0 h1:3pOBB7MIHs0CempWSjZLekRKt9Oc3OO2lr2eE7R/IeQ= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.109.0/go.mod h1:keP8lTqP228+Bj2C0we9/risZU3jMxI1vS9L5fkyxoE= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.109.0 h1:oR9H6WbwqtvfssPfS1PfquDQxt0P+AORJyfKRNl7o0Q= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.109.0/go.mod h1:0TrXcZw+Uu7Fq9jwMu2fNvRmjQUk+uU7QCYdlhwP2iM= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.109.0 h1:lAuNItoR/qG+da55i8YywcWHq/O7K1HRgBUdS3v+ZoU= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.109.0/go.mod h1:W0PBtJmNTOrR2KDladC0yfazkBjaQU/lC1QDSxYWxYA= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.109.0 h1:V3JcBvLDzeLgswyhG88H4Su8wmvs/Xb1/XYQkucBYq4= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.109.0/go.mod h1:62usHlM1SL41NzyF9g86GIFgeztQ+cUlM3HXKFdbFNo= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.109.0 h1:0T0+/7z/N+aDYloOmUv4zi0NE0KoKLA0M9WrDOQXVEI= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.109.0/go.mod h1:vzucvp4pVkBJkA+/fiEJMd7t0PQJGyBWjrLJ52iYRqM= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.109.0 h1:TUyBEx/D8r0dKS7YhuJCxWcTRGtvCYaLa5B4G1P3hlU= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.109.0/go.mod h1:BLAmTIgCq/18WeXIPTmtRNrM5FI/CajLZdsJuHdLMFA= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.109.0 h1:1oibBtHzip+T4ZLhhBramwhRIFPphEd1+CGqmgQGXIg= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.109.0/go.mod h1:olYVe+J0LXFo4foDZnJ5zuTV56GKcpbsFKxO5mOg60Y= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.109.0 h1:hiiQb39FuPgBPLsBs98jNwpqzzmUP103VBwK3E03X5E= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.109.0/go.mod h1:3+JymB/fh5iNHZtZ4y9T6NtAODjkUXQQcfgF8HZCEHo= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.109.0 h1:9NPEO7Z8V/moQza/uUGIABsSc48Va3tfstZGk/FG75c= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.109.0/go.mod h1:pYD2hFzbXdGy8DRap60WTXlMNkcF7b3vyd37mctxhB8= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.109.0 h1:u65BxxXX9tAqjwFnvwL7yqKWHiOFDHG9jKM0UthAL18= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.109.0/go.mod h1:UKEwVBxPn/wRMKelq+9pdYlnkVFQ8h8yh5c8k2tRjNU= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.109.0 h1:/DYYZTFiMLxmx2XKzCepDT/VDv3u9gIgdzUQvdL2gtM= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.109.0/go.mod h1:ydMgguz0dLWUQnIK3ogZQaoFKXGeLI37KqAtpsJAI6s= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.109.0 h1:jbMuFwmDCRm3ycSJXLZAWmJQQWkcrotgcCB/dic99XE= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.109.0/go.mod h1:BSE5GPIaG+Qltwsrq/2YmbzU0YmEfW5+PK3wOUvARZI= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.109.0 h1:LEpo+3dMUJ7cAoX2xqQXmLuCGlA5OVSQl1c/Os3ZhYk= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.109.0/go.mod h1:1gBYb3ohJNGVaMD2N5GPhpKU8W9jvPI3uHPIgmUGcyM= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.109.0 h1:wXorKr/8dt2A1x0DGW+Uh53sX1ERdJp6IUMmUaagR20= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.109.0/go.mod h1:3riREDwyXx+8g+IK27BaqVxMqRaGU6jpeBZ+RPNBB0w= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.109.0 h1:49eU82qM9YhubCPh4o9z+6t8sw9ytS3sfPi/1Yzf0UQ= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.109.0/go.mod h1:t+2SQm0yPa+1GYpoOg7/lzZ4cHgk3os6uqALvnBA1aU= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.109.0 h1:g79FG4aNXwnpatYBoEfSm+ngQF6gJ7MHBL9z2uzqQa4= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.109.0/go.mod h1:x2dYB6tEOSc/kRl3r8v1XkY7GtpRy6Y1Mlu+NqAb2WU= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.109.0 h1:AMFYxEvaUWFW1N7rCJIfySAnY0JTSiLS/XECBH+aviY= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.109.0/go.mod h1:FBiMYL2c0lLjfRsKg83lH4zYQ8F5nGypfkU1+g4mOaU= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.109.0 h1:peFxYtLPPVgPWM6saX78XevfXka5uhIfK+gaucW6xYc= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.109.0/go.mod h1:xXLGSqdvZBSfdLY2cd746mpL1duEplCv7NwIiZrhUTI= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.109.0 h1:M3YhZ2WUp0komYWsPtL+JwRJAX7zEbN7CcOedTshIwo= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.109.0/go.mod h1:dRdivclTOOynN53U/Zq1jmBsmuDnb816rK+1soZi4uY= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.109.0 h1:3xF0NCiKKo0YMYU13IHJKh7RsTYnFFrQ/SKTixgk6rk= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.109.0/go.mod h1:bVlcMosKm9dggU6oShhawR/bmvpcaYXygPK/+eKLLqo= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.109.0 h1:Kn/Jrre9qF1vwm4vCWlsMFKhxMolN07887nu/qMA/sk= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.109.0/go.mod h1:8kGP/qIM+YlJQswkRIEXK67xN8iwKdO7CYhcH2jDRp0= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.109.0 h1:/W1CXipt//oFJHhfD/Cx6sMaNS0MOA7kx9Lwy+U2LV4= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.109.0/go.mod h1:acwSKQ96VjeiDCFY8RcPMExsG4g9gT2MHVOQPydEig8= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.109.0 h1:WpfAVQNwHmZiAHRxx0syKeWPaZCAGCuxqjMunwYGRSs= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.109.0/go.mod h1:6sxRueshlefujFPBWct+wkbHq+OKmvvMLIx06DVZU5U= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.109.0 h1:MDcIm8CBGtkN9dYfNefnRygEeE/j2F3TJAY8eJgTURo= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.109.0/go.mod h1:OCI7nOzM2mqOI0dW0n4O9zktDyWH48KL7YCA3GWFQhM= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.109.0 h1:3a/Y3/uaLVdu/1QHjxgaCZu8dI6VLffI9N6j80oiAbw= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.109.0/go.mod h1:kIh6tdityVjMYBjsLld/44IEcr7vnNQ6kfH9KYym74Y= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.109.0 h1:4VBRgtyh3hHSgAVGgs4bvNwJd0oUGyxVA3eQO2ujNsA= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.109.0/go.mod h1:9MGQCqxdCNBhdD+7QBZ6hH9HipXe5CajMafVKglD5f0= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.109.0 h1:pocaWd91oGCG+Uhrj7b8I7YrWFsJZrn/ov6woY9Y//Y= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.109.0/go.mod h1:aJOHFecWxgPmIukTajRKxQ7Q4DAmcUKmDL66wnu9JGQ= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.109.0 h1:v4kj/Hs6Sjea3oUa1IyHR75baxfbw60JqYE8pqj9H3k= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.109.0/go.mod h1:mkuZ8eCQ+J7JiV5XfX77LcpoIKFxsCB0LaGaKbyUX44= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.109.0 h1:Gyi5ZiTvHGnoxHvezi3YAzWWQVTbdAObn/+Y4zXa9a4= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.109.0/go.mod h1:k79qpGNMPMGjB8XjESL599Wa7/5CrO8JtmuExTfT4yM= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.109.0 h1:o7TuN2pH3dybzsIlcqDK0aGvHZBXc5yVxQMcu0MXsGw= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.109.0/go.mod h1:Zf2QUXo/u8CEhls+KnhqZtU3CKzYCenGW76RP8JOnsE= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.109.0 h1:xZbqAiVl85GtCOXEuRvGNNziHrzuAyVC2pxt50WAfYA= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.109.0/go.mod h1:pf03X7fpCGS1StUBdhmdB3/uW8cKmil0AFzYyZcbsoE= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.109.0 h1:Y+xoX6s/x8xRoMSTkOlzB4cbxoilUUjJT13jNbdX+zI= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.109.0/go.mod h1:UTJmyseH3oxqGGfGWwLKjgX1nvJFWOuHk6589Qes75U= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.109.0 h1:p7wfdyUDeXOcOZreLFIzCw+EwoqoE9oun5pGk/dGKPc= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.109.0/go.mod h1:f+CLQl2qzwahULQeqlXWLjmn8S3lyOxT9C660CJsdO8= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.109.0 h1:/DbqqTwfln/LSu6TcryMl8ursWEvLXi9oa3YEdx53ZI= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.109.0/go.mod h1:zQcK9/0M58biBHlcjYAHB3DEQiWS4RpAp95ZRBKe5xc= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.109.0 h1:A2YjC0zAh4oe8rBV94hUCwq0NEWA6TsVkKnwMa5TF10= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.109.0/go.mod h1:Qz5ugyCxgcAiGjvp6UkJqMVtco6+d8VXj/6J6U7JVlo= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.109.0 h1:TmQ3+bkiAqWVfrkCZtB7m6adAVSXCUG2xiNpbo8cNnM= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.109.0/go.mod h1:VfAZTjcmn57mtI6McDC52+6LrioOu/ZR8helqsxHtyw= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.109.0 h1:3bhPg1t5iPi9Xbw6eVH6hFioSn8wmPFYLh19T0oszec= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.109.0/go.mod h1:h6WzA6ttU+iN1FL+BuqBIAxMf8e2RN6VoJ71p1VEezE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.109.0 h1:J7GI62EoqpI4qSgDI2CVJYaHCbQpSD1HIvUf6IMqHjk= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.109.0/go.mod h1:tmmrCWxZW7SHgLX+hg66ctE07idjb5fr/cvSirVBbfI= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.109.0 h1:szUDJ/1ZmaTH+Azt68pko10MXTIJtFm/orBD2MuxlGc= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.109.0/go.mod h1:1aJ+q3jFR+UVsitJF03xKrJ/+N8QyHIs9yWoRS85498= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.109.0 h1:T6rvvaY1PW5Oqwb3fhFy89UARRoveqtSLh6t5uvktes= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.109.0/go.mod h1:EWEI4jcMr9jXlBWTG77rqknzc3K+QObImve7y5vdnjs= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.109.0 h1:9mStsYv/9nnav/mftmHxEA6fp7c7mfd5CgU2802frjE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.109.0/go.mod h1:P7e6ch+uoSfxK+lMwfcndkHE6gWUqvWKpr7mD04KIAA= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.109.0 h1:k7uHhrznH4dYvzbaCRz5VgFyHzhd1NGow1s6504r6tA= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.109.0/go.mod h1:LfwqmbImTBZW5psp7tCyZPHIPy3Imwexq+K/A1NAhEY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.109.0 h1:Mi0qKcH4VjyyZsbaWYG038drk5FCFL7igVM8abEL4ZY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.109.0/go.mod h1:KvJWxR0bDk9Qh0ktw4gOFsd/ZrJ7p5KTAQueEJsaK9Q= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.109.0 h1:3kXFgdEEKw37ftdRC7SmXAiZuLahVavqOYRhlJVMLc8= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.109.0/go.mod h1:HtaWI5WJKJkBhHz2R7Xb2n7R3fdBPhfKieYcQajNCTo= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.109.0 h1:q3rHsRNnB97Xw2rjTBW1qpw6y+LP2xWSRbmTJtPIyQM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.109.0/go.mod h1:vo39/3CexkMcF+T0T8Ic/Oer/ErrSMiD+MWNBYo9VYE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.109.0 h1:YQB8+grNfmaLqiavbv4VKhBw1NF8O6pSmbLC+FjMrKM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.109.0/go.mod h1:XOuilD83ZQWc0Te2B7+X0dRm9Z19M4h480UXTPO41Xc= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.109.0 h1:mr94+h1RarvcZbsHOz8dzqIBwIEAoxbBBlsuguQyZTU= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.109.0/go.mod h1:/cJjT1Tsh3onIjeZlKH4Tc94HOvs7gDcdDwK3KKRUC4= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.109.0 h1:aBX4V/3T7gT16EnrpSO1lMGNFfhhAtDYJ336ELImLHo= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.109.0/go.mod h1:RjSpcrHZdWvZNyBQBxdgQmccuNAcoXc0WCuvyFghVr4= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.109.0 h1:CSYFxtxCBTF7BHbITx3g5ilxsjAI2Mn5nDHotnU4KXg= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.109.0/go.mod h1:D0jbiFn1iOXtc/lfotbBKayP3KWUIYdc00GmTFcsWds= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.109.0 h1:uQ0k6hoTMH7yvkqEN55p57otgn7TZWzBhj02SaJAtOM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.109.0/go.mod h1:S1STFk6+KETAhaOVaAsNUIEf1wRlNBOlMu/1vnIvW9A= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.109.0 h1:MXfuYf9ygtz77RvORnGPcD8WwcyBq0LOCv1mdJ89UsE= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.109.0/go.mod h1:T+WCLIq5mgjeliV9fBkkGIID4b132RZ9INtR8xv8nhY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.109.0 h1:r5mfEkON7NXqpf7Thch60nnhJVan7BdVKCx3Q5jB7fA= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.109.0/go.mod h1:i/U2BmC/pXlFsYIr1A8HjfNxnGVNy3EZpz8MTklbFPw= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.109.0 h1:kvkD4WCqpiix0XLkgw2oNcQCKIhnxEzXYRWvdzGThBk= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.109.0/go.mod h1:5Yd9ez2MklFD5BAhiA0bvbNwK/YbhCYzS305xvwGMLk= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.109.0 h1:D3L1PMvyZfzEDHOTNOmpCEqS67WZvrSS/GVxdWxWkaM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.109.0/go.mod h1:RVKq4ulQ7Rn6qP1eHM2wM++oKnmapRtkCQusAYxuxRk= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.109.0 h1:zGGn5F0WWcJ463P3lnt4r9KL/2A2QuP4hxa/tkWXKtM= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.109.0/go.mod h1:c/QB5T/ayynIPqx/yTAbUfaYH3uq8z+fMlmAHipqhfo= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.109.0 h1:rAYFkHgTrlxjWmO0TstlaKnG8D8ZkAhvgX66o72chBY= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.109.0/go.mod h1:e7aupeNVkFNxZy7KJxp+KkUPF4hq0X1/IfN6wKru2Lc= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.109.0 h1:pLMLndOzGLyE5WuN2a19My6ySYr6N/UtoM7IllRKKbw= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.109.0/go.mod h1:5954rquV2MrYB3VYIPmQhPdyOoxDKJfr0ymv0nF6kCY= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.109.0 h1:uKbTGjuQL9M7VTDuTxHC9UhrzDLLDxadotPtcBJwMBo= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.109.0/go.mod h1:57oMySxf38b9oXDLf4faUGTh62f5+nn3Gs1tIE2achI= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.109.0 h1:DtK1ww+a4GUwj5B/2qen45ePJG/VbdnrIuy3D7nmGGI= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.109.0/go.mod h1:fg599JS4SNwUzbWo16Cl36T2cvIPI7NYOX13cWkJga8= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.109.0 h1:lkAPT2Wje/4WnYYVajW4bv4Fbuajcw+9WzYb+C9ZpHc= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.109.0/go.mod h1:jwDh0L2ybXkAPmG4Rf5RYIAskfW81JX256s6HA9sAe8= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.109.0 h1:FvsCAzInSpYMQcC5yQQ0XDB5TzrX3UzvbIwcNqQVXyM= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.109.0/go.mod h1:7dkKbLs3o40JyLlwPdWRnD20VzlTBM4jPoFGxYAfT/k= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.109.0 h1:ZgXYukH/b3zlPBGNCsK/8AIiaRTAmYop2cRcnKCjJ4Y= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.109.0/go.mod h1:H6fo0u3QqJ25Yldpc5hfuiMHdc9s12InGdaUgF8rGd8= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.109.0 h1:WDxAwaifiK2/WxlfnQmMTrYrm34/izpAV7IqObwpK8Q= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.109.0/go.mod h1:bi0B5Ft+9EU7mX3N1PfXRFKIfe0ZCM7heU6oXLRVpD4= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.109.0 h1:98hBdWb8kcGefIuHmwfetnLfJEYeI3NzKJ5/O77OPCM= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.109.0/go.mod h1:aI6kcLfBi4eeqfDwdrHT7E1fhuxRRjeqwbQFitx2kP4= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.109.0 h1:nT8dSBamRSR8hLEtgjsKSyCX+rbU/i4ABYOuQpf8Nxw= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.109.0/go.mod h1:iP63ZUZIoPMqtPd9mE5d6/poECyKrrLggnEVIErJCGM= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.109.0 h1:gCEoavcQ0yVjA1CiYZlhnzeOdZ5bPsgFFwCoC/UUywA= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.109.0/go.mod h1:dpSIBopcBa4qZq7q7yxjp1xePzX+DAYPzZPYqp7oLSU= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.109.0 h1:+kh354oE1KoCUU0yDLFLnvO4twmSe8FJtiii6DbtTsY= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.109.0/go.mod h1:yByl4iylR4JKNVoW1erfSf844Wn89xN8Ajqz8Qqr2RA= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.109.0 h1:1Gk/rNb21b/1fUrhEeI4h1deoFtsBff6GU9WwaqUUYY= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.109.0/go.mod h1:VzghNte3h6Z8QH7JDkgQahFOFjD7n0K3/mxa0rp5ytc= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.109.0 h1:yci3vACUIsA6Jo5RssuZttfKx6ZIKMQoFZnVKON1KbM= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.109.0/go.mod h1:AEoTTctPV4aZKj29+Kcndz17DIRhQFIZJBBy89q7wlU= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.109.0 h1:PBg8KwyndTvJF+cvx1DS+u4tZsqA6lGy5DNW/aXe6x4= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.109.0/go.mod h1:FSU+HErJyo9pAxY0HJBEvsADFDFCLTO/cZArw8mKC4E= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.109.0 h1:6Q29ciD/uF5eLesRIjc1LvqjS1bK4FfK71Dy1kZLEts= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.109.0/go.mod h1:zFgCYFBzdn3DVWYtQHGTwr4uWPH5/cz+K08VxHU0stc= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.109.0 h1:gr9vlS5i/Zayn1ce9tO76WzX5PFhmuVgv1WXgNwW/4o= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.109.0/go.mod h1:shPdPVcFLYGOaNAkQtI4jz9DJ6sOKjIs0aomzYgkqZQ= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.109.0 h1:kB44Y4izlto8aKtsi6QSEXUaM9sZ6dv1EY/gEfv/XY4= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.109.0/go.mod h1:wiaJ2ThdDE9/RJrisHimkm7xTCpc4/CkVFuX+8EBiOE= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.109.0 h1:mJ/ADh7dfCBbo29Fo7BLZJ/aqLgaRPsJjPK+TRyxy7U= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.109.0/go.mod h1:6L541PkRlJq0MZkhcTyjBrtOI+KJXK4L7bdM7u2ay6E= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.109.0 h1:u4U+FR12TRThRT2TicKpJCOeXUuhmvhWjMwcqO/Ae9k= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.109.0/go.mod h1:PsKl5xT4Dsdzi5jZq03mfsJy3+9yRiZ1Ee0HdDDlSp0= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.109.0 h1:144F040xjSRvDmI7mvFjUzGTtYPG7TPah5zV7oG8qso= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.109.0/go.mod h1:LSXi23XBct5lxebBI7Dgl1g8G/A6bhJV6LdmomRQ7qo= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.109.0 h1:Z+0zxNfJ5W9IJ7DPoNgdVbscjNofM5NbMWM67ib2kBU= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.109.0/go.mod h1:bJcA0uNjmLpmVzH4mKCJqggEYZT8rbtU8xvDT6e54Co= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.109.0 h1:dFqyHd6kB706+lkpOmMg+RMbKkErHVi2I43hWMNyvzA= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.109.0/go.mod h1:oObkutfPm64G6XUXsnrcLOlYb/yGOZ2TYLYypdom3zc= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.109.0 h1:P9xupJ0uYwpJKT21wMAMwo8o2PNPYQYNsoBl4tGZRNU= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.109.0/go.mod h1:IwcaVNbhmvOhMp3nWV9wMWjmhwVL9kDuw2WVno/i1T4= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.109.0 h1:nJ1SAA9FyUSPT86BTP6kSSe/fVYNy3LOMw9C1EcU6uo= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.109.0/go.mod h1:x0MZ9pwQnFBwP/yI9vSDbRWPRlB5vnaZ8ll2RO5k6Eg= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.109.0 h1:+16yqBftEXjWNYxhaVIR2s+lY/Rt8vRxrOrGi5ia0NQ= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.109.0/go.mod h1:W35oH3QKCRRSrGlf1KdgC7CBP8L4Q10YAgQbBofDChQ= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.109.0 h1:PLS2Tn1cSyv7ourdAoPA4aAWaSva0WW5NkkC7nyp2Zg= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.109.0/go.mod h1:KejwVLZqfVprRa/FRikVIsw+DaWprc5CgG8W9iBKjfs= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.109.0 h1:qvOy775k8+gt8XUW8pYZpGc+XTn/lZNsTwDrLwSCm+U= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.109.0/go.mod h1:3+BGMuTn8HGAe1MF2WjYmte5VzG5aoZvs9h2d/Pj+5Y= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.109.0 h1:EsDmXd9q2yUUAWxplZWG5aOZdthquilbKtNprPokOeA= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.109.0/go.mod h1:sqwjLyjFSZyXzJGQ863KiPuStN/9Ho/oUNjjLMbBTcE= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.109.0 h1:Gy/uI2FnHtilKOBFSW3F9NOnNSrk07cpjWletUuWzS8= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.109.0/go.mod h1:ta/G4NgzQvhCt911c+8Wn8A9SDXy6ZbPHfwbz8LJLQg= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.109.0 h1:KtBPQWaKCS9nmG1cTbl1xROcd31+ziqrv28zlKwkiyo= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.109.0/go.mod h1:pRMfAbGQceDlttlVc15J5ushw+7QDhpJY9VT3SB6bQs= -github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.109.0 h1:cmOwOz4jZJll00ggp3VFV6HlQhDVGc+DHVE9FiUbTNE= -github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.109.0/go.mod h1:1ZuzJbuLgaL4jvh/ukbLHcx5OjL6i2qfxRTzGWPD+Vg= -github.com/open-telemetry/opentelemetry-collector-contrib/testbed/mockdatasenders/mockdatadogagentexporter v0.109.0 h1:rz+VOrWs//fvioLw6zC+cFxTnbmGDl4proqOEl7Wrpc= -github.com/open-telemetry/opentelemetry-collector-contrib/testbed/mockdatasenders/mockdatadogagentexporter v0.109.0/go.mod h1:ERpSJvVF//xKHZhA0jV2pIFOiTP4cyXcLnGefvwSWvs= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.115.0 h1:Xkfl44ZRgkz1EoCCYgwPomQkV+BrYOPvv9v1Kd1gZE4= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.115.0/go.mod h1:Sr/upBdJeJ7nxDfmCFCl9iHosXiPoQCPHkCJslDyoUA= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.115.0 h1:yBOpacgNInabTLtqH8rgdU0ajDOVgsZDfov9NY/SUoc= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.115.0/go.mod h1:u8zFCiorLO8eWq/IdDl/SQyr3apaVsQi8dMJXbPbOBg= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.115.0 h1:sO4fPw0NRUibgBVvQVTqPBCBRFh0I+ODIr3HAwcWezI= +github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.115.0/go.mod h1:HqzCXJ4rxXzWNYaUtCqJzXyTsCGEKSa/d+tHcyeRDY0= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.115.0 h1:u9QX4X0qZB3iyNZNZwf4YH8/dmGav+rEywnZdWcJdDk= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.115.0/go.mod h1:FuK6l/Il/8J0Df0p1jKVYAYiUBrWzxFZk2PQky6XvQE= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.115.0 h1:lkILPVa9OqVxPtCXdU5M0cg6BTta4XtIjTeH957Tsik= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.115.0/go.mod h1:XXKU0wGYRnJ0MZWmXJYdRQC8utZDFOhi8CRrKcI8DIA= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.115.0 h1:clj+zH4LIEddgVUuc7eqwDcatWVbE4wiQWFn+XCBFvk= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.115.0/go.mod h1:8Zx+0wnC6S/kV53H8Ki0lq+oY+in0RQGnskgkJ02Nd4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.115.0 h1:xA7t8AwlhU2t45haWN90XalRThQlEbVxqEMGj2jkLTA= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.115.0/go.mod h1:huvQlLtdqF+ia/nbUkUXMSKQ39zIY4i1pfJQTe+DE1A= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.115.0 h1:qtct9PsKONY6YOMc+QGBE/uGs8KMBcF6mvYJbyFHFt8= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.115.0/go.mod h1:OR9DKWrSRpfc3+CxwsL2QTOuHD03S9w0Jubi3EhTcy4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.115.0 h1:sVfc/ND4/Bp+r1U3zCucxz4U4kG0D4DpHnkJh8SCcxs= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.115.0/go.mod h1:X32RUqZJR51cpTFxrnNvRQaS9zRW3BA8+ul+CzlvGUU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.115.0 h1:ERZZn6Z3/nQVyzIWCSfGSH8im5v+NS3eOjc+F24ljvs= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.115.0/go.mod h1:PetcN/RbgdGEXdKy543/rwr/Vw1grrWJW1Fnf9szf6U= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.115.0 h1:hYFqbhrWi1vMPor3xZnKUHVdVjkkCzMe2pZlWa4sd3g= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.115.0/go.mod h1:NO3B0zn2KdZFVlOWQpV8kdHPoBz/2TKrOcIticasu5o= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.115.0 h1:s6wXer6CvXH856ezICs8+DcBG2ETOlY6AzrhN6v5qio= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.115.0/go.mod h1:TW+4e/jFKDx0DolzSb47J6SZ8VQi8E9JC2WXju6jIno= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.115.0 h1:fmLETJJDtb9zTjio+lsPqByXRiDjkL93C++9BiY3HvU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.115.0/go.mod h1:Hm/rw1kqx/jvupI4zIB6mCarmni12VGXm02Qeq8XDgQ= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.115.0 h1:+chjfzq/LX6e5KLBoOH5cMH0abARKdZZAR4Esl6i/N4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.115.0/go.mod h1:e6VtbMpfBlKdpjAgwyP4AG9sG1k8JqpMyK7DOMHg5nU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.115.0 h1:u7Ht+E1ghQESffcjyaxWrXGsfSWa1VE9LKC4f2PPx84= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.115.0/go.mod h1:r3iS2mDYu+cnGjgNc8TgvuUUAN6A6/1BvR1e1YJBrqM= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.115.0 h1:RXYLbv2uTJlJTJcEa5H8/fLdX419XUlbn6mjzEgTWxc= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.115.0/go.mod h1:ngeyITKu+koaagA/sFpnuT+x0nFVBNdWq60/h5buSr4= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.115.0 h1:OKZ7621PLOPS60NR793joAlPp6OVyrR0bQiBOymmFYM= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.115.0/go.mod h1:19AqiOGBL0OqT9Y36cvTsq3pynqPX3Eber86jJvDv8c= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.115.0 h1:QpEV5poZP1QGnhyLg8fcvvYuq9aDkwzv9A/Nv2KlXes= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.115.0/go.mod h1:2X7h1Wf+TOtiaDR5SnE2a0mBTtDoWd2oM03Zodh+kSI= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.115.0 h1:8nJPRhTno1IrOXq1FWPbAdZhG6SIFgVSTnojS2w9CLw= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.115.0/go.mod h1:6BHbZuWu1KXAYvHDx1Xv+Q9wpwAt4HhL1vxtKhiJwv8= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.115.0 h1:xsWDu5KqwkCdsLj0t7xLgnY4AOEf3Ngcg5xQIZongQ0= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.115.0/go.mod h1:pGRMJMicROceeevqlBUSsS5pPDHINaFLzX3THmRcDk0= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.115.0 h1:un39NY5vpr2th6fJeAeKRnNBxsc3UqV3RiMDuE/vSuc= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.115.0/go.mod h1:LS2OD4qu4tfBS2sU8BN/Rxb944z3fDmDtSw1tDcymxA= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.115.0 h1:tn4uJaBcj2HdCpnz4uFstgXFjaf3yGAw6ngawWTzy+A= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.115.0/go.mod h1:3M7eR1pUQxnJVJu+Nk1xdQ+ZScdS+KSmelpq6cjAKJo= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.115.0 h1:cmSOl8dexYz8/ZQGSYyGmeNgo3bxxDFuWQQ+XazbmL8= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.115.0/go.mod h1:qP0oNxkFOJqFZY6uGFJarhWziI+aqsov/0IRJkL85vg= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.115.0 h1:OmwyS3i+UFENIQizvmeC9kBtT1Rdchbeo0Ksl8ZNcGQ= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.115.0/go.mod h1:Z3VC/J++bjSNkzOJ2yDbBUBxA+nYi7Juk3p1dCsiKE4= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.115.0 h1:51D/x3xIAnWgVrY0lgdU+b+yb2aWd72uDqu9GhjRcNI= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.115.0/go.mod h1:nLau1YUdjhtLrk4jXLPb2l9riQ1Ap4xytTLl7MBedBg= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.115.0 h1:BtYrSkQSYGJufsmbqqrpzb+BJXH2S4CKL14i1bxOFCU= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.115.0/go.mod h1:4LQ1S3eBu+MyCNaCkBk0hIoAhvJJS851i/tY45FtDf4= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.115.0 h1:HVGG31WeB6Fn2+il2/ycWj9tDP0fxOeOqD1rKCjsBSc= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.115.0/go.mod h1:2hYojHs5daPVWECuZsPViKwty0ojuHUEmk8GEuaFqO0= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.115.0 h1:pZcKgTxza29XcYkfT4fwIRhg+ASz7kY64R3CVCohqIQ= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.115.0/go.mod h1:tAZJhSdNKRnR4kVXnoVc3IlOl2RuE8tK+uv60ez5Q1E= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.115.0 h1:4Ycg73pYVdiF+oq+BmUq7Dkg0WKeKvBSk9AOKvBe4LU= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.115.0/go.mod h1:l2Q+MmYk2ZRDSbhX9GlJYvBXC51AqhDJAj2ne290Xik= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.115.0 h1:Jh3XgGs4YBz0zCj6HU49gspyAjJUHf5DVCQTyw69FDw= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.115.0/go.mod h1:biiJzDxPevfbrnGaTZOU2I0f1zT3DWUGkpXdH/+uQ8k= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.115.0 h1:qfUo0NYFcKo3bK63o2FbGBmFWd7iHlXtwOEMgvb5RaM= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.115.0/go.mod h1:CCMkr9ZFAzjSY1SqRqXmpBjcY2qPYzu3dTPS72wBZwU= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.115.0 h1:DceAGbtG1BVqnA9kOsHDIs+o1ER+J51ayyDpu5c+B/M= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.115.0/go.mod h1:4HebVM9TmMpsxZAXLX5om998dTm1JUndjcpmhrnGkx4= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.115.0 h1:e8YcdSlrjt7RE6a9Fk+lNlqei8qv7l0TP/+7RlvDm7o= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.115.0/go.mod h1:sCx+2x6y1jjWGcXbgyP97Q+Himx84LlPZ9yWLgcV4vo= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.115.0 h1:SF3gOOEkfntE3zEhY80yO7BVQ5CkaK8ecic2U2AZPHE= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.115.0/go.mod h1:jeBzX5m8O9X0LQxiryV9sJUIrn+QAwOnCBE2wZWIltQ= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.115.0 h1:F34g3Vkkd+D7JS7oQT9epXjTR06Dpb8pblvSW0P0hkk= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.115.0/go.mod h1:kxuPS8JKnLVWie4PnL8iCoFx/mr89yR4VYFvJhlQfpY= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.115.0 h1:FjVyTJm0UQBMhWeuYOmK3BJtf93AbDKRScKGZ9Fk9ek= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.115.0/go.mod h1:G56rS4nL0VypkD7a94UaQmIjO5t0kffVcjbhpvSogww= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.115.0 h1:1iaHJTr8vp0M5PS/sEc+SspvfDcEKQ/hxg+y6zeUTqs= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.115.0/go.mod h1:wU2kNdrmD4b+5oTTCxOgMNPaG2yFYWk3Ab4fmj66LME= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.115.0 h1:m7SqhbTvMDKmO1Bw9ASfUYsiSmNa7vx/7/uSUYu5DCs= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.115.0/go.mod h1:F9ypvos3ttBxyH2uI23KXnUr2TnSpSRkQrnNMzEA0sI= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.115.0 h1:vRQQFD4YpasQFUAdF030UWtaflSYFXK542bfWMGhOK0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.115.0/go.mod h1:BZ7DT+0VkKR7P3I9PGEDfVa0GdB0ty41eEcejIUXF9A= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.115.0 h1:a36EJz/mb83f6ieX0v4fNDJ1jXqpeaM6DVQXeFDvdhw= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.115.0/go.mod h1:r5/40YO1eSP5ZreOmRzVOUtDr7YG39ZIUcVjHd+9Izc= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.115.0 h1:xITYM8BkEgs2Wf+PczOrVv0b1Fk4N929/xR9YtxLpkw= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.115.0/go.mod h1:m+5tYnZKfNDtnZKknOfssYSXBEL5Yqse4CJMpaY5kMk= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.115.0 h1:tFUm48xxdtuk3AgY5AY90DJ6UnxRW5k/HBpA24blCAo= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.115.0/go.mod h1:EI5GXHQVRNLx78DSyqSU8ZzIxQayUN7KlaeVChk5rJc= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.115.0 h1:h6zEsBtuZalQu7lKYf6ZCcj8fTocT+zxdmuOou9515Q= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.115.0/go.mod h1:6QU/K0dGCGYorkOvJmhbDFCspy4RPxRkFjf9I64y6I0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0 h1:f/HrZgTf6TF97v67uEZB3v2UtBT9aQojBvnloD3LOm4= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0/go.mod h1:Hp9uSq3qNJqdxu24u7RWyuPT9x1GgEUSx9US1LLeLi0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.115.0 h1:vXDJE8YHfAoYIAlPRtODchlqb6lWnGhJxPaT2ljvN7I= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.115.0/go.mod h1:f3IgMFHIjEUEI/I+5e3KWMPq9h2PSMy9WovmvPdmlb0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.115.0 h1:yXfwbXOAOEjaICnOb2raWD17jy9fwTXNoblS+3dBYZc= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.115.0/go.mod h1:5kMXT8uFeGzsIIocU1PjfzYwakbCbQquiferXmkw38g= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.115.0 h1:HURmseqTSAs8bTS6mQ+GyHsiI/C0lZHBYzOIKiaBXlw= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.115.0/go.mod h1:Ou5GidMD1Y1rZkXeeBKjGymsPs6vaB8ouY3z7lpMKDA= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.115.0 h1:4RoU3SlcNe6Dxyxfv8JVsrN8QgjBQ44Pkt9FLKK095I= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.115.0/go.mod h1:jfPlBpZT+hvp52Ldcx+srxaqyYuKxBkxOd3KtxbveCU= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.115.0 h1:8A+iBT5G23zvBPqYx32Qh4800jHFo4X9T1fpQKVQ+4E= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.115.0/go.mod h1:AhdPvwYKu7G8LKRWzHTNQYBq27RinsMm5qSanwSA/rU= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.115.0 h1:MuyDWyVoCty8HyP2CAYoRZXwINiThHovcC1Bj3+H8lk= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.115.0/go.mod h1:asekVnrdzYsMJBaJtIyXOt8p07l1x0xs8X3h00sZyf0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.115.0 h1:6GIJOSEIWBt9bprARMtTjRlENrwNsJl2UzbtjOBk7A0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.115.0/go.mod h1:/Fg/itwlAzDjyM0Sjenup9TbdOT+aVNPSqXsF80M8hw= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.115.0 h1:l4NBxl2AELPlyqupLu1IVAjtbGOEovaKEyt0UGMsuq8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.115.0/go.mod h1:j1qF1hE/Qcy2I655yXbf2ItezXok61OW+9AAxbH2ORw= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.115.0 h1:5mo0RdP0Hs3/QLoTwf9ilHc8x0CsfdQzGzMoGdDxiSQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.115.0/go.mod h1:iYgX5DFrPGvWSmKy4jOUanlsS3Rf/pV5vdX0jNFqs4s= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog v0.115.0 h1:WOqt8NpU/JPGYDR4CiWx7g/sHV6Oe9FChzhushwmVdo= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog v0.115.0/go.mod h1:wV/+iU7MyXcyTaY8K5Qx+1Z3yUzrxA40nydPQA476Iw= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.115.0 h1:l9AsnVHr3Sp4lAGFlBJ6Ochl7mlPE0d5MNd70o4qKEM= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.115.0/go.mod h1:kARk81QZpcX6L8x4fLo4Nr/z/+jpo5PxXtugBxF2DyE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.115.0 h1:Z9p78zj9Qblw472mGkPieuX7mqduAp47rzMbFfq5evI= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.115.0/go.mod h1:mtxUxJEIQy27MaGR1yzcn/OK8NoddEgb7fumpEbKYss= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.115.0 h1:7wjWEkvtP1oU2TNZzjo+5sY3GRvwhMhOJ9zFAeGGgo8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.115.0/go.mod h1:1q/L2R/28emNCz0EHfxEw853I6lPxTcHTqS+UrMea0k= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.115.0 h1:qdZ9EqmdM19pWhPoFA7VivBTdzP2HvNwXa3CCMHYoDQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.115.0/go.mod h1:mrL1MNrcg0zYAJ+aK9WtOH062dl2wN9DDG7mZk9H8v4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.115.0 h1:MerLKMrkM4YoGF6Di0D9yMXO02yCX8mrZAi/+jJVVeI= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.115.0/go.mod h1:R8AkVWe9G5Q0oMOapvm9HNS076E3Min8SVlmhBL3QD0= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.115.0 h1:WEqcnWSy9dNSlGb8pYRBX7zhaz2ReyaeImlenbzNTB4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.115.0/go.mod h1:6Mk71CakHUA3I6oM9hARDiyQypYyOolvb+4PFYyVEFg= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.115.0 h1:eoapW0JBablApkdv4C1RUuOKfz0U6SwuKMYYSAJH6fE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.115.0/go.mod h1:hW2AaybTRcwxJySGLC3Fh1vd2VDaQhRBfa7O7w30NS8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.115.0 h1:R9MRrO+dSkAHBQLZjuwjv2RHXHQqF2Wtm1Ki0VKD5cs= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.115.0/go.mod h1:rKXLXmwdUVcUHwTilroKSejbg3KSwLeYzNPSpkIEnv4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.115.0 h1:7tQ+WjojXhtWDFTJlwCvkjpvdTed5YkVKVQKVAu1alg= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.115.0/go.mod h1:iqgJP7+N03pOIOqYaKjVWYoIKweNdFivsvWJfFw6MTQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.115.0 h1:PmYiiOKopMdXl/WA0SxBEZFTiJVBuIpZrmRi4xvDzHI= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.115.0/go.mod h1:qBPBqhO1kCBCCu05bTbWCxAUNDqzPn6oALLIrQyHmZE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.115.0 h1:rrIm0dyEdaHmQo6udPK1V3opkzEKa0PrZzSdY5oGqmQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.115.0/go.mod h1:AMeisxL/9gs0bzozaymUqI1/EJ9GPvtnLh/BtqtjSF8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.115.0 h1:QchOTdiOIMctdoY3jl45eNUdUc9jo6N2u3ZayjCS/44= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.115.0/go.mod h1:NyQ+csnjEI1rKpYbMQfDm9bGs9nou6a8Uf5YomLa+zQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.115.0 h1:KghgAubxdDqP4eUQ+d2GzHXUAwtFxpSDToqFVnax0XA= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.115.0/go.mod h1:cW/BaYE6Uo7ZYHbmT0wVBktHP0SfeLqGHMf0qks7rOE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.115.0 h1:ioGiKiO0WqT3PxkzanuJsPVA24FItH6nTJeDeSMFpYA= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.115.0/go.mod h1:x1W4J+pzK/Bi9jjYBYESTsPq0nRJJLZoN7cPNd0vYSU= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.115.0 h1:y+Ystow5wnNQg/5yxx2AnWwtdUrKBTtdzTS3M+d1o8U= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.115.0/go.mod h1:UNQYkrGC0fQYoGCU/9ReJwWtTUCg3b37qrQj8BCWKOE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.115.0 h1:A9zqBtUJZ5J/0VI+B1dxuQhc2iVYpD9c54SgaKtFIN8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.115.0/go.mod h1:hG7GOrBBux/cg1fAUzvSlzYY02ekxjF9IvH4ls/nGXA= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.115.0 h1:hAsK9I081ShnSDSKPVEHB3TLawyOmbR6bPDiQEkgo2Y= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.115.0/go.mod h1:z8XdvlhXSYVboxS3TPGembE9kfxLAYH2PxPLMvf8wTk= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.115.0 h1:t3BGnPpmeuxW51vISSu51PrAs49ACBCa1Yl1NfZGE5Y= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.115.0/go.mod h1:jQLYyroEYEV1kWJApmGBgVuGUd73v+Q6EUJ6Wy7N508= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.115.0 h1:X6rEs7IxDpcDDBOCmkA3xHmc373UxHchH7BykK3Ao+o= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.115.0/go.mod h1:fmLLh7jL0uK/t8op9TieOz7pwxItl4hdFo2fX7U0Etg= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.115.0 h1:ficXJmB6l6kfiu+R6CmggtnlQWMHUNzu2csDYA4CFSs= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.115.0/go.mod h1:ykraxSeEVCuA43oqlMWnex78+vNQ+1dBTJUeInkqIpA= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.115.0 h1:QlisfzozR6a7wF+iIIjJC9YG1/btqrJANhrwUc3JiWI= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.115.0/go.mod h1:2DNBNDZbbk0rp3VDp1QcOfc5etsM1DnpFb7011rr2gg= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.115.0 h1:6RGhDlZkekmp12EvK6JV9fiIwrdZBOJID6/Ts9tXzL4= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.115.0/go.mod h1:qZRQtGr/DAjuBqAuKJMN2cWvc9RI94lB0Oq8UyGAduo= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.115.0 h1:XUstEF2/Rrx4aWwyke0QbXxyMsD/dN3Ej8sxxz3bE1g= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.115.0/go.mod h1:JnloihIXG9SsX8ITiGsNqviZvZTi2WBO23NVtdrVrks= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.115.0 h1:4qQKdEV5b2Mr6U1FYdOHY5ewVnNyNok/unHXPznwYXA= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.115.0/go.mod h1:FF5YKDPWjQp/D7jLSgs5fl1iAJ51gZ8eegR1yfieGRM= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.115.0 h1:vwZQ7k8oqlK0bdZYTsjP/59zjQQfjSD4fNsWIWsTu2w= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.115.0/go.mod h1:5ObSa9amrbzbYTdAK1Qhv3D/YqCxxnQhP0sk2eWB7Oo= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.115.0 h1:jQ6mIXhWqXhl8MPun9soNynsQ0lpOpOYQyAnQ28F014= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.115.0/go.mod h1:oRxNwm6HN7ckp4aJOAFC8BVBPa0UDhB8vNGTFL3QBJg= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.115.0 h1:KbfjEsr2d/5TGWHvcaBC3lOpYAnquEraLXcis4IamAs= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.115.0/go.mod h1:fmtZPK5RIz+2Lcm9xQZuwiM+M8/juSSeJufSxUT+J9w= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.115.0 h1:iT04H54PeygRCV/pUe3Rndai2Uf3LyiXsjueeEaq3vU= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.115.0/go.mod h1:9mCy+uOqybQlQSuR+KGxWFgdk+/YzHvHMz/k/ph1ncE= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.115.0 h1:olyiml73slGYORDjZNViW3nKiysC+K+h5yPsSBjUxQ4= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.115.0/go.mod h1:N00k1mTxzfS2clqxSP4Dxk7iX8GWbbuCq6LF8/ECk/M= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.115.0 h1:sLRTfXUFiqJ5Qe/NN5MUJxTaFt46E0Y/xjSY+KesCQc= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.115.0/go.mod h1:361IqXD4jnfs6G+Yn7978uv1UNozhZo4yBYy4p6Nqzc= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.115.0 h1:veprz/l+6CLoLVPcml4jp9tYC7qZOngILn9WxUlJN1g= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.115.0/go.mod h1:xr5dRxiVr/46rSiAEn8Y5V8+0n8crZsV9QuWR9VBfME= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.115.0 h1:9UHE7iTYDxUjKVd56bPqeMcci8T8M12RuAZZpijkQu0= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.115.0/go.mod h1:LDlwPxalBANVRNnAqHJfIp0XQ8TrQC9tuTKcYAl1Ns4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.115.0 h1:jBA6xZq8nPrbiEbROFlCaJC7JOR1OfqzY3hg80IZQHI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.115.0/go.mod h1:r1QANrkY2hGAQssHsGmt8+wvKZT3q41wQNQJI430T7I= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.115.0 h1:U7dgFSZv5B1O2plr3DHvLvobsnHnzm+cToLLDmfEono= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.115.0/go.mod h1:7FNYF6db+ix1e3mpa6Y7Di3nx6/yLhTBiJ5fD1+Tu0w= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.115.0 h1:Py++5X9X8n+o5iqqcGMBiFhd0u2BztCIpnFuLojuLHI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.115.0/go.mod h1:OAevKtcf0BTdlH573M4JA6r5SpmWieZCotayixYL9jU= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.115.0 h1:uAtUoqKIFVvmRCQ8y/rJjT3cPakcVIE1pruI1elmliA= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver v0.115.0/go.mod h1:Q0EZ2e/xqleucMQk/+xf2m86yxkcTV6Zfwyz9bvrDA0= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.115.0 h1:JSFnfWwlVGLul8p9DE6Sk6E0zaqCvbys7CqvJQD4MIs= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.115.0/go.mod h1:cw0qzwXzKKxM7QyDcNSp9OSDLySVXyaSrgdqWPqlDk8= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.115.0 h1:XDlXWa6pdAp02kdfZdzZ0cjeZMNHjI7dj2dNgKdzOfo= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.115.0/go.mod h1:Zo6YARAWAMCdlUmyKBq0EcuKmLjxfC2hUNd3jIAFsWE= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.115.0 h1:hYNlyUj3F43cuv1ap19NlEEchQfs91vYeNoQ1+nswLo= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.115.0/go.mod h1:1o6wF5HJdpb2hd2eGMoQhGuTKb4F2+j/IHBJJSPdM2w= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.115.0 h1:satJaDP5SjwFKLPa5UxBg3MIUJQ2NQ+4bTO88n0SW0g= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.115.0/go.mod h1:1NZE+dWHRux5kN0fI1w57AbHzqL4xVniD0X6HPeFwHU= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.115.0 h1:/1+B9AmzNDEQn54L9b364ItEJ1uWNL3ozHBzHLxbhy8= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.115.0/go.mod h1:Ac2KWWH8FKl74onXut8O0gb9GUM267b505grf7udh1Y= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.115.0 h1:GIyMUiud3T8nyCJP9KVhxVKvfcNQRBCde5uTCl6K/i0= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.115.0/go.mod h1:x4hCznyUolxGt5cE/uXWRCckdIDrUYqH5hJddvdKZd4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.115.0 h1:5PueOkHjC4aCFtjmbN5nPyB2Pcad9LZSUQt10Me3E6w= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.115.0/go.mod h1:opWWZRYe5C/ErOviHO2zwwauV0VnuAJFQ8Vu+UxpQ/g= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.115.0 h1:McHRAaPXx8FN6gXnRPnNaDSPAsPc/WRCvA0HhL15iLM= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.115.0/go.mod h1:FDCqM9AnvMJX2Gu0O9ARrg+nhqHIVgJZzQhWTF0xASw= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.115.0 h1:3BJLq6lX2P+RoJ0vSW7sAeGXFKbUw3m57EQ+g+mYnzQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.115.0/go.mod h1:2SetZwljaevaRr6Ek1zvzQaFkTxcNYcMcakLdtU/sTI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.115.0 h1:zBzHPDgDHLmFyJzjiBq7Z7IwbcHiotmnBJNP29Hxm1Q= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.115.0/go.mod h1:Utdu9cbK7qZ1cDsvBCttJyoEe12fx62GbzCB6/hl4FQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.115.0 h1:CKe2VcoFEx0i5JUxdx8ktM5pJltIIxfTOlzFC5fV6X4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.115.0/go.mod h1:TlRqvW5zVebmmJabC762bnWjGT0BHHwrbiRtDli7rUI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.115.0 h1:h/HAHLIZnIyu85l8wOeggOyiI8z8citNAqxQktVKUpk= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.115.0/go.mod h1:iEU0NA/i2sUREqD19JYmjKwrjMUTcddad/h1LGdSMHw= +github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.115.0 h1:wff2fs3/Fh1OQiVTfa1cUz2JYKx7c+caC1GdSOR8B3s= +github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.115.0/go.mod h1:xNnO+NLBOQvW78RpBg/ruxRLFbZ2tL2KIchGoVOhfWc= +github.com/open-telemetry/opentelemetry-collector-contrib/testbed/mockdatasenders/mockdatadogagentexporter v0.115.0 h1:HwsDEWDF1I9NdQjyLaYM/GdpnWo5MmcFLuRXMMP5a8Y= +github.com/open-telemetry/opentelemetry-collector-contrib/testbed/mockdatasenders/mockdatadogagentexporter v0.115.0/go.mod h1:iPL1vGn8YbmXU2qM/7omBd3zmKON1oL8qcl7zfzAoS0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -1116,8 +1134,8 @@ github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= 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= @@ -1147,8 +1165,8 @@ github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= -github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1162,8 +1180,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.57.0 h1:Ro/rKjwdq9mZn1K5QPctzh+MA4Lp0BuYk5ZZEVhoNcY= -github.com/prometheus/common v0.57.0/go.mod h1:7uRPFSUTbfZWsJ7MHY56sqt7hLQu3bxXHDnNhl8E9qI= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1179,14 +1197,14 @@ github.com/prometheus/prometheus v0.54.1/go.mod h1:xlLByHhk2g3ycakQGrMaU8K7OySZx github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/relvacode/iso8601 v1.4.0 h1:GsInVSEJfkYuirYFxa80nMLbH2aydgZpIf52gYZXUJs= -github.com/relvacode/iso8601 v1.4.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= +github.com/relvacode/iso8601 v1.6.0 h1:eFXUhMJN3Gz8Rcq82f9DTMW0svjtAVuIEULglM7QHTU= +github.com/relvacode/iso8601 v1.6.0/go.mod h1:FlNp+jz+TXpyRqgmM7tnzHHzBnz776kmAH2h3sZCn0I= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1209,16 +1227,16 @@ github.com/shirou/gopsutil v2.20.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.11 h1:WaU9xqGFKvFfsUv94SXcUPD7rCkU0vr/asVdQOBZNj8= +github.com/shirou/gopsutil/v4 v4.24.11/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= -github.com/signalfx/sapm-proto v0.14.0 h1:KWh3I5E4EkelB19aP1/54Ik8khSioC/RVRW/riOfRGg= -github.com/signalfx/sapm-proto v0.14.0/go.mod h1:Km6PskZh966cqNoUn3AmRyGRix5VfwnxVBvn2vjRC9U= +github.com/signalfx/sapm-proto v0.17.0 h1:KY+9zm/yDOq6uzaguI1RmrJcWxzbkGv0zE6GplA3ytc= +github.com/signalfx/sapm-proto v0.17.0/go.mod h1:c8fGx9DjGP7Hqif7g6Zy6E+BCMXK/dERFU2b3faA0gk= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -1270,8 +1288,9 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= @@ -1288,11 +1307,11 @@ github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhso github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= github.com/tidwall/tinylru v1.2.1 h1:VgBr72c2IEr+V+pCdkPZUwiQ0KJknnWIYbhxAVkYfQk= github.com/tidwall/tinylru v1.2.1/go.mod h1:9bQnEduwB6inr2Y7AkBP7JPgCkyrhTV/ZpX0oOOpBI4= -github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= -github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= +github.com/tidwall/wal v1.1.8 h1:2qDSGdAdjaY3PEvHRva+9UFqgk+ef7cOiW1Qn5JH1y0= +github.com/tidwall/wal v1.1.8/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.2.0 h1:0uKB/662twsVBpYUPbokj4sTSKhWFKB7LopO2kWK8lY= -github.com/tinylib/msgp v1.2.0/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= +github.com/tinylib/msgp v1.2.4 h1:yLFeUGostXXSGW5vxfT5dXG/qzkn4schv2I7at5+hVU= +github.com/tinylib/msgp v1.2.4/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= @@ -1359,158 +1378,186 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector v0.109.0 h1:ULnMWuwcy4ix1oP5RFFRcmpEbaU5YabW6nWcLMQQRo0= -go.opentelemetry.io/collector v0.109.0/go.mod h1:gheyquSOc5E9Y+xsPmpA+PBrpPc+msVsIalY76/ZvnQ= -go.opentelemetry.io/collector/client v1.15.0 h1:SMUKTntljRmFvB8nCVf6KjbEQ/qm63wi+huDx+Bc/po= -go.opentelemetry.io/collector/client v1.15.0/go.mod h1:m0MdKbzRIVgyGu70qbJ6TwBmKtblk7cmPqspM45a5yY= -go.opentelemetry.io/collector/component v0.109.0 h1:AU6eubP1htO8Fvm86uWn66Kw0DMSFhgcRM2cZZTYfII= -go.opentelemetry.io/collector/component v0.109.0/go.mod h1:jRVFY86GY6JZ61SXvUN69n7CZoTjDTqWyNC+wJJvzOw= -go.opentelemetry.io/collector/component/componentprofiles v0.109.0 h1:W+IHaK1SdExcp3lmb454Y6v+JArsWHD0gsoBiX+dKNY= -go.opentelemetry.io/collector/component/componentprofiles v0.109.0/go.mod h1:rmD8l1mpJULa3UFi/2c62Mij3QNH00BzQ05ZkfQqNYc= -go.opentelemetry.io/collector/component/componentstatus v0.109.0 h1:LiyJOvkv1lVUqBECvolifM2lsXFEgVXHcIw0MWRf/1I= -go.opentelemetry.io/collector/component/componentstatus v0.109.0/go.mod h1:TBx2Leggcw1c1tM+Gt/rDYbqN9Unr3fMxHh2TbxLizI= -go.opentelemetry.io/collector/config/configauth v0.109.0 h1:6I2g1dcXD7KCmzXWHaL09I6RSmiCER4b+UARYkmMw3U= -go.opentelemetry.io/collector/config/configauth v0.109.0/go.mod h1:i36T9K3m7pLSlqMFdy+npY7JxfxSg3wQc8bHNpykLLE= -go.opentelemetry.io/collector/config/configcompression v1.15.0 h1:HHzus/ahJW2dA6h4S4vs1MwlbOck27Ivk/L3o0V94UA= -go.opentelemetry.io/collector/config/configcompression v1.15.0/go.mod h1:pnxkFCLUZLKWzYJvfSwZnPrnm0twX14CYj2ADth5xiU= -go.opentelemetry.io/collector/config/configgrpc v0.109.0 h1:LyaX6l7QhxaBzHJRNuZxtQ7P4iSu0/5pY9lt6En0RwQ= -go.opentelemetry.io/collector/config/configgrpc v0.109.0/go.mod h1:nrwFbaSSrRRb3VJPign40ALOZQ3LH4fOCYLJRZU4/1k= -go.opentelemetry.io/collector/config/confighttp v0.109.0 h1:6R2+zI1LqFarEnCL4k+1DCsFi+aVeUTbfFOQBk0JBh0= -go.opentelemetry.io/collector/config/confighttp v0.109.0/go.mod h1:fzvAO2nCnP9XRUiaCBh1AZ2whUf99iQTkEVFCyH+URk= -go.opentelemetry.io/collector/config/confignet v0.109.0 h1:/sBkAzkNtVFLWb38bfgkmkJXIBi4idayDmP4xaA2BDk= -go.opentelemetry.io/collector/config/confignet v0.109.0/go.mod h1:o3v4joAEjvLwntqexg5ixMqRrU1+Vst+jWuCUaBNgOg= -go.opentelemetry.io/collector/config/configopaque v1.15.0 h1:J1rmPR1WGro7BNCgni3o+VDoyB7ZqH2/SG1YK+6ujCw= -go.opentelemetry.io/collector/config/configopaque v1.15.0/go.mod h1:6zlLIyOoRpJJ+0bEKrlZOZon3rOp5Jrz9fMdR4twOS4= -go.opentelemetry.io/collector/config/configretry v1.15.0 h1:4ZUPrWWh4wiwdlGnss2lZDhvf1xkt8uwHEqmuqovMEs= -go.opentelemetry.io/collector/config/configretry v1.15.0/go.mod h1:KvQF5cfphq1rQm1dKR4eLDNQYw6iI2fY72NMZVa+0N0= -go.opentelemetry.io/collector/config/configtelemetry v0.109.0 h1:ItbYw3tgFMU+TqGcDVEOqJLKbbOpfQg3AHD8b22ygl8= -go.opentelemetry.io/collector/config/configtelemetry v0.109.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= -go.opentelemetry.io/collector/config/configtls v1.15.0 h1:imUIYDu6lo7juxxgpJhoMQ+LJRxqQzKvjOcWTo4u0IY= -go.opentelemetry.io/collector/config/configtls v1.15.0/go.mod h1:T3pOF5UemLzmYgY7QpiZuDRrihJ8lyXB0cDe6j1F1Ek= -go.opentelemetry.io/collector/config/internal v0.109.0 h1:uAlmO9Gu4Ff5wXXWWn+7XRZKEBjwGE8YdkdJxOlodns= -go.opentelemetry.io/collector/config/internal v0.109.0/go.mod h1:JJJGJTz1hILaaT+01FxbCFcDvPf2otXqMcWk/s2KvlA= -go.opentelemetry.io/collector/confmap v1.15.0 h1:KaNVG6fBJXNqEI+/MgZasH0+aShAU1yAkSYunk6xC4E= -go.opentelemetry.io/collector/confmap v1.15.0/go.mod h1:GrIZ12P/9DPOuTpe2PIS51a0P/ZM6iKtByVee1Uf3+k= -go.opentelemetry.io/collector/confmap/provider/envprovider v1.15.0 h1:QK4S0CY3l7aJ3EJdrM1Bm4fVQoF285RgdrXdKKpMz1U= -go.opentelemetry.io/collector/confmap/provider/envprovider v1.15.0/go.mod h1:/syocs/ODZitkUDojxDNPSPWfEC84q+XGzrXq1bkb9k= -go.opentelemetry.io/collector/confmap/provider/fileprovider v1.15.0 h1:qO9sgYUYHeASlH+hqf9uUj6NcN+WjB2ZglhsU1VPb6M= -go.opentelemetry.io/collector/confmap/provider/fileprovider v1.15.0/go.mod h1:mPK7NOS3NCLpPM+g9vul6esU5bYttauDNi3lcC47jG8= -go.opentelemetry.io/collector/confmap/provider/httpprovider v0.109.0 h1:AXb7Sr5xKaQt3MPCvbpk2gv3cmjHZuQhhAbpjpMNod8= -go.opentelemetry.io/collector/confmap/provider/httpprovider v0.109.0/go.mod h1:TY9njdV+TW5jRUvCZUPOboKUNEr1xzB/e4ZjEPIPdTc= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.109.0 h1:5COuB/kJZM/O5Vb3UmKkRr7g3E69tP+ePvNmY+Au+Es= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.109.0/go.mod h1:QKnaYuai5C5wDRoPVtLSkaz9ruH+HAnUzr3zOG2hgKU= -go.opentelemetry.io/collector/connector v0.109.0 h1:5U6uJETP4x9pkYAJTJsN4S9c4cjmd0tLZwzdZ/8Mscc= -go.opentelemetry.io/collector/connector v0.109.0/go.mod h1:/OXMHga1Cu9wNp+AOxxgekMQeccMN42Q73xScm+C62M= -go.opentelemetry.io/collector/connector/connectorprofiles v0.109.0 h1:v0fl+nxF5AEC91v8jLgLZ07D4vv5lgJ9jGJdVyIMx10= -go.opentelemetry.io/collector/connector/connectorprofiles v0.109.0/go.mod h1:s+qrtOxWWsh631GmD5rhMAgWA0DWaOk0F310leKqN4Y= -go.opentelemetry.io/collector/consumer v0.109.0 h1:fdXlJi5Rat/poHPiznM2mLiXjcv1gPy3fyqqeirri58= -go.opentelemetry.io/collector/consumer v0.109.0/go.mod h1:E7PZHnVe1DY9hYy37toNxr9/hnsO7+LmnsixW8akLQI= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.109.0 h1:+WZ6MEWQRC6so3IRrW916XK58rI9NnrFHKW/P19jQvc= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.109.0/go.mod h1:spZ9Dn1MRMPDHHThdXZA5TrFhdOL1wsl0Dw45EBVoVo= -go.opentelemetry.io/collector/consumer/consumertest v0.109.0 h1:v4w9G2MXGJ/eabCmX1DvQYmxzdysC8UqIxa/BWz7ACo= -go.opentelemetry.io/collector/consumer/consumertest v0.109.0/go.mod h1:lECt0qOrx118wLJbGijtqNz855XfvJv0xx9GSoJ8qSE= -go.opentelemetry.io/collector/exporter v0.109.0 h1:LsZ8/EB8cYvdgap3a8HWCEHYpVyH9A4d53Hy0W6n9KY= -go.opentelemetry.io/collector/exporter v0.109.0/go.mod h1:yk+qAB1ZJYoUYretkzbNt/onpy/VyQdTpPhvIbyh3Us= -go.opentelemetry.io/collector/exporter/debugexporter v0.109.0 h1:w/bKcIFy5HwjbtjyLtZ8lcKfKUs+E2o8Dk8qQcJrzpI= -go.opentelemetry.io/collector/exporter/debugexporter v0.109.0/go.mod h1:KN7xarQB/PgxQ0LazfWtx/ODmRVFNIoFFuWJWRZl2+k= -go.opentelemetry.io/collector/exporter/exporterprofiles v0.109.0 h1:px+iViqF0JB6+COJL6cTSa0HLpJRNlPmFUA6zjOCKMk= -go.opentelemetry.io/collector/exporter/exporterprofiles v0.109.0/go.mod h1:Zs5z/fdsRN3v9mChU2aYNGzUAJgY+2D+T7ZRGiZ3lmY= -go.opentelemetry.io/collector/exporter/loggingexporter v0.109.0 h1:AXcQt90JHLhd4ZsQhPcCm3gbduttqPTRHCAEdFNslW8= -go.opentelemetry.io/collector/exporter/loggingexporter v0.109.0/go.mod h1:Tf7wYjg8EGk5AlteOyfBfxAs6sXtNfGaBUWEau9sZ0w= -go.opentelemetry.io/collector/exporter/otlpexporter v0.109.0 h1:T0yQXSxFnl0mN8tUpR9i3bgDWFQqXRg7N3VCvYQIFcc= -go.opentelemetry.io/collector/exporter/otlpexporter v0.109.0/go.mod h1:5UWl8qL4EbNqTFGvJ9y0GjYTap03UtJbMhuJO9LJGfM= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.109.0 h1:FTN1KRg4vZt5ZArEjHINTieHCX36kEk/QFHXo1Xs+/Q= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.109.0/go.mod h1:ejCuRQHv6D++sKco4K76nJwfS3gAqiZZQuStJ2y9TE4= -go.opentelemetry.io/collector/extension v0.109.0 h1:r/WkSCYGF1B/IpUgbrKTyJHcfn7+A5+mYfp5W7+B4U0= -go.opentelemetry.io/collector/extension v0.109.0/go.mod h1:WDE4fhiZnt2haxqSgF/2cqrr5H+QjgslN5tEnTBZuXc= -go.opentelemetry.io/collector/extension/auth v0.109.0 h1:yKUMCUG3IkjuOnHriNj0nqFU2DRdZn3Tvn9eqCI0eTg= -go.opentelemetry.io/collector/extension/auth v0.109.0/go.mod h1:wOIv49JhXIfol8CRmQvLve05ft3nZQUnTfcnuZKxdbo= -go.opentelemetry.io/collector/extension/ballastextension v0.108.1 h1:HmuvkGN2s5hnviVZ62CRM7XbGOWcVjlp3L6VOZEvaTc= -go.opentelemetry.io/collector/extension/ballastextension v0.108.1/go.mod h1:Yu2jtjK7RD8Ie13N06rQMtGbLqWySmPEPEZoJdS9DT4= -go.opentelemetry.io/collector/extension/experimental/storage v0.109.0 h1:kIJiOXHHBgMCvuDNA602dS39PJKB+ryiclLE3V5DIvM= -go.opentelemetry.io/collector/extension/experimental/storage v0.109.0/go.mod h1:6cGr7MxnF72lAiA7nbkSC8wnfIk+L9CtMzJWaaII9vs= -go.opentelemetry.io/collector/extension/extensioncapabilities v0.109.0 h1:gwLiFySAlYvaaITqmF3EkblrxwcfaDxntUmflf3YdrA= -go.opentelemetry.io/collector/extension/extensioncapabilities v0.109.0/go.mod h1:4zf6xx0Qtv9OHJg599Ah48URgpNCPP6tiSakwIRcRfk= -go.opentelemetry.io/collector/extension/zpagesextension v0.109.0 h1:ckD3J8GIMagfAxwNOhwvdvZIK9ve5lXjWhauk/knSbo= -go.opentelemetry.io/collector/extension/zpagesextension v0.109.0/go.mod h1:bp2ZFqesXpE0omutODQoRaHcMsY+SjNAScfQurUb1lM= -go.opentelemetry.io/collector/featuregate v1.15.0 h1:8KRWaZaE9hLlyMXnMTvnWtUJnzrBuTI0aLIvxqe8QP0= -go.opentelemetry.io/collector/featuregate v1.15.0/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= -go.opentelemetry.io/collector/filter v0.109.0 h1:kXRV/YzGH4+Udy3sZYm5AooazqZx8tChGE+mL2DQEBU= -go.opentelemetry.io/collector/filter v0.109.0/go.mod h1:KowpGOq69yMhlC9mjEMjgWPUeZ/aCPXV1ConIcpqUQo= -go.opentelemetry.io/collector/internal/globalgates v0.109.0 h1:hBnxv0qtYJtsxZKr5evieX+VKZ7DcC22p5KFxeX1cGM= -go.opentelemetry.io/collector/internal/globalgates v0.109.0/go.mod h1:R5E97bZTG+IimHwxKbZBXMvooDXVboUjUMG1omkQti8= -go.opentelemetry.io/collector/otelcol v0.109.0 h1:x7hcrV3lnCg7Ub0Q5haLRFWmqS3mPiqEPOLkOS18VNg= -go.opentelemetry.io/collector/otelcol v0.109.0/go.mod h1:LR2qca0GFWd2yZFBaSTpTIPqnAXJM3gmes++nZNx4ms= -go.opentelemetry.io/collector/otelcol/otelcoltest v0.109.0 h1:j1jEq+iBfzc2XrFZphQOz2VoYlsOLqZFnBTWZfTq+yU= -go.opentelemetry.io/collector/otelcol/otelcoltest v0.109.0/go.mod h1:Fcacbap4v39ymbW6AlgZQUqcQm+YMo2rO9izv66IpwQ= -go.opentelemetry.io/collector/pdata v1.15.0 h1:q/T1sFpRKJnjDrUsHdJ6mq4uSqViR/f92yvGwDby/gY= -go.opentelemetry.io/collector/pdata v1.15.0/go.mod h1:2wcsTIiLAJSbqBq/XUUYbi+cP+N87d0jEJzmb9nT19U= -go.opentelemetry.io/collector/pdata/pprofile v0.109.0 h1:5lobQKeHk8p4WC7KYbzL6ZqqX3eSizsdmp5vM8pQFBs= -go.opentelemetry.io/collector/pdata/pprofile v0.109.0/go.mod h1:lXIifCdtR5ewO17JAYTUsclMqRp6h6dCowoXHhGyw8Y= -go.opentelemetry.io/collector/pdata/testdata v0.109.0 h1:gvIqy6juvqFET/6zi+zUOH1KZY/vtEDZW55u7gJ/hEo= -go.opentelemetry.io/collector/pdata/testdata v0.109.0/go.mod h1:zRttU/F5QMQ6ZXBMXCoSVG3EORTZLTK+UUS0VoMoT44= -go.opentelemetry.io/collector/processor v0.109.0 h1:Pgo9hib4ae1FSA47RB7TUUS26nConIlXcltzbxrjFg8= -go.opentelemetry.io/collector/processor v0.109.0/go.mod h1:Td43GwGMRCXin5JM/zAzMtLieobHTVVrD4Y7jSvsMtg= -go.opentelemetry.io/collector/processor/batchprocessor v0.109.0 h1:WqFGXId61sX91Og0VC7WjeR58Qv+YCsbLt3/Q1w3H8k= -go.opentelemetry.io/collector/processor/batchprocessor v0.109.0/go.mod h1:+aZMsL25etcyFTF6jIJwVv99OYE2JfnxQXGIKjIOY3M= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.109.0 h1:wXMvSe4OizuOPbp59xGj4CYYvvqGZaFcTtZSJ7RRnGw= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.109.0/go.mod h1:ewP8+ghUVT0O5+A6VU7SIlU5uDxkeiVwt/aI4Gbbpzs= -go.opentelemetry.io/collector/processor/processorprofiles v0.109.0 h1:+w0vqF30eOskfpcIuZLAJb1dCWcayBlGWoQCOUWKzf4= -go.opentelemetry.io/collector/processor/processorprofiles v0.109.0/go.mod h1:k7pJ76mOeU1Fx1hoVEJExMK9mhMre8xdSS3+cOKvdM4= -go.opentelemetry.io/collector/receiver v0.109.0 h1:DTOM7xaDl7FUGQIjvjmWZn03JUE+aG4mJzWWfb7S8zw= -go.opentelemetry.io/collector/receiver v0.109.0/go.mod h1:jeiCHaf3PE6aXoZfHF5Uexg7aztu+Vkn9LVw0YDKm6g= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.109.0 h1:zqDh6B9hgrrU5gnv7GBg5mvIcgYNc5plKcUzSm8ZvmU= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.109.0/go.mod h1:lRRYeYtzzNrY/Sy9FD59Hcw+RH3k+Wq110DYS5bfxgQ= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.109.0 h1:KKzdIixE/XJWvqdCcNWAOtsEhNKu4waLKJjawjhnPLw= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.109.0/go.mod h1:FKU+RFkSLWWB3tUUB6vifapZdFp1FoqVYVQ22jpHc8w= -go.opentelemetry.io/collector/semconv v0.109.0 h1:6CStOFOVhdrzlHg51kXpcPHRKPh5RtV7z/wz+c1TG1g= -go.opentelemetry.io/collector/semconv v0.109.0/go.mod h1:zCJ5njhWpejR+A40kiEoeFm1xq1uzyZwMnRNX6/D82A= -go.opentelemetry.io/collector/service v0.109.0 h1:kL0qiY1AJSpQgFdLSAZXb/vsyauWhNaBrQ3Uk/xAx3Q= -go.opentelemetry.io/collector/service v0.109.0/go.mod h1:lpOCtSftIcuiTZleqGPHWU2g7hpsJPrlwBT1a16sBew= -go.opentelemetry.io/contrib/config v0.9.0 h1:AJ1c6+vJ6SxvqBBhsi2RhLFMlc6SnJOg81Jp4toFyNw= -go.opentelemetry.io/contrib/config v0.9.0/go.mod h1:u/u2L6y/c8GKrq/AP51sfXV4Eu24btVlC3A5f867xwg= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= -go.opentelemetry.io/contrib/propagators/b3 v1.29.0 h1:hNjyoRsAACnhoOLWupItUjABzeYmX3GTTZLzwJluJlk= -go.opentelemetry.io/contrib/propagators/b3 v1.29.0/go.mod h1:E76MTitU1Niwo5NSN+mVxkyLu4h4h7Dp/yh38F2WuIU= -go.opentelemetry.io/contrib/zpages v0.54.0 h1:tSfm/LEK5E46sd5qx/Y9o4iQ65ipLubV0Una7veXFlA= -go.opentelemetry.io/contrib/zpages v0.54.0/go.mod h1:sbe4/RH3CFKkdM5zuGwfziKjvkqUOK9hSgLFckiVZUI= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.5.0 h1:4d++HQ+Ihdl+53zSjtsCUFDmNMju2FC9qFkUlTxPLqo= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.5.0/go.mod h1:mQX5dTO3Mh5ZF7bPKDkt5c/7C41u/SiDr9XgTpzXXn8= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.29.0 h1:k6fQVDQexDE+3jG2SfCQjnHS7OamcP73YMoxEVq5B6k= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.29.0/go.mod h1:t4BrYLHU450Zo9fnydWlIuswB1bm7rM8havDpWOJeDo= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.29.0 h1:xvhQxJ/C9+RTnAj5DpTg7LSM1vbbMTiXt7e9hsfqHNw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.29.0/go.mod h1:Fcvs2Bz1jkDM+Wf5/ozBGmi3tQ/c9zPKLnsipnfhGAo= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 h1:dIIDULZJpgdiHz5tXrTgKIMLkus6jEFa7x5SOKcyR7E= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0/go.mod h1:jlRVBe7+Z1wyxFSUs48L6OBQZ5JwH2Hg/Vbl+t9rAgI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0 h1:nSiV3s7wiCam610XcLbYOmMfJxB9gO4uK3Xgv5gmTgg= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0/go.mod h1:hKn/e/Nmd19/x1gvIHwtOwVWM+VhuITSWip3JUDghj0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 h1:JAv0Jwtl01UFiyWZEMiJZBiTlv5A50zNs8lsthXqIio= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0/go.mod h1:QNKLmUEAq2QUbPQUfvw4fmv0bgbK7UlOSFCnXyfvSNc= -go.opentelemetry.io/otel/exporters/prometheus v0.51.0 h1:G7uexXb/K3T+T9fNLCCKncweEtNEBMTO+46hKX5EdKw= -go.opentelemetry.io/otel/exporters/prometheus v0.51.0/go.mod h1:v0mFe5Kk7woIh938mrZBJBmENYquyA0IICrlYm4Y0t4= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.5.0 h1:ThVXnEsdwNcxdBO+r96ci1xbF+PgNjwlk457VNuJODo= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.5.0/go.mod h1:rHWcSmC4q2h3gje/yOq6sAOaq8+UHxN/Ru3BbmDXOfY= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0 h1:X3ZjNp36/WlkSYx0ul2jw4PtbNEDDeLskw3VPsrpYM0= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0/go.mod h1:2uL/xnOXh0CHOBFCWXz5u1A4GXLiW+0IQIzVbeOEQ0U= -go.opentelemetry.io/otel/log v0.5.0 h1:x1Pr6Y3gnXgl1iFBwtGy1W/mnzENoK0w0ZoaeOI3i30= -go.opentelemetry.io/otel/log v0.5.0/go.mod h1:NU/ozXeGuOR5/mjCRXYbTC00NFJ3NYuraV/7O78F0rE= -go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= -go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= -go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= -go.opentelemetry.io/otel/sdk/log v0.5.0 h1:A+9lSjlZGxkQOr7QSBJcuyyYBw79CufQ69saiJLey7o= -go.opentelemetry.io/otel/sdk/log v0.5.0/go.mod h1:zjxIW7sw1IHolZL2KlSAtrUi8JHttoeiQy43Yl3WuVQ= -go.opentelemetry.io/otel/sdk/metric v1.29.0 h1:K2CfmJohnRgvZ9UAj2/FhIf/okdWcNdBwe1m8xFXiSY= -go.opentelemetry.io/otel/sdk/metric v1.29.0/go.mod h1:6zZLdCl2fkauYoZIOn/soQIDSWFmNSRcICarHfuhNJQ= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +go.opentelemetry.io/collector v0.115.0 h1:qUZ0bTeNBudMxNQ7FJKS//TxTjeJ7tfU/z22mcFavWU= +go.opentelemetry.io/collector v0.115.0/go.mod h1:66qx0xKnVvdwq60e1DEfb4e+zmM9szhPsv2hxZ/Mpj4= +go.opentelemetry.io/collector/client v1.21.0 h1:3Kes8lOFMYVxoxeAmX+DTEAkuS1iTA3NkSfqzGmygJA= +go.opentelemetry.io/collector/client v1.21.0/go.mod h1:jYJGiL0UA975OOyHmjbQSokNWt1OiviI5KjPOMUMGwc= +go.opentelemetry.io/collector/component v0.115.0 h1:iLte1oCiXzjiCnaOBKdsXacfFiECecpWxW3/LeriMoo= +go.opentelemetry.io/collector/component v0.115.0/go.mod h1:oIUFiH7w1eOimdeYhFI+gAIxYSiLDocKVJ0PTvX7d6s= +go.opentelemetry.io/collector/component/componentstatus v0.115.0 h1:pbpUIL+uKDfEiSgKK+S5nuSL6MDIIQYsp4b65ZGVb9M= +go.opentelemetry.io/collector/component/componentstatus v0.115.0/go.mod h1:36A+9XSiOz0Cdhq+UwwPRlEr5CYuSkEnVO9om4BH7d0= +go.opentelemetry.io/collector/component/componenttest v0.115.0 h1:9URDJ9VyP6tuij+YHjp/kSSMecnZOd7oGvzu+rw9SJY= +go.opentelemetry.io/collector/component/componenttest v0.115.0/go.mod h1:PzXvNqKLCiSADZGZFKH+IOHMkaQ0GTHuzysfVbTPKYY= +go.opentelemetry.io/collector/config/configauth v0.115.0 h1:xa+ALdyPgva3rZnLBh1H2oS5MsHP6JxSqMtQmcELnys= +go.opentelemetry.io/collector/config/configauth v0.115.0/go.mod h1:C7anpb3Rf4KswMT+dgOzkW9UX0z/65PLORpUw3p0VYc= +go.opentelemetry.io/collector/config/configcompression v1.21.0 h1:0zbPdZAgPFMAarwJEC4gaR6f/JBP686A3TYSgb3oa+E= +go.opentelemetry.io/collector/config/configcompression v1.21.0/go.mod h1:LvYG00tbPTv0NOLoZN0wXq1F5thcxvukO8INq7xyfWU= +go.opentelemetry.io/collector/config/configgrpc v0.115.0 h1:gZzXSFe6hB3RUcEeAYqk1yT+TBa+X9tp6/1x29Yg2yk= +go.opentelemetry.io/collector/config/configgrpc v0.115.0/go.mod h1:107lRZ5LdQPMdGJGd4m1GhyKxyH0az2cUOqrJgTEN8E= +go.opentelemetry.io/collector/config/confighttp v0.115.0 h1:BIy394oNXnqySJwrCqgAJu4gWgAV5aQUDD6k1hy6C8o= +go.opentelemetry.io/collector/config/confighttp v0.115.0/go.mod h1:Wr50ut12NmCEAl4bWLJryw2EjUmJTtYRg89560Q51wc= +go.opentelemetry.io/collector/config/confignet v1.21.0 h1:PeQ5YrMnfftysFL/WVaSrjPOWjD6DfeABY50pf9CZxU= +go.opentelemetry.io/collector/config/confignet v1.21.0/go.mod h1:ZppUH1hgUJOubawEsxsQ9MzEYFytqo2GnVSS7d4CVxc= +go.opentelemetry.io/collector/config/configopaque v1.21.0 h1:PcvRGkBk4Px8BQM7tX+kw4i3jBsfAHGoGQbtZg6Ox7U= +go.opentelemetry.io/collector/config/configopaque v1.21.0/go.mod h1:sW0t0iI/VfRL9VYX7Ik6XzVgPcR+Y5kejTLsYcMyDWs= +go.opentelemetry.io/collector/config/configretry v1.21.0 h1:ZHoOvAkEcv5BBeaJn8IQ6rQ4GMPZWW4S+W7R4QTEbZU= +go.opentelemetry.io/collector/config/configretry v1.21.0/go.mod h1:cleBc9I0DIWpTiiHfu9v83FUaCTqcPXmebpLxjEIqro= +go.opentelemetry.io/collector/config/configtelemetry v0.115.0 h1:U07FinCDop+r2RjWQ3aP9ZWONC7r7kQIp1GkXQi6nsI= +go.opentelemetry.io/collector/config/configtelemetry v0.115.0/go.mod h1:SlBEwQg0qly75rXZ6W1Ig8jN25KBVBkFIIAUI1GiAAE= +go.opentelemetry.io/collector/config/configtls v1.21.0 h1:ZfrlAYgBD8lzp04W0GxwiDmUbrvKsvDYJi+wkyiXlpA= +go.opentelemetry.io/collector/config/configtls v1.21.0/go.mod h1:5EsNefPfVCMOTlOrr3wyj7LrsOgY7V8iqRl8oFZEqtw= +go.opentelemetry.io/collector/config/internal v0.115.0 h1:eVk57iufZpUXyPJFKTb1Ebx5tmcCyroIlt427r5pxS8= +go.opentelemetry.io/collector/config/internal v0.115.0/go.mod h1:OVkadRWlKAoWjHslqjWtBLAne8ceQm8WYT71ZcBWLFc= +go.opentelemetry.io/collector/confmap v1.21.0 h1:1tIcx2/Suwg8VhuPmQw87ba0ludPmumpFCFRZZa6RXA= +go.opentelemetry.io/collector/confmap v1.21.0/go.mod h1:Rrhs+MWoaP6AswZp+ReQ2VO9dfOfcUjdjiSHBsG+nec= +go.opentelemetry.io/collector/confmap/provider/envprovider v1.21.0 h1:YLf++Z8CMp86AanfOCWUiE7vKbb1kSjgC3a9VJoxbD4= +go.opentelemetry.io/collector/confmap/provider/envprovider v1.21.0/go.mod h1:aSWLYcmgZZJDNtWN1M8JKQuehoGgOxibl1KuvKTar4M= +go.opentelemetry.io/collector/confmap/provider/fileprovider v1.21.0 h1:+zukkM+3l426iGoJkXTpLB2Z8QnZFu26TkGPjh5Rn/4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v1.21.0/go.mod h1:BXBpQhF3n4CNLYO2n/mWZPd2U9ekpbLXLRGZrun1VfI= +go.opentelemetry.io/collector/confmap/provider/httpprovider v1.21.0 h1:NYYGM+SgIlTuNGjd8eGzDr8DkvOe4q7cXon8djF9yyI= +go.opentelemetry.io/collector/confmap/provider/httpprovider v1.21.0/go.mod h1:XRYbuwqq1awFuNhLDUv4aSvn6MzqX+abcevx1O+APJI= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.21.0 h1:P3Q9RytCMY76ORPCnkkjOa4fkuFqmZiQRor+F/nPlYE= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.21.0/go.mod h1:xhYhHK3yLQ78tsoaKPIGUfFulgy961ImOe2gATH3RQc= +go.opentelemetry.io/collector/connector v0.115.0 h1:4Kkm3HQFzNT1eliMOB8FbIn+PLMRJ2qQku5Vmy3V8Ko= +go.opentelemetry.io/collector/connector v0.115.0/go.mod h1:+ByuAmYLrYHoKh9B+LGqUc0N2kXcN2l8Dea8Mp6brZ8= +go.opentelemetry.io/collector/connector/connectorprofiles v0.115.0 h1:aW1f4Az0I+QJyImFccNWAXqik80bnNu27aQqi2hFfD8= +go.opentelemetry.io/collector/connector/connectorprofiles v0.115.0/go.mod h1:lmynB1CucydOsHa8RSSBh5roUZPfuiv65imXhtNzClM= +go.opentelemetry.io/collector/connector/connectortest v0.115.0 h1:GjtourFr0MJmlbtEPAZ/1BZCxkNAeJ0aMTlrxwftJ0k= +go.opentelemetry.io/collector/connector/connectortest v0.115.0/go.mod h1:f3KQXXNlh/XuV8elmnuVVyfY92dJCAovz10gD72OH0k= +go.opentelemetry.io/collector/consumer v1.21.0 h1:THKZ2Vbi6GkamjTBI2hFq5Dc4kINZTWGwQNa8d/Ty9g= +go.opentelemetry.io/collector/consumer v1.21.0/go.mod h1:FQcC4ThMtRYY41dv+IPNK8POLLhAFY3r1YR5fuP7iiY= +go.opentelemetry.io/collector/consumer/consumererror v0.115.0 h1:yli//xBCQMPZKXNgNlXemo4dvqhnFrAmCZ11DvQgmcY= +go.opentelemetry.io/collector/consumer/consumererror v0.115.0/go.mod h1:LwVzAvQ6ZVNG7mbOvurbAo+W/rKws0IcjOwriuZXqPE= +go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.115.0 h1:gaIhzpaGFWauiyznrQ3f++TbcdXxA5rpsX3L9uGjMM8= +go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.115.0/go.mod h1:7oXvuGBSawS5bc413lh1KEMcXkqBcrCqZQahOdnE24U= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0 h1:H3fDuyQW1t2HWHkz96WMBQJKUevypOCjBqnqtaAWyoA= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0/go.mod h1:IzEmZ91Tp7TBxVDq8Cc9xvLsmO7H08njr6Pu9P5d9ns= +go.opentelemetry.io/collector/consumer/consumertest v0.115.0 h1:hru0I2447y0TluCdwlKYFFtgcpyCnlM+LiOK1JZyA70= +go.opentelemetry.io/collector/consumer/consumertest v0.115.0/go.mod h1:ybjALRJWR6aKNOzEMy1T1ruCULVDEjj4omtOJMrH/kU= +go.opentelemetry.io/collector/exporter v0.115.0 h1:JnxfpOnsuqhTPKJXVKJLS1Cv3BiVrVLzpHOjJEQw+xw= +go.opentelemetry.io/collector/exporter v0.115.0/go.mod h1:xof3fHQK8wADhaKLIJcQ7ChZaFLNC+haRdPN0wgl6kY= +go.opentelemetry.io/collector/exporter/debugexporter v0.115.0 h1:gb9VMQhcbvYqp0SJ4Hp8R9XqOLNLsoTgNJCPKpNEaVc= +go.opentelemetry.io/collector/exporter/debugexporter v0.115.0/go.mod h1:H/HS1UJlcZPNBbOcrsGZc2sPdQDHtbOjHOxMtJkmlcU= +go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.115.0 h1:fetbc740pODH6JW+H49SW0hiAJwQE+/B0SbuIlaY2rg= +go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.115.0/go.mod h1:oEKZ/d5BeaCK6Made9iwaeqmlT4lRbJSlW9nhIn/TwM= +go.opentelemetry.io/collector/exporter/exporterprofiles v0.115.0 h1:lSQEleCn/q9eFufcuK61NdFKU70ZlgI9dBjPCO/4CrE= +go.opentelemetry.io/collector/exporter/exporterprofiles v0.115.0/go.mod h1:7l5K2AecimX2kx+nZC1gKG3QkP247CO1+SodmJ4fFkQ= +go.opentelemetry.io/collector/exporter/exportertest v0.115.0 h1:P9SMTUXQOtcaq40bGtnnAe14zRmR4/yUgj/Tb2BEf/k= +go.opentelemetry.io/collector/exporter/exportertest v0.115.0/go.mod h1:1jMZ9gFGXglb8wfNrBZIgd+RvpZhSyFwdfE+Jtf9w4U= +go.opentelemetry.io/collector/exporter/otlpexporter v0.115.0 h1:Kqr31VFrQvgEMzeg8T1JSXWacjUQoZph39efKN8jBpY= +go.opentelemetry.io/collector/exporter/otlpexporter v0.115.0/go.mod h1:5uy/gduFx2mH0GxJ84sY75NfzQJb9xYmgiL9Pf0dKF8= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.115.0 h1:I0qzSWGbgph+iva5/jU8tkeUTkkqqcj8+UzMxg5ubF8= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.115.0/go.mod h1:cUrv5EG12iOs5MXaecfi9K+ZATEELefpyZY6Hj4NlUo= +go.opentelemetry.io/collector/extension v0.115.0 h1:/cBb8AUdD0KMWC6V3lvCC16eP9Fg0wd1Upcp5rgvuGI= +go.opentelemetry.io/collector/extension v0.115.0/go.mod h1:HI7Ak6loyi6ZrZPsQJW1OO1wbaAW8OqXLFNQlTZnreQ= +go.opentelemetry.io/collector/extension/auth v0.115.0 h1:TTMokbBsSHZRFH48PvGSJmgSS8F3Rkr9MWGHZn8eJDk= +go.opentelemetry.io/collector/extension/auth v0.115.0/go.mod h1:3w+2mzeb2OYNOO4Bi41TUo4jr32ap2y7AOq64IDpxQo= +go.opentelemetry.io/collector/extension/auth/authtest v0.115.0 h1:OZe7dKbZ01qodSpZU0ZYzI6zpmmzJ3UvfdBSFAbSgDw= +go.opentelemetry.io/collector/extension/auth/authtest v0.115.0/go.mod h1:fk9WCXP0x91Q64Z8HZKWTHh9PWtgoWE1KXe3n2Bff3U= +go.opentelemetry.io/collector/extension/experimental/storage v0.115.0 h1:sZXw0+77092pq24CkUoTRoHQPLQUsDq6HFRNB0g5yR4= +go.opentelemetry.io/collector/extension/experimental/storage v0.115.0/go.mod h1:qjFH7Y3QYYs88By2ZB5GMSUN5k3ul4Brrq2J6lKACA0= +go.opentelemetry.io/collector/extension/extensioncapabilities v0.115.0 h1:/g25Hp5aoCNKdDjIb3Fc7XRglO8yaBRFLO/IUNPnqNI= +go.opentelemetry.io/collector/extension/extensioncapabilities v0.115.0/go.mod h1:EQx7ETiy330O6q05S2KRZsRNDg0aQEeJmVl7Ipx+Fcw= +go.opentelemetry.io/collector/extension/extensiontest v0.115.0 h1:GBVFxFEskR8jSdu9uaQh2qpXnN5VNXhXjpJ2UjxtE8I= +go.opentelemetry.io/collector/extension/extensiontest v0.115.0/go.mod h1:eu1ecbz5mT+cHoH2H3GmD/rOO0WsicSJD2RLrYuOmRA= +go.opentelemetry.io/collector/extension/zpagesextension v0.115.0 h1:zYrZZocc7n0ZuDyXNkIaX0P0qk2fjMQj7NegwBJZA4k= +go.opentelemetry.io/collector/extension/zpagesextension v0.115.0/go.mod h1:OaXwNHF3MAcInBzCXrhXbTNHfIi9b7YGhXjtCFZqxNY= +go.opentelemetry.io/collector/featuregate v1.21.0 h1:+EULHPJDLMipcwAGZVp9Nm8NriRvoBBMxp7MSiIZVMI= +go.opentelemetry.io/collector/featuregate v1.21.0/go.mod h1:3GaXqflNDVwWndNGBJ1+XJFy3Fv/XrFgjMN60N3z7yg= +go.opentelemetry.io/collector/filter v0.115.0 h1:pYnHUFDSHSjEIFZit+CU09itVkDXgV+WcV2HOkjvQcE= +go.opentelemetry.io/collector/filter v0.115.0/go.mod h1:aewQ+jmvpH88gPVWpNXiWSm+wwJVxTK4f23ex2NMd2c= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.115.0 h1:6DRiSECeApFq6Jj5ug77rG53R6FzJEZBfygkyMEXdpg= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.115.0/go.mod h1:vgQf5HQdmLQqpDHpDq2S3nTRoUuKtRcZpRTsy+UiwYw= +go.opentelemetry.io/collector/internal/memorylimiter v0.115.0 h1:U07IJxyHZXM6eLn8cOq/Lycx6DhQZhpDOuYtIRw/d6I= +go.opentelemetry.io/collector/internal/memorylimiter v0.115.0/go.mod h1:KNcU8WVpW5y7Ij6CGnsefb7q1UZT7VvrTDhe5FKNOA4= +go.opentelemetry.io/collector/internal/sharedcomponent v0.115.0 h1:9TL6T6ALqDpumUJ0tYIuPIg5LGo4r6eoqlNArYX116o= +go.opentelemetry.io/collector/internal/sharedcomponent v0.115.0/go.mod h1:SgBLKMh11bOTPR1bdDZbi5MlqsoDBBFI3uBIwnei+0k= +go.opentelemetry.io/collector/otelcol v0.115.0 h1:wZhFGrSCZcTQ4qw4ePjI2PaSrOCejoQKAjprKD/xavs= +go.opentelemetry.io/collector/otelcol v0.115.0/go.mod h1:iK8DPvaizirIYKDl1zZG7DDYUj6GkkH4KHifVVM88vk= +go.opentelemetry.io/collector/otelcol/otelcoltest v0.115.0 h1:HNlFpQujlnvawBk8nvMGxzjDHWDCfSprxem/EpQn4u8= +go.opentelemetry.io/collector/otelcol/otelcoltest v0.115.0/go.mod h1:WsMbqYl2rm3nPFbdxQqyLXf4iu97nYLeuQ1seZIpV3Y= +go.opentelemetry.io/collector/pdata v1.21.0 h1:PG+UbiFMJ35X/WcAR7Rf/PWmWtRdW0aHlOidsR6c5MA= +go.opentelemetry.io/collector/pdata v1.21.0/go.mod h1:GKb1/zocKJMvxKbS+sl0W85lxhYBTFJ6h6I1tphVyDU= +go.opentelemetry.io/collector/pdata/pprofile v0.115.0 h1:NI89hy13vNDw7EOnQf7Jtitks4HJFO0SUWznTssmP94= +go.opentelemetry.io/collector/pdata/pprofile v0.115.0/go.mod h1:jGzdNfO0XTtfLjXCL/uCC1livg1LlfR+ix2WE/z3RpQ= +go.opentelemetry.io/collector/pdata/testdata v0.115.0 h1:Rblz+AKXdo3fG626jS+KSd0OSA4uMXcTQfpwed6P8LI= +go.opentelemetry.io/collector/pdata/testdata v0.115.0/go.mod h1:inNnRt6S2Nn260EfCBEcjesjlKOSsr0jPwkPqpBkt4s= +go.opentelemetry.io/collector/pipeline v0.115.0 h1:bmACBqb0e8U9ag+vGGHUP7kCfAO7HHROdtzIEg8ulus= +go.opentelemetry.io/collector/pipeline v0.115.0/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= +go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.115.0 h1:3l9ruCAOrssTUDnyChKNzHWOdTtfThnYaoPZ1/+5sD0= +go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.115.0/go.mod h1:2Myg+law/5lcezo9PhhZ0wjCaLYdGK24s1jDWbSW9VY= +go.opentelemetry.io/collector/processor v0.115.0 h1:+fveHGRe24PZPv/F5taahGuZ9HdNW44hgNWEJhIUdyc= +go.opentelemetry.io/collector/processor v0.115.0/go.mod h1:/oLHBlLsm7tFb7zOIrA5C0j14yBtjXKAgxJJ2Bktyk4= +go.opentelemetry.io/collector/processor/batchprocessor v0.115.0 h1:dgw1jcE/YVFTs41b3Y7SerU3BBSyMEE93AYV+BAxR8E= +go.opentelemetry.io/collector/processor/batchprocessor v0.115.0/go.mod h1:imG1kDEq14UGlxyCjSCf1TUEFdSWRvF7tLoYX9nixEQ= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.115.0 h1:LCA2jwxy1PRc7X/AtRJfMdOANh5rVLdwo5PAM+gAuyo= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.115.0/go.mod h1:gPcHyza7Rek3jfrQFxw99fcWBDkkRqBaMHcUz9yYv5I= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.0 h1:r1UF8LPICTRXBL0685zV/CC8J4sWg/qm1g+sHOYMq2Y= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.0/go.mod h1:3erq5umu5a7DKXo4PBm4I5yJjc6r0aJNvBV2nVSPDuE= +go.opentelemetry.io/collector/processor/processorprofiles v0.115.0 h1:cCZAs+FXaebZPppqAN3m+X3etoSBL6NvyQo8l0hOZoo= +go.opentelemetry.io/collector/processor/processorprofiles v0.115.0/go.mod h1:kMxF0gknlWX4duuAJFi2/HuIRi6C3w95tOenRa0GKOY= +go.opentelemetry.io/collector/processor/processortest v0.115.0 h1:j9HEaYFOeOB6VYl9zGhBnhQbTkqGBa2udUvu5NTh6hc= +go.opentelemetry.io/collector/processor/processortest v0.115.0/go.mod h1:Gws+VEnp/eW3qAqPpqbKsrbnnxxNfyDjqrfUXbZfZic= +go.opentelemetry.io/collector/receiver v0.115.0 h1:55Q3Jvj6zHCIA1psKqi/3kEMJO4OqUF5tNAEYNdB1U8= +go.opentelemetry.io/collector/receiver v0.115.0/go.mod h1:nBSCh2O/WUcfgpJ+Jpz+B0z0Hn5jHeRvF2WmLij5EIY= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.115.0 h1:NqMWsGuVy6y6VKTaPeJS7NZ9KAxhE/xyGUC7GaLYm/o= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.115.0/go.mod h1:9ituzngnjsh/YvO+Phayq9BTk/nw0rgK5ZVvX1oxULk= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.115.0 h1:R9JLaj2Al93smIPUkbJshAkb/cY0H5JBOxIx+Zu0NG4= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.115.0/go.mod h1:05E5hGujWeeXJmzKZwTdHyZ/+rRyrQlQB5p5Q2XY39M= +go.opentelemetry.io/collector/receiver/receivertest v0.115.0 h1:OiB684SbHQi6/Pd3ZH0cXjYvCpBS9ilQBfTQx0wVXHg= +go.opentelemetry.io/collector/receiver/receivertest v0.115.0/go.mod h1:Y8Z9U/bz9Xpyt8GI8DxZZgryw3mnnIw+AeKVLTD2cP8= +go.opentelemetry.io/collector/scraper v0.115.0 h1:hbfebO7x1Xm96OwqeuLz5w7QAaB3ZMlwOkUo0XzPadc= +go.opentelemetry.io/collector/scraper v0.115.0/go.mod h1:7YoCO6/4PeExLiX1FokcydJGCQUa7lUqZsqXokJ5VZ4= +go.opentelemetry.io/collector/semconv v0.115.0 h1:SoqMvg4ZEB3mz2EdAb6XYa+TuMo5Mir5FRBr3nVFUDY= +go.opentelemetry.io/collector/semconv v0.115.0/go.mod h1:N6XE8Q0JKgBN2fAhkUQtqK9LT7rEGR6+Wu/Rtbal1iI= +go.opentelemetry.io/collector/service v0.115.0 h1:k4GAOiI5tZgB2QKgwA6c3TeAVr7QL/ft5cOQbzUr8Iw= +go.opentelemetry.io/collector/service v0.115.0/go.mod h1:DKde9LMhNebdREecDSsqiTFLI2wRc+IoV4/wGxU6goY= +go.opentelemetry.io/contrib/bridges/otelzap v0.6.0 h1:j8icMXyyqNf6HGuwlYhniPnVsbJIq7n+WirDu3VAJdQ= +go.opentelemetry.io/contrib/bridges/otelzap v0.6.0/go.mod h1:evIOZpl+kAlU5IsaYX2Siw+IbpacAZvXemVsgt70uvw= +go.opentelemetry.io/contrib/config v0.10.0 h1:2JknAzMaYjxrHkTnZh3eOme/Y2P5eHE2SWfhfV6Xd6c= +go.opentelemetry.io/contrib/config v0.10.0/go.mod h1:aND2M6/KfNkntI5cyvHriR/zvZgPf8j9yETdSmvpfmc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 h1:yMkBS9yViCc7U7yeLzJPM2XizlfdVvBRSmsQDWu6qc0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0/go.mod h1:n8MR6/liuGB5EmTETUBeU5ZgqMOlqKRxUaqPQBOANZ8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= +go.opentelemetry.io/contrib/propagators/b3 v1.31.0 h1:PQPXYscmwbCp76QDvO4hMngF2j8Bx/OTV86laEl8uqo= +go.opentelemetry.io/contrib/propagators/b3 v1.31.0/go.mod h1:jbqfV8wDdqSDrAYxVpXQnpM0XFMq2FtDesblJ7blOwQ= +go.opentelemetry.io/contrib/zpages v0.56.0 h1:W7vP6s3juzL5KiHpr41zLNmsJ0QAZudYu8ay0zGAoko= +go.opentelemetry.io/contrib/zpages v0.56.0/go.mod h1:IxPRP4TYHw9jLeaEOSDIiA9zmyJNZNO6sbW55iMvSXs= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 h1:mMOmtYie9Fx6TSVzw4W+NTpvoaS1JWWga37oI1a/4qQ= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0/go.mod h1:yy7nDsMMBUkD+jeekJ36ur5f3jJIrmCwUrY67VFhNpA= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 h1:j7ZSD+5yn+lo3sGV69nW04rRR0jhYnBwjuX3r0HvnK0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0/go.mod h1:WXbYJTUaZXAbYd8lbgGuvih0yuCfOFC5RJoYnoLcGz8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 h1:t/Qur3vKSkUCcDVaSumWF2PKHt85pc7fRvFuoVT8qFU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0/go.mod h1:Rl61tySSdcOJWoEgYZVtmnKdA0GeKrSqkHC1t+91CH8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0/go.mod h1:TMu73/k1CP8nBUpDLc71Wj/Kf7ZS9FK5b53VapRsP9o= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 h1:lUsI2TYsQw2r1IASwoROaCnjdj2cvC2+Jbxvk6nHnWU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0/go.mod h1:2HpZxxQurfGxJlJDblybejHB6RX6pmExPNe517hREw4= +go.opentelemetry.io/otel/exporters/prometheus v0.54.0 h1:rFwzp68QMgtzu9PgP3jm9XaMICI6TsofWWPcBDKwlsU= +go.opentelemetry.io/otel/exporters/prometheus v0.54.0/go.mod h1:QyjcV9qDP6VeK5qPyKETvNjmaaEc7+gqjh4SS0ZYzDU= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 h1:TwmL3O3fRR80m8EshBrd8YydEZMcUCsZXzOUlnFohwM= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0/go.mod h1:tH98dDv5KPmPThswbXA0fr0Lwfs+OhK8HgaCo7PjRrk= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 h1:SZmDnHcgp3zwlPBS2JX2urGYe/jBKEIT6ZedHRUyCz8= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0/go.mod h1:fdWW0HtZJ7+jNpTKUR0GpMEDP69nR8YBJQxNiVCE3jk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6BmckTU+9Rxn04m2bD3gD6Mk0OIOCPk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= +go.opentelemetry.io/otel/log v0.8.0 h1:egZ8vV5atrUWUbnSsHn6vB8R21G2wrKqNiDt3iWertk= +go.opentelemetry.io/otel/log v0.8.0/go.mod h1:M9qvDdUTRCopJcGRKg57+JSQ9LgLBrwwfC32epk5NX8= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/log v0.7.0 h1:dXkeI2S0MLc5g0/AwxTZv6EUEjctiH8aG14Am56NTmQ= +go.opentelemetry.io/otel/sdk/log v0.7.0/go.mod h1:oIRXpW+WD6M8BuGj5rtS0aRu/86cbDV/dAfNaZBIjYM= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1548,8 +1595,8 @@ golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1560,8 +1607,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw= +golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1634,16 +1681,16 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= -golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.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-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1657,8 +1704,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ 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.1.0/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.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1734,16 +1781,16 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.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.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1758,8 +1805,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1819,8 +1866,8 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= -golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= +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= @@ -1886,10 +1933,10 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -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/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1909,8 +1956,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= -google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= 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= @@ -1924,8 +1971,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.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/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1970,12 +2017,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= -k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= -k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= @@ -1985,8 +2032,8 @@ k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= -sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= +sigs.k8s.io/controller-runtime v0.19.3 h1:XO2GvC9OPftRst6xWCpTgBZO04S2cbp0Qqkj8bX1sPw= +sigs.k8s.io/controller-runtime v0.19.3/go.mod h1:j4j87DqtsThvwTv5/Tc5NFRyyF/RF0ip4+62tbTSIUM= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/testbed/sampling/sampling_test.go b/testbed/sampling/sampling_test.go index 6b42a2b485..af37ea8e15 100644 --- a/testbed/sampling/sampling_test.go +++ b/testbed/sampling/sampling_test.go @@ -27,21 +27,31 @@ func (n *NoopTestSummary) Save() {} var testResults testbed.TestResultsSummary = &NoopTestSummary{} -func createProcessorsConfiguration(policies string) map[string]string { +func createProcessorsConfiguration(policies string) []correctnesstests.ProcessorNameAndConfigBody { // TODO: It is painful to create configurations because of the go formatting. // Ideally it should be possible to create configurations from a file. - processors := map[string]string{ - "groupbytrace": ` + processors := []correctnesstests.ProcessorNameAndConfigBody{ + { + Name: "groupbytrace", + Body: ` groupbytrace: `, - "tail_sampling": fmt.Sprintf(` + }, + { + Name: "tail_sampling", + Body: fmt.Sprintf(` tail_sampling: decision_wait: 3s policies: %s`, policies), - "batch": ` + }, + { + Name: "batch", + Body: ` batch: send_batch_size: 1024 -`} +`, + }, + } return processors } @@ -90,7 +100,7 @@ func TestTailSamplingData(t *testing.T) { func testWithSampledData( t *testing.T, - processors map[string]string, + processors []correctnesstests.ProcessorNameAndConfigBody, customizer sampledSpanCustomizerFunc, ) { var resourceSpec testbed.ResourceSpec diff --git a/tools/release/image-mirror/go.sum b/tools/release/image-mirror/go.sum index dde5a39b2b..51a9e0b912 100644 --- a/tools/release/image-mirror/go.sum +++ b/tools/release/image-mirror/go.sum @@ -2,60 +2,32 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/aws/aws-sdk-go-v2 v1.27.2 h1:pLsTXqX93rimAOZG2FIYraDQstZaaGVVN4tNw65v0h8= -github.com/aws/aws-sdk-go-v2 v1.27.2/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= -github.com/aws/aws-sdk-go-v2/config v1.27.18 h1:wFvAnwOKKe7QAyIxziwSKjmer9JBMH1vzIL6W+fYuKk= -github.com/aws/aws-sdk-go-v2/config v1.27.18/go.mod h1:0xz6cgdX55+kmppvPm2IaKzIXOheGJhAufacPJaXZ7c= github.com/aws/aws-sdk-go-v2/config v1.27.37 h1:xaoIwzHVuRWRHFI0jhgEdEGc8xE1l91KaeRDsWEIncU= github.com/aws/aws-sdk-go-v2/config v1.27.37/go.mod h1:S2e3ax9/8KnMSyRVNd3sWTKs+1clJ2f1U6nE0lpvQRg= -github.com/aws/aws-sdk-go-v2/credentials v1.17.18 h1:D/ALDWqK4JdY3OFgA2thcPO1c9aYTT5STS/CvnkqY1c= -github.com/aws/aws-sdk-go-v2/credentials v1.17.18/go.mod h1:JuitCWq+F5QGUrmMPsk945rop6bB57jdscu+Glozdnc= github.com/aws/aws-sdk-go-v2/credentials v1.17.35 h1:7QknrZhYySEB1lEXJxGAmuD5sWwys5ZXNr4m5oEz0IE= github.com/aws/aws-sdk-go-v2/credentials v1.17.35/go.mod h1:8Vy4kk7at4aPSmibr7K+nLTzG6qUQAUO4tW49fzUV4E= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5 h1:dDgptDO9dxeFkXy+tEgVkzSClHZje/6JkPW5aZyEvrQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5/go.mod h1:gjvE2KBUgUQhcv89jqxrIxH9GaKs1JbZzWejj/DaHGA= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 h1:cy8ahBJuhtM8GTTSyOkfy6WVPV1IE+SS5/wfXUYuulw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9/go.mod h1:CZBXGLaJnEZI6EVNcPd7a6B5IC5cA/GkRWtu9fp3S6Y= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 h1:A4SYk07ef04+vxZToz9LWvAXl9LW0NClpPpMsi31cz0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9/go.mod h1:5jJcHuwDagxN+ErjQ3PU3ocf6Ylc/p9x+BLO/+X4iXw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= -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/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/service/ecrpublic v1.23.10 h1:dNXYTooy/H6NSIJ/zZqAVk/Ri4G4mqEWoz3btXhqI7E= -github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.23.10/go.mod h1:6JWi6AO/j/YgTOdu+XM2fRfoZTmferahXDwmravqSwQ= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.26.1 h1:KYMEjahljQJ2/sXsGJulhB7j8fQG8QjqjjtTBJKu/Cc= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.26.1/go.mod h1:wtQIcTA5qkJq7k+Dx/jdDp+UZ/CU8uatz5K5LgB7QB4= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 h1:o4T+fKxA3gTMcluBNZZXE9DNaMkJuUL1O3mffCUjoJo= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11/go.mod h1:84oZdJ+VjuJKs9v1UTC9NaodRZRseOXCTgku+vQJWR8= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 h1:gEYM2GSpr4YNWc6hCd5nod4+d4kd9vWIAWrmGuLdlMw= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.11/go.mod h1:gVvwPdPNYehHSP9Rs7q27U1EU+3Or2ZpXvzAYJNh63w= github.com/aws/aws-sdk-go-v2/service/sso v1.23.1 h1:2jrVsMHqdLD1+PA4BA6Nh1eZp0Gsy3mFSB5MxDvcJtU= github.com/aws/aws-sdk-go-v2/service/sso v1.23.1/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 h1:iXjh3uaH3vsVcnyZX7MqCoCfcyxIrVE9iOQruRaWPrQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5/go.mod h1:5ZXesEuy/QcO0WUnt+4sDkxhdXRHTu2yG0uCSH8B6os= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.1 h1:0L7yGCg3Hb3YQqnSgBTZM5wepougtL1aEccdcdYhHME= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.1/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 h1:M/1u4HBpwLuMtjlxuI2y6HoVLzF5e2mfxHCg7ZVMYmk= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.12/go.mod h1:kcfd+eTdEi/40FIbLq4Hif3XMXnl5b/+t/KTfLt9xIk= github.com/aws/aws-sdk-go-v2/service/sts v1.31.1 h1:8K0UNOkZiK9Uh3HIF6Bx0rcNCftqGCeKmOaR7Gp5BSo= github.com/aws/aws-sdk-go-v2/service/sts v1.31.1/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -71,14 +43,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8= -github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v27.3.1+incompatible h1:qEGdFBF3Xu6SCvCYhc7CzaQTlBmqDuzxPDpigSyeKQQ= github.com/docker/cli v27.3.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= -github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= @@ -100,16 +68,12 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.19.1 h1:yMQ62Al6/V0Z7CqIrrS1iYoA5/oQCm88DeNujc7C1KY= -github.com/google/go-containerregistry v0.19.1/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI= github.com/google/go-containerregistry v0.20.2 h1:B1wPJ1SN/S7pB+ZAimcciVD+r+yV/l/DSArMxlbwseo= github.com/google/go-containerregistry v0.20.2/go.mod h1:z38EKdKh4h7IP2gSfUUqEvalZBqs6AoLeWfUy34nQC8= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= 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/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0= github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= @@ -144,26 +108,18 @@ github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinC github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= @@ -182,8 +138,6 @@ golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -191,8 +145,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/tools/workflow/cleaner/go.sum b/tools/workflow/cleaner/go.sum index 1a02fdbd6d..f235e84a74 100644 --- a/tools/workflow/cleaner/go.sum +++ b/tools/workflow/cleaner/go.sum @@ -10,8 +10,6 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/tools/workflow/linters/go.mod b/tools/workflow/linters/go.mod index a91ef91785..3cab49be27 100644 --- a/tools/workflow/linters/go.mod +++ b/tools/workflow/linters/go.mod @@ -122,7 +122,6 @@ require ( github.com/nunnatsa/ginkgolinter v0.16.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect - github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polyfloyd/go-errorlint v1.6.0 // indirect github.com/prometheus/client_golang v1.20.4 // indirect @@ -162,7 +161,6 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tetafro/godot v1.4.18 // indirect github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a // indirect diff --git a/tools/workflow/linters/go.sum b/tools/workflow/linters/go.sum index cd7c766885..2cdda8cee6 100644 --- a/tools/workflow/linters/go.sum +++ b/tools/workflow/linters/go.sum @@ -4,32 +4,22 @@ 4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8= github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0= -github.com/Abirdcfly/dupword v0.0.14 h1:3U4ulkc8EUo+CaT105/GJ1BQwtgyj6+VaBVbAX11Ba8= -github.com/Abirdcfly/dupword v0.0.14/go.mod h1:VKDAbxdY8YbKUByLGg8EETzYSuC4crm9WwI6Y3S0cLI= github.com/Abirdcfly/dupword v0.1.1 h1:Bsxe0fIw6OwBtXMIncaTxCLHYO5BB+3mcsR5E8VXloY= github.com/Abirdcfly/dupword v0.1.1/go.mod h1:B49AcJdTYYkpd4HjgAcutNGG9HZ2JWwKunH9Y2BA6sM= github.com/Antonboom/errname v0.1.13 h1:JHICqsewj/fNckzrfVSe+T33svwQxmjC+1ntDsHOVvM= github.com/Antonboom/errname v0.1.13/go.mod h1:uWyefRYRN54lBg6HseYCFhs6Qjcy41Y3Jl/dVhA87Ns= github.com/Antonboom/nilnil v0.1.9 h1:eKFMejSxPSA9eLSensFmjW2XTgTwJMjZ8hUHtV4s/SQ= github.com/Antonboom/nilnil v0.1.9/go.mod h1:iGe2rYwCq5/Me1khrysB4nwI7swQvjclR8/YRPl5ihQ= -github.com/Antonboom/testifylint v1.4.1 h1:LeBVoSeqCgJoHqwu46yzm7Zgcm6T7QhDYfT9VtFIRpg= -github.com/Antonboom/testifylint v1.4.1/go.mod h1:+8Q9+AOLsz5ZiQiiYujJKs9mNz398+M6UgslP4qgJLA= github.com/Antonboom/testifylint v1.4.3 h1:ohMt6AHuHgttaQ1xb6SSnxCeK4/rnK7KKzbvs7DmEck= github.com/Antonboom/testifylint v1.4.3/go.mod h1:+8Q9+AOLsz5ZiQiiYujJKs9mNz398+M6UgslP4qgJLA= -github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/toml v1.4.1-0.20240615085220-eb727477b3f7 h1:GwfNF1ZrlhC1rccPhl176V0DcyO+1Gwd9zqbGTZP2zg= github.com/BurntSushi/toml v1.4.1-0.20240615085220-eb727477b3f7/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/Crocmagnon/fatcontext v0.3.0 h1:S6gNUYNSN9V76Tu017OFgoaOpybmMhwe6Ewh1cYd0jg= -github.com/Crocmagnon/fatcontext v0.3.0/go.mod h1:x3F9YW5CFE7vo+FGA5GzBD1SBXU4FQI0+y1ReG4Q+pY= github.com/Crocmagnon/fatcontext v0.5.2 h1:vhSEg8Gqng8awhPju2w7MKHqMlg4/NI+gSDHtR3xgwA= github.com/Crocmagnon/fatcontext v0.5.2/go.mod h1:87XhRMaInHP44Q7Tlc7jkgKKB7kZAOPiDkFMdKCC+74= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 h1:/fTUt5vmbkAcMBt4YQiuC23cV0kEsN1MVMNqeOW43cU= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0/go.mod h1:ONJg5sxcbsdQQ4pOW8TGdTidT2TMAUy/2Xhr8mrYaao= -github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= @@ -56,16 +46,10 @@ github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJ github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= -github.com/bombsimon/wsl/v4 v4.4.0 h1:1FHD09Li8Okn1/iERsSOo+0pXZZpVuw0XUz5/a+4+UQ= -github.com/bombsimon/wsl/v4 v4.4.0/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= github.com/bombsimon/wsl/v4 v4.4.1 h1:jfUaCkN+aUpobrMO24zwyAMwMAV5eSziCkOKEauOLdw= github.com/bombsimon/wsl/v4 v4.4.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= -github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= -github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= github.com/breml/bidichk v0.3.1 h1:mm0l1NVE6lhaF4GUI8wX6TRV+e9kyHSvtA1wSG3nDqU= github.com/breml/bidichk v0.3.1/go.mod h1:Qo0jQtZkQYyArvHxFXxNmaioxJRgfnSo6UirDTaAJL4= -github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= -github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= github.com/breml/errchkjson v0.4.0 h1:gftf6uWZMtIa/Is3XJgibewBm2ksAQSY/kABDNFTAdk= github.com/breml/errchkjson v0.4.0/go.mod h1:AuBOSTHyLSaaAFlWsRSuRBIroCh3eh7ZHh5YeelDIk8= github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= @@ -82,16 +66,11 @@ github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iy github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc= github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= -github.com/ckaznocha/intrange v0.1.2 h1:3Y4JAxcMntgb/wABQ6e8Q8leMd26JbX2790lIss9MTI= -github.com/ckaznocha/intrange v0.1.2/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE= github.com/ckaznocha/intrange v0.2.1 h1:M07spnNEQoALOJhwrImSrJLaxwuiQK+hA2DeajBlwYk= github.com/ckaznocha/intrange v0.2.1/go.mod h1:7NEhVyf8fzZO5Ds7CRaqPEm52Ut83hsTiL5zbER/HYk= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/daixiang0/gci v0.13.4 h1:61UGkmpoAcxHM2hhNkZEf5SzwQtWJXTSws7jaPyqwlw= -github.com/daixiang0/gci v0.13.4/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= github.com/daixiang0/gci v0.13.5 h1:kThgmH1yBmZSBCh1EJVxQ7JsHpm5Oms0AMed/0LaH4c= github.com/daixiang0/gci v0.13.5/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -114,14 +93,14 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/ghostiam/protogetter v0.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk= -github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= github.com/ghostiam/protogetter v0.3.8 h1:LYcXbYvybUyTIxN2Mj9h6rHrDZBDwZloPoKctWrFyJY= github.com/ghostiam/protogetter v0.3.8/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA= github.com/go-critic/go-critic v0.11.4 h1:O7kGOCx0NDIni4czrkRIXTnit0mkyKOCePh3My6OyEU= github.com/go-critic/go-critic v0.11.4/go.mod h1:2QAdo4iuLik5S9YG0rT4wcZ8QxwHYkrr6/2MWAiv/vc= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= +github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= @@ -143,26 +122,18 @@ github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQi github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= -github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= -github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/gofmt v0.0.0-20231019111953-be8c47862aaa h1:L0Zq43Px2HrLroRKEgfCsQLMJUkjskJBB1kd1Zjcvvc= -github.com/golangci/gofmt v0.0.0-20231019111953-be8c47862aaa/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 h1:/1322Qns6BtQxUZDTAT4SdcoxknUki7IAoK4SAXr8ME= github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9/go.mod h1:Oesb/0uFAyWoaw1U1qS5zyjCg5NP9C9iwjnI4tIsXEE= -github.com/golangci/golangci-lint v1.59.1 h1:CRRLu1JbhK5avLABFJ/OHVSQ0Ie5c4ulsOId1h3TTks= -github.com/golangci/golangci-lint v1.59.1/go.mod h1:jX5Oif4C7P0j9++YB2MMJmoNrb01NJ8ITqKWNLewThg= github.com/golangci/golangci-lint v1.61.0 h1:VvbOLaRVWmyxCnUIMTbf1kDsaJbTzH20FAMXTAlQGu8= github.com/golangci/golangci-lint v1.61.0/go.mod h1:e4lztIrJJgLPhWvFPDkhiMwEFRrWlmFbrZea3FsJyN8= github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs= @@ -182,9 +153,8 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= @@ -216,8 +186,6 @@ github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjz github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jjti/go-spancheck v0.6.1 h1:ZK/wE5Kyi1VX3PJpUO2oEgeoI4FWOUm7Shb2Gbv5obI= -github.com/jjti/go-spancheck v0.6.1/go.mod h1:vF1QkOO159prdo6mHRxak2CpzDpHAfKiPUDP/NeRnX8= github.com/jjti/go-spancheck v0.6.2 h1:iYtoxqPMzHUPp7St+5yA8+cONdyXD3ug6KK15n7Pklk= github.com/jjti/go-spancheck v0.6.2/go.mod h1:+X7lvIrR5ZdUTkxFYqzJ0abr8Sb5LOo80uOhWNqIrYA= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= @@ -228,6 +196,8 @@ github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -266,20 +236,14 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= -github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE= -github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA= github.com/mgechev/revive v1.4.0 h1:+6LDNE1XKsUCkpuDOMrzjOsXqiQOZ/jPlscLyA6mMXw= github.com/mgechev/revive v1.4.0/go.mod h1:uzGR6feiCiJi4oND58/KMt/lEnR5vmjzRYPZiR0sQRQ= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 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/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= -github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= @@ -294,12 +258,10 @@ github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbn github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU= -github.com/onsi/ginkgo/v2 v2.17.3/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= @@ -307,36 +269,23 @@ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJ github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= -github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.5.2 h1:SJhVik3Umsjh7mte1vE0fVZ5T1gznasQG3PV7U5xFdA= -github.com/polyfloyd/go-errorlint v1.5.2/go.mod h1:sH1QC1pxxi0fFecsVIzBmxtrgd9IF/SkJpA6wqyKAJs= github.com/polyfloyd/go-errorlint v1.6.0 h1:tftWV9DE7txiFzPpztTAwyoRLKNj9gpVm2cg8/OwcYY= github.com/polyfloyd/go-errorlint v1.6.0/go.mod h1:HR7u8wuP1kb1NeN1zqTd1ZMlqUKPPHF+Id4vIPvDqVw= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs= -github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 h1:+Wl/0aFp0hpuHM3H//KMft64WQ1yX9LdJY64Qm/gFCo= github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= @@ -350,13 +299,9 @@ github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.3.2 h1:CuG27ulzEB1Gu5Dk5gP8PFxSOZ3ptSdP5iI/3IXxM18= -github.com/ryancurrah/gomodguard v1.3.2/go.mod h1:LqdemiFomEjcxOqirbQCb3JFvSxH2JUYMerTFd3sF2o= github.com/ryancurrah/gomodguard v1.3.5 h1:cShyguSwUEeC0jS7ylOiG/idnd1TpJ1LfHGpV3oJmPU= github.com/ryancurrah/gomodguard v1.3.5/go.mod h1:MXlEPQRxgfPQa62O8wzK3Ozbkv9Rkqr+wKjSxTdsNJE= github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= @@ -373,8 +318,6 @@ github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tM github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.27.0 h1:t/3jZpSXtRPRf2xr0m63i32ZrusyurIGT9E5wAvXQnI= github.com/sashamelentyev/usestdlibvars v1.27.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= -github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 h1:rnO6Zp1YMQwv8AyxzuwsVohljJgp4L0ZqiCgtACsPsc= -github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9/go.mod h1:dg7lPlu/xK/Ut9SedURCoZbVCR4yC7fM65DtH9/CDHs= github.com/securego/gosec/v2 v2.21.3 h1:EZJttSs3Kw57Ap6EwMBjmFql8ARsIsWYP2pd+FNAoCg= github.com/securego/gosec/v2 v2.21.3/go.mod h1:xSEd+rXbCjjinAofXTWh3Z7hkpBJdUwKTt2as7tKOF0= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= @@ -385,12 +328,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sivchari/tenv v1.9.1 h1:8OnnAteRw5ailLV0KqXce2ZKn5RwHH6QVFsJ6RMccnM= -github.com/sivchari/tenv v1.9.1/go.mod h1:tdY24masnVoZFxYrHv/nD6Tc8FbkEtAQEEziXpyMgqY= github.com/sivchari/tenv v1.10.0 h1:g/hzMA+dBCKqGXgW8AV/1xIWhAvDrx0zFKNR48NFMg0= github.com/sivchari/tenv v1.10.0/go.mod h1:tdY24masnVoZFxYrHv/nD6Tc8FbkEtAQEEziXpyMgqY= -github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= -github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= github.com/sonatard/noctx v0.1.0 h1:JjqOc2WN16ISWAjAk8M5ej0RfExEXtkEyExl2hLW+OM= github.com/sonatard/noctx v0.1.0/go.mod h1:0RvBxqY8D4j9cTTTWE8ylt2vqj2EPI8fHmrxHdsaZ2c= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= @@ -399,12 +338,8 @@ github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCp github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -431,24 +366,18 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.16 h1:4ChfhveiNLk4NveAZ9Pu2AN8QZ2nkUGFuadM9lrr5D0= -github.com/tetafro/godot v1.4.16/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/tetafro/godot v1.4.18 h1:ouX3XGiziKDypbpXqShBfnNLTSjR8r3/HVzrtJ+bHlI= github.com/tetafro/godot v1.4.18/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a h1:A6uKudFIfAEpoPdaal3aSqGxBzLyU8TqyXImLwo6dIo= github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460= github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= -github.com/tomarrell/wrapcheck/v2 v2.8.3 h1:5ov+Cbhlgi7s/a42BprYoxsr73CbdMUTzE3bRDFASUs= -github.com/tomarrell/wrapcheck/v2 v2.8.3/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tomarrell/wrapcheck/v2 v2.9.0 h1:801U2YCAjLhdN8zhZ/7tdjB3EnAoRlJHt/s+9hijLQ4= github.com/tomarrell/wrapcheck/v2 v2.9.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= @@ -457,8 +386,6 @@ github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81v github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/Gk8VQ= github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= -github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= -github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= github.com/uudashr/gocognit v1.1.3 h1:l+a111VcDbKfynh+airAy/DJQKaXh2m9vkoysMPSZyM= github.com/uudashr/gocognit v1.1.3/go.mod h1:aKH8/e8xbTRBwjbCkwZ8qt4l2EpKXl31KMHgSS+lZ2U= github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= @@ -481,20 +408,12 @@ go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs= go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S7TYM= -go-simpler.org/sloglint v0.7.1 h1:qlGLiqHbN5islOxjeLXoPtUdZXb669RW+BDQ+xOSNoU= -go-simpler.org/sloglint v0.7.1/go.mod h1:OlaVDRh/FKKd4X4sIMbsz8st97vomydceL146Fthh/c= go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= -go.opentelemetry.io/build-tools v0.13.0 h1:0I3jJQ2zcJU8k4ZjyHNqUBX2Len1UvBIOzVP4b50g9A= -go.opentelemetry.io/build-tools v0.13.0/go.mod h1:PEtg5iWjNI9WAlKXP/xll/hgbq/Cp4Ma4T1ssKB2T0Q= go.opentelemetry.io/build-tools v0.14.0 h1:fcnriXRUVpnVIFXtdlc1fTn9g+YRxzOV0xhw4nN919c= go.opentelemetry.io/build-tools v0.14.0/go.mod h1:pxTqOr0uL/0s9+xnpuKTAhmVFDssF3O4UUUuWKQqThE= -go.opentelemetry.io/build-tools/dbotconf v0.13.0 h1:yu/2zZn96+wfdEY/rg/LPH+ScodwAhPylQKQO0YpWmk= -go.opentelemetry.io/build-tools/dbotconf v0.13.0/go.mod h1:5qJOERSYF2p4tOXoV02oBsdspvax2OCWGbUqgnYoB+8= go.opentelemetry.io/build-tools/dbotconf v0.14.0 h1:sVIUBttMR7FwkZpcY/HvnfMupAe/K0XIuCYFgAmfYHA= go.opentelemetry.io/build-tools/dbotconf v0.14.0/go.mod h1:jZADCRzN6h/DE3Ov9H5bFoOZDm55w/M2jSVkZGsZlbo= -go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= -go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -509,14 +428,10 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= 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/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20240604190554-fc45aab8b7f8 h1:WKP3FgLqWfVutBnw/dr+LNg4fzjyTQP5o+ELTIyoBrs= -golang.org/x/exp/typeparams v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0 h1:bVwtbF629Xlyxk6xLQq2TDYmqP0uiWaet5LwRebuY0k= golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -530,8 +445,6 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.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-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -550,8 +463,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -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.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -577,7 +490,6 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -588,8 +500,6 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -600,8 +510,6 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -614,8 +522,6 @@ golang.org/x/text v0.6.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.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -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.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -634,15 +540,12 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -662,23 +565,13 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= -honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= honnef.co/go/tools v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I= honnef.co/go/tools v0.5.1/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs= -mvdan.cc/editorconfig v0.2.1-0.20231228180347-1925077f8eb2 h1:8nmqQGVnHUtHuT+yvuA49lQK0y5il5IOr2PtCBkDI2M= -mvdan.cc/editorconfig v0.2.1-0.20231228180347-1925077f8eb2/go.mod h1:r8RiQJRtzrPrZdcdEs5VCMqvRxAzYDUu9a4S9z7fKh8= mvdan.cc/editorconfig v0.3.0 h1:D1D2wLYEYGpawWT5SpM5pRivgEgXjtEXwC9MWhEY0gQ= mvdan.cc/editorconfig v0.3.0/go.mod h1:NcJHuDtNOTEJ6251indKiWuzK6+VcrMuLzGMLKBFupQ= -mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= -mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA= mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU= mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo= -mvdan.cc/sh/v3 v3.8.0 h1:ZxuJipLZwr/HLbASonmXtcvvC9HXY9d2lXZHnKGjFc8= -mvdan.cc/sh/v3 v3.8.0/go.mod h1:w04623xkgBVo7/IUK89E0g8hBykgEpN0vgOj3RJr6MY= mvdan.cc/sh/v3 v3.9.0 h1:it14fyjCdQUk4jf/aYxLO3FG8jFarR9GzMCtnlvvD7c= mvdan.cc/sh/v3 v3.9.0/go.mod h1:cdBk8bgoiBI7lSZqK5JhUuq7OB64VQ7fgm85xelw3Nk= -mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U= -mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= mvdan.cc/unparam v0.0.0-20240917084806-57a3b4290ba3 h1:YkmTN1n5U60NM02j7TCSWRlW3fqNiuXe/eVXf0dLFN8= mvdan.cc/unparam v0.0.0-20240917084806-57a3b4290ba3/go.mod h1:z5yboO1sP1Q9pcfvS597TpfbNXQjphDlkCJHzt13ybc= diff --git a/vendor/github.com/DataDog/datadog-agent/comp/core/log/def/LICENSE b/vendor/github.com/DataDog/datadog-agent/comp/core/log/def/LICENSE new file mode 100644 index 0000000000..b370545be1 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/comp/core/log/def/LICENSE @@ -0,0 +1,200 @@ + 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 2016-present Datadog, 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. diff --git a/vendor/github.com/DataDog/datadog-agent/comp/core/log/def/component.go b/vendor/github.com/DataDog/datadog-agent/comp/core/log/def/component.go new file mode 100644 index 0000000000..17cb1eab14 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/comp/core/log/def/component.go @@ -0,0 +1,59 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +// Package log implements a component to handle logging internal to the agent. +// +// The component uses a number of values in BundleParams to decide how to +// initialize itself, reading values from the comp/core/config component when +// necessary. At present, it configures and wraps the global logger in +// pkg/util/log, but will eventually be self-sufficient. +// +// The mock component does not read any configuration values, and redirects +// logging output to `t.Log(..)`, for ease of investigation when a test fails. +package log + +// team: agent-shared-components + +// Component is the component type. +type Component interface { + // Trace logs the given arguments, separated by spaces, at the trace level + Trace(v ...interface{}) + // Tracef logs the given formatted arguments at the trace level + Tracef(format string, params ...interface{}) + + // Debug logs the given arguments, separated by spaces, at the debug level + Debug(v ...interface{}) + // Debugf logs the given formatted arguments at the debug level + Debugf(format string, params ...interface{}) + + // Info logs the given arguments, separated by spaces, at the info level + Info(v ...interface{}) + // Infof logs the given formatted arguments at the info level + Infof(format string, params ...interface{}) + + // Warn logs the given arguments, separated by spaces, at the warn level, + // and returns an error containing the messages. + Warn(v ...interface{}) error + // Warnf logs the given formatted arguments at the warn level, and returns + // an error containing the message. + Warnf(format string, params ...interface{}) error + + // Error logs the given arguments, separated by spaces, at the error level, + // and returns an error containing the messages. + Error(v ...interface{}) error + // Errorf logs the given formatted arguments at the error level, and returns + // an error containing the message. + Errorf(format string, params ...interface{}) error + + // Critical logs the given arguments, separated by spaces, at the critical level, + // an error containing the message. + Critical(v ...interface{}) error + // Criticalf logs the given formatted arguments at the critical level, and returns + // an error containing the message. + Criticalf(format string, params ...interface{}) error + + // Flush will flush the contents of the logs to the sinks + Flush() +} diff --git a/vendor/github.com/DataDog/datadog-agent/comp/core/log/def/params.go b/vendor/github.com/DataDog/datadog-agent/comp/core/log/def/params.go new file mode 100644 index 0000000000..30ed78cee7 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/comp/core/log/def/params.go @@ -0,0 +1,184 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +package log + +import ( + "os" + "runtime" +) + +// Params defines the parameters for this log component. +// +// Logs-related parameters are implemented as unexported fields containing +// callbacks. These fields can be set with the `LogXxx()` methods, which +// return the updated LogParams. One of `logimpl.ForOneShot` or `logimpl.ForDaemon` +// must be called. +type Params struct { + // loggerName is the name that appears in the logfile + loggerName string + + // logLevelFn returns the log level. This field is set by methods on this + // type. + logLevelFn func(configGetter) string + + // logFileFn returns the log file. This field is set by methods on this type. + logFileFn func(configGetter) string + + // logSyslogURIFn returns the syslog URI. This field is set by methods on this type. + logSyslogURIFn func(configGetter) string + + // logSyslogRFCFn returns a boolean determining whether to use syslog RFC + // 5424. This field is set by methods on this type. + logSyslogRFCFn func(configGetter) bool + + // logToConsoleFn returns a boolean determining whether to write logs to + // the console. This field is set by methods on this type. + logToConsoleFn func(configGetter) bool + + // logFormatJSONFn returns a boolean determining whether logs should be + // written in JSON format. + logFormatJSONFn func(configGetter) bool +} + +// configGetter is a subset of the comp/core/config component, able to get +// config values for the xxxFn fields in LogParams. comp/core/log uses +// this interface to get parameters that may depend on a configuration value. +type configGetter interface { + GetString(key string) string + GetBool(key string) bool +} + +// ForOneShot sets up logging parameters for a one-shot app. +// +// If overrideFromEnv is set, then DD_LOG_LEVEL will override the given level. +// +// Otherwise, file logging is disabled, syslog is disabled, console logging is +// enabled, and JSON formatting is disabled. +func ForOneShot(loggerName, level string, overrideFromEnv bool) Params { + params := Params{} + params.loggerName = loggerName + if overrideFromEnv { + params.logLevelFn = func(configGetter) string { + value, found := os.LookupEnv("DD_LOG_LEVEL") + if !found { + return level + } + return value + } + } else { + params.logLevelFn = func(configGetter) string { return level } + } + params.logFileFn = func(configGetter) string { return "" } + params.logSyslogURIFn = func(configGetter) string { return "" } + params.logSyslogRFCFn = func(configGetter) bool { return false } + params.logToConsoleFn = func(configGetter) bool { return true } + params.logFormatJSONFn = func(configGetter) bool { return false } + return params +} + +// ForDaemon sets up logging parameters for a daemon app. +// +// The log level is set based on the `log_level` config parameter. +// +// The log file is set based on the logFileConfig config parameter, +// or disabled if `disable_file_logging` is set. +// +// On platforms which support it, syslog is enabled if `log_to_syslog` is set, +// using `syslog_uri` or defaulting to "unixgram:///dev/log" if that is empty. +// The `syslog_rfc` config parameter determines whether this produces 5424-compliant +// output. +// +// Console logging is enabled if `log_to_console` is set. Lots are formatted +// as JSON if `log_format_json` is set. +func ForDaemon(loggerName, logFileConfig, defaultLogFile string) Params { + params := Params{} + params.loggerName = loggerName + params.logLevelFn = func(g configGetter) string { return g.GetString("log_level") } + params.logFileFn = func(g configGetter) string { + if g.GetBool("disable_file_logging") { + return "" + } + logFile := g.GetString(logFileConfig) + if logFile == "" { + logFile = defaultLogFile + } + return logFile + } + params.logSyslogURIFn = func(g configGetter) string { + if runtime.GOOS == "windows" { + return "" // syslog not supported on Windows + } + enabled := g.GetBool("log_to_syslog") + uri := g.GetString("syslog_uri") + + if !enabled { + return "" + } + + if uri == "" { + return "unixgram:///dev/log" + } + + return uri + } + params.logSyslogRFCFn = func(g configGetter) bool { return g.GetBool("syslog_rfc") } + params.logToConsoleFn = func(g configGetter) bool { return g.GetBool("log_to_console") } + params.logFormatJSONFn = func(g configGetter) bool { return g.GetBool("log_format_json") } + return params +} + +// LogToFile modifies the parameters to set the destination log file, overriding any +// previous logfile parameter. +func (params *Params) LogToFile(logFile string) { + params.logFileFn = func(configGetter) string { return logFile } +} + +// LogToConsole modifies the parameters to toggle logging to console +func (params *Params) LogToConsole(logToConsole bool) { + params.logToConsoleFn = func(configGetter) bool { return logToConsole } +} + +// LoggerName is the name that appears in the logfile +func (params Params) LoggerName() string { + return params.loggerName +} + +// These functions are used in unit tests. + +// LogLevelFn returns the log level +func (params Params) LogLevelFn(c configGetter) string { + return params.logLevelFn(c) +} + +// LogFileFn returns the log file +func (params Params) LogFileFn(c configGetter) string { + return params.logFileFn(c) +} + +// IsLogLevelFnSet returns whether the logLevelFn field is set +func (params Params) IsLogLevelFnSet() bool { + return params.logLevelFn != nil +} + +// LogSyslogURIFn returns the syslog URI +func (params Params) LogSyslogURIFn(c configGetter) string { + return params.logSyslogURIFn(c) +} + +// LogSyslogRFCFn returns a boolean determining whether to use syslog RFC 5424 +func (params Params) LogSyslogRFCFn(c configGetter) bool { + return params.logSyslogRFCFn(c) +} + +// LogToConsoleFn returns a boolean determining whether to write logs to the console +func (params Params) LogToConsoleFn(c configGetter) bool { + return params.logToConsoleFn(c) +} + +// LogFormatJSONFn returns a boolean determining whether logs should be written in JSON format +func (params Params) LogFormatJSONFn(c configGetter) bool { + return params.logFormatJSONFn(c) +} diff --git a/vendor/github.com/DataDog/datadog-agent/comp/core/telemetry/telemetryimpl/telemetry_mock.go b/vendor/github.com/DataDog/datadog-agent/comp/core/telemetry/telemetryimpl/telemetry_mock.go index 5d7a161c29..5d33b0fb45 100644 --- a/vendor/github.com/DataDog/datadog-agent/comp/core/telemetry/telemetryimpl/telemetry_mock.go +++ b/vendor/github.com/DataDog/datadog-agent/comp/core/telemetry/telemetryimpl/telemetry_mock.go @@ -44,9 +44,10 @@ func newMock(deps testDependencies) telemetry.Mock { telemetry := &telemetryImplMock{ telemetryImpl{ - mutex: &mutex, - registry: reg, - meterProvider: provider, + mutex: &mutex, + registry: reg, + meterProvider: provider, + defaultRegistry: prometheus.NewRegistry(), }, } diff --git a/vendor/github.com/DataDog/datadog-agent/comp/logs/agent/config/config.go b/vendor/github.com/DataDog/datadog-agent/comp/logs/agent/config/config.go index 5c188e2139..4a38335832 100644 --- a/vendor/github.com/DataDog/datadog-agent/comp/logs/agent/config/config.go +++ b/vendor/github.com/DataDog/datadog-agent/comp/logs/agent/config/config.go @@ -15,6 +15,7 @@ import ( "time" pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" + "github.com/DataDog/datadog-agent/pkg/config/structure" pkgconfigutils "github.com/DataDog/datadog-agent/pkg/config/utils" "github.com/DataDog/datadog-agent/pkg/util/log" ) @@ -70,7 +71,7 @@ func GlobalProcessingRules(coreConfig pkgconfigmodel.Reader) ([]*ProcessingRule, if s, ok := raw.(string); ok && s != "" { err = json.Unmarshal([]byte(s), &rules) } else { - err = coreConfig.UnmarshalKey("logs_config.processing_rules", &rules) + err = structure.UnmarshalKey(coreConfig, "logs_config.processing_rules", &rules, structure.ConvertEmptyStringToNil) } if err != nil { return nil, err diff --git a/vendor/github.com/DataDog/datadog-agent/comp/logs/agent/config/config_keys.go b/vendor/github.com/DataDog/datadog-agent/comp/logs/agent/config/config_keys.go index df5ee1ad4a..0f9dbbf2b3 100644 --- a/vendor/github.com/DataDog/datadog-agent/comp/logs/agent/config/config_keys.go +++ b/vendor/github.com/DataDog/datadog-agent/comp/logs/agent/config/config_keys.go @@ -11,6 +11,7 @@ import ( pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup" + "github.com/DataDog/datadog-agent/pkg/config/structure" "github.com/DataDog/datadog-agent/pkg/util/log" ) @@ -152,7 +153,7 @@ func (l *LogsConfigKeys) getAdditionalEndpoints() []unmarshalEndpoint { if s, ok := raw.(string); ok && s != "" { err = json.Unmarshal([]byte(s), &endpoints) } else { - err = l.getConfig().UnmarshalKey(configKey, &endpoints) + err = structure.UnmarshalKey(l.getConfig(), configKey, &endpoints, structure.EnableSquash) } if err != nil { log.Warnf("Could not parse additional_endpoints for logs: %v", err) diff --git a/vendor/github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl/agent.go b/vendor/github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl/agent.go index c874c00b21..d1910d28db 100644 --- a/vendor/github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl/agent.go +++ b/vendor/github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl/agent.go @@ -13,7 +13,7 @@ import ( configComponent "github.com/DataDog/datadog-agent/comp/core/config" "github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface" - logComponent "github.com/DataDog/datadog-agent/comp/core/log" + log "github.com/DataDog/datadog-agent/comp/core/log/def" "github.com/DataDog/datadog-agent/comp/logs/agent/config" "github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline" pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" @@ -42,14 +42,14 @@ type Dependencies struct { fx.In Lc fx.Lifecycle - Log logComponent.Component + Log log.Component Config configComponent.Component Hostname hostnameinterface.Component } // Agent represents the data pipeline that collects, decodes, processes and sends logs to the backend. type Agent struct { - log logComponent.Component + log log.Component config pkgconfigmodel.Reader hostname hostnameinterface.Component @@ -219,7 +219,7 @@ func (a *Agent) SetupPipeline( } // buildEndpoints builds endpoints for the logs agent -func buildEndpoints(coreConfig pkgconfigmodel.Reader, log logComponent.Component) (*config.Endpoints, error) { +func buildEndpoints(coreConfig pkgconfigmodel.Reader, log log.Component) (*config.Endpoints, error) { httpConnectivity := config.HTTPConnectivityFailure if endpoints, err := config.BuildHTTPEndpoints(coreConfig, intakeTrackType, config.AgentJSONIntakeProtocol, config.DefaultIntakeOrigin); err == nil { httpConnectivity = http.CheckConnectivity(endpoints.Main, coreConfig) diff --git a/vendor/github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter/factory.go b/vendor/github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter/factory.go index febe51094e..24f8352902 100644 --- a/vendor/github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter/factory.go +++ b/vendor/github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter/factory.go @@ -79,7 +79,7 @@ func (f *factory) createLogsExporter( ctx, cancel := context.WithCancel(ctx) // cancel() runs on shutdown - return exporterhelper.NewLogsExporter( + return exporterhelper.NewLogs( ctx, set, c, diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/nodetreemodel/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/config/nodetreemodel/LICENSE new file mode 100644 index 0000000000..b370545be1 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/nodetreemodel/LICENSE @@ -0,0 +1,200 @@ + 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 2016-present Datadog, 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. diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/nodetreemodel/config.go b/vendor/github.com/DataDog/datadog-agent/pkg/config/nodetreemodel/config.go new file mode 100644 index 0000000000..2bef6c0b81 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/nodetreemodel/config.go @@ -0,0 +1,868 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +// Package nodetreemodel defines a model for the config using a tree of nodes +package nodetreemodel + +import ( + "bytes" + "errors" + "fmt" + "io" + "os" + "path" + "reflect" + "strconv" + "strings" + "sync" + "time" + + "path/filepath" + + "github.com/DataDog/viper" + "github.com/mohae/deepcopy" + "github.com/spf13/afero" + "golang.org/x/exp/slices" + + "github.com/DataDog/datadog-agent/pkg/config/model" + "github.com/DataDog/datadog-agent/pkg/util/log" +) + +// sources list the known sources, following the order of hierarchy between them +var sources = []model.Source{ + model.SourceDefault, + model.SourceUnknown, + model.SourceFile, + model.SourceEnvVar, + model.SourceFleetPolicies, + model.SourceAgentRuntime, + model.SourceLocalConfigProcess, + model.SourceRC, + model.SourceCLI, +} + +// safeConfig implements Config: +// - wraps viper with a safety lock +// - implements the additional DDHelpers +type safeConfig struct { + *viper.Viper + configSources map[model.Source]*viper.Viper + sync.RWMutex + envPrefix string + envKeyReplacer *strings.Replacer + + notificationReceivers []model.NotificationReceiver + + // Proxy settings + proxies *model.Proxy + + // configEnvVars is the set of env vars that are consulted for + // configuration values. + configEnvVars map[string]struct{} + + // keys that have been used but are unknown + // used to warn (a single time) on use + unknownKeys map[string]struct{} + + // extraConfigFilePaths represents additional configuration file paths that will be merged into the main configuration when ReadInConfig() is called. + extraConfigFilePaths []string +} + +// OnUpdate adds a callback to the list receivers to be called each time a value is changed in the configuration +// by a call to the 'Set' method. +// Callbacks are only called if the value is effectively changed. +func (c *safeConfig) OnUpdate(callback model.NotificationReceiver) { + c.Lock() + defer c.Unlock() + c.notificationReceivers = append(c.notificationReceivers, callback) +} + +// Set wraps Viper for concurrent access +func (c *safeConfig) Set(key string, newValue interface{}, source model.Source) { + if source == model.SourceDefault { + c.SetDefault(key, newValue) + return + } + + // modify the config then release the lock to avoid deadlocks while notifying + var receivers []model.NotificationReceiver + c.Lock() + previousValue := c.Viper.Get(key) + c.configSources[source].Set(key, newValue) + c.mergeViperInstances(key) + if !reflect.DeepEqual(previousValue, newValue) { + // if the value has not changed, do not duplicate the slice so that no callback is called + receivers = slices.Clone(c.notificationReceivers) + } + c.Unlock() + + // notifying all receiver about the updated setting + for _, receiver := range receivers { + receiver(key, previousValue, newValue) + } +} + +// SetWithoutSource sets the given value using source Unknown +func (c *safeConfig) SetWithoutSource(key string, value interface{}) { + c.Set(key, value, model.SourceUnknown) +} + +// SetDefault wraps Viper for concurrent access +func (c *safeConfig) SetDefault(key string, value interface{}) { + c.Lock() + defer c.Unlock() + c.configSources[model.SourceDefault].Set(key, value) + c.Viper.SetDefault(key, value) +} + +// UnsetForSource unsets a config entry for a given source +func (c *safeConfig) UnsetForSource(key string, source model.Source) { + // modify the config then release the lock to avoid deadlocks while notifying + var receivers []model.NotificationReceiver + c.Lock() + previousValue := c.Viper.Get(key) + c.configSources[source].Set(key, nil) + c.mergeViperInstances(key) + newValue := c.Viper.Get(key) // Can't use nil, so we get the newly computed value + if previousValue != nil { + // if the value has not changed, do not duplicate the slice so that no callback is called + receivers = slices.Clone(c.notificationReceivers) + } + c.Unlock() + + // notifying all receiver about the updated setting + for _, receiver := range receivers { + receiver(key, previousValue, newValue) + } +} + +// mergeViperInstances is called after a change in an instance of Viper +// to recompute the state of the main Viper +// (it must be used with a lock to prevent concurrent access to Viper) +func (c *safeConfig) mergeViperInstances(key string) { + var val interface{} + for _, source := range sources { + if currVal := c.configSources[source].Get(key); currVal != nil { + val = currVal + } + } + c.Viper.Set(key, val) +} + +// SetKnown adds a key to the set of known valid config keys +func (c *safeConfig) SetKnown(key string) { + c.Lock() + defer c.Unlock() + c.Viper.SetKnown(key) +} + +// IsKnown returns whether a key is known +func (c *safeConfig) IsKnown(key string) bool { + c.RLock() + defer c.RUnlock() + + return c.Viper.IsKnown(key) +} + +// checkKnownKey checks if a key is known, and if not logs a warning +// Only a single warning will be logged per unknown key. +// +// Must be called with the lock read-locked. +// The lock can be released and re-locked. +func (c *safeConfig) checkKnownKey(key string) { + if c.Viper.IsKnown(key) { + return + } + + if _, ok := c.unknownKeys[key]; ok { + return + } + + // need to write-lock to add the key to the unknownKeys map + c.RUnlock() + // but we need to have the lock in the same state (RLocked) at the end of the function + defer c.RLock() + + c.Lock() + c.unknownKeys[key] = struct{}{} + c.Unlock() + + // log without holding the lock + log.Warnf("config key %v is unknown", key) +} + +// GetKnownKeysLowercased returns all the keys that meet at least one of these criteria: +// 1) have a default, 2) have an environment variable binded or 3) have been SetKnown() +// Note that it returns the keys lowercased. +func (c *safeConfig) GetKnownKeysLowercased() map[string]interface{} { + c.RLock() + defer c.RUnlock() + + // GetKnownKeysLowercased returns a fresh map, so the caller may do with it + // as they please without holding the lock. + return c.Viper.GetKnownKeys() +} + +// ParseEnvAsStringSlice registers a transformer function to parse an an environment variables as a []string. +func (c *safeConfig) ParseEnvAsStringSlice(key string, fn func(string) []string) { + c.Lock() + defer c.Unlock() + c.Viper.SetEnvKeyTransformer(key, func(data string) interface{} { return fn(data) }) +} + +// ParseEnvAsMapStringInterface registers a transformer function to parse an an environment variables as a +// map[string]interface{}. +func (c *safeConfig) ParseEnvAsMapStringInterface(key string, fn func(string) map[string]interface{}) { + c.Lock() + defer c.Unlock() + c.Viper.SetEnvKeyTransformer(key, func(data string) interface{} { return fn(data) }) +} + +// ParseEnvAsSliceMapString registers a transformer function to parse an an environment variables as a []map[string]string. +func (c *safeConfig) ParseEnvAsSliceMapString(key string, fn func(string) []map[string]string) { + c.Lock() + defer c.Unlock() + c.Viper.SetEnvKeyTransformer(key, func(data string) interface{} { return fn(data) }) +} + +// ParseEnvAsSlice registers a transformer function to parse an an environment variables as a +// []interface{}. +func (c *safeConfig) ParseEnvAsSlice(key string, fn func(string) []interface{}) { + c.Lock() + defer c.Unlock() + c.Viper.SetEnvKeyTransformer(key, func(data string) interface{} { return fn(data) }) +} + +// SetFs wraps Viper for concurrent access +func (c *safeConfig) SetFs(fs afero.Fs) { + c.Lock() + defer c.Unlock() + c.Viper.SetFs(fs) +} + +// IsSet wraps Viper for concurrent access +func (c *safeConfig) IsSet(key string) bool { + c.RLock() + defer c.RUnlock() + return c.Viper.IsSet(key) +} + +func (c *safeConfig) AllKeysLowercased() []string { + c.RLock() + defer c.RUnlock() + return c.Viper.AllKeys() +} + +// Get wraps Viper for concurrent access +func (c *safeConfig) Get(key string) interface{} { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return deepcopy.Copy(val) +} + +// GetAllSources returns the value of a key for each source +func (c *safeConfig) GetAllSources(key string) []model.ValueWithSource { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + vals := make([]model.ValueWithSource, len(sources)) + for i, source := range sources { + vals[i] = model.ValueWithSource{ + Source: source, + Value: deepcopy.Copy(c.configSources[source].Get(key)), + } + } + return vals +} + +// GetString wraps Viper for concurrent access +func (c *safeConfig) GetString(key string) string { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetStringE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return val +} + +// GetBool wraps Viper for concurrent access +func (c *safeConfig) GetBool(key string) bool { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetBoolE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return val +} + +// GetInt wraps Viper for concurrent access +func (c *safeConfig) GetInt(key string) int { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetIntE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return val +} + +// GetInt32 wraps Viper for concurrent access +func (c *safeConfig) GetInt32(key string) int32 { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetInt32E(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return val +} + +// GetInt64 wraps Viper for concurrent access +func (c *safeConfig) GetInt64(key string) int64 { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetInt64E(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return val +} + +// GetFloat64 wraps Viper for concurrent access +func (c *safeConfig) GetFloat64(key string) float64 { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetFloat64E(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return val +} + +// GetTime wraps Viper for concurrent access +func (c *safeConfig) GetTime(key string) time.Time { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetTimeE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return val +} + +// GetDuration wraps Viper for concurrent access +func (c *safeConfig) GetDuration(key string) time.Duration { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetDurationE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return val +} + +// GetStringSlice wraps Viper for concurrent access +func (c *safeConfig) GetStringSlice(key string) []string { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetStringSliceE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return slices.Clone(val) +} + +// GetFloat64SliceE loads a key as a []float64 +func (c *safeConfig) GetFloat64SliceE(key string) ([]float64, error) { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + + // We're using GetStringSlice because viper can only parse list of string from env variables + list, err := c.Viper.GetStringSliceE(key) + if err != nil { + return nil, fmt.Errorf("'%v' is not a list", key) + } + + res := []float64{} + for _, item := range list { + nb, err := strconv.ParseFloat(item, 64) + if err != nil { + return nil, fmt.Errorf("value '%v' from '%v' is not a float64", item, key) + } + res = append(res, nb) + } + return res, nil +} + +// GetStringMap wraps Viper for concurrent access +func (c *safeConfig) GetStringMap(key string) map[string]interface{} { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetStringMapE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return deepcopy.Copy(val).(map[string]interface{}) +} + +// GetStringMapString wraps Viper for concurrent access +func (c *safeConfig) GetStringMapString(key string) map[string]string { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetStringMapStringE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return deepcopy.Copy(val).(map[string]string) +} + +// GetStringMapStringSlice wraps Viper for concurrent access +func (c *safeConfig) GetStringMapStringSlice(key string) map[string][]string { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetStringMapStringSliceE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return deepcopy.Copy(val).(map[string][]string) +} + +// GetSizeInBytes wraps Viper for concurrent access +func (c *safeConfig) GetSizeInBytes(key string) uint { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + val, err := c.Viper.GetSizeInBytesE(key) + if err != nil { + log.Warnf("failed to get configuration value for key %q: %s", key, err) + } + return val +} + +// GetSource wraps Viper for concurrent access +func (c *safeConfig) GetSource(key string) model.Source { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + var source model.Source + for _, s := range sources { + if c.configSources[s].Get(key) != nil { + source = s + } + } + return source +} + +// SetEnvPrefix wraps Viper for concurrent access, and keeps the envPrefix for +// future reference +func (c *safeConfig) SetEnvPrefix(in string) { + c.Lock() + defer c.Unlock() + c.configSources[model.SourceEnvVar].SetEnvPrefix(in) + c.Viper.SetEnvPrefix(in) + c.envPrefix = in +} + +// mergeWithEnvPrefix derives the environment variable that Viper will use for a given key. +// mergeWithEnvPrefix must be called while holding the config log (read or write). +func (c *safeConfig) mergeWithEnvPrefix(key string) string { + return strings.Join([]string{c.envPrefix, strings.ToUpper(key)}, "_") +} + +// BindEnv wraps Viper for concurrent access, and adds tracking of the configurable env vars +func (c *safeConfig) BindEnv(input ...string) { + c.Lock() + defer c.Unlock() + var envKeys []string + + // If one input is given, viper derives an env key from it; otherwise, all inputs after + // the first are literal env vars. + if len(input) == 1 { + envKeys = []string{c.mergeWithEnvPrefix(input[0])} + } else { + envKeys = input[1:] + } + + for _, key := range envKeys { + // apply EnvKeyReplacer to each key + if c.envKeyReplacer != nil { + key = c.envKeyReplacer.Replace(key) + } + c.configEnvVars[key] = struct{}{} + } + + _ = c.configSources[model.SourceEnvVar].BindEnv(input...) + _ = c.Viper.BindEnv(input...) +} + +// SetEnvKeyReplacer wraps Viper for concurrent access +func (c *safeConfig) SetEnvKeyReplacer(r *strings.Replacer) { + c.Lock() + defer c.Unlock() + c.configSources[model.SourceEnvVar].SetEnvKeyReplacer(r) + c.Viper.SetEnvKeyReplacer(r) + c.envKeyReplacer = r +} + +// UnmarshalKey wraps Viper for concurrent access +func (c *safeConfig) UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error { + c.RLock() + defer c.RUnlock() + c.checkKnownKey(key) + return c.Viper.UnmarshalKey(key, rawVal, opts...) +} + +// Unmarshal wraps Viper for concurrent access +func (c *safeConfig) Unmarshal(rawVal interface{}) error { + c.RLock() + defer c.RUnlock() + return c.Viper.Unmarshal(rawVal) +} + +// UnmarshalExact wraps Viper for concurrent access +func (c *safeConfig) UnmarshalExact(rawVal interface{}) error { + c.RLock() + defer c.RUnlock() + return c.Viper.UnmarshalExact(rawVal) +} + +// ReadInConfig wraps Viper for concurrent access +func (c *safeConfig) ReadInConfig() error { + c.Lock() + defer c.Unlock() + // ReadInConfig reset configuration with the main config file + err := errors.Join(c.Viper.ReadInConfig(), c.configSources[model.SourceFile].ReadInConfig()) + if err != nil { + return err + } + + type extraConf struct { + path string + content []byte + } + + // Read extra config files + extraConfContents := []extraConf{} + for _, path := range c.extraConfigFilePaths { + b, err := os.ReadFile(path) + if err != nil { + return fmt.Errorf("could not read extra config file '%s': %w", path, err) + } + extraConfContents = append(extraConfContents, extraConf{path: path, content: b}) + } + + // Merge with base config and 'file' config + for _, confFile := range extraConfContents { + err = errors.Join(c.Viper.MergeConfig(bytes.NewReader(confFile.content)), c.configSources[model.SourceFile].MergeConfig(bytes.NewReader(confFile.content))) + if err != nil { + return fmt.Errorf("error merging %s config file: %w", confFile.path, err) + } + log.Infof("extra configuration file %s was loaded successfully", confFile.path) + } + return nil +} + +// ReadConfig wraps Viper for concurrent access +func (c *safeConfig) ReadConfig(in io.Reader) error { + c.Lock() + defer c.Unlock() + b, err := io.ReadAll(in) + if err != nil { + return err + } + err = c.Viper.ReadConfig(bytes.NewReader(b)) + if err != nil { + return err + } + return c.configSources[model.SourceFile].ReadConfig(bytes.NewReader(b)) +} + +// MergeConfig wraps Viper for concurrent access +func (c *safeConfig) MergeConfig(in io.Reader) error { + c.Lock() + defer c.Unlock() + return c.Viper.MergeConfig(in) +} + +// MergeFleetPolicy merges the configuration from the reader given with an existing config +// it overrides the existing values with the new ones in the FleetPolicies source, and updates the main config +// according to sources priority order. +// +// Note: this should only be called at startup, as notifiers won't receive a notification when this loads +func (c *safeConfig) MergeFleetPolicy(configPath string) error { + c.Lock() + defer c.Unlock() + + // Check file existence & open it + _, err := os.Stat(configPath) + if err != nil && !os.IsNotExist(err) { + return fmt.Errorf("unable to open config file %s: %w", configPath, err) + } else if err != nil && os.IsNotExist(err) { + return nil + } + in, err := os.Open(configPath) + if err != nil { + return fmt.Errorf("unable to open config file %s: %w", configPath, err) + } + defer in.Close() + + c.configSources[model.SourceFleetPolicies].SetConfigType("yaml") + err = c.configSources[model.SourceFleetPolicies].MergeConfigOverride(in) + if err != nil { + return err + } + for _, key := range c.configSources[model.SourceFleetPolicies].AllKeys() { + c.mergeViperInstances(key) + } + log.Infof("Fleet policies configuration %s successfully merged", path.Base(configPath)) + return nil +} + +// MergeConfigMap merges the configuration from the map given with an existing config. +// Note that the map given may be modified. +func (c *safeConfig) MergeConfigMap(cfg map[string]any) error { + c.Lock() + defer c.Unlock() + return c.Viper.MergeConfigMap(cfg) +} + +// AllSettings wraps Viper for concurrent access +func (c *safeConfig) AllSettings() map[string]interface{} { + c.RLock() + defer c.RUnlock() + + // AllSettings returns a fresh map, so the caller may do with it + // as they please without holding the lock. + return c.Viper.AllSettings() +} + +// AllSettingsWithoutDefault returns a copy of the all the settings in the configuration without defaults +func (c *safeConfig) AllSettingsWithoutDefault() map[string]interface{} { + c.RLock() + defer c.RUnlock() + + // AllSettingsWithoutDefault returns a fresh map, so the caller may do with it + // as they please without holding the lock. + return c.Viper.AllSettingsWithoutDefault() +} + +// AllSettingsBySource returns the settings from each source (file, env vars, ...) +func (c *safeConfig) AllSettingsBySource() map[model.Source]interface{} { + c.RLock() + defer c.RUnlock() + + sources := []model.Source{ + model.SourceDefault, + model.SourceUnknown, + model.SourceFile, + model.SourceEnvVar, + model.SourceFleetPolicies, + model.SourceAgentRuntime, + model.SourceRC, + model.SourceCLI, + model.SourceLocalConfigProcess, + } + res := map[model.Source]interface{}{} + for _, source := range sources { + res[source] = c.configSources[source].AllSettingsWithoutDefault() + } + res[model.SourceProvided] = c.Viper.AllSettingsWithoutDefault() + return res +} + +// AddConfigPath wraps Viper for concurrent access +func (c *safeConfig) AddConfigPath(in string) { + c.Lock() + defer c.Unlock() + c.configSources[model.SourceFile].AddConfigPath(in) + c.Viper.AddConfigPath(in) +} + +// AddExtraConfigPaths allows adding additional configuration files +// which will be merged into the main configuration during the ReadInConfig call. +// Configuration files are merged sequentially. If a key already exists and the foreign value type matches the existing one, the foreign value overrides it. +// If both the existing value and the new value are nested configurations, they are merged recursively following the same principles. +func (c *safeConfig) AddExtraConfigPaths(ins []string) error { + if len(ins) == 0 { + return nil + } + c.Lock() + defer c.Unlock() + var pathsToAdd []string + var errs []error + for _, in := range ins { + in, err := filepath.Abs(in) + if err != nil { + errs = append(errs, fmt.Errorf("could not get absolute path of extra config file '%s': %s", in, err)) + continue + } + if slices.Index(c.extraConfigFilePaths, in) == -1 && slices.Index(pathsToAdd, in) == -1 { + pathsToAdd = append(pathsToAdd, in) + } + } + err := errors.Join(errs...) + if err == nil { + c.extraConfigFilePaths = append(c.extraConfigFilePaths, pathsToAdd...) + } + return err +} + +// SetConfigName wraps Viper for concurrent access +func (c *safeConfig) SetConfigName(in string) { + c.Lock() + defer c.Unlock() + c.configSources[model.SourceFile].SetConfigName(in) + c.Viper.SetConfigName(in) +} + +// SetConfigFile wraps Viper for concurrent access +func (c *safeConfig) SetConfigFile(in string) { + c.Lock() + defer c.Unlock() + c.configSources[model.SourceFile].SetConfigFile(in) + c.Viper.SetConfigFile(in) +} + +// SetConfigType wraps Viper for concurrent access +func (c *safeConfig) SetConfigType(in string) { + c.Lock() + defer c.Unlock() + c.configSources[model.SourceFile].SetConfigType(in) + c.Viper.SetConfigType(in) +} + +// ConfigFileUsed wraps Viper for concurrent access +func (c *safeConfig) ConfigFileUsed() string { + c.RLock() + defer c.RUnlock() + return c.Viper.ConfigFileUsed() +} + +func (c *safeConfig) SetTypeByDefaultValue(in bool) { + c.Lock() + defer c.Unlock() + for _, source := range sources { + c.configSources[source].SetTypeByDefaultValue(in) + } + c.Viper.SetTypeByDefaultValue(in) +} + +// GetEnvVars implements the Config interface +func (c *safeConfig) GetEnvVars() []string { + c.RLock() + defer c.RUnlock() + vars := make([]string, 0, len(c.configEnvVars)) + for v := range c.configEnvVars { + vars = append(vars, v) + } + return vars +} + +// BindEnvAndSetDefault implements the Config interface +func (c *safeConfig) BindEnvAndSetDefault(key string, val interface{}, env ...string) { + c.SetDefault(key, val) + c.BindEnv(append([]string{key}, env...)...) //nolint:errcheck +} + +func (c *safeConfig) Warnings() *model.Warnings { + return nil +} + +func (c *safeConfig) Object() model.Reader { + return c +} + +// NewConfig returns a new Config object. +func NewConfig(name string, envPrefix string, envKeyReplacer *strings.Replacer) model.Config { + config := safeConfig{ + Viper: viper.New(), + configSources: map[model.Source]*viper.Viper{}, + configEnvVars: map[string]struct{}{}, + unknownKeys: map[string]struct{}{}, + } + + // load one Viper instance per source of setting change + for _, source := range sources { + config.configSources[source] = viper.New() + } + + config.SetTypeByDefaultValue(true) + config.SetConfigName(name) + config.SetEnvPrefix(envPrefix) + config.SetEnvKeyReplacer(envKeyReplacer) + + return &config +} + +// CopyConfig copies the given config to the receiver config. This should only be used in tests as replacing +// the global config reference is unsafe. +func (c *safeConfig) CopyConfig(cfg model.Config) { + c.Lock() + defer c.Unlock() + + if cfg, ok := cfg.(*safeConfig); ok { + c.Viper = cfg.Viper + c.configSources = cfg.configSources + c.envPrefix = cfg.envPrefix + c.envKeyReplacer = cfg.envKeyReplacer + c.proxies = cfg.proxies + c.configEnvVars = cfg.configEnvVars + c.unknownKeys = cfg.unknownKeys + c.notificationReceivers = cfg.notificationReceivers + return + } + panic("Replacement config must be an instance of safeConfig") +} + +// GetProxies returns the proxy settings from the configuration +func (c *safeConfig) GetProxies() *model.Proxy { + c.Lock() + defer c.Unlock() + if c.proxies != nil { + return c.proxies + } + if c.Viper.GetBool("fips.enabled") { + return nil + } + if !c.Viper.IsSet("proxy.http") && !c.Viper.IsSet("proxy.https") && !c.Viper.IsSet("proxy.no_proxy") { + return nil + } + p := &model.Proxy{ + HTTP: c.Viper.GetString("proxy.http"), + HTTPS: c.Viper.GetString("proxy.https"), + NoProxy: c.Viper.GetStringSlice("proxy.no_proxy"), + } + + c.proxies = p + return c.proxies +} + +func (c *safeConfig) ExtraConfigFilesUsed() []string { + c.Lock() + defer c.Unlock() + res := make([]string, len(c.extraConfigFilePaths)) + copy(res, c.extraConfigFilePaths) + return res +} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/config.go b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/config.go index 4cf537291a..de296d7c17 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/config.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/config.go @@ -28,6 +28,8 @@ import ( "github.com/DataDog/datadog-agent/pkg/collector/check/defaults" pkgconfigenv "github.com/DataDog/datadog-agent/pkg/config/env" pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" + "github.com/DataDog/datadog-agent/pkg/config/nodetreemodel" + "github.com/DataDog/datadog-agent/pkg/config/teeconfig" "github.com/DataDog/datadog-agent/pkg/util/hostname/validate" "github.com/DataDog/datadog-agent/pkg/util/log" "github.com/DataDog/datadog-agent/pkg/util/optional" @@ -78,8 +80,10 @@ const ( // DefaultCompressorKind is the default compressor. Options available are 'zlib' and 'zstd' DefaultCompressorKind = "zlib" - // DefaultZstdCompressionLevel should mirror the default compression level defined in https://github.com/DataDog/zstd/blob/1.x/zstd.go#L23 - DefaultZstdCompressionLevel = 5 + // DefaultZstdCompressionLevel is the default compression level for `zstd`. + // Compression level 1 provides the lowest compression ratio, but uses much less RSS especially + // in situations where we have a high value for `GOMAXPROCS`. + DefaultZstdCompressionLevel = 1 // DefaultLogsSenderBackoffFactor is the default logs sender backoff randomness factor DefaultLogsSenderBackoffFactor = 2.0 @@ -238,8 +242,23 @@ var serverlessConfigComponents = []func(pkgconfigmodel.Setup){ func init() { osinit() + // Configure Datadog global configuration - datadog = pkgconfigmodel.NewConfig("datadog", "DD", strings.NewReplacer(".", "_")) + envvar, found := os.LookupEnv("DD_CONF_NODETREEMODEL") + // Possible values for DD_CONF_NODETREEMODEL: + // - "enable": Use the nodetreemodel for the config, instead of viper + // - "tee": Construct both viper and nodetreemodel. Write to both, only read from viper + // - other: Use viper for the config + if found && envvar == "enable" { + datadog = nodetreemodel.NewConfig("datadog", "DD", strings.NewReplacer(".", "_")) + } else if found && envvar == "tee" { + var viperConfig = pkgconfigmodel.NewConfig("datadog", "DD", strings.NewReplacer(".", "_")) + var nodetreeConfig = nodetreemodel.NewConfig("datadog", "DD", strings.NewReplacer(".", "_")) + datadog = teeconfig.NewTeeConfig(viperConfig, nodetreeConfig) + } else { + datadog = pkgconfigmodel.NewConfig("datadog", "DD", strings.NewReplacer(".", "_")) + } + systemProbe = pkgconfigmodel.NewConfig("system-probe", "DD", strings.NewReplacer(".", "_")) // Configuration defaults @@ -334,6 +353,9 @@ func InitConfig(config pkgconfigmodel.Config) { config.BindEnvAndSetDefault("flare_stripped_keys", []string{}) config.BindEnvAndSetDefault("scrubber.additional_keys", []string{}) + // flare configs + config.BindEnvAndSetDefault("flare_provider_timeout", 10) + // Docker config.BindEnvAndSetDefault("docker_query_timeout", int64(5)) config.BindEnvAndSetDefault("docker_labels_as_tags", map[string]string{}) @@ -441,9 +463,9 @@ func InitConfig(config pkgconfigmodel.Config) { config.BindEnvAndSetDefault("network_path.collector.workers", 4) config.BindEnvAndSetDefault("network_path.collector.timeout", DefaultNetworkPathTimeout) config.BindEnvAndSetDefault("network_path.collector.max_ttl", DefaultNetworkPathMaxTTL) - config.BindEnvAndSetDefault("network_path.collector.input_chan_size", 1000) - config.BindEnvAndSetDefault("network_path.collector.processing_chan_size", 1000) - config.BindEnvAndSetDefault("network_path.collector.pathtest_contexts_limit", 10000) + config.BindEnvAndSetDefault("network_path.collector.input_chan_size", 100000) + config.BindEnvAndSetDefault("network_path.collector.processing_chan_size", 100000) + config.BindEnvAndSetDefault("network_path.collector.pathtest_contexts_limit", 100000) config.BindEnvAndSetDefault("network_path.collector.pathtest_ttl", "15m") config.BindEnvAndSetDefault("network_path.collector.pathtest_interval", "5m") config.BindEnvAndSetDefault("network_path.collector.flush_interval", "10s") @@ -703,6 +725,8 @@ func InitConfig(config pkgconfigmodel.Config) { // Admission controller config.BindEnvAndSetDefault("admission_controller.enabled", false) + config.BindEnvAndSetDefault("admission_controller.validation.enabled", true) + config.BindEnvAndSetDefault("admission_controller.mutation.enabled", true) config.BindEnvAndSetDefault("admission_controller.mutate_unlabelled", false) config.BindEnvAndSetDefault("admission_controller.port", 8000) config.BindEnvAndSetDefault("admission_controller.container_registry", "gcr.io/datadoghq") @@ -973,6 +997,8 @@ func InitConfig(config pkgconfigmodel.Config) { config.BindEnvAndSetDefault("remote_policies", false) config.BindEnvAndSetDefault("installer.registry.url", "") config.BindEnvAndSetDefault("installer.registry.auth", "") + config.BindEnvAndSetDefault("installer.registry.username", "") + config.BindEnvAndSetDefault("installer.registry.password", "") config.BindEnv("fleet_policies_dir") config.SetDefault("fleet_layers", []string{}) @@ -1225,9 +1251,8 @@ func telemetry(config pkgconfigmodel.Setup) { // The histogram buckets use to track the time in nanoseconds it takes for a DogStatsD listeners to push data to the server config.BindEnvAndSetDefault("telemetry.dogstatsd.listeners_channel_latency_buckets", []string{}) - // Agent Telemetry. It is experimental feature and is subject to change. - // It should not be enabled unless prompted by Datadog Support - config.BindEnvAndSetDefault("agent_telemetry.enabled", false) + // Agent Telemetry + config.BindEnvAndSetDefault("agent_telemetry.enabled", true) config.SetKnown("agent_telemetry.additional_endpoints.*") bindEnvAndSetLogsConfigKeys(config, "agent_telemetry.") @@ -1508,7 +1533,8 @@ func logsagent(config pkgconfigmodel.Setup) { config.BindEnvAndSetDefault("logs_config.auto_multi_line.tokenizer_max_input_bytes", 60) config.BindEnvAndSetDefault("logs_config.auto_multi_line.pattern_table_max_size", 20) config.BindEnvAndSetDefault("logs_config.auto_multi_line.pattern_table_match_threshold", 0.75) - config.BindEnvAndSetDefault("logs_config.tag_auto_multi_line_logs", false) + // Add a tag to logs that are multiline aggregated + config.BindEnvAndSetDefault("logs_config.tag_multi_line_logs", false) // Add a tag to logs that are truncated by the agent config.BindEnvAndSetDefault("logs_config.tag_truncated_logs", false) @@ -1545,12 +1571,16 @@ func logsagent(config pkgconfigmodel.Setup) { // more disk I/O at the wildcard log paths config.BindEnvAndSetDefault("logs_config.file_wildcard_selection_mode", "by_name") + // Max size in MB an integration logs file can use + config.BindEnvAndSetDefault("logs_config.integrations_logs_files_max_size", 10) + // Max disk usage in MB all integrations logs files are allowed to use in total + config.BindEnvAndSetDefault("logs_config.integrations_logs_total_usage", 100) + // Do not store logs on disk when the disk usage exceeds 80% of the disk capacity. + config.BindEnvAndSetDefault("logs_config.integrations_logs_disk_ratio", 0.80) + // SDS logs blocking mechanism config.BindEnvAndSetDefault("logs_config.sds.wait_for_configuration", "") config.BindEnvAndSetDefault("logs_config.sds.buffer_max_size", 0) - - // Max size in MB to allow for integrations logs files - config.BindEnvAndSetDefault("logs_config.integrations_logs_files_max_size", 100) } func vector(config pkgconfigmodel.Setup) { @@ -1852,6 +1882,8 @@ func findUnknownEnvVars(config pkgconfigmodel.Config, environ []string, addition "DD_TESTS_RUNTIME_COMPILED": {}, // this variable is used by the Kubernetes leader election mechanism "DD_POD_NAME": {}, + // this variable is used by tracers + "DD_INSTRUMENTATION_TELEMETRY_ENABLED": {}, } for _, key := range config.GetEnvVars() { knownVars[key] = struct{}{} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/config_change_checker.go b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/config_change_checker.go new file mode 100644 index 0000000000..674ad0d314 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/config_change_checker.go @@ -0,0 +1,56 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +package setup + +import ( + "fmt" + "os" + "reflect" +) + +// ChangeChecker checks the state of `config.Datadog` did not change +// between `NewChangeChecker()“ and `HasChanged()`. It is +// designed to be used in `TestMain` function as follow: +// +// func TestMain(m *testing.M) { +// checker := testutil.NewConfigChangeChecker() +// exit := m.Run() +// if checker.HasChanged() { +// os.Exit(1) +// } +// os.Exit(exit) +// } +type ChangeChecker struct { + configSettings map[string]interface{} +} + +// NewChangeChecker creates a new instance of ConfigChangeChecker +func NewChangeChecker() *ChangeChecker { + return &ChangeChecker{ + configSettings: Datadog().AllSettings(), + } +} + +// HasChanged returns whether `config.Datadog` changed since +// `NewConfigChangeChecker`. If some changes are detected +// this function displays on the standard error what keys changed. +func (c *ChangeChecker) HasChanged() bool { + allSettingsAfter := Datadog().AllSettings() + stateHasChanged := false + for k, before := range c.configSettings { + after := allSettingsAfter[k] + delete(allSettingsAfter, k) + if !reflect.DeepEqual(before, after) { + _, _ = fmt.Fprintf(os.Stderr, "Config change detected: Key:'%s' previous value:'%+v' new value:'%+v'\n", k, before, after) + stateHasChanged = true + } + } + for k, v := range allSettingsAfter { + _, _ = fmt.Fprintf(os.Stderr, "Config change detected: Key:'%s' was set to value:'%+v' but it was not restored to its default value\n", k, v) + stateHasChanged = true + } + return stateHasChanged +} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/constants/constants.go b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/constants/constants.go index d23620e464..7f68ba0973 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/constants/constants.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/constants/constants.go @@ -9,4 +9,6 @@ package constants const ( // DefaultEBPFLessProbeAddr defines the default ebpfless probe address DefaultEBPFLessProbeAddr = "localhost:5678" + // ClusterIDCacheKey is the key name for the orchestrator cluster id in the agent in-mem cache + ClusterIDCacheKey = "orchestratorClusterID" ) diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/otlp.go b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/otlp.go index 7ff9245d61..f6312342e3 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/otlp.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/otlp.go @@ -94,6 +94,5 @@ func setupOTLPEnvironmentVariables(config pkgconfigmodel.Setup) { config.BindEnv(OTLPSection + ".metrics.summaries.mode") // Debug settings - config.BindEnv(OTLPSection + ".debug.loglevel") // Deprecated config.BindEnv(OTLPSection + ".debug.verbosity") } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/system_probe.go b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/system_probe.go index 7ebde9fda3..a083d716d2 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/system_probe.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/system_probe.go @@ -206,7 +206,7 @@ func InitSystemProbeConfig(cfg pkgconfigmodel.Config) { cfg.BindEnvAndSetDefault(join(spNS, "enable_conntrack_all_namespaces"), true, "DD_SYSTEM_PROBE_ENABLE_CONNTRACK_ALL_NAMESPACES") cfg.BindEnvAndSetDefault(join(netNS, "enable_protocol_classification"), true, "DD_ENABLE_PROTOCOL_CLASSIFICATION") cfg.BindEnvAndSetDefault(join(netNS, "enable_ringbuffers"), true, "DD_SYSTEM_PROBE_NETWORK_ENABLE_RINGBUFFERS") - cfg.BindEnvAndSetDefault(join(netNS, "enable_tcp_failed_connections"), false, "DD_SYSTEM_PROBE_NETWORK_ENABLE_FAILED_CONNS") + cfg.BindEnvAndSetDefault(join(netNS, "enable_tcp_failed_connections"), true, "DD_SYSTEM_PROBE_NETWORK_ENABLE_FAILED_CONNS") cfg.BindEnvAndSetDefault(join(netNS, "ignore_conntrack_init_failure"), false, "DD_SYSTEM_PROBE_NETWORK_IGNORE_CONNTRACK_INIT_FAILURE") cfg.BindEnvAndSetDefault(join(netNS, "conntrack_init_timeout"), 10*time.Second) cfg.BindEnvAndSetDefault(join(netNS, "allow_netlink_conntracker_fallback"), true) @@ -400,6 +400,7 @@ func InitSystemProbeConfig(cfg pkgconfigmodel.Config) { // Discovery config cfg.BindEnvAndSetDefault(join(discoveryNS, "enabled"), false) + cfg.BindEnvAndSetDefault(join(discoveryNS, "cpu_usage_update_delay"), "60s") // Fleet policies cfg.BindEnv("fleet_policies_dir") diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/system_probe_cws.go b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/system_probe_cws.go index 3497ffc143..4e9c952809 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/system_probe_cws.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/setup/system_probe_cws.go @@ -86,7 +86,6 @@ func initCWSSystemProbeConfig(cfg pkgconfigmodel.Config) { cfg.BindEnvAndSetDefault("runtime_security_config.security_profile.watch_dir", true) cfg.BindEnvAndSetDefault("runtime_security_config.security_profile.cache_size", 10) cfg.BindEnvAndSetDefault("runtime_security_config.security_profile.max_count", 400) - cfg.BindEnvAndSetDefault("runtime_security_config.security_profile.remote_configuration.enabled", false) cfg.BindEnvAndSetDefault("runtime_security_config.security_profile.dns_match_max_depth", 3) // CWS - Auto suppression @@ -139,4 +138,6 @@ func initCWSSystemProbeConfig(cfg pkgconfigmodel.Config) { cfg.BindEnvAndSetDefault("runtime_security_config.enforcement.disarmer.executable.enabled", true) cfg.BindEnvAndSetDefault("runtime_security_config.enforcement.disarmer.executable.max_allowed", 5) cfg.BindEnvAndSetDefault("runtime_security_config.enforcement.disarmer.executable.period", "1m") + + cfg.BindEnvAndSetDefault("runtime_security_config.network_monitoring.enabled", false) } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/structure/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/config/structure/LICENSE new file mode 100644 index 0000000000..b370545be1 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/structure/LICENSE @@ -0,0 +1,200 @@ + 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 2016-present Datadog, 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. diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/structure/unmarshal.go b/vendor/github.com/DataDog/datadog-agent/pkg/config/structure/unmarshal.go new file mode 100644 index 0000000000..c336a8bbc9 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/structure/unmarshal.go @@ -0,0 +1,557 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +// Package structure defines a helper to retrieve structured data from the config +package structure + +import ( + "fmt" + "reflect" + "slices" + "strconv" + "strings" + "unicode" + "unicode/utf8" + + "github.com/DataDog/datadog-agent/pkg/config/model" +) + +// features allowed for handling edge-cases +type featureSet struct { + allowSquash bool + convertEmptyStrNil bool +} + +// UnmarshalKeyOption is an option that affects the enabled features in UnmarshalKey +type UnmarshalKeyOption func(*featureSet) + +// EnableSquash allows UnmarshalKey to take advantage of `mapstructure`s `squash` feature +// a squashed field hoists its fields up a level in the marshalled representation and directly embeds them +var EnableSquash UnmarshalKeyOption = func(fs *featureSet) { + fs.allowSquash = true +} + +// ConvertEmptyStringToNil allows UnmarshalKey to implicitly convert empty strings into nil slices +var ConvertEmptyStringToNil UnmarshalKeyOption = func(fs *featureSet) { + fs.convertEmptyStrNil = true +} + +// error for when a key is not found +var errNotFound = fmt.Errorf("not found") + +// UnmarshalKey retrieves data from the config at the given key and deserializes it +// to be stored on the target struct. It is implemented entirely using reflection, and +// does not depend upon details of the data model of the config. +// Target struct can use of struct tag of "yaml", "json", or "mapstructure" to rename fields +func UnmarshalKey(cfg model.Reader, key string, target interface{}, opts ...UnmarshalKeyOption) error { + fs := &featureSet{} + for _, o := range opts { + o(fs) + } + rawval := cfg.Get(key) + // Don't create a reflect.Value out of nil, just return immediately + if rawval == nil { + return nil + } + source, err := newNode(reflect.ValueOf(rawval)) + if err != nil { + return err + } + outValue := reflect.ValueOf(target) + if outValue.Kind() == reflect.Pointer { + outValue = reflect.Indirect(outValue) + } + switch outValue.Kind() { + case reflect.Map: + return copyMap(outValue, source, fs) + case reflect.Struct: + return copyStruct(outValue, source, fs) + case reflect.Slice: + if arr, ok := source.(arrayNode); ok { + return copyList(outValue, arr, fs) + } + if isEmptyString(source) { + if fs.convertEmptyStrNil { + return nil + } + return fmt.Errorf("treating empty string as a nil slice not allowed for UnmarshalKey without ConvertEmptyStrNil option") + } + return fmt.Errorf("can not UnmarshalKey to a slice from a non-list source: %T", source) + default: + return fmt.Errorf("can only UnmarshalKey to struct, map, or slice, got %v", outValue.Kind()) + } +} + +// leafNode represents a leaf with a scalar value + +type leafNode interface { + GetBool() (bool, error) + GetInt() (int, error) + GetFloat() (float64, error) + GetString() (string, error) +} + +type leafNodeImpl struct { + // val must be a scalar kind + val reflect.Value +} + +var _ leafNode = (*leafNodeImpl)(nil) +var _ node = (*leafNodeImpl)(nil) + +// arrayNode represents a node with an ordered array of children + +type arrayNode interface { + Size() int + Index(int) (node, error) +} + +type arrayNodeImpl struct { + // val must be a Slice with Len() and Index() + val reflect.Value +} + +var _ arrayNode = (*arrayNodeImpl)(nil) +var _ node = (*arrayNodeImpl)(nil) + +// node represents an arbitrary node of the tree + +type node interface { + GetChild(string) (node, error) + ChildrenKeys() ([]string, error) +} + +type innerNodeImpl struct { + // val must be a struct + val reflect.Value +} + +type innerMapNodeImpl struct { + // val must be a map[string]interface{} + val reflect.Value + // remapCase maps each lower-case key to the original case. This + // enables GetChild to retrieve values using case-insensitive keys + remapCase map[string]string +} + +var _ node = (*innerNodeImpl)(nil) +var _ node = (*innerMapNodeImpl)(nil) + +// all nodes, leaf, inner, and array nodes, each act as nodes +func newNode(v reflect.Value) (node, error) { + if v.Kind() == reflect.Struct { + return &innerNodeImpl{val: v}, nil + } else if v.Kind() == reflect.Map { + return &innerMapNodeImpl{val: v, remapCase: makeRemapCase(v)}, nil + } else if v.Kind() == reflect.Slice { + return &arrayNodeImpl{val: v}, nil + } else if isScalarKind(v) { + return &leafNodeImpl{val: v}, nil + } + return nil, fmt.Errorf("could not create node from: %v of type %T and kind %v", v, v, v.Kind()) +} + +// GetChild returns the child node at the given case-insensitive key, or an error if not found +func (n *innerNodeImpl) GetChild(key string) (node, error) { + findex := findFieldMatch(n.val, key) + if findex == -1 { + return nil, errNotFound + } + inner := n.val.Field(findex) + if inner.Kind() == reflect.Interface { + inner = inner.Elem() + } + return newNode(inner) +} + +// ChildrenKeys returns the list of keys of the children of the given node, if it is a map +func (n *innerNodeImpl) ChildrenKeys() ([]string, error) { + structType := n.val.Type() + keys := make([]string, 0, n.val.NumField()) + for i := 0; i < structType.NumField(); i++ { + f := structType.Field(i) + ch, _ := utf8.DecodeRuneInString(f.Name) + if unicode.IsLower(ch) { + continue + } + fieldKey, _ := fieldNameToKey(f) + keys = append(keys, fieldKey) + } + return keys, nil +} + +// GetChild returns the child node at the given case-insensitive key, or an error if not found +func (n *innerMapNodeImpl) GetChild(key string) (node, error) { + mkey := n.remapCase[strings.ToLower(key)] + inner := n.val.MapIndex(reflect.ValueOf(mkey)) + if !inner.IsValid() { + return nil, errNotFound + } + if inner.Kind() == reflect.Interface { + inner = inner.Elem() + } + return newNode(inner) +} + +// ChildrenKeys returns the list of keys of the children of the given node, if it is a map +func (n *innerMapNodeImpl) ChildrenKeys() ([]string, error) { + mapkeys := n.val.MapKeys() + keys := make([]string, 0, len(mapkeys)) + for _, kv := range mapkeys { + if kstr, ok := kv.Interface().(string); ok { + keys = append(keys, kstr) + } else { + return nil, fmt.Errorf("map node has invalid non-string key: %v", kv) + } + } + // map keys are iterated non-deterministically, sort them + slices.Sort(keys) + return keys, nil +} + +// GetChild returns an error because array node does not have children accessible by name +func (n *arrayNodeImpl) GetChild(string) (node, error) { + return nil, fmt.Errorf("arrayNodeImpl.GetChild not implemented") +} + +// ChildrenKeys returns an error because array node does not have children accessible by name +func (n *arrayNodeImpl) ChildrenKeys() ([]string, error) { + return nil, fmt.Errorf("arrayNodeImpl.ChildrenKeys not implemented") +} + +// Size returns number of children in the list +func (n *arrayNodeImpl) Size() int { + return n.val.Len() +} + +// Index returns the kth element of the list +func (n *arrayNodeImpl) Index(k int) (node, error) { + // arrayNodeImpl assumes val is an Array with Len() and Index() + elem := n.val.Index(k) + if elem.Kind() == reflect.Interface { + elem = elem.Elem() + } + return newNode(elem) +} + +// GetChild returns an error because a leaf has no children +func (n *leafNodeImpl) GetChild(key string) (node, error) { + return nil, fmt.Errorf("can't GetChild(%s) of a leaf node", key) +} + +// ChildrenKeys returns an error because a leaf has no children +func (n *leafNodeImpl) ChildrenKeys() ([]string, error) { + return nil, fmt.Errorf("can't get ChildrenKeys of a leaf node") +} + +// GetBool returns the scalar as a bool, or an error otherwise +func (n *leafNodeImpl) GetBool() (bool, error) { + if n.val.Kind() == reflect.Bool { + return n.val.Bool(), nil + } else if n.val.Kind() == reflect.Int { + return n.val.Int() != 0, nil + } else if n.val.Kind() == reflect.String { + return convertToBool(n.val.String()) + } + return false, newConversionError(n.val, "bool") +} + +// GetInt returns the scalar as a int, or an error otherwise +func (n *leafNodeImpl) GetInt() (int, error) { + switch n.val.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return int(n.val.Int()), nil + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return int(n.val.Uint()), nil + case reflect.Float32, reflect.Float64: + return int(n.val.Float()), nil + } + return 0, newConversionError(n.val, "int") +} + +// GetFloat returns the scalar as a float64, or an error otherwise +func (n *leafNodeImpl) GetFloat() (float64, error) { + switch n.val.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return float64(n.val.Int()), nil + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return float64(n.val.Uint()), nil + case reflect.Float32, reflect.Float64: + return float64(n.val.Float()), nil + } + return 0, newConversionError(n.val, "float") +} + +// GetString returns the scalar as a string, or an error otherwise +func (n *leafNodeImpl) GetString() (string, error) { + switch n.val.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + stringVal := strconv.FormatInt(n.val.Int(), 10) + return stringVal, nil + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + stringVal := strconv.FormatUint(n.val.Uint(), 10) + return stringVal, nil + case reflect.Float32: + stringVal := strconv.FormatFloat(n.val.Float(), 'f', -1, 32) + return stringVal, nil + case reflect.Float64: + stringVal := strconv.FormatFloat(n.val.Float(), 'f', -1, 64) + return stringVal, nil + case reflect.String: + return n.val.String(), nil + } + return "", newConversionError(n.val, "string") +} + +// convert a string to a bool using standard yaml constants +func convertToBool(text string) (bool, error) { + lower := strings.ToLower(text) + if lower == "y" || lower == "yes" || lower == "on" || lower == "true" || lower == "1" { + return true, nil + } else if lower == "n" || lower == "no" || lower == "off" || lower == "false" || lower == "0" { + return false, nil + } + return false, newConversionError(reflect.ValueOf(text), "bool") +} + +type specifierSet map[string]struct{} + +// fieldNameToKey returns the lower-cased field name, for case insensitive comparisons, +// with struct tag rename applied, as well as the set of specifiers from struct tags +// struct tags are handled in order of yaml, then json, then mapstructure +func fieldNameToKey(field reflect.StructField) (string, specifierSet) { + name := field.Name + + tagtext := "" + if val := field.Tag.Get("yaml"); val != "" { + tagtext = val + } else if val := field.Tag.Get("json"); val != "" { + tagtext = val + } else if val := field.Tag.Get("mapstructure"); val != "" { + tagtext = val + } + + // skip any additional specifiers such as ",omitempty" or ",squash" + // TODO: support multiple specifiers + var specifiers map[string]struct{} + if commaPos := strings.IndexRune(tagtext, ','); commaPos != -1 { + specifiers = make(map[string]struct{}) + val := tagtext[:commaPos] + specifiers[tagtext[commaPos+1:]] = struct{}{} + if val != "" { + name = val + } + } else if tagtext != "" { + name = tagtext + } + return strings.ToLower(name), specifiers +} + +func copyStruct(target reflect.Value, source node, fs *featureSet) error { + targetType := target.Type() + for i := 0; i < targetType.NumField(); i++ { + f := targetType.Field(i) + ch, _ := utf8.DecodeRuneInString(f.Name) + if unicode.IsLower(ch) { + continue + } + fieldKey, specifiers := fieldNameToKey(f) + if _, ok := specifiers["squash"]; ok { + if !fs.allowSquash { + return fmt.Errorf("feature 'squash' not allowed for UnmarshalKey without EnableSquash option") + } + err := copyAny(target.FieldByName(f.Name), source, fs) + if err != nil { + return err + } + continue + } + child, err := source.GetChild(fieldKey) + if err == errNotFound { + continue + } + if err != nil { + return err + } + err = copyAny(target.FieldByName(f.Name), child, fs) + if err != nil { + return err + } + } + return nil +} + +func copyMap(target reflect.Value, source node, _ *featureSet) error { + // TODO: Should handle maps with more complex types in a future PR + ktype := reflect.TypeOf("") + vtype := reflect.TypeOf("") + mtype := reflect.MapOf(ktype, vtype) + results := reflect.MakeMap(mtype) + + mapKeys, err := source.ChildrenKeys() + if err != nil { + return err + } + for _, mkey := range mapKeys { + child, err := source.GetChild(mkey) + if err != nil { + return err + } + if child == nil { + continue + } + if scalar, ok := child.(leafNode); ok { + if mval, err := scalar.GetString(); err == nil { + results.SetMapIndex(reflect.ValueOf(mkey), reflect.ValueOf(mval)) + } else { + return fmt.Errorf("TODO: only map[string]string supported currently") + } + } + } + target.Set(results) + return nil +} + +func copyLeaf(target reflect.Value, source leafNode, _ *featureSet) error { + if source == nil { + return fmt.Errorf("source value is not a scalar") + } + switch target.Kind() { + case reflect.Bool: + v, err := source.GetBool() + if err != nil { + return err + } + target.SetBool(v) + return nil + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + v, err := source.GetInt() + if err != nil { + return err + } + target.SetInt(int64(v)) + return nil + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + v, err := source.GetInt() + if err != nil { + return err + } + target.SetUint(uint64(v)) + return nil + case reflect.Float32, reflect.Float64: + v, err := source.GetFloat() + if err != nil { + return err + } + target.SetFloat(float64(v)) + return nil + case reflect.String: + v, err := source.GetString() + if err != nil { + return err + } + target.SetString(v) + return nil + } + return fmt.Errorf("unsupported scalar type %v", target.Kind()) +} + +func copyList(target reflect.Value, source arrayNode, fs *featureSet) error { + if source == nil { + return fmt.Errorf("source value is not a list") + } + elemType := target.Type() + elemType = elemType.Elem() + numElems := source.Size() + results := reflect.MakeSlice(reflect.SliceOf(elemType), numElems, numElems) + for k := 0; k < numElems; k++ { + elemSource, err := source.Index(k) + if err != nil { + return err + } + ptrOut := reflect.New(elemType) + outTarget := ptrOut.Elem() + err = copyAny(outTarget, elemSource, fs) + if err != nil { + return err + } + results.Index(k).Set(outTarget) + } + target.Set(results) + return nil +} + +func copyAny(target reflect.Value, source node, fs *featureSet) error { + if target.Kind() == reflect.Pointer { + allocPtr := reflect.New(target.Type().Elem()) + target.Set(allocPtr) + target = allocPtr.Elem() + } + if isScalarKind(target) { + if leaf, ok := source.(leafNode); ok { + return copyLeaf(target, leaf, fs) + } + return fmt.Errorf("can't copy into target: scalar required, but source is not a leaf") + } else if target.Kind() == reflect.Map { + return copyMap(target, source, fs) + } else if target.Kind() == reflect.Struct { + return copyStruct(target, source, fs) + } else if target.Kind() == reflect.Slice { + if arr, ok := source.(arrayNode); ok { + return copyList(target, arr, fs) + } + return fmt.Errorf("can't copy into target: []T required, but source is not an array") + } else if target.Kind() == reflect.Invalid { + return fmt.Errorf("can't copy invalid value %s : %v", target, target.Kind()) + } + return fmt.Errorf("unknown value to copy: %v", target.Type()) +} + +func isEmptyString(source node) bool { + if leaf, ok := source.(leafNode); ok { + if str, err := leaf.GetString(); err == nil { + return str == "" + } + } + return false +} + +func isScalarKind(v reflect.Value) bool { + k := v.Kind() + return (k >= reflect.Bool && k <= reflect.Float64) || k == reflect.String +} + +func makeRemapCase(v reflect.Value) map[string]string { + remap := make(map[string]string) + iter := v.MapRange() + for iter.Next() { + mkey := "" + switch k := iter.Key().Interface().(type) { + case string: + mkey = k + default: + mkey = fmt.Sprintf("%s", k) + } + remap[strings.ToLower(mkey)] = mkey + } + return remap +} + +func findFieldMatch(val reflect.Value, key string) int { + // case-insensitive match for struct names + key = strings.ToLower(key) + schema := val.Type() + for i := 0; i < schema.NumField(); i++ { + fieldKey, _ := fieldNameToKey(schema.Field(i)) + if key == fieldKey { + return i + } + } + return -1 +} + +func newConversionError(v reflect.Value, expectType string) error { + return fmt.Errorf("could not convert to %s: %v of type %T and Kind %v", expectType, v, v, v.Kind()) +} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/teeconfig/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/config/teeconfig/LICENSE new file mode 100644 index 0000000000..b370545be1 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/teeconfig/LICENSE @@ -0,0 +1,200 @@ + 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 2016-present Datadog, 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. diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/config/teeconfig/teeconfig.go b/vendor/github.com/DataDog/datadog-agent/pkg/config/teeconfig/teeconfig.go new file mode 100644 index 0000000000..93f7f08511 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/pkg/config/teeconfig/teeconfig.go @@ -0,0 +1,410 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +// Package teeconfig is a tee of two configs that writes to both but reads from only one +package teeconfig + +import ( + "io" + "strings" + "time" + + "github.com/DataDog/viper" + "github.com/spf13/afero" + + "github.com/DataDog/datadog-agent/pkg/config/model" +) + +// teeConfig is a combination of two configs, both get written to but only baseline is read +type teeConfig struct { + baseline model.Config + compare model.Config +} + +// NewTeeConfig constructs a new teeConfig +func NewTeeConfig(baseline, compare model.Config) model.Config { + return &teeConfig{baseline: baseline, compare: compare} +} + +// OnUpdate adds a callback to the list receivers to be called each time a value is changed in the configuration +// by a call to the 'Set' method. +// Callbacks are only called if the value is effectively changed. +func (t *teeConfig) OnUpdate(callback model.NotificationReceiver) { + t.baseline.OnUpdate(callback) + t.compare.OnUpdate(callback) +} + +// Set wraps Viper for concurrent access +func (t *teeConfig) Set(key string, newValue interface{}, source model.Source) { + t.baseline.Set(key, newValue, source) + t.compare.Set(key, newValue, source) +} + +// SetWithoutSource sets the given value using source Unknown +func (t *teeConfig) SetWithoutSource(key string, value interface{}) { + t.baseline.SetWithoutSource(key, value) + t.compare.SetWithoutSource(key, value) +} + +// SetDefault wraps Viper for concurrent access +func (t *teeConfig) SetDefault(key string, value interface{}) { + t.baseline.SetDefault(key, value) + t.compare.SetDefault(key, value) +} + +// UnsetForSource unsets a config entry for a given source +func (t *teeConfig) UnsetForSource(key string, source model.Source) { + t.baseline.UnsetForSource(key, source) + t.compare.UnsetForSource(key, source) +} + +// SetKnown adds a key to the set of known valid config keys +func (t *teeConfig) SetKnown(key string) { + t.baseline.SetKnown(key) + t.compare.SetKnown(key) +} + +// IsKnown returns whether a key is known +func (t *teeConfig) IsKnown(key string) bool { + return t.baseline.IsKnown(key) +} + +// GetKnownKeysLowercased returns all the keys that meet at least one of these criteria: +// 1) have a default, 2) have an environment variable binded or 3) have been SetKnown() +// Note that it returns the keys lowercased. +func (t *teeConfig) GetKnownKeysLowercased() map[string]interface{} { + return t.baseline.GetKnownKeysLowercased() +} + +// ParseEnvAsStringSlice registers a transformer function to parse an an environment variables as a []string. +func (t *teeConfig) ParseEnvAsStringSlice(key string, fn func(string) []string) { + t.baseline.ParseEnvAsStringSlice(key, fn) + t.compare.ParseEnvAsStringSlice(key, fn) +} + +// ParseEnvAsMapStringInterface registers a transformer function to parse an an environment variables as a +// map[string]interface{}. +func (t *teeConfig) ParseEnvAsMapStringInterface(key string, fn func(string) map[string]interface{}) { + t.baseline.ParseEnvAsMapStringInterface(key, fn) + t.compare.ParseEnvAsMapStringInterface(key, fn) +} + +// ParseEnvAsSliceMapString registers a transformer function to parse an an environment variables as a []map[string]string. +func (t *teeConfig) ParseEnvAsSliceMapString(key string, fn func(string) []map[string]string) { + t.baseline.ParseEnvAsSliceMapString(key, fn) + t.compare.ParseEnvAsSliceMapString(key, fn) +} + +// ParseEnvAsSlice registers a transformer function to parse an an environment variables as a +// []interface{}. +func (t *teeConfig) ParseEnvAsSlice(key string, fn func(string) []interface{}) { + t.baseline.ParseEnvAsSlice(key, fn) + t.compare.ParseEnvAsSlice(key, fn) +} + +// SetFs wraps Viper for concurrent access +func (t *teeConfig) SetFs(fs afero.Fs) { + t.baseline.SetFs(fs) + t.compare.SetFs(fs) +} + +// IsSet wraps Viper for concurrent access +func (t *teeConfig) IsSet(key string) bool { + return t.baseline.IsSet(key) +} + +func (t *teeConfig) AllKeysLowercased() []string { + return t.baseline.AllKeysLowercased() +} + +// Get wraps Viper for concurrent access +func (t *teeConfig) Get(key string) interface{} { + return t.baseline.Get(key) +} + +// GetAllSources returns the value of a key for each source +func (t *teeConfig) GetAllSources(key string) []model.ValueWithSource { + return t.baseline.GetAllSources(key) +} + +// GetString wraps Viper for concurrent access +func (t *teeConfig) GetString(key string) string { + return t.baseline.GetString(key) +} + +// GetBool wraps Viper for concurrent access +func (t *teeConfig) GetBool(key string) bool { + return t.baseline.GetBool(key) +} + +// GetInt wraps Viper for concurrent access +func (t *teeConfig) GetInt(key string) int { + return t.baseline.GetInt(key) +} + +// GetInt32 wraps Viper for concurrent access +func (t *teeConfig) GetInt32(key string) int32 { + return t.baseline.GetInt32(key) +} + +// GetInt64 wraps Viper for concurrent access +func (t *teeConfig) GetInt64(key string) int64 { + return t.baseline.GetInt64(key) +} + +// GetFloat64 wraps Viper for concurrent access +func (t *teeConfig) GetFloat64(key string) float64 { + return t.baseline.GetFloat64(key) +} + +// GetTime wraps Viper for concurrent access +func (t *teeConfig) GetTime(key string) time.Time { + return t.baseline.GetTime(key) +} + +// GetDuration wraps Viper for concurrent access +func (t *teeConfig) GetDuration(key string) time.Duration { + return t.baseline.GetDuration(key) +} + +// GetStringSlice wraps Viper for concurrent access +func (t *teeConfig) GetStringSlice(key string) []string { + return t.baseline.GetStringSlice(key) +} + +// GetFloat64SliceE loads a key as a []float64 +func (t *teeConfig) GetFloat64SliceE(key string) ([]float64, error) { + return t.baseline.GetFloat64SliceE(key) +} + +// GetStringMap wraps Viper for concurrent access +func (t *teeConfig) GetStringMap(key string) map[string]interface{} { + return t.baseline.GetStringMap(key) +} + +// GetStringMapString wraps Viper for concurrent access +func (t *teeConfig) GetStringMapString(key string) map[string]string { + return t.baseline.GetStringMapString(key) +} + +// GetStringMapStringSlice wraps Viper for concurrent access +func (t *teeConfig) GetStringMapStringSlice(key string) map[string][]string { + return t.baseline.GetStringMapStringSlice(key) +} + +// GetSizeInBytes wraps Viper for concurrent access +func (t *teeConfig) GetSizeInBytes(key string) uint { + return t.baseline.GetSizeInBytes(key) +} + +// GetSource wraps Viper for concurrent access +func (t *teeConfig) GetSource(key string) model.Source { + return t.baseline.GetSource(key) +} + +// SetEnvPrefix wraps Viper for concurrent access, and keeps the envPrefix for +// future reference +func (t *teeConfig) SetEnvPrefix(in string) { + t.baseline.SetEnvPrefix(in) + t.compare.SetEnvPrefix(in) +} + +// BindEnv wraps Viper for concurrent access, and adds tracking of the configurable env vars +func (t *teeConfig) BindEnv(input ...string) { + t.baseline.BindEnv(input...) + t.compare.BindEnv(input...) +} + +// SetEnvKeyReplacer wraps Viper for concurrent access +func (t *teeConfig) SetEnvKeyReplacer(r *strings.Replacer) { + t.baseline.SetEnvKeyReplacer(r) + t.compare.SetEnvKeyReplacer(r) +} + +// UnmarshalKey wraps Viper for concurrent access +func (t *teeConfig) UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error { + return t.baseline.UnmarshalKey(key, rawVal, opts...) +} + +// Unmarshal wraps Viper for concurrent access +func (t *teeConfig) Unmarshal(rawVal interface{}) error { + return t.baseline.Unmarshal(rawVal) +} + +// UnmarshalExact wraps Viper for concurrent access +func (t *teeConfig) UnmarshalExact(rawVal interface{}) error { + return t.baseline.UnmarshalExact(rawVal) +} + +// ReadInConfig wraps Viper for concurrent access +func (t *teeConfig) ReadInConfig() error { + err1 := t.baseline.ReadInConfig() + err2 := t.compare.ReadInConfig() + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + return nil +} + +// ReadConfig wraps Viper for concurrent access +func (t *teeConfig) ReadConfig(in io.Reader) error { + err1 := t.baseline.ReadConfig(in) + err2 := t.compare.ReadConfig(in) + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + return nil + +} + +// MergeConfig wraps Viper for concurrent access +func (t *teeConfig) MergeConfig(in io.Reader) error { + err1 := t.baseline.MergeConfig(in) + err2 := t.compare.MergeConfig(in) + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + return nil + +} + +// MergeFleetPolicy merges the configuration from the reader given with an existing config +// it overrides the existing values with the new ones in the FleetPolicies source, and updates the main config +// according to sources priority order. +// +// Note: this should only be called at startup, as notifiers won't receive a notification when this loads +func (t *teeConfig) MergeFleetPolicy(configPath string) error { + err1 := t.baseline.MergeFleetPolicy(configPath) + err2 := t.compare.MergeFleetPolicy(configPath) + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + return nil +} + +// MergeConfigMap merges the configuration from the map given with an existing config. +// Note that the map given may be modified. +func (t *teeConfig) MergeConfigMap(cfg map[string]any) error { + err1 := t.baseline.MergeConfigMap(cfg) + err2 := t.compare.MergeConfigMap(cfg) + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + return nil +} + +// AllSettings wraps Viper for concurrent access +func (t *teeConfig) AllSettings() map[string]interface{} { + return t.baseline.AllSettings() +} + +// AllSettingsWithoutDefault returns a copy of the all the settings in the configuration without defaults +func (t *teeConfig) AllSettingsWithoutDefault() map[string]interface{} { + return t.baseline.AllSettingsWithoutDefault() +} + +// AllSettingsBySource returns the settings from each source (file, env vars, ...) +func (t *teeConfig) AllSettingsBySource() map[model.Source]interface{} { + return t.baseline.AllSettingsBySource() +} + +// AddConfigPath wraps Viper for concurrent access +func (t *teeConfig) AddConfigPath(in string) { + t.baseline.AddConfigPath(in) + t.compare.AddConfigPath(in) +} + +// AddExtraConfigPaths allows adding additional configuration files +// which will be merged into the main configuration during the ReadInConfig call. +// Configuration files are merged sequentially. If a key already exists and the foreign value type matches the existing one, the foreign value overrides it. +// If both the existing value and the new value are nested configurations, they are merged recursively following the same principles. +func (t *teeConfig) AddExtraConfigPaths(ins []string) error { + err1 := t.baseline.AddExtraConfigPaths(ins) + err2 := t.compare.AddExtraConfigPaths(ins) + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + return nil +} + +// SetConfigName wraps Viper for concurrent access +func (t *teeConfig) SetConfigName(in string) { + t.baseline.SetConfigName(in) + t.compare.SetConfigName(in) +} + +// SetConfigFile wraps Viper for concurrent access +func (t *teeConfig) SetConfigFile(in string) { + t.baseline.SetConfigFile(in) + t.compare.SetConfigFile(in) +} + +// SetConfigType wraps Viper for concurrent access +func (t *teeConfig) SetConfigType(in string) { + t.baseline.SetConfigType(in) + t.compare.SetConfigType(in) +} + +// ConfigFileUsed wraps Viper for concurrent access +func (t *teeConfig) ConfigFileUsed() string { + return t.baseline.ConfigFileUsed() +} + +//func (t *teeConfig) SetTypeByDefaultValue(in bool) { +// t.baseline.SetTypeByDefaultValue(in) +// t.compare.SetTypeByDefaultValue(in) +//} + +// GetEnvVars implements the Config interface +func (t *teeConfig) GetEnvVars() []string { + return t.baseline.GetEnvVars() +} + +// BindEnvAndSetDefault implements the Config interface +func (t *teeConfig) BindEnvAndSetDefault(key string, val interface{}, env ...string) { + t.baseline.BindEnvAndSetDefault(key, val, env...) + t.compare.BindEnvAndSetDefault(key, val, env...) +} + +func (t *teeConfig) Warnings() *model.Warnings { + return nil +} + +func (t *teeConfig) Object() model.Reader { + return t.baseline +} + +// CopyConfig copies the given config to the receiver config. This should only be used in tests as replacing +// the global config reference is unsafe. +func (t *teeConfig) CopyConfig(cfg model.Config) { + t.baseline.CopyConfig(cfg) + t.compare.CopyConfig(cfg) +} + +func (t *teeConfig) GetProxies() *model.Proxy { + return t.baseline.GetProxies() +} + +func (t *teeConfig) ExtraConfigFilesUsed() []string { + return t.baseline.ExtraConfigFilesUsed() +} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/auditor/auditor.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/auditor/auditor.go index 578107bfa0..cad651a7c7 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/auditor/auditor.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/auditor/auditor.go @@ -133,8 +133,7 @@ func (a *RegistryAuditor) Channel() chan *message.Payload { // GetOffset returns the last committed offset for a given identifier, // returns an empty string if it does not exist. func (a *RegistryAuditor) GetOffset(identifier string) string { - r := a.readOnlyRegistryCopy() - entry, exists := r[identifier] + entry, exists := a.readOnlyRegistryEntryCopy(identifier) if !exists { return "" } @@ -144,8 +143,7 @@ func (a *RegistryAuditor) GetOffset(identifier string) string { // GetTailingMode returns the last committed offset for a given identifier, // returns an empty string if it does not exist. func (a *RegistryAuditor) GetTailingMode(identifier string) string { - r := a.readOnlyRegistryCopy() - entry, exists := r[identifier] + entry, exists := a.readOnlyRegistryEntryCopy(identifier) if !exists { return "" } @@ -265,6 +263,16 @@ func (a *RegistryAuditor) readOnlyRegistryCopy() map[string]RegistryEntry { return r } +func (a *RegistryAuditor) readOnlyRegistryEntryCopy(identifier string) (RegistryEntry, bool) { + a.registryMutex.Lock() + defer a.registryMutex.Unlock() + entry, exists := a.registry[identifier] + if !exists { + return RegistryEntry{}, false + } + return *entry, true +} + // flushRegistry writes on disk the registry at the given path func (a *RegistryAuditor) flushRegistry() error { r := a.readOnlyRegistryCopy() diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/auditor/null_auditor.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/auditor/null_auditor.go index 5e6ff02f84..a38b9c8a75 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/auditor/null_auditor.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/auditor/null_auditor.go @@ -29,12 +29,12 @@ func NewNullAuditor() *NullAuditor { // GetOffset returns an empty string. // //nolint:revive // TODO(AML) Fix revive linter -func (a *NullAuditor) GetOffset(identifier string) string { return "" } +func (a *NullAuditor) GetOffset(_ string) string { return "" } // GetTailingMode returns an empty string. // //nolint:revive // TODO(AML) Fix revive linter -func (a *NullAuditor) GetTailingMode(identifier string) string { return "" } +func (a *NullAuditor) GetTailingMode(_ string) string { return "" } // Start starts the NullAuditor main loop. func (a *NullAuditor) Start() { diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/client/http/sync_destination.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/client/http/sync_destination.go index 732b1d52bf..62625e6da6 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/client/http/sync_destination.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/client/http/sync_destination.go @@ -50,7 +50,7 @@ func (d *SyncDestination) Target() string { } // Start starts reading the input channel -func (d *SyncDestination) Start(input chan *message.Payload, output chan *message.Payload, isRetrying chan bool) (stopChan <-chan struct{}) { +func (d *SyncDestination) Start(input chan *message.Payload, output chan *message.Payload, _ chan bool) (stopChan <-chan struct{}) { stop := make(chan struct{}) go d.run(input, output, stop) return stop diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/diagnostic/format.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/diagnostic/format.go index 4b7b44b379..55c192cf08 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/diagnostic/format.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/diagnostic/format.go @@ -26,7 +26,7 @@ type logFormatter struct { } //nolint:revive // TODO(AML) Fix revive linter -func (l *logFormatter) Format(m *message.Message, eventType string, redactedMsg []byte) string { +func (l *logFormatter) Format(m *message.Message, _ string, redactedMsg []byte) string { hname, err := l.hostname.Get(context.TODO()) if err != nil { hname = "unknown" diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/message/message.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/message/message.go index bac1ade620..e852a97d70 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/message/message.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/message/message.go @@ -354,3 +354,13 @@ func (m *Message) Tags() []string { func (m *Message) TagsToString() string { return m.Origin.TagsToString(m.ProcessingTags) } + +// TruncatedReasonTag returns a tag with the reason for truncation. +func TruncatedReasonTag(reason string) string { + return fmt.Sprintf("truncated:%s", reason) +} + +// MultiLineSourceTag returns a tag for multiline logs. +func MultiLineSourceTag(source string) string { + return fmt.Sprintf("multiline:%s", source) +} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/metrics/metrics.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/metrics/metrics.go index 063a4e6afe..49a6b30bbd 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/metrics/metrics.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/metrics/metrics.go @@ -58,6 +58,11 @@ var ( // TlmEncodedBytesSent is the total number of sent bytes after encoding if any TlmEncodedBytesSent = telemetry.NewCounter("logs", "encoded_bytes_sent", nil, "Total number of sent bytes after encoding if any") + // BytesMissed is the number of bytes lost before they could be consumed by the agent, such as after a log rotation + BytesMissed = expvar.Int{} + // TlmBytesMissed is the number of bytes lost before they could be consumed by the agent, such as after log rotation + TlmBytesMissed = telemetry.NewCounter("logs", "bytes_missed", + nil, "Total number of bytes lost before they could be consumed by the agent, such as after log rotation") // SenderLatency the last reported latency value from the http sender (ms) SenderLatency = expvar.Int{} // TlmSenderLatency a histogram of http sender latency (ms) @@ -70,6 +75,12 @@ var ( DestinationHttpRespByStatusAndUrl = expvar.Map{} //nolint:revive // TODO(AML) Fix revive linter TlmDestinationHttpRespByStatusAndUrl = telemetry.NewCounter("logs", "destination_http_resp", []string{"status_code", "url"}, "Count of http responses by status code and destination url") + + // TlmAutoMultilineAggregatorFlush Count of each line flushed from the auto mulitline aggregator. + TlmAutoMultilineAggregatorFlush = telemetry.NewCounter("logs", "auto_multi_line_aggregator_flush", []string{"truncated", "line_type"}, "Count of each line flushed from the auto mulitline aggregator") + + // TlmLogsDiscardedFromSDSBuffer how many messages were dropped when waiting for an SDS configuration because the buffer is full + TlmLogsDiscardedFromSDSBuffer = telemetry.NewCounter("logs", "sds__dropped_from_buffer", nil, "Count of messages dropped from the buffer while waiting for an SDS configuration") ) func init() { @@ -83,6 +94,7 @@ func init() { LogsExpvars.Set("RetryCount", &RetryCount) LogsExpvars.Set("RetryTimeSpent", &RetryTimeSpent) LogsExpvars.Set("EncodedBytesSent", &EncodedBytesSent) + LogsExpvars.Set("BytesMissed", &BytesMissed) LogsExpvars.Set("SenderLatency", &SenderLatency) LogsExpvars.Set("HttpDestinationStats", &DestinationExpVars) } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/pipeline/pipeline.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/pipeline/pipeline.go index b9915f0700..0a050d3848 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/pipeline/pipeline.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/pipeline/pipeline.go @@ -26,13 +26,13 @@ import ( // Pipeline processes and sends messages to the backend type Pipeline struct { - InputChan chan *message.Message - flushChan chan struct{} - processor *processor.Processor - strategy sender.Strategy - sender *sender.Sender - serverless bool - flushDoneChan chan struct{} + InputChan chan *message.Message + flushChan chan struct{} + processor *processor.Processor + strategy sender.Strategy + sender *sender.Sender + serverless bool + flushWg *sync.WaitGroup } // NewPipeline returns a new Pipeline @@ -48,10 +48,10 @@ func NewPipeline(outputChan chan *message.Payload, cfg pkgconfigmodel.Reader) *Pipeline { var senderDoneChan chan *sync.WaitGroup - var flushDoneChan chan struct{} + var flushWg *sync.WaitGroup if serverless { senderDoneChan = make(chan *sync.WaitGroup) - flushDoneChan = make(chan struct{}) + flushWg = &sync.WaitGroup{} } mainDestinations := getDestinations(endpoints, destinationsContext, pipelineID, serverless, senderDoneChan, status, cfg) @@ -73,20 +73,22 @@ func NewPipeline(outputChan chan *message.Payload, encoder = processor.RawEncoder } - strategy := getStrategy(strategyInput, senderInput, flushChan, endpoints, serverless, flushDoneChan, pipelineID) - logsSender = sender.NewSender(cfg, senderInput, outputChan, mainDestinations, config.DestinationPayloadChanSize, senderDoneChan, flushDoneChan) + strategy := getStrategy(strategyInput, senderInput, flushChan, endpoints, serverless, flushWg, pipelineID) + logsSender = sender.NewSender(cfg, senderInput, outputChan, mainDestinations, config.DestinationPayloadChanSize, senderDoneChan, flushWg) inputChan := make(chan *message.Message, config.ChanSize) - processor := processor.New(inputChan, strategyInput, processingRules, encoder, diagnosticMessageReceiver, hostname, pipelineID) + + processor := processor.New(cfg, inputChan, strategyInput, processingRules, + encoder, diagnosticMessageReceiver, hostname, pipelineID) return &Pipeline{ - InputChan: inputChan, - flushChan: flushChan, - processor: processor, - strategy: strategy, - sender: logsSender, - serverless: serverless, - flushDoneChan: flushDoneChan, + InputChan: inputChan, + flushChan: flushChan, + processor: processor, + strategy: strategy, + sender: logsSender, + serverless: serverless, + flushWg: flushWg, } } @@ -110,8 +112,8 @@ func (p *Pipeline) Flush(ctx context.Context) { p.processor.Flush(ctx) // flush messages in the processor into the sender if p.serverless { - // Wait for the logs sender to finish sending payloads - <-p.flushDoneChan + // Wait for the logs sender to finish sending payloads to all destinations before allowing the flush to finish + p.flushWg.Wait() } } @@ -149,13 +151,13 @@ func getDestinations(endpoints *config.Endpoints, destinationsContext *client.De } //nolint:revive // TODO(AML) Fix revive linter -func getStrategy(inputChan chan *message.Message, outputChan chan *message.Payload, flushChan chan struct{}, endpoints *config.Endpoints, serverless bool, flushDoneChan chan struct{}, pipelineID int) sender.Strategy { +func getStrategy(inputChan chan *message.Message, outputChan chan *message.Payload, flushChan chan struct{}, endpoints *config.Endpoints, serverless bool, flushWg *sync.WaitGroup, _ int) sender.Strategy { if endpoints.UseHTTP || serverless { encoder := sender.IdentityContentType if endpoints.Main.UseCompression { encoder = sender.NewGzipContentEncoding(endpoints.Main.CompressionLevel) } - return sender.NewBatchStrategy(inputChan, outputChan, flushChan, serverless, flushDoneChan, sender.ArraySerializer, endpoints.BatchWait, endpoints.BatchMaxSize, endpoints.BatchMaxContentSize, "logs", encoder) + return sender.NewBatchStrategy(inputChan, outputChan, flushChan, serverless, flushWg, sender.ArraySerializer, endpoints.BatchWait, endpoints.BatchMaxSize, endpoints.BatchMaxContentSize, "logs", encoder) } return sender.NewStreamStrategy(inputChan, outputChan, sender.IdentityContentType) } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/pipeline/provider.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/pipeline/provider.go index 04812a8aed..54d3b947a1 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/pipeline/provider.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/pipeline/provider.go @@ -28,8 +28,9 @@ import ( type Provider interface { Start() Stop() - ReconfigureSDSStandardRules(standardRules []byte) error - ReconfigureSDSAgentConfig(config []byte) error + ReconfigureSDSStandardRules(standardRules []byte) (bool, error) + ReconfigureSDSAgentConfig(config []byte) (bool, error) + StopSDSProcessing() error NextPipelineChan() chan *message.Message // Flush flushes all pipeline contained in this Provider Flush(ctx context.Context) @@ -111,8 +112,9 @@ func (p *provider) Stop() { p.outputChan = nil } -func (p *provider) reconfigureSDS(config []byte, orderType sds.ReconfigureOrderType) error { - var responses []chan error +// return true if all processor SDS scanners are active. +func (p *provider) reconfigureSDS(config []byte, orderType sds.ReconfigureOrderType) (bool, error) { + var responses []chan sds.ReconfigureResponse // send a reconfiguration order to every running pipeline @@ -120,7 +122,7 @@ func (p *provider) reconfigureSDS(config []byte, orderType sds.ReconfigureOrderT order := sds.ReconfigureOrder{ Type: orderType, Config: config, - ResponseChan: make(chan error), + ResponseChan: make(chan sds.ReconfigureResponse), } responses = append(responses, order.ResponseChan) @@ -131,28 +133,43 @@ func (p *provider) reconfigureSDS(config []byte, orderType sds.ReconfigureOrderT // reports if at least one error occurred var rerr error + allScannersActive := true for _, response := range responses { - err := <-response - if err != nil { - rerr = multierror.Append(rerr, err) + resp := <-response + + if !resp.IsActive { + allScannersActive = false + } + + if resp.Err != nil { + rerr = multierror.Append(rerr, resp.Err) } + close(response) } - return rerr + return allScannersActive, rerr } // ReconfigureSDSStandardRules stores the SDS standard rules for the given provider. -func (p *provider) ReconfigureSDSStandardRules(standardRules []byte) error { +func (p *provider) ReconfigureSDSStandardRules(standardRules []byte) (bool, error) { return p.reconfigureSDS(standardRules, sds.StandardRules) } // ReconfigureSDSAgentConfig reconfigures the pipeline with the given // configuration received through Remote Configuration. -func (p *provider) ReconfigureSDSAgentConfig(config []byte) error { +// Return true if all SDS scanners are active after applying this configuration. +func (p *provider) ReconfigureSDSAgentConfig(config []byte) (bool, error) { return p.reconfigureSDS(config, sds.AgentConfig) } +// StopSDSProcessing reconfigures the pipeline removing the SDS scanning +// from the processing steps. +func (p *provider) StopSDSProcessing() error { + _, err := p.reconfigureSDS(nil, sds.StopProcessing) + return err +} + // NextPipelineChan returns the next pipeline input channel func (p *provider) NextPipelineChan() chan *message.Message { pipelinesLen := len(p.pipelines) diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/processor/encoder.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/processor/encoder.go index e3af636d6d..93f6e73631 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/processor/encoder.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/processor/encoder.go @@ -7,7 +7,7 @@ package processor import ( - "unicode" + "strings" "unicode/utf8" "github.com/DataDog/datadog-agent/pkg/logs/message" @@ -23,14 +23,17 @@ func toValidUtf8(msg []byte) string { if utf8.Valid(msg) { return string(msg) } - str := make([]rune, 0, len(msg)) - for i := range msg { - r, size := utf8.DecodeRune(msg[i:]) - if r == utf8.RuneError && size == 1 { - str = append(str, unicode.ReplacementChar) - } else { - str = append(str, r) - } + + var str strings.Builder + str.Grow(len(msg)) + + for len(msg) > 0 { + r, size := utf8.DecodeRune(msg) + // in case of invalid utf-8, DecodeRune returns (utf8.RuneError, 1) + // and since RuneError is the same as unicode.ReplacementChar + // no need to handle the error explicitly + str.WriteRune(r) + msg = msg[size:] } - return string(str) + return str.String() } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/processor/processor.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/processor/processor.go index 707e1874cd..f66a8c0c48 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/processor/processor.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/processor/processor.go @@ -11,6 +11,7 @@ import ( "github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface" "github.com/DataDog/datadog-agent/comp/logs/agent/config" + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" "github.com/DataDog/datadog-agent/pkg/logs/diagnostic" "github.com/DataDog/datadog-agent/pkg/logs/message" "github.com/DataDog/datadog-agent/pkg/logs/metrics" @@ -38,13 +39,29 @@ type Processor struct { mu sync.Mutex hostname hostnameinterface.Component - sds *sds.Scanner // configured through RC + sds sdsProcessor +} + +type sdsProcessor struct { + // buffer stores the messages for the buffering mechanism in case we didn't + // receive any SDS configuration & wait_for_configuration == "buffer". + buffer []*message.Message + bufferedBytes int + maxBufferSize int + + /// buffering indicates if we're buffering while waiting for an SDS configuration + buffering bool + + scanner *sds.Scanner // configured through RC } // New returns an initialized Processor. -func New(inputChan, outputChan chan *message.Message, processingRules []*config.ProcessingRule, encoder Encoder, - diagnosticMessageReceiver diagnostic.MessageReceiver, hostname hostnameinterface.Component, pipelineID int) *Processor { - sdsScanner := sds.CreateScanner(pipelineID) +func New(cfg pkgconfigmodel.Reader, inputChan, outputChan chan *message.Message, processingRules []*config.ProcessingRule, + encoder Encoder, diagnosticMessageReceiver diagnostic.MessageReceiver, hostname hostnameinterface.Component, + pipelineID int) *Processor { + + waitForSDSConfig := sds.ShouldBufferUntilSDSConfiguration(cfg) + maxBufferSize := sds.WaitForConfigurationBufferMaxSize(cfg) return &Processor{ pipelineID: pipelineID, @@ -54,9 +71,15 @@ func New(inputChan, outputChan chan *message.Message, processingRules []*config. processingRules: processingRules, encoder: encoder, done: make(chan struct{}), - sds: sdsScanner, diagnosticMessageReceiver: diagnosticMessageReceiver, hostname: hostname, + + sds: sdsProcessor{ + // will immediately starts buffering if it has been configured as so + buffering: waitForSDSConfig, + maxBufferSize: maxBufferSize, + scanner: sds.CreateScanner(pipelineID), + }, } } @@ -72,13 +95,14 @@ func (p *Processor) Stop() { <-p.done // once the processor mainloop is not running, it's safe // to delete the sds scanner instance. - if p.sds != nil { - p.sds.Delete() - p.sds = nil + if p.sds.scanner != nil { + p.sds.scanner.Delete() + p.sds.scanner = nil } } // Flush processes synchronously the messages that this processor has to process. +// Mainly (only?) used by the Serverless Agent. func (p *Processor) Flush(ctx context.Context) { p.mu.Lock() defer p.mu.Unlock() @@ -104,27 +128,94 @@ func (p *Processor) run() { for { select { + // Processing, usual main loop + // --------------------------- + case msg, ok := <-p.inputChan: if !ok { // channel has been closed return } - p.processMessage(msg) + + // if we have to wait for an SDS configuration to start processing & forwarding + // the logs, that's here that we buffer the message + if p.sds.buffering { + // buffer until we receive a configuration + p.sds.bufferMsg(msg) + } else { + // process the message + p.processMessage(msg) + } + p.mu.Lock() // block here if we're trying to flush synchronously //nolint:staticcheck p.mu.Unlock() + + // SDS reconfiguration + // ------------------- + case order := <-p.ReconfigChan: p.mu.Lock() - if err := p.sds.Reconfigure(order); err != nil { - log.Errorf("Error while reconfiguring the SDS scanner: %v", err) - order.ResponseChan <- err - } else { - order.ResponseChan <- nil - } + p.applySDSReconfiguration(order) p.mu.Unlock() } } } +func (p *Processor) applySDSReconfiguration(order sds.ReconfigureOrder) { + isActive, err := p.sds.scanner.Reconfigure(order) + response := sds.ReconfigureResponse{ + IsActive: isActive, + Err: err, + } + + if err != nil { + log.Errorf("Error while reconfiguring the SDS scanner: %v", err) + } else { + // no error while reconfiguring the SDS scanner and since it looks active now, + // we should drain the buffered messages if any and stop the + // buffering mechanism. + if p.sds.buffering && isActive { + log.Debug("Processor ready with an SDS configuration.") + p.sds.buffering = false + + // drain the buffer of messages if anything's in there + if len(p.sds.buffer) > 0 { + log.Info("SDS: sending", len(p.sds.buffer), "buffered messages") + for _, msg := range p.sds.buffer { + p.processMessage(msg) + } + } + + p.sds.resetBuffer() + } + // no else case, the buffering is only a startup mechanism, after having + // enabled the SDS scanners, if they become inactive it is because the + // configuration has been sent like that. + } + + order.ResponseChan <- response +} + +func (s *sdsProcessor) bufferMsg(msg *message.Message) { + s.buffer = append(s.buffer, msg) + s.bufferedBytes += len(msg.GetContent()) + + for len(s.buffer) > 0 { + if s.bufferedBytes > s.maxBufferSize { + s.bufferedBytes -= len(s.buffer[0].GetContent()) + s.buffer = s.buffer[1:] + metrics.TlmLogsDiscardedFromSDSBuffer.Inc() + } else { + break + } + } +} + +func (s *sdsProcessor) resetBuffer() { + s.buffer = nil + s.bufferedBytes = 0 +} + func (p *Processor) processMessage(msg *message.Message) { metrics.LogsDecoded.Add(1) metrics.TlmLogsDecoded.Inc() @@ -184,8 +275,8 @@ func (p *Processor) applyRedactingRules(msg *message.Message) bool { // -------------------------- // Global SDS scanner, applied on all log sources - if p.sds.IsReady() { - mutated, evtProcessed, err := p.sds.Scan(content, msg) + if p.sds.scanner.IsReady() { + mutated, evtProcessed, err := p.sds.scanner.Scan(content, msg) if err != nil { log.Error("while using SDS to scan the log:", err) } else if mutated { diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/reconfigure.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/reconfigure.go index 5b3d3fe4c6..117aad8609 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/reconfigure.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/reconfigure.go @@ -6,8 +6,21 @@ //nolint:revive package sds +import ( + "fmt" + + pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model" +) + type ReconfigureOrderType string +const waitForConfigField = "logs_config.sds.wait_for_configuration" +const waitForConfigBufferMaxSizeField = "logs_config.sds.buffer_max_size" +const waitForConfigDefaultBufferMaxSize = 1024 * 1024 * 500 + +const waitForConfigNoCollection = "no_collection" +const waitForConfigBuffer = "buffer" + const ( // StandardRules triggers the storage of a new set of standard rules // and reconfigure the internal SDS scanner with an existing user @@ -15,6 +28,9 @@ const ( StandardRules ReconfigureOrderType = "standard_rules" // AgentConfig triggers a reconfiguration of the SDS scanner. AgentConfig ReconfigureOrderType = "agent_config" + // StopProcessing triggers a reconfiguration of the SDS scanner by destroying + // it to remove the SDS processing step. + StopProcessing ReconfigureOrderType = "stop_processing" ) // ReconfigureOrder are used to trigger a reconfiguration @@ -22,5 +38,68 @@ const ( type ReconfigureOrder struct { Type ReconfigureOrderType Config []byte - ResponseChan chan error + ResponseChan chan ReconfigureResponse +} + +// ReconfigureResponse is used to transmit the result from reconfiguring +// the processors. +type ReconfigureResponse struct { + Err error + IsActive bool +} + +// ValidateConfigField returns true if the configuration value for +// wait_for_configuration is valid. +// Validates its value only when SDS is enabled. +func ValidateConfigField(cfg pkgconfigmodel.Reader) error { + str := cfg.GetString(waitForConfigField) + + if !SDSEnabled || + str == "" || str == waitForConfigBuffer || str == waitForConfigNoCollection { + return nil + } + + return fmt.Errorf("invalid value for '%s': %s. Valid values: %s, %s", + waitForConfigField, str, + waitForConfigBuffer, waitForConfigNoCollection) +} + +// ShouldBlockCollectionUntilSDSConfiguration returns true if we want to start the +// collection only after having received an SDS configuration. +func ShouldBlockCollectionUntilSDSConfiguration(cfg pkgconfigmodel.Reader) bool { + if cfg == nil { + return false + } + + // in case of an invalid value for the `wait_for_configuration` field, + // as a safeguard, we want to block collection until we received an SDS configuration. + if SDSEnabled && ValidateConfigField(cfg) != nil { + return true + } + + return SDSEnabled && cfg.GetString(waitForConfigField) == waitForConfigNoCollection +} + +// ShouldBufferUntilSDSConfiguration returns true if we have to buffer until we've +// received an SDS configuration. +func ShouldBufferUntilSDSConfiguration(cfg pkgconfigmodel.Reader) bool { + if cfg == nil { + return false + } + + return SDSEnabled && cfg.GetString(waitForConfigField) == waitForConfigBuffer +} + +// WaitForConfigurationBufferMaxSize returns a size for the buffer used while +// waiting for an SDS configuration. +func WaitForConfigurationBufferMaxSize(cfg pkgconfigmodel.Reader) int { + if cfg == nil { + return waitForConfigDefaultBufferMaxSize + } + + v := cfg.GetInt(waitForConfigBufferMaxSizeField) + if v <= 0 { + v = waitForConfigDefaultBufferMaxSize + } + return v } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/rules.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/rules.go index a5e32fe903..43a3af4ac4 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/rules.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/rules.go @@ -50,7 +50,9 @@ type StandardRulesConfig struct { // StandardRulesDefaults contains consts defaults information for // standard rules. type StandardRulesDefaults struct { - IncludedKeywordsCharCount uint32 `json:"included_keywords_char_count"` + IncludedKeywordsCharCount uint32 `json:"included_keywords_char_count"` + ExcludedKeywordsCharCount uint32 `json:"excluded_keywords_char_count"` + ExcludedKeywords []string `json:"excluded_keywords"` } // RuleConfig of rule as sent by the Remote Configuration. @@ -67,8 +69,9 @@ type RuleConfig struct { // ProximityKeywords definition in RC config. type ProximityKeywords struct { - Keywords []string `json:"keywords"` - CharacterCount uint32 `json:"character_count"` + Keywords []string `json:"keywords"` + CharacterCount uint32 `json:"character_count"` + UseRecommendedKeywords bool `json:"use_recommended_keywords"` } // RuleDefinition definition in RC config. diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/scanner.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/scanner.go index effde9e28c..581fe810a7 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/scanner.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/scanner.go @@ -14,6 +14,7 @@ import ( "strconv" "strings" "sync" + "time" "github.com/DataDog/datadog-agent/pkg/logs/message" "github.com/DataDog/datadog-agent/pkg/telemetry" @@ -32,6 +33,8 @@ var ( "Count of SDS reconfiguration error.", telemetry.Options{DefaultMetric: true}) tlmSDSReconfigSuccess = telemetry.NewCounterWithOpts("sds", "reconfiguration_success", []string{"pipeline", "type"}, "Count of SDS reconfiguration success.", telemetry.Options{DefaultMetric: true}) + tlmSDSProcessingLatency = telemetry.NewSimpleHistogram("sds", "processing_latency", "Processing latency histogram", + []float64{10, 250, 500, 2000, 5000, 10000}) // unit: us ) // Scanner wraps an SDS Scanner implementation, adds reconfiguration @@ -86,11 +89,12 @@ const ( // to apply the reconfiguration. // When receiving standard rules, user configuration are reloaded and scanners are // recreated to use the newly received standard rules. +// The boolean return parameter indicates if the SDS scanner has been destroyed. // This method is thread safe, a scan can't happen at the same time. -func (s *Scanner) Reconfigure(order ReconfigureOrder) error { +func (s *Scanner) Reconfigure(order ReconfigureOrder) (bool, error) { if s == nil { log.Warn("Trying to reconfigure a nil Scanner") - return nil + return false, nil } s.Lock() @@ -102,24 +106,28 @@ func (s *Scanner) Reconfigure(order ReconfigureOrder) error { case StandardRules: // reconfigure the standard rules err := s.reconfigureStandardRules(order.Config) + var isActive bool // if we already received a configuration and no errors happened while // reconfiguring the standard rules: reapply the user configuration now. if err == nil && s.rawConfig != nil { - if rerr := s.reconfigureRules(s.rawConfig); rerr != nil { + var rerr error + if isActive, rerr = s.reconfigureRules(s.rawConfig); rerr != nil { log.Error("Can't reconfigure SDS after having received standard rules:", rerr) - s.rawConfig = nil // we drop this configuration because it is unusable + s.rawConfig = nil // we drop this configuration because it seems unusable if err == nil { err = rerr } } } - return err + return isActive, err case AgentConfig: return s.reconfigureRules(order.Config) + case StopProcessing: + return s.reconfigureRules([]byte("{}")) } - return fmt.Errorf("Scanner.Reconfigure: Unknown order type: %v", order.Type) + return false, fmt.Errorf("Scanner.Reconfigure: Unknown order type: %v", order.Type) } // reconfigureStandardRules stores in-memory standard rules received through RC. @@ -159,25 +167,26 @@ func (s *Scanner) reconfigureStandardRules(rawConfig []byte) error { // reconfigureRules reconfigures the internal SDS scanner using the in-memory // standard rules. Could possibly delete and recreate the internal SDS scanner if // necessary. +// The boolean return parameter returns if an SDS scanner is active. // This method is NOT thread safe, caller has to ensure the thread safety. -func (s *Scanner) reconfigureRules(rawConfig []byte) error { +func (s *Scanner) reconfigureRules(rawConfig []byte) (bool, error) { if rawConfig == nil { tlmSDSReconfigError.Inc(s.pipelineID, string(AgentConfig), "nil_config") - return fmt.Errorf("Invalid nil raw configuration received for user configuration") + return s.Scanner != nil, fmt.Errorf("Invalid nil raw configuration received for user configuration") } if s.standardRules == nil || len(s.standardRules) == 0 { // store it for the next try s.rawConfig = rawConfig tlmSDSReconfigError.Inc(s.pipelineID, string(AgentConfig), "no_std_rules") - log.Info("Received an user configuration but no SDS standard rules available.") - return nil + log.Debug("Received an user configuration but no SDS standard rules available.") + return s.Scanner != nil, nil } var config RulesConfig if err := json.Unmarshal(rawConfig, &config); err != nil { tlmSDSReconfigError.Inc(s.pipelineID, string(AgentConfig), "cant_unmarshal") - return fmt.Errorf("Can't unmarshal raw configuration: %v", err) + return s.Scanner != nil, fmt.Errorf("Can't unmarshal raw configuration: %v", err) } // ignore disabled rules @@ -197,11 +206,11 @@ func (s *Scanner) reconfigureRules(rawConfig []byte) error { s.configuredRules = nil tlmSDSReconfigSuccess.Inc(s.pipelineID, "shutdown") } - return nil + return false, nil } // prepare the scanner rules - var sdsRules []sds.Rule + var sdsRules []sds.RuleConfig var malformedRulesCount int var unknownStdRulesCount int for _, userRule := range config.Rules { @@ -231,7 +240,7 @@ func (s *Scanner) reconfigureRules(rawConfig []byte) error { var err error if scanner, err = sds.CreateScanner(sdsRules); err != nil { tlmSDSReconfigError.Inc(s.pipelineID, string(AgentConfig), "scanner_error") - return fmt.Errorf("while configuring an SDS Scanner: %v", err) + return s.Scanner != nil, fmt.Errorf("while configuring an SDS Scanner: %v", err) } // destroy the old scanner @@ -245,7 +254,7 @@ func (s *Scanner) reconfigureRules(rawConfig []byte) error { s.rawConfig = rawConfig s.configuredRules = config.Rules - log.Info("Created an SDS scanner with", len(scanner.Rules), "enabled rules") + log.Info("Created an SDS scanner with", len(scanner.RuleConfigs), "enabled rules") for _, rule := range s.configuredRules { log.Debug("Configured rule:", rule.Name) } @@ -255,14 +264,13 @@ func (s *Scanner) reconfigureRules(rawConfig []byte) error { tlmSDSRulesState.Set(float64(totalRulesReceived-len(config.Rules)), s.pipelineID, "disabled") tlmSDSReconfigSuccess.Inc(s.pipelineID, string(AgentConfig)) - return nil + return true, nil } -// interpretRCRule interprets a rule as received through RC to return -// an sds.Rule usable with the shared library. +// interpretRCRule interprets a rule as received through RC to return an sds.Rule usable with the shared library. // `standardRule` contains the definition, with the name, pattern, etc. // `userRule` contains the configuration done by the user: match action, etc. -func interpretRCRule(userRule RuleConfig, standardRule StandardRuleConfig, defaults StandardRulesDefaults) (sds.Rule, error) { +func interpretRCRule(userRule RuleConfig, standardRule StandardRuleConfig, defaults StandardRulesDefaults) (sds.RuleConfig, error) { var extraConfig sds.ExtraConfig var defToUse = StandardRuleDefinition{Version: -1} @@ -279,7 +287,6 @@ func interpretRCRule(userRule RuleConfig, standardRule StandardRuleConfig, defau reqCapabilitiesCount := len(stdRuleDef.RequiredCapabilities) if reqCapabilitiesCount > 0 { if reqCapabilitiesCount > 1 { - // TODO(remy): telemetry log.Warnf("Standard rule '%v' with multiple required capabilities: %d. Only the first one will be used", standardRule.Name, reqCapabilitiesCount) } received := stdRuleDef.RequiredCapabilities[0] @@ -302,20 +309,27 @@ func interpretRCRule(userRule RuleConfig, standardRule StandardRuleConfig, defau } if defToUse.Version == -1 { - // TODO(remy): telemetry - return sds.Rule{}, fmt.Errorf("unsupported rule with no compatible definition") + return nil, fmt.Errorf("unsupported rule with no compatible definition") } - // we use the filled `CharacterCount` value to decide if we want - // to use the user provided configuration for proximity keywords - // or if we have to use the information provided in the std rules instead. - if userRule.IncludedKeywords.CharacterCount > 0 { - // proximity keywords configuration provided by the user - extraConfig.ProximityKeywords = sds.CreateProximityKeywordsConfig(userRule.IncludedKeywords.CharacterCount, userRule.IncludedKeywords.Keywords, nil) - } else if len(defToUse.DefaultIncludedKeywords) > 0 && defaults.IncludedKeywordsCharCount > 0 { - // the user has not specified proximity keywords - // use the proximity keywords provided by the standard rule if any + // If the "Use recommended keywords" checkbox has been checked, we use the default + // included keywords available in the rule (curated by Datadog). + // Otherwise: + // If some included keywords have been manually filled by the user, we use them + // Else we start using the default excluded keywords. + if userRule.IncludedKeywords.UseRecommendedKeywords { + // default included keywords extraConfig.ProximityKeywords = sds.CreateProximityKeywordsConfig(defaults.IncludedKeywordsCharCount, defToUse.DefaultIncludedKeywords, nil) + } else { + if len(userRule.IncludedKeywords.Keywords) > 0 && userRule.IncludedKeywords.CharacterCount > 0 { + // user provided included keywords + extraConfig.ProximityKeywords = sds.CreateProximityKeywordsConfig(userRule.IncludedKeywords.CharacterCount, userRule.IncludedKeywords.Keywords, nil) + } else if len(defaults.ExcludedKeywords) > 0 && defaults.ExcludedKeywordsCharCount > 0 { + // default excluded keywords + extraConfig.ProximityKeywords = sds.CreateProximityKeywordsConfig(defaults.ExcludedKeywordsCharCount, nil, defaults.ExcludedKeywords) + } else { + log.Warn("not using the recommended keywords but no keywords available for rule", userRule.Name) + } } // we've compiled all necessary information merging the standard rule and the user config @@ -341,7 +355,7 @@ func interpretRCRule(userRule RuleConfig, standardRule StandardRuleConfig, defau return sds.NewHashRule(standardRule.Name, defToUse.Pattern, extraConfig), nil } - return sds.Rule{}, fmt.Errorf("Unknown MatchAction type (%v) received through RC for rule '%s':", matchAction, standardRule.Name) + return nil, fmt.Errorf("Unknown MatchAction type (%v) received through RC for rule '%s':", matchAction, standardRule.Name) } // Scan scans the given `event` using the internal SDS scanner. @@ -353,6 +367,7 @@ func interpretRCRule(userRule RuleConfig, standardRule StandardRuleConfig, defau func (s *Scanner) Scan(event []byte, msg *message.Message) (bool, []byte, error) { s.Lock() defer s.Unlock() + start := time.Now() if s.Scanner == nil { return false, nil, fmt.Errorf("can't Scan with an unitialized scanner") @@ -373,6 +388,7 @@ func (s *Scanner) Scan(event []byte, msg *message.Message) (bool, []byte, error) // using a tag. msg.ProcessingTags = append(msg.ProcessingTags, ScannedTag) + tlmSDSProcessingLatency.Observe(float64(time.Since(start) / 1000)) return scanResult.Mutated, scanResult.Event, err } @@ -412,7 +428,7 @@ func (s *Scanner) IsReady() bool { if s.Scanner == nil { return false } - if len(s.Scanner.Rules) == 0 { + if len(s.Scanner.RuleConfigs) == 0 { return false } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/scanner_nosds.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/scanner_nosds.go index 7ed96c1062..0f1d256f69 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/scanner_nosds.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sds/scanner_nosds.go @@ -29,8 +29,8 @@ func CreateScanner(_ int) *Scanner { } // Reconfigure mocks the Reconfigure function. -func (s *Scanner) Reconfigure(_ ReconfigureOrder) error { - return nil +func (s *Scanner) Reconfigure(_ ReconfigureOrder) (bool, error) { + return false, nil } // Delete mocks the Delete function. diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sender/batch_strategy.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sender/batch_strategy.go index ed8e9ba697..4949f4a4e7 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sender/batch_strategy.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sender/batch_strategy.go @@ -7,6 +7,7 @@ package sender import ( + "sync" "time" "github.com/benbjohnson/clock" @@ -22,12 +23,12 @@ var ( // batchStrategy contains all the logic to send logs in batch. type batchStrategy struct { - inputChan chan *message.Message - outputChan chan *message.Payload - flushChan chan struct{} - serverless bool - flushDoneChan chan struct{} - buffer *MessageBuffer + inputChan chan *message.Message + outputChan chan *message.Payload + flushChan chan struct{} + serverless bool + flushWg *sync.WaitGroup + buffer *MessageBuffer // pipelineName provides a name for the strategy to differentiate it from other instances in other internal pipelines pipelineName string serializer Serializer @@ -42,21 +43,21 @@ func NewBatchStrategy(inputChan chan *message.Message, outputChan chan *message.Payload, flushChan chan struct{}, serverless bool, - flushDoneChan chan struct{}, + flushWg *sync.WaitGroup, serializer Serializer, batchWait time.Duration, maxBatchSize int, maxContentSize int, pipelineName string, contentEncoding ContentEncoding) Strategy { - return newBatchStrategyWithClock(inputChan, outputChan, flushChan, serverless, flushDoneChan, serializer, batchWait, maxBatchSize, maxContentSize, pipelineName, clock.New(), contentEncoding) + return newBatchStrategyWithClock(inputChan, outputChan, flushChan, serverless, flushWg, serializer, batchWait, maxBatchSize, maxContentSize, pipelineName, clock.New(), contentEncoding) } func newBatchStrategyWithClock(inputChan chan *message.Message, outputChan chan *message.Payload, flushChan chan struct{}, serverless bool, - flushDoneChan chan struct{}, + flushWg *sync.WaitGroup, serializer Serializer, batchWait time.Duration, maxBatchSize int, @@ -70,7 +71,7 @@ func newBatchStrategyWithClock(inputChan chan *message.Message, outputChan: outputChan, flushChan: flushChan, serverless: serverless, - flushDoneChan: flushDoneChan, + flushWg: flushWg, buffer: NewMessageBuffer(maxBatchSize, maxContentSize), serializer: serializer, batchWait: batchWait, @@ -141,10 +142,6 @@ func (s *batchStrategy) processMessage(m *message.Message, outputChan chan *mess // to the next stage of the pipeline. func (s *batchStrategy) flushBuffer(outputChan chan *message.Payload) { if s.buffer.IsEmpty() { - if s.serverless { - // If there are no messages to send then mark the flush as done - s.flushDoneChan <- struct{}{} - } return } messages := s.buffer.GetMessages() @@ -167,6 +164,11 @@ func (s *batchStrategy) sendMessages(messages []*message.Message, outputChan cha return } + if s.serverless { + // Increment the wait group so the flush doesn't finish until all payloads are sent to all destinations + s.flushWg.Add(1) + } + outputChan <- &message.Payload{ Messages: messages, Encoded: encodedPayload, diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sender/sender.go b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sender/sender.go index f72ab3ae8f..31fa4db0bb 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/logs/sender/sender.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/logs/sender/sender.go @@ -37,11 +37,11 @@ type Sender struct { done chan struct{} bufferSize int senderDoneChan chan *sync.WaitGroup - flushDoneChan chan struct{} + flushWg *sync.WaitGroup } // NewSender returns a new sender. -func NewSender(config pkgconfigmodel.Reader, inputChan chan *message.Payload, outputChan chan *message.Payload, destinations *client.Destinations, bufferSize int, senderDoneChan chan *sync.WaitGroup, flushDoneChan chan struct{}) *Sender { +func NewSender(config pkgconfigmodel.Reader, inputChan chan *message.Payload, outputChan chan *message.Payload, destinations *client.Destinations, bufferSize int, senderDoneChan chan *sync.WaitGroup, flushWg *sync.WaitGroup) *Sender { return &Sender{ config: config, inputChan: inputChan, @@ -50,7 +50,7 @@ func NewSender(config pkgconfigmodel.Reader, inputChan chan *message.Payload, ou done: make(chan struct{}), bufferSize: bufferSize, senderDoneChan: senderDoneChan, - flushDoneChan: flushDoneChan, + flushWg: flushWg, } } @@ -122,10 +122,11 @@ func (s *Sender) run() { inUse := float64(time.Since(startInUse) / time.Millisecond) tlmSendWaitTime.Add(inUse) - if s.senderDoneChan != nil { + if s.senderDoneChan != nil && s.flushWg != nil { + // Wait for all destinations to finish sending the payload senderDoneWg.Wait() - // In serverless ensure the payload is sent to all destinations to sync with a flush - s.flushDoneChan <- struct{}{} + // Decrement the wait group when this payload has been sent + s.flushWg.Done() } } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/obfuscate.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/obfuscate.go index fd5ac9ddd3..3032fb54f3 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/obfuscate.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/obfuscate.go @@ -185,6 +185,11 @@ type SQLConfig struct { // This option is only valid when ObfuscationMode is "normalize_only" or "obfuscate_and_normalize". KeepIdentifierQuotation bool `json:"keep_identifier_quotation" yaml:"keep_identifier_quotation"` + // KeepJSONPath specifies whether to keep JSON paths following JSON operators in SQL statements in obfuscation. + // By default, JSON paths are treated as literals and are obfuscated to ?, e.g. "data::jsonb -> 'name'" -> "data::jsonb -> ?". + // This option is only valid when ObfuscationMode is "normalize_only" or "obfuscate_and_normalize". + KeepJSONPath bool `json:"keep_json_path" yaml:"keep_json_path"` + // Cache reports whether the obfuscator should use a LRU look-up cache for SQL obfuscations. Cache bool } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql.go index 18fc120a73..8674173c8f 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql.go @@ -439,6 +439,7 @@ func (o *Obfuscator) ObfuscateWithSQLLexer(in string, opts *SQLConfig) (*Obfusca sqllexer.WithReplacePositionalParameter(!opts.KeepPositionalParameter), sqllexer.WithReplaceBoolean(!opts.KeepBoolean), sqllexer.WithReplaceNull(!opts.KeepNull), + sqllexer.WithKeepJsonPath(opts.KeepJSONPath), ) } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql_tokenizer.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql_tokenizer.go index e379d7dde4..190801d1dc 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql_tokenizer.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql_tokenizer.go @@ -473,10 +473,15 @@ func (tkn *SQLTokenizer) Scan() (TokenKind, []byte) { // modulo operator (e.g. 'id % 8') return TokenKind(ch), tkn.bytes() case '$': - if isDigit(tkn.lastChar) { - // TODO(gbbr): the first digit after $ does not necessarily guarantee - // that this isn't a dollar-quoted string constant. We might eventually - // want to cover for this use-case too (e.g. $1$some text$1$). + if isDigit(tkn.lastChar) || tkn.lastChar == '?' { + // TODO(knusbaum): Valid dollar quote tags start with alpha characters and contain no symbols. + // See: https://www.postgresql.org/docs/15/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS + // See also: https://pgpedia.info/d/dollar-quoting.html instead. + // + // Instances of $[integer] or $? are prepared statement variables. + // We may eventually want to expand this to check for symbols other than numbers and '?', + // since other symbols are not valid dollar quote tags, but for now this covers prepared statement + // variables without exposing us to more risk of not obfuscating something than necessary. return tkn.scanPreparedStatement('$') } @@ -678,11 +683,16 @@ func (tkn *SQLTokenizer) scanDollarQuotedString() (TokenKind, []byte) { func (tkn *SQLTokenizer) scanPreparedStatement(_ rune) (TokenKind, []byte) { // a prepared statement expect a digit identifier like $1 - if !isDigit(tkn.lastChar) { + if !isDigit(tkn.lastChar) && tkn.lastChar != '?' { tkn.setErr(`prepared statements must start with digits, got "%c" (%d)`, tkn.lastChar, tkn.lastChar) return LexError, tkn.bytes() } + if tkn.lastChar == '?' { + tkn.advance() + return PreparedStatement, tkn.bytes() + } + // scanNumber keeps the prefix rune intact. // read numbers and return an error if any token, buff := tkn.scanNumber(false) diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/products.go b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/products.go index 35974c5e94..120229ecf2 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/products.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/products.go @@ -30,6 +30,7 @@ var validProducts = map[string]struct{}{ ProductContainerAutoscalingValues: {}, ProductTesting1: {}, ProductTesting2: {}, + ProductOrchestratorK8sCRDs: {}, } const ( @@ -81,4 +82,6 @@ const ( ProductTesting1 = "TESTING1" // ProductTesting2 is a product used for testing remote config ProductTesting2 = "TESTING2" + // ProductOrchestratorK8sCRDs receives values for k8s crds + ProductOrchestratorK8sCRDs = "ORCHESTRATOR_K8S_CRDS" ) diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/telemetry/histogram.go b/vendor/github.com/DataDog/datadog-agent/pkg/telemetry/histogram.go index a35d3564ec..a2f81dfcfc 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/telemetry/histogram.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/telemetry/histogram.go @@ -16,10 +16,10 @@ type Histogram interface { type histogramNoOp struct{} -func (h histogramNoOp) Observe(_ float64, _ ...string) {} -func (h histogramNoOp) Delete(_ ...string) {} -func (h histogramNoOp) WithValues(tagsValue ...string) telemetryComponent.SimpleHistogram { return nil } //nolint:revive // TODO fix revive unused-parameter -func (h histogramNoOp) WithTags(tags map[string]string) telemetryComponent.SimpleHistogram { //nolint:revive // TODO fix revive unused-parameter +func (h histogramNoOp) Observe(_ float64, _ ...string) {} +func (h histogramNoOp) Delete(_ ...string) {} +func (h histogramNoOp) WithValues(_ ...string) telemetryComponent.SimpleHistogram { return nil } +func (h histogramNoOp) WithTags(_ map[string]string) telemetryComponent.SimpleHistogram { return nil } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/telemetry/stat_counter_wrapper.go b/vendor/github.com/DataDog/datadog-agent/pkg/telemetry/stat_counter_wrapper.go index cb0955dad6..a7329d4a9e 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/telemetry/stat_counter_wrapper.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/telemetry/stat_counter_wrapper.go @@ -23,6 +23,12 @@ func (sgw *StatCounterWrapper) Inc(tags ...string) { sgw.counter.Inc(tags...) } +// IncWithTags increments the counter with the given tags value. +func (sgw *StatCounterWrapper) IncWithTags(tags map[string]string) { + sgw.stat.Inc() + sgw.counter.IncWithTags(tags) +} + // Delete deletes the value for the counter with the given tags value. func (sgw *StatCounterWrapper) Delete() { sgw.stat.Store(0) diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/agent/agent.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/agent/agent.go index a7b3a7c160..7d65641aca 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/agent/agent.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/trace/agent/agent.go @@ -65,6 +65,9 @@ type TraceWriter interface { // FlushSync blocks and sends pending payloads when syncMode is true FlushSync() error + + // UpdateAPIKey signals the TraceWriter to update the API Keys stored in its senders config. + UpdateAPIKey(oldKey, newKey string) } // Concentrator accepts stats input, 'concentrating' them together into buckets before flushing them @@ -225,6 +228,18 @@ func (a *Agent) FlushSync() { } } +// UpdateAPIKey receives the API Key update signal and propagates it across all internal +// components that rely on API Key configuration: +// - HTTP Receiver (used in reverse proxies) +// - Trace Writer senders +// - Stats Writer senders +func (a *Agent) UpdateAPIKey(oldKey, newKey string) { + log.Infof("API Key changed. Updating trace-agent config...") + a.Receiver.UpdateAPIKey() + a.TraceWriter.UpdateAPIKey(oldKey, newKey) + a.StatsWriter.UpdateAPIKey(oldKey, newKey) +} + func (a *Agent) work() { for { p, ok := <-a.In diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/api/api.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/api/api.go index 7062efc03e..5fa3c4f657 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/api/api.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/trace/api/api.go @@ -380,6 +380,16 @@ func (r *HTTPReceiver) Stop() error { return nil } +// UpdateAPIKey rebuilds the server handler to update API Keys in all endpoints +func (r *HTTPReceiver) UpdateAPIKey() { + if r.server == nil { + return + } + log.Debug("API Key updated. Rebuilding API handler.") + handler := r.buildMux() + r.server.Handler = handler +} + func (r *HTTPReceiver) handleWithVersion(v Version, f func(Version, http.ResponseWriter, *http.Request)) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { if mediaType := getMediaType(req); mediaType == "application/msgpack" && (v == v01 || v == v02) { diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/api/telemetry.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/api/telemetry.go index a0eb0bffab..a45ac41050 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/api/telemetry.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/trace/api/telemetry.go @@ -36,6 +36,7 @@ const ( awsLambda cloudResourceType = "AWSLambda" awsFargate cloudResourceType = "AWSFargate" cloudRun cloudResourceType = "GCPCloudRun" + cloudFunctions cloudResourceType = "GCPCloudFunctions" azureAppService cloudResourceType = "AzureAppService" azureContainerApp cloudResourceType = "AzureContainerApp" aws cloudProvider = "AWS" @@ -283,6 +284,12 @@ func (f *TelemetryForwarder) setRequestHeader(req *http.Request) { if serviceName, found := f.conf.GlobalTags["service_name"]; found { req.Header.Set(cloudResourceIdentifierHeader, serviceName) } + case "cloudfunction": + req.Header.Set(cloudProviderHeader, string(gcp)) + req.Header.Set(cloudResourceTypeHeader, string(cloudFunctions)) + if serviceName, found := f.conf.GlobalTags["service_name"]; found { + req.Header.Set(cloudResourceIdentifierHeader, serviceName) + } case "appservice": req.Header.Set(cloudProviderHeader, string(azure)) req.Header.Set(cloudResourceTypeHeader, string(azureAppService)) diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/config.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/config.go index 2ada0ea27e..2e8a94cd0e 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/config.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/config.go @@ -117,6 +117,13 @@ type ObfuscationConfig struct { CreditCards obfuscate.CreditCardsConfig `mapstructure:"credit_cards"` } +func obfuscationMode(enabled bool) obfuscate.ObfuscationMode { + if enabled { + return obfuscate.ObfuscateOnly + } + return "" +} + // Export returns an obfuscate.Config matching o. func (o *ObfuscationConfig) Export(conf *AgentConfig) obfuscate.Config { return obfuscate.Config{ @@ -126,6 +133,7 @@ func (o *ObfuscationConfig) Export(conf *AgentConfig) obfuscate.Config { KeepSQLAlias: conf.HasFeature("keep_sql_alias"), DollarQuotedFunc: conf.HasFeature("dollar_quoted_func"), Cache: conf.HasFeature("sql_cache"), + ObfuscationMode: obfuscationMode(conf.HasFeature("sqllexer")), }, ES: o.ES, OpenSearch: o.OpenSearch, @@ -555,6 +563,14 @@ func (c *AgentConfig) APIKey() string { return c.Endpoints[0].APIKey } +// UpdateAPIKey updates the API Key associated with the main endpoint. +func (c *AgentConfig) UpdateAPIKey(val string) { + if len(c.Endpoints) == 0 { + return + } + c.Endpoints[0].APIKey = val +} + // NewHTTPClient returns a new http.Client to be used for outgoing connections to the // Datadog API. func (c *AgentConfig) NewHTTPClient() *ResetClient { diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.ini b/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.ini index 34badd126b..24ffaafe5d 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.ini +++ b/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.ini @@ -8,8 +8,8 @@ peer.aws.sqs.queue = "queuename" peer.cassandra.contact.points = "db.cassandra.contact.points" peer.couchbase.seed.nodes = "db.couchbase.seed.nodes" peer.db.name = "db.name,mongodb.db,db.instance,cassandra.keyspace,db.namespace" -peer.db.system = "db.system" -peer.hostname = "peer.hostname,hostname,net.peer.name,db.hostname,network.destination.name,grpc.host,http.host,server.address,http.server_name,out.host,dns.hostname" +peer.db.system = "db.system,active_record.db.vendor,db.type,sequel.db.vendor" +peer.hostname = "peer.hostname,hostname,net.peer.name,db.hostname,network.destination.name,grpc.host,http.host,server.address,http.server_name,out.host,dns.hostname,network.destination.ip" peer.kafka.bootstrap.servers = "messaging.kafka.bootstrap.servers" peer.messaging.destination = "topicname,messaging.destination,messaging.destination.name,messaging.rabbitmq.exchange,amqp.destination,amqp.queue,amqp.exchange,msmq.queue.path,aws.queue.name" peer.messaging.system = "messaging.system" diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/writer/stats.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/writer/stats.go index 50485cf80d..b83ea98a5e 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/writer/stats.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/trace/writer/stats.go @@ -96,6 +96,16 @@ func NewStatsWriter( return sw } +// UpdateAPIKey updates the API Key, if needed, on Stats Writer senders. +func (w *DatadogStatsWriter) UpdateAPIKey(oldKey, newKey string) { + for _, s := range w.senders { + if oldKey == s.cfg.apiKey { + log.Debugf("API Key updated for stats endpoint=%s", s.cfg.url) + s.cfg.apiKey = newKey + } + } +} + // Run starts the DatadogStatsWriter, making it ready to receive stats and report w.statsd. func (w *DatadogStatsWriter) Run() { t := time.NewTicker(5 * time.Second) diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/writer/trace.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/writer/trace.go index 2a7b5ab6b9..c1521f879d 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/writer/trace.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/trace/writer/trace.go @@ -136,6 +136,16 @@ func NewTraceWriter( return tw } +// UpdateAPIKey updates the API Key, if needed, on Trace Writer senders. +func (w *TraceWriter) UpdateAPIKey(oldKey, newKey string) { + for _, s := range w.senders { + if oldKey == s.cfg.apiKey { + log.Debugf("API Key updated for traces endpoint=%s", s.cfg.url) + s.cfg.apiKey = newKey + } + } +} + func (w *TraceWriter) reporter() { tck := time.NewTicker(w.tick) defer tck.Stop() @@ -294,14 +304,14 @@ func (w *TraceWriter) serialize(pl *pb.AgentPayload) { if err != nil { // it will never happen, unless an invalid compression is chosen; // we know gzip.BestSpeed is valid. - log.Errorf("Failed to initialize gzip writer. No traces can be sent: %v", err) + log.Errorf("Failed to initialize %s writer. No traces can be sent: %v", w.compressor.Encoding(), err) return } if _, err := writer.Write(b); err != nil { - log.Errorf("Error gzipping trace payload: %v", err) + log.Errorf("Error %s trace payload: %v", w.compressor.Encoding(), err) } if err := writer.Close(); err != nil { - log.Errorf("Error closing gzip stream when writing trace payload: %v", err) + log.Errorf("Error closing %s stream when writing trace payload: %v", w.compressor.Encoding(), err) } sendPayloads(w.senders, p, w.syncMode) diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/http/transport.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/http/transport.go index 62d1641e58..94cfa4f4ce 100644 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/http/transport.go +++ b/vendor/github.com/DataDog/datadog-agent/pkg/util/http/transport.go @@ -97,14 +97,21 @@ func CreateHTTPTransport(cfg pkgconfigmodel.Reader) *http.Transport { tlsHandshakeTimeout = 10 * time.Second } + // Control whether to disable RFC 6555 Fast Fallback ("Happy Eyeballs") + // By default this is disabled (set to a negative value). + // It can be set to 0 to use the default value, or an explicit duration. + fallbackDelay := -1 * time.Nanosecond + if cfg.IsSet("http_dial_fallback_delay") { + fallbackDelay = cfg.GetDuration("http_dial_fallback_delay") + } + transport := &http.Transport{ TLSClientConfig: tlsConfig, DialContext: (&net.Dialer{ Timeout: 30 * time.Second, // Enables TCP keepalives to detect broken connections - KeepAlive: 30 * time.Second, - // Disable RFC 6555 Fast Fallback ("Happy Eyeballs") - FallbackDelay: -1 * time.Nanosecond, + KeepAlive: 30 * time.Second, + FallbackDelay: fallbackDelay, }).DialContext, MaxIdleConns: 100, MaxIdleConnsPerHost: 5, diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_podman_util.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_podman_util.go new file mode 100644 index 0000000000..4327572820 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_podman_util.go @@ -0,0 +1,27 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +package log + +import ( + "strings" +) + +// The paths below are set in podman code and cannot be modified by the user. +// Ref: https://github.com/containers/podman/blob/7c38ee756592d95e718967fcd3983b81abd95e76/test/e2e/run_transient_test.go#L19-L45 +const ( + sqlDBSuffix string = "/storage/db.sql" + boltDBSuffix string = "/storage/libpod/bolt_state.db" +) + +// ExtractPodmanRootDirFromDBPath extracts the podman base path for the containers directory based on the user-provided `podman_db_path`. +func ExtractPodmanRootDirFromDBPath(podmanDBPath string) string { + if strings.HasSuffix(podmanDBPath, sqlDBSuffix) { + return strings.TrimSuffix(podmanDBPath, sqlDBSuffix) + } else if strings.HasSuffix(podmanDBPath, boltDBSuffix) { + return strings.TrimSuffix(podmanDBPath, boltDBSuffix) + } + return "" +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/.apigentools-info b/vendor/github.com/DataDog/datadog-api-client-go/v2/.apigentools-info index 4951056b1f..f07f393814 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/.apigentools-info +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-08-12 13:34:54.556770", - "spec_repo_commit": "0360f6c8" + "regenerated": "2024-10-02 14:33:47.833685", + "spec_repo_commit": "3b4747f4" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-08-12 13:34:54.576362", - "spec_repo_commit": "0360f6c8" + "regenerated": "2024-10-02 14:33:47.848461", + "spec_repo_commit": "3b4747f4" } } } \ No newline at end of file diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/CHANGELOG.md b/vendor/github.com/DataDog/datadog-api-client-go/v2/CHANGELOG.md index f1e0d6cbcb..44db47295e 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/CHANGELOG.md +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/CHANGELOG.md @@ -1,5 +1,56 @@ # CHANGELOG +## 2.31.0 / 2024-10-02 + +### Fixed +* change schema used in FastlyServicesResponse by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2700 +### Added +* Add new synthetics HTTP javascript assertion by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2616 +* Dashboards - Toplist widget style - Add palette by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2668 +* Allow Table Widget requests to specify text replace formatting in dashboards by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2669 +* Add documentation for Data Jobs Monitoring summary keys by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2672 +* Update estimate docs with realtime changes by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2704 +* Ensure clients can handle empty oneOf objects by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2702 +* Add referenceTables field to security monitoring endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2697 +* Add UA documentation for new DJM usage_type by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2698 +* Add v2 endpoints for MS Teams Integration by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2707 +* Add documention for OCI Integration by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2713 +* Add schema for mobile test by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2682 +* Add Synthetics endpoint to fetch uptimes in API spec by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2661 +### Changed +* Split the synthetics request port field into a oneOf by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2678 +* Remove unused field `color` in `TeamUpdateAttributes` by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2674 +* Powerpack add support for prefix and available values by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2683 +* bump go version to 1.22 by @amaskara-dd in https://github.com/DataDog/datadog-api-client-go/pull/2692 +* Update v2 metrics list endpoint filter by metric type to use metric type category by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2705 + + +**Full Changelog**: https://github.com/DataDog/datadog-api-client-go/compare/v2.30.0...v2.31.0 + +## 2.30.0 / 2024-09-04 + +### Fixed +* Add `is_totp` and `is_fido` to Synthetic global variables by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2582 +### Added +* Add `api_key` and `name` to `CloudflareAccountResponseAttributes`. by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2631 +* Add `api_key` and `name` to `FastlyAccountUpdateRequestAttributes`. by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2632 +* Add `opsgenie_api_key` to `OpsgenieServiceResponseAttributes`. by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2633 +* Add `category` and `remote_config_read_enabled` to `APIKeyCreateAttributes`, and add `LeakedKey`. by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2634 +* Allow 4 group-bys for pattern viz by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2642 +* add url attribute to metrics assets v2 api by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2644 +* Add editable field to suppression rule by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2545 +* Add `num_flex_logs_retention_days` field to logs_indexes api spec by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2645 +* Software catalog openapi spec by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2641 +### Changed +* allow variables in port by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2624 +* Fix VFTs and extracted local variables enum types by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2604 +* Changed Widget time schema to add support for new fixed_span and live_span object by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2629 +### Deprecated +* mark groupby_simple_monitor as deprecated by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-go/pull/2658 + + +**Full Changelog**: https://github.com/DataDog/datadog-api-client-go/compare/v2.29.0...v2.30.0 + ## 2.29.0 / 2024-08-12 ### Fixed diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/README.md b/vendor/github.com/DataDog/datadog-api-client-go/v2/README.md index 983bf2de08..d51e5dd3b9 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/README.md +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/README.md @@ -4,7 +4,7 @@ This repository contains a Go API client for the [Datadog API](https://docs.data ## Requirements -- Go 1.19+ +- Go 1.22+ ## Layout diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/api_synthetics.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/api_synthetics.go index f13796c30e..aa03d152a0 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/api_synthetics.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/api_synthetics.go @@ -19,7 +19,7 @@ type SyntheticsApi datadog.Service // CreateGlobalVariable Create a global variable. // Create a Synthetic global variable. -func (a *SyntheticsApi) CreateGlobalVariable(ctx _context.Context, body SyntheticsGlobalVariable) (SyntheticsGlobalVariable, *_nethttp.Response, error) { +func (a *SyntheticsApi) CreateGlobalVariable(ctx _context.Context, body SyntheticsGlobalVariableRequest) (SyntheticsGlobalVariable, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -309,6 +309,79 @@ func (a *SyntheticsApi) CreateSyntheticsBrowserTest(ctx _context.Context, body S return localVarReturnValue, localVarHTTPResponse, nil } +// CreateSyntheticsMobileTest Create a mobile test. +// Create a Synthetic mobile test. +func (a *SyntheticsApi) CreateSyntheticsMobileTest(ctx _context.Context, body SyntheticsMobileTest) (SyntheticsMobileTest, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarReturnValue SyntheticsMobileTest + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v1.SyntheticsApi.CreateSyntheticsMobileTest") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/synthetics/tests/mobile" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "application/json" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 402 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // DeleteGlobalVariable Delete a global variable. // Delete a Synthetic global variable. func (a *SyntheticsApi) DeleteGlobalVariable(ctx _context.Context, variableId string) (*_nethttp.Response, error) { @@ -506,7 +579,7 @@ func (a *SyntheticsApi) DeleteTests(ctx _context.Context, body SyntheticsDeleteT // EditGlobalVariable Edit a global variable. // Edit a Synthetic global variable. -func (a *SyntheticsApi) EditGlobalVariable(ctx _context.Context, variableId string, body SyntheticsGlobalVariable) (SyntheticsGlobalVariable, *_nethttp.Response, error) { +func (a *SyntheticsApi) EditGlobalVariable(ctx _context.Context, variableId string, body SyntheticsGlobalVariableRequest) (SyntheticsGlobalVariable, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} @@ -578,6 +651,79 @@ func (a *SyntheticsApi) EditGlobalVariable(ctx _context.Context, variableId stri return localVarReturnValue, localVarHTTPResponse, nil } +// FetchUptimes Fetch uptime for multiple tests. +// Fetch uptime for multiple Synthetic tests by ID. +func (a *SyntheticsApi) FetchUptimes(ctx _context.Context, body SyntheticsFetchUptimesPayload) ([]SyntheticsTestUptime, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarReturnValue []SyntheticsTestUptime + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v1.SyntheticsApi.FetchUptimes") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/synthetics/tests/uptimes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "application/json" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // GetAPITest Get an API test. // Get the detailed configuration associated with // a Synthetic API test. @@ -1191,6 +1337,78 @@ func (a *SyntheticsApi) GetGlobalVariable(ctx _context.Context, variableId strin return localVarReturnValue, localVarHTTPResponse, nil } +// GetMobileTest Get a Mobile test. +// Get the detailed configuration associated with +// a Synthetic Mobile test. +func (a *SyntheticsApi) GetMobileTest(ctx _context.Context, publicId string) (SyntheticsMobileTest, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarReturnValue SyntheticsMobileTest + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v1.SyntheticsApi.GetMobileTest") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/synthetics/tests/mobile/{public_id}" + localVarPath = strings.Replace(localVarPath, "{"+"public_id"+"}", _neturl.PathEscape(datadog.ParameterToString(publicId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "application/json" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // GetPrivateLocation Get a private location. // Get a Synthetic private location. func (a *SyntheticsApi) GetPrivateLocation(ctx _context.Context, locationId string) (SyntheticsPrivateLocation, *_nethttp.Response, error) { @@ -2139,6 +2357,80 @@ func (a *SyntheticsApi) UpdateBrowserTest(ctx _context.Context, publicId string, return localVarReturnValue, localVarHTTPResponse, nil } +// UpdateMobileTest Edit a Mobile test. +// Edit the configuration of a Synthetic Mobile test. +func (a *SyntheticsApi) UpdateMobileTest(ctx _context.Context, publicId string, body SyntheticsMobileTest) (SyntheticsMobileTest, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarReturnValue SyntheticsMobileTest + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v1.SyntheticsApi.UpdateMobileTest") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/synthetics/tests/mobile/{public_id}" + localVarPath = strings.Replace(localVarPath, "{"+"public_id"+"}", _neturl.PathEscape(datadog.ParameterToString(publicId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "application/json" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // UpdatePrivateLocation Edit a private location. // Edit a Synthetic private location. func (a *SyntheticsApi) UpdatePrivateLocation(ctx _context.Context, locationId string, body SyntheticsPrivateLocation) (SyntheticsPrivateLocation, *_nethttp.Response, error) { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/doc.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/doc.go index 9d8b94fbd9..c84822fa2c 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/doc.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/doc.go @@ -152,10 +152,12 @@ // - [SyntheticsApi.CreatePrivateLocation] // - [SyntheticsApi.CreateSyntheticsAPITest] // - [SyntheticsApi.CreateSyntheticsBrowserTest] +// - [SyntheticsApi.CreateSyntheticsMobileTest] // - [SyntheticsApi.DeleteGlobalVariable] // - [SyntheticsApi.DeletePrivateLocation] // - [SyntheticsApi.DeleteTests] // - [SyntheticsApi.EditGlobalVariable] +// - [SyntheticsApi.FetchUptimes] // - [SyntheticsApi.GetAPITest] // - [SyntheticsApi.GetAPITestLatestResults] // - [SyntheticsApi.GetAPITestResult] @@ -163,6 +165,7 @@ // - [SyntheticsApi.GetBrowserTestLatestResults] // - [SyntheticsApi.GetBrowserTestResult] // - [SyntheticsApi.GetGlobalVariable] +// - [SyntheticsApi.GetMobileTest] // - [SyntheticsApi.GetPrivateLocation] // - [SyntheticsApi.GetSyntheticsCIBatch] // - [SyntheticsApi.GetSyntheticsDefaultLocations] @@ -175,6 +178,7 @@ // - [SyntheticsApi.TriggerTests] // - [SyntheticsApi.UpdateAPITest] // - [SyntheticsApi.UpdateBrowserTest] +// - [SyntheticsApi.UpdateMobileTest] // - [SyntheticsApi.UpdatePrivateLocation] // - [SyntheticsApi.UpdateTestPauseStatus] // - [TagsApi.CreateHostTags] diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_alert_graph_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_alert_graph_widget_definition.go index eb2f5823ea..76fa04a581 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_alert_graph_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_alert_graph_widget_definition.go @@ -294,9 +294,6 @@ func (o *AlertGraphWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField := false o.AlertId = *all.AlertId - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_change_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_change_widget_definition.go index 83f4db1458..fda304c4df 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_change_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_change_widget_definition.go @@ -301,9 +301,6 @@ func (o *ChangeWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField := false o.CustomLinks = all.CustomLinks o.Requests = *all.Requests - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_check_status_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_check_status_widget_definition.go index 029889f5e1..eab67322fe 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_check_status_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_check_status_widget_definition.go @@ -404,9 +404,6 @@ func (o *CheckStatusWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { o.Grouping = *all.Grouping } o.Tags = all.Tags - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_distribution_point_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_distribution_point_item.go index dee25d7f9f..4a7654c947 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_distribution_point_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_distribution_point_item.go @@ -53,7 +53,7 @@ func (obj *DistributionPointItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.DistributionPointData != nil { jsonDistributionPointData, _ := datadog.Marshal(obj.DistributionPointData) - if string(jsonDistributionPointData) == "{}" { // empty struct + if string(jsonDistributionPointData) == "{}" && string(data) != "{}" { // empty struct obj.DistributionPointData = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_distribution_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_distribution_widget_definition.go index 823e334441..ca20bbd1ce 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_distribution_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_distribution_widget_definition.go @@ -484,9 +484,6 @@ func (o *DistributionWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { o.Markers = all.Markers o.Requests = *all.Requests o.ShowLegend = all.ShowLegend - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_event_stream_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_event_stream_widget_definition.go index 4c646d18ec..16b3413572 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_event_stream_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_event_stream_widget_definition.go @@ -338,9 +338,6 @@ func (o *EventStreamWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { } o.Query = *all.Query o.TagsExecution = all.TagsExecution - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_event_timeline_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_event_timeline_widget_definition.go index 1a03baa902..62a14beada 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_event_timeline_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_event_timeline_widget_definition.go @@ -298,9 +298,6 @@ func (o *EventTimelineWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) hasInvalidField := false o.Query = *all.Query o.TagsExecution = all.TagsExecution - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_funnel_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_funnel_widget_definition.go index 5f4f065f50..8bce957c1e 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_funnel_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_funnel_widget_definition.go @@ -263,9 +263,6 @@ func (o *FunnelWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField := false o.Requests = *all.Requests - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_geomap_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_geomap_widget_definition.go index ee539a3f9f..b609530cbb 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_geomap_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_geomap_widget_definition.go @@ -367,9 +367,6 @@ func (o *GeomapWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField = true } o.Style = *all.Style - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_heat_map_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_heat_map_widget_definition.go index 5a585ad8f3..f196ea510e 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_heat_map_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_heat_map_widget_definition.go @@ -437,9 +437,6 @@ func (o *HeatMapWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { o.LegendSize = all.LegendSize o.Requests = *all.Requests o.ShowLegend = all.ShowLegend - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_hourly_usage_attribution_usage_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_hourly_usage_attribution_usage_type.go index 4de4a18be5..2b86287a36 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_hourly_usage_attribution_usage_type.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_hourly_usage_attribution_usage_type.go @@ -37,6 +37,7 @@ const ( HOURLYUSAGEATTRIBUTIONUSAGETYPE_CUSTOM_TIMESERIES_USAGE HourlyUsageAttributionUsageType = "custom_timeseries_usage" HOURLYUSAGEATTRIBUTIONUSAGETYPE_CWS_CONTAINERS_USAGE HourlyUsageAttributionUsageType = "cws_containers_usage" HOURLYUSAGEATTRIBUTIONUSAGETYPE_CWS_HOSTS_USAGE HourlyUsageAttributionUsageType = "cws_hosts_usage" + HOURLYUSAGEATTRIBUTIONUSAGETYPE_DATA_JOBS_MONITORING_USAGE HourlyUsageAttributionUsageType = "data_jobs_monitoring_usage" HOURLYUSAGEATTRIBUTIONUSAGETYPE_DBM_HOSTS_USAGE HourlyUsageAttributionUsageType = "dbm_hosts_usage" HOURLYUSAGEATTRIBUTIONUSAGETYPE_DBM_QUERIES_USAGE HourlyUsageAttributionUsageType = "dbm_queries_usage" HOURLYUSAGEATTRIBUTIONUSAGETYPE_ERROR_TRACKING_USAGE HourlyUsageAttributionUsageType = "error_tracking_usage" @@ -111,6 +112,7 @@ var allowedHourlyUsageAttributionUsageTypeEnumValues = []HourlyUsageAttributionU HOURLYUSAGEATTRIBUTIONUSAGETYPE_CUSTOM_TIMESERIES_USAGE, HOURLYUSAGEATTRIBUTIONUSAGETYPE_CWS_CONTAINERS_USAGE, HOURLYUSAGEATTRIBUTIONUSAGETYPE_CWS_HOSTS_USAGE, + HOURLYUSAGEATTRIBUTIONUSAGETYPE_DATA_JOBS_MONITORING_USAGE, HOURLYUSAGEATTRIBUTIONUSAGETYPE_DBM_HOSTS_USAGE, HOURLYUSAGEATTRIBUTIONUSAGETYPE_DBM_QUERIES_USAGE, HOURLYUSAGEATTRIBUTIONUSAGETYPE_ERROR_TRACKING_USAGE, diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_list_stream_query.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_list_stream_query.go index b714bb053e..ff42ec09c1 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_list_stream_query.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_list_stream_query.go @@ -18,7 +18,7 @@ type ListStreamQuery struct { DataSource ListStreamSource `json:"data_source"` // Size to use to display an event. EventSize *WidgetEventSize `json:"event_size,omitempty"` - // Group by configuration for the List Stream Widget. Group by can be used only with logs_pattern_stream (up to 3 items) or logs_transaction_stream (one group by item is required) list stream source. + // Group by configuration for the List Stream Widget. Group by can be used only with logs_pattern_stream (up to 4 items) or logs_transaction_stream (one group by item is required) list stream source. GroupBy []ListStreamGroupByItems `json:"group_by,omitempty"` // List of indexes. Indexes []string `json:"indexes,omitempty"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_list_stream_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_list_stream_widget_definition.go index 33fe8d466e..c158708c2d 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_list_stream_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_list_stream_widget_definition.go @@ -334,9 +334,6 @@ func (o *ListStreamWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { o.LegendSize = all.LegendSize o.Requests = *all.Requests o.ShowLegend = all.ShowLegend - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_log_stream_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_log_stream_widget_definition.go index a690ecd6e4..991a2597c5 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_log_stream_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_log_stream_widget_definition.go @@ -522,9 +522,6 @@ func (o *LogStreamWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField = true } o.Sort = all.Sort - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_logs_index.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_logs_index.go index 609d6ad6ac..f7049b8c69 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_logs_index.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_logs_index.go @@ -29,8 +29,13 @@ type LogsIndex struct { IsRateLimited *bool `json:"is_rate_limited,omitempty"` // The name of the index. Name string `json:"name"` - // The number of days before logs are deleted from this index. Available values depend on - // retention plans specified in your organization's contract/subscriptions. + // The total number of days logs are stored in Standard and Flex Tier before being deleted from the index. + // If Standard Tier is enabled on this index, logs are first retained in Standard Tier for the number of days specified through `num_retention_days`, + // and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days` is reached. + // The available values depend on retention plans specified in your organization's contract/subscriptions. + NumFlexLogsRetentionDays *int64 `json:"num_flex_logs_retention_days,omitempty"` + // The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index. + // The available values depend on retention plans specified in your organization's contract/subscriptions. NumRetentionDays *int64 `json:"num_retention_days,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` @@ -242,6 +247,34 @@ func (o *LogsIndex) SetName(v string) { o.Name = v } +// GetNumFlexLogsRetentionDays returns the NumFlexLogsRetentionDays field value if set, zero value otherwise. +func (o *LogsIndex) GetNumFlexLogsRetentionDays() int64 { + if o == nil || o.NumFlexLogsRetentionDays == nil { + var ret int64 + return ret + } + return *o.NumFlexLogsRetentionDays +} + +// GetNumFlexLogsRetentionDaysOk returns a tuple with the NumFlexLogsRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogsIndex) GetNumFlexLogsRetentionDaysOk() (*int64, bool) { + if o == nil || o.NumFlexLogsRetentionDays == nil { + return nil, false + } + return o.NumFlexLogsRetentionDays, true +} + +// HasNumFlexLogsRetentionDays returns a boolean if a field has been set. +func (o *LogsIndex) HasNumFlexLogsRetentionDays() bool { + return o != nil && o.NumFlexLogsRetentionDays != nil +} + +// SetNumFlexLogsRetentionDays gets a reference to the given int64 and assigns it to the NumFlexLogsRetentionDays field. +func (o *LogsIndex) SetNumFlexLogsRetentionDays(v int64) { + o.NumFlexLogsRetentionDays = &v +} + // GetNumRetentionDays returns the NumRetentionDays field value if set, zero value otherwise. func (o *LogsIndex) GetNumRetentionDays() int64 { if o == nil || o.NumRetentionDays == nil { @@ -293,6 +326,9 @@ func (o LogsIndex) MarshalJSON() ([]byte, error) { toSerialize["is_rate_limited"] = o.IsRateLimited } toSerialize["name"] = o.Name + if o.NumFlexLogsRetentionDays != nil { + toSerialize["num_flex_logs_retention_days"] = o.NumFlexLogsRetentionDays + } if o.NumRetentionDays != nil { toSerialize["num_retention_days"] = o.NumRetentionDays } @@ -313,6 +349,7 @@ func (o *LogsIndex) UnmarshalJSON(bytes []byte) (err error) { Filter *LogsFilter `json:"filter"` IsRateLimited *bool `json:"is_rate_limited,omitempty"` Name *string `json:"name"` + NumFlexLogsRetentionDays *int64 `json:"num_flex_logs_retention_days,omitempty"` NumRetentionDays *int64 `json:"num_retention_days,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { @@ -326,7 +363,7 @@ func (o *LogsIndex) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"daily_limit", "daily_limit_reset", "daily_limit_warning_threshold_percentage", "exclusion_filters", "filter", "is_rate_limited", "name", "num_retention_days"}) + datadog.DeleteKeys(additionalProperties, &[]string{"daily_limit", "daily_limit_reset", "daily_limit_warning_threshold_percentage", "exclusion_filters", "filter", "is_rate_limited", "name", "num_flex_logs_retention_days", "num_retention_days"}) } else { return err } @@ -345,6 +382,7 @@ func (o *LogsIndex) UnmarshalJSON(bytes []byte) (err error) { o.Filter = *all.Filter o.IsRateLimited = all.IsRateLimited o.Name = *all.Name + o.NumFlexLogsRetentionDays = all.NumFlexLogsRetentionDays o.NumRetentionDays = all.NumRetentionDays if len(additionalProperties) > 0 { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_logs_index_update_request.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_logs_index_update_request.go index 19892adac2..cd654787d6 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_logs_index_update_request.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_logs_index_update_request.go @@ -28,11 +28,17 @@ type LogsIndexUpdateRequest struct { ExclusionFilters []LogsExclusion `json:"exclusion_filters,omitempty"` // Filter for logs. Filter LogsFilter `json:"filter"` - // The number of days before logs are deleted from this index. Available values depend on - // retention plans specified in your organization's contract/subscriptions. + // The total number of days logs are stored in Standard and Flex Tier before being deleted from the index. + // If Standard Tier is enabled on this index, logs are first retained in Standard Tier for the number of days specified through `num_retention_days`, + // and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days` is reached. + // The available values depend on retention plans specified in your organization's contract/subscriptions. // - // **Note:** Changing the retention for an index adjusts the length of retention for all logs - // already in this index. It may also affect billing. + // **Note**: Changing this value affects all logs already in this index. It may also affect billing. + NumFlexLogsRetentionDays *int64 `json:"num_flex_logs_retention_days,omitempty"` + // The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index. + // The available values depend on retention plans specified in your organization's contract/subscriptions. + // + // **Note**: Changing this value affects all logs already in this index. It may also affect billing. NumRetentionDays *int64 `json:"num_retention_days,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` @@ -220,6 +226,34 @@ func (o *LogsIndexUpdateRequest) SetFilter(v LogsFilter) { o.Filter = v } +// GetNumFlexLogsRetentionDays returns the NumFlexLogsRetentionDays field value if set, zero value otherwise. +func (o *LogsIndexUpdateRequest) GetNumFlexLogsRetentionDays() int64 { + if o == nil || o.NumFlexLogsRetentionDays == nil { + var ret int64 + return ret + } + return *o.NumFlexLogsRetentionDays +} + +// GetNumFlexLogsRetentionDaysOk returns a tuple with the NumFlexLogsRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogsIndexUpdateRequest) GetNumFlexLogsRetentionDaysOk() (*int64, bool) { + if o == nil || o.NumFlexLogsRetentionDays == nil { + return nil, false + } + return o.NumFlexLogsRetentionDays, true +} + +// HasNumFlexLogsRetentionDays returns a boolean if a field has been set. +func (o *LogsIndexUpdateRequest) HasNumFlexLogsRetentionDays() bool { + return o != nil && o.NumFlexLogsRetentionDays != nil +} + +// SetNumFlexLogsRetentionDays gets a reference to the given int64 and assigns it to the NumFlexLogsRetentionDays field. +func (o *LogsIndexUpdateRequest) SetNumFlexLogsRetentionDays(v int64) { + o.NumFlexLogsRetentionDays = &v +} + // GetNumRetentionDays returns the NumRetentionDays field value if set, zero value otherwise. func (o *LogsIndexUpdateRequest) GetNumRetentionDays() int64 { if o == nil || o.NumRetentionDays == nil { @@ -270,6 +304,9 @@ func (o LogsIndexUpdateRequest) MarshalJSON() ([]byte, error) { toSerialize["exclusion_filters"] = o.ExclusionFilters } toSerialize["filter"] = o.Filter + if o.NumFlexLogsRetentionDays != nil { + toSerialize["num_flex_logs_retention_days"] = o.NumFlexLogsRetentionDays + } if o.NumRetentionDays != nil { toSerialize["num_retention_days"] = o.NumRetentionDays } @@ -289,6 +326,7 @@ func (o *LogsIndexUpdateRequest) UnmarshalJSON(bytes []byte) (err error) { DisableDailyLimit *bool `json:"disable_daily_limit,omitempty"` ExclusionFilters []LogsExclusion `json:"exclusion_filters,omitempty"` Filter *LogsFilter `json:"filter"` + NumFlexLogsRetentionDays *int64 `json:"num_flex_logs_retention_days,omitempty"` NumRetentionDays *int64 `json:"num_retention_days,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { @@ -299,7 +337,7 @@ func (o *LogsIndexUpdateRequest) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"daily_limit", "daily_limit_reset", "daily_limit_warning_threshold_percentage", "disable_daily_limit", "exclusion_filters", "filter", "num_retention_days"}) + datadog.DeleteKeys(additionalProperties, &[]string{"daily_limit", "daily_limit_reset", "daily_limit_warning_threshold_percentage", "disable_daily_limit", "exclusion_filters", "filter", "num_flex_logs_retention_days", "num_retention_days"}) } else { return err } @@ -317,6 +355,7 @@ func (o *LogsIndexUpdateRequest) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField = true } o.Filter = *all.Filter + o.NumFlexLogsRetentionDays = all.NumFlexLogsRetentionDays o.NumRetentionDays = all.NumRetentionDays if len(additionalProperties) > 0 { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monitor.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monitor.go index 1ed9bbb5e2..cbf8fd1529 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monitor.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monitor.go @@ -39,7 +39,7 @@ type Monitor struct { Priority datadog.NullableInt64 `json:"priority,omitempty"` // The monitor query. Query string `json:"query"` - // A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the [Roles API](https://docs.datadoghq.com/api/latest/roles/#list-roles) and are located in the `data.id` field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. `restricted_roles` is the successor of `locked`. For more information about `locked` and `restricted_roles`, see the [monitor options docs](https://docs.datadoghq.com/monitors/guide/monitor_api_options/#permissions-options). + // A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the [Roles API](https://docs.datadoghq.com/api/latest/roles/#list-roles) and are located in the `data.id` field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. You can use the [Restriction Policies API](https://docs.datadoghq.com/api/latest/restriction-policies/) to manage write authorization for individual monitors by teams and users, in addition to roles. RestrictedRoles datadog.NullableList[string] `json:"restricted_roles,omitempty"` // Wrapper object with the different monitor states. State *MonitorState `json:"state,omitempty"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monitor_options.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monitor_options.go index 4587f05479..59c518b7d4 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monitor_options.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monitor_options.go @@ -33,7 +33,8 @@ type MonitorOptions struct { // Example values are: "60m", "1h", and "2d". // This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. GroupRetentionDuration *string `json:"group_retention_duration,omitempty"` - // Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold. + // Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold. Use `notify_by` instead. + // Deprecated GroupbySimpleMonitor *bool `json:"groupby_simple_monitor,omitempty"` // A Boolean indicating whether notifications from this monitor automatically inserts its triggering tags into the title. // @@ -377,6 +378,7 @@ func (o *MonitorOptions) SetGroupRetentionDuration(v string) { } // GetGroupbySimpleMonitor returns the GroupbySimpleMonitor field value if set, zero value otherwise. +// Deprecated func (o *MonitorOptions) GetGroupbySimpleMonitor() bool { if o == nil || o.GroupbySimpleMonitor == nil { var ret bool @@ -387,6 +389,7 @@ func (o *MonitorOptions) GetGroupbySimpleMonitor() bool { // GetGroupbySimpleMonitorOk returns a tuple with the GroupbySimpleMonitor field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *MonitorOptions) GetGroupbySimpleMonitorOk() (*bool, bool) { if o == nil || o.GroupbySimpleMonitor == nil { return nil, false @@ -400,6 +403,7 @@ func (o *MonitorOptions) HasGroupbySimpleMonitor() bool { } // SetGroupbySimpleMonitor gets a reference to the given bool and assigns it to the GroupbySimpleMonitor field. +// Deprecated func (o *MonitorOptions) SetGroupbySimpleMonitor(v bool) { o.GroupbySimpleMonitor = &v } diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monthly_usage_attribution_supported_metrics.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monthly_usage_attribution_supported_metrics.go index e7b4168efd..e337904009 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monthly_usage_attribution_supported_metrics.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monthly_usage_attribution_supported_metrics.go @@ -51,6 +51,8 @@ const ( MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_CWS_CONTAINERS_USAGE MonthlyUsageAttributionSupportedMetrics = "cws_containers_usage" MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_CWS_HOSTS_PERCENTAGE MonthlyUsageAttributionSupportedMetrics = "cws_hosts_percentage" MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_CWS_HOSTS_USAGE MonthlyUsageAttributionSupportedMetrics = "cws_hosts_usage" + MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DATA_JOBS_MONITORING_USAGE MonthlyUsageAttributionSupportedMetrics = "data_jobs_monitoring_usage" + MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DATA_JOBS_MONITORING_PERCENTAGE MonthlyUsageAttributionSupportedMetrics = "data_jobs_monitoring_percentage" MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_HOSTS_PERCENTAGE MonthlyUsageAttributionSupportedMetrics = "dbm_hosts_percentage" MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_HOSTS_USAGE MonthlyUsageAttributionSupportedMetrics = "dbm_hosts_usage" MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_QUERIES_PERCENTAGE MonthlyUsageAttributionSupportedMetrics = "dbm_queries_percentage" @@ -193,6 +195,8 @@ var allowedMonthlyUsageAttributionSupportedMetricsEnumValues = []MonthlyUsageAtt MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_CWS_CONTAINERS_USAGE, MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_CWS_HOSTS_PERCENTAGE, MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_CWS_HOSTS_USAGE, + MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DATA_JOBS_MONITORING_USAGE, + MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DATA_JOBS_MONITORING_PERCENTAGE, MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_HOSTS_PERCENTAGE, MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_HOSTS_USAGE, MONTHLYUSAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_QUERIES_PERCENTAGE, diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monthly_usage_attribution_values.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monthly_usage_attribution_values.go index aa248355ac..d93bea90d5 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monthly_usage_attribution_values.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_monthly_usage_attribution_values.go @@ -94,6 +94,8 @@ type MonthlyUsageAttributionValues struct { CwsHostsPercentage *float64 `json:"cws_hosts_percentage,omitempty"` // The Cloud Workload Security host usage by tag(s). CwsHostsUsage *float64 `json:"cws_hosts_usage,omitempty"` + // The Data Jobs Monitoring usage by tag(s). + DataJobsMonitoringUsage *float64 `json:"data_jobs_monitoring_usage,omitempty"` // The percentage of Database Monitoring host usage by tag(s). DbmHostsPercentage *float64 `json:"dbm_hosts_percentage,omitempty"` // The Database Monitoring host usage by tag(s). @@ -1484,6 +1486,34 @@ func (o *MonthlyUsageAttributionValues) SetCwsHostsUsage(v float64) { o.CwsHostsUsage = &v } +// GetDataJobsMonitoringUsage returns the DataJobsMonitoringUsage field value if set, zero value otherwise. +func (o *MonthlyUsageAttributionValues) GetDataJobsMonitoringUsage() float64 { + if o == nil || o.DataJobsMonitoringUsage == nil { + var ret float64 + return ret + } + return *o.DataJobsMonitoringUsage +} + +// GetDataJobsMonitoringUsageOk returns a tuple with the DataJobsMonitoringUsage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MonthlyUsageAttributionValues) GetDataJobsMonitoringUsageOk() (*float64, bool) { + if o == nil || o.DataJobsMonitoringUsage == nil { + return nil, false + } + return o.DataJobsMonitoringUsage, true +} + +// HasDataJobsMonitoringUsage returns a boolean if a field has been set. +func (o *MonthlyUsageAttributionValues) HasDataJobsMonitoringUsage() bool { + return o != nil && o.DataJobsMonitoringUsage != nil +} + +// SetDataJobsMonitoringUsage gets a reference to the given float64 and assigns it to the DataJobsMonitoringUsage field. +func (o *MonthlyUsageAttributionValues) SetDataJobsMonitoringUsage(v float64) { + o.DataJobsMonitoringUsage = &v +} + // GetDbmHostsPercentage returns the DbmHostsPercentage field value if set, zero value otherwise. func (o *MonthlyUsageAttributionValues) GetDbmHostsPercentage() float64 { if o == nil || o.DbmHostsPercentage == nil { @@ -4304,6 +4334,9 @@ func (o MonthlyUsageAttributionValues) MarshalJSON() ([]byte, error) { if o.CwsHostsUsage != nil { toSerialize["cws_hosts_usage"] = o.CwsHostsUsage } + if o.DataJobsMonitoringUsage != nil { + toSerialize["data_jobs_monitoring_usage"] = o.DataJobsMonitoringUsage + } if o.DbmHostsPercentage != nil { toSerialize["dbm_hosts_percentage"] = o.DbmHostsPercentage } @@ -4644,6 +4677,7 @@ func (o *MonthlyUsageAttributionValues) UnmarshalJSON(bytes []byte) (err error) CwsContainersUsage *float64 `json:"cws_containers_usage,omitempty"` CwsHostsPercentage *float64 `json:"cws_hosts_percentage,omitempty"` CwsHostsUsage *float64 `json:"cws_hosts_usage,omitempty"` + DataJobsMonitoringUsage *float64 `json:"data_jobs_monitoring_usage,omitempty"` DbmHostsPercentage *float64 `json:"dbm_hosts_percentage,omitempty"` DbmHostsUsage *float64 `json:"dbm_hosts_usage,omitempty"` DbmQueriesPercentage *float64 `json:"dbm_queries_percentage,omitempty"` @@ -4746,7 +4780,7 @@ func (o *MonthlyUsageAttributionValues) UnmarshalJSON(bytes []byte) (err error) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"api_percentage", "api_usage", "apm_fargate_percentage", "apm_fargate_usage", "apm_host_percentage", "apm_host_usage", "apm_usm_percentage", "apm_usm_usage", "appsec_fargate_percentage", "appsec_fargate_usage", "appsec_percentage", "appsec_usage", "asm_serverless_traced_invocations_percentage", "asm_serverless_traced_invocations_usage", "browser_percentage", "browser_usage", "ci_pipeline_indexed_spans_percentage", "ci_pipeline_indexed_spans_usage", "ci_test_indexed_spans_percentage", "ci_test_indexed_spans_usage", "ci_visibility_itr_percentage", "ci_visibility_itr_usage", "cloud_siem_percentage", "cloud_siem_usage", "container_excl_agent_percentage", "container_excl_agent_usage", "container_percentage", "container_usage", "cspm_containers_percentage", "cspm_containers_usage", "cspm_hosts_percentage", "cspm_hosts_usage", "custom_event_percentage", "custom_event_usage", "custom_ingested_timeseries_percentage", "custom_ingested_timeseries_usage", "custom_timeseries_percentage", "custom_timeseries_usage", "cws_containers_percentage", "cws_containers_usage", "cws_hosts_percentage", "cws_hosts_usage", "dbm_hosts_percentage", "dbm_hosts_usage", "dbm_queries_percentage", "dbm_queries_usage", "error_tracking_percentage", "error_tracking_usage", "estimated_indexed_logs_percentage", "estimated_indexed_logs_usage", "estimated_indexed_spans_percentage", "estimated_indexed_spans_usage", "estimated_ingested_logs_percentage", "estimated_ingested_logs_usage", "estimated_ingested_spans_percentage", "estimated_ingested_spans_usage", "estimated_rum_sessions_percentage", "estimated_rum_sessions_usage", "fargate_percentage", "fargate_usage", "functions_percentage", "functions_usage", "incident_management_monthly_active_users_percentage", "incident_management_monthly_active_users_usage", "indexed_spans_percentage", "indexed_spans_usage", "infra_host_percentage", "infra_host_usage", "ingested_logs_bytes_percentage", "ingested_logs_bytes_usage", "ingested_spans_bytes_percentage", "ingested_spans_bytes_usage", "invocations_percentage", "invocations_usage", "lambda_traced_invocations_percentage", "lambda_traced_invocations_usage", "logs_indexed_15day_percentage", "logs_indexed_15day_usage", "logs_indexed_180day_percentage", "logs_indexed_180day_usage", "logs_indexed_1day_percentage", "logs_indexed_1day_usage", "logs_indexed_30day_percentage", "logs_indexed_30day_usage", "logs_indexed_360day_percentage", "logs_indexed_360day_usage", "logs_indexed_3day_percentage", "logs_indexed_3day_usage", "logs_indexed_45day_percentage", "logs_indexed_45day_usage", "logs_indexed_60day_percentage", "logs_indexed_60day_usage", "logs_indexed_7day_percentage", "logs_indexed_7day_usage", "logs_indexed_90day_percentage", "logs_indexed_90day_usage", "logs_indexed_custom_retention_percentage", "logs_indexed_custom_retention_usage", "mobile_app_testing_percentage", "mobile_app_testing_usage", "ndm_netflow_percentage", "ndm_netflow_usage", "npm_host_percentage", "npm_host_usage", "obs_pipeline_bytes_percentage", "obs_pipeline_bytes_usage", "obs_pipelines_vcpu_percentage", "obs_pipelines_vcpu_usage", "online_archive_percentage", "online_archive_usage", "profiled_container_percentage", "profiled_container_usage", "profiled_fargate_percentage", "profiled_fargate_usage", "profiled_host_percentage", "profiled_host_usage", "rum_browser_mobile_sessions_percentage", "rum_browser_mobile_sessions_usage", "rum_replay_sessions_percentage", "rum_replay_sessions_usage", "sca_fargate_percentage", "sca_fargate_usage", "sds_scanned_bytes_percentage", "sds_scanned_bytes_usage", "serverless_apps_percentage", "serverless_apps_usage", "siem_analyzed_logs_add_on_percentage", "siem_analyzed_logs_add_on_usage", "siem_ingested_bytes_percentage", "siem_ingested_bytes_usage", "snmp_percentage", "snmp_usage", "universal_service_monitoring_percentage", "universal_service_monitoring_usage", "vuln_management_hosts_percentage", "vuln_management_hosts_usage", "workflow_executions_percentage", "workflow_executions_usage"}) + datadog.DeleteKeys(additionalProperties, &[]string{"api_percentage", "api_usage", "apm_fargate_percentage", "apm_fargate_usage", "apm_host_percentage", "apm_host_usage", "apm_usm_percentage", "apm_usm_usage", "appsec_fargate_percentage", "appsec_fargate_usage", "appsec_percentage", "appsec_usage", "asm_serverless_traced_invocations_percentage", "asm_serverless_traced_invocations_usage", "browser_percentage", "browser_usage", "ci_pipeline_indexed_spans_percentage", "ci_pipeline_indexed_spans_usage", "ci_test_indexed_spans_percentage", "ci_test_indexed_spans_usage", "ci_visibility_itr_percentage", "ci_visibility_itr_usage", "cloud_siem_percentage", "cloud_siem_usage", "container_excl_agent_percentage", "container_excl_agent_usage", "container_percentage", "container_usage", "cspm_containers_percentage", "cspm_containers_usage", "cspm_hosts_percentage", "cspm_hosts_usage", "custom_event_percentage", "custom_event_usage", "custom_ingested_timeseries_percentage", "custom_ingested_timeseries_usage", "custom_timeseries_percentage", "custom_timeseries_usage", "cws_containers_percentage", "cws_containers_usage", "cws_hosts_percentage", "cws_hosts_usage", "data_jobs_monitoring_usage", "dbm_hosts_percentage", "dbm_hosts_usage", "dbm_queries_percentage", "dbm_queries_usage", "error_tracking_percentage", "error_tracking_usage", "estimated_indexed_logs_percentage", "estimated_indexed_logs_usage", "estimated_indexed_spans_percentage", "estimated_indexed_spans_usage", "estimated_ingested_logs_percentage", "estimated_ingested_logs_usage", "estimated_ingested_spans_percentage", "estimated_ingested_spans_usage", "estimated_rum_sessions_percentage", "estimated_rum_sessions_usage", "fargate_percentage", "fargate_usage", "functions_percentage", "functions_usage", "incident_management_monthly_active_users_percentage", "incident_management_monthly_active_users_usage", "indexed_spans_percentage", "indexed_spans_usage", "infra_host_percentage", "infra_host_usage", "ingested_logs_bytes_percentage", "ingested_logs_bytes_usage", "ingested_spans_bytes_percentage", "ingested_spans_bytes_usage", "invocations_percentage", "invocations_usage", "lambda_traced_invocations_percentage", "lambda_traced_invocations_usage", "logs_indexed_15day_percentage", "logs_indexed_15day_usage", "logs_indexed_180day_percentage", "logs_indexed_180day_usage", "logs_indexed_1day_percentage", "logs_indexed_1day_usage", "logs_indexed_30day_percentage", "logs_indexed_30day_usage", "logs_indexed_360day_percentage", "logs_indexed_360day_usage", "logs_indexed_3day_percentage", "logs_indexed_3day_usage", "logs_indexed_45day_percentage", "logs_indexed_45day_usage", "logs_indexed_60day_percentage", "logs_indexed_60day_usage", "logs_indexed_7day_percentage", "logs_indexed_7day_usage", "logs_indexed_90day_percentage", "logs_indexed_90day_usage", "logs_indexed_custom_retention_percentage", "logs_indexed_custom_retention_usage", "mobile_app_testing_percentage", "mobile_app_testing_usage", "ndm_netflow_percentage", "ndm_netflow_usage", "npm_host_percentage", "npm_host_usage", "obs_pipeline_bytes_percentage", "obs_pipeline_bytes_usage", "obs_pipelines_vcpu_percentage", "obs_pipelines_vcpu_usage", "online_archive_percentage", "online_archive_usage", "profiled_container_percentage", "profiled_container_usage", "profiled_fargate_percentage", "profiled_fargate_usage", "profiled_host_percentage", "profiled_host_usage", "rum_browser_mobile_sessions_percentage", "rum_browser_mobile_sessions_usage", "rum_replay_sessions_percentage", "rum_replay_sessions_usage", "sca_fargate_percentage", "sca_fargate_usage", "sds_scanned_bytes_percentage", "sds_scanned_bytes_usage", "serverless_apps_percentage", "serverless_apps_usage", "siem_analyzed_logs_add_on_percentage", "siem_analyzed_logs_add_on_usage", "siem_ingested_bytes_percentage", "siem_ingested_bytes_usage", "snmp_percentage", "snmp_usage", "universal_service_monitoring_percentage", "universal_service_monitoring_usage", "vuln_management_hosts_percentage", "vuln_management_hosts_usage", "workflow_executions_percentage", "workflow_executions_usage"}) } else { return err } @@ -4792,6 +4826,7 @@ func (o *MonthlyUsageAttributionValues) UnmarshalJSON(bytes []byte) (err error) o.CwsContainersUsage = all.CwsContainersUsage o.CwsHostsPercentage = all.CwsHostsPercentage o.CwsHostsUsage = all.CwsHostsUsage + o.DataJobsMonitoringUsage = all.DataJobsMonitoringUsage o.DbmHostsPercentage = all.DbmHostsPercentage o.DbmHostsUsage = all.DbmHostsUsage o.DbmQueriesPercentage = all.DbmQueriesPercentage diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_query_value_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_query_value_widget_definition.go index f3281b506a..13ede80c82 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_query_value_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_query_value_widget_definition.go @@ -476,9 +476,6 @@ func (o *QueryValueWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { } else { o.TextAlign = all.TextAlign } - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time if all.TimeseriesBackground != nil && all.TimeseriesBackground.UnparsedObject != nil && o.UnparsedObject == nil { hasInvalidField = true diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_run_workflow_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_run_workflow_widget_definition.go index 1c1982bd2b..cffb0be3af 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_run_workflow_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_run_workflow_widget_definition.go @@ -332,9 +332,6 @@ func (o *RunWorkflowWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField := false o.CustomLinks = all.CustomLinks o.Inputs = all.Inputs - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_scatter_plot_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_scatter_plot_widget_definition.go index 74617788c6..253deef49d 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_scatter_plot_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_scatter_plot_widget_definition.go @@ -404,9 +404,6 @@ func (o *ScatterPlotWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField = true } o.Requests = *all.Requests - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_service_summary_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_service_summary_widget_definition.go index 392bb2d37b..d846694b8c 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_service_summary_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_service_summary_widget_definition.go @@ -615,9 +615,6 @@ func (o *ServiceSummaryWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) o.SizeFormat = all.SizeFormat } o.SpanName = *all.SpanName - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_shared_dashboard_invites_data.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_shared_dashboard_invites_data.go index caebaafa2c..13ab72e929 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_shared_dashboard_invites_data.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_shared_dashboard_invites_data.go @@ -53,7 +53,7 @@ func (obj *SharedDashboardInvitesData) UnmarshalJSON(data []byte) error { if err == nil { if obj.SharedDashboardInvitesDataList != nil { jsonSharedDashboardInvitesDataList, _ := datadog.Marshal(obj.SharedDashboardInvitesDataList) - if string(jsonSharedDashboardInvitesDataList) == "{}" { // empty struct + if string(jsonSharedDashboardInvitesDataList) == "{}" && string(data) != "{}" { // empty struct obj.SharedDashboardInvitesDataList = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_split_graph_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_split_graph_widget_definition.go index 0502f42bb4..c59328dd5e 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_split_graph_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_split_graph_widget_definition.go @@ -301,9 +301,6 @@ func (o *SplitGraphWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField = true } o.SplitConfig = *all.SplitConfig - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if !all.Type.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_sunburst_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_sunburst_widget_definition.go index 8592336838..6c94cf0636 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_sunburst_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_sunburst_widget_definition.go @@ -368,9 +368,6 @@ func (o *SunburstWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { o.HideTotal = all.HideTotal o.Legend = all.Legend o.Requests = *all.Requests - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion.go index 8ec62a4292..1ddfc01cc0 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion.go @@ -16,6 +16,7 @@ type SyntheticsAssertion struct { SyntheticsAssertionJSONPathTarget *SyntheticsAssertionJSONPathTarget SyntheticsAssertionJSONSchemaTarget *SyntheticsAssertionJSONSchemaTarget SyntheticsAssertionXPathTarget *SyntheticsAssertionXPathTarget + SyntheticsAssertionJavascript *SyntheticsAssertionJavascript // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject interface{} @@ -46,6 +47,11 @@ func SyntheticsAssertionXPathTargetAsSyntheticsAssertion(v *SyntheticsAssertionX return SyntheticsAssertion{SyntheticsAssertionXPathTarget: v} } +// SyntheticsAssertionJavascriptAsSyntheticsAssertion is a convenience function that returns SyntheticsAssertionJavascript wrapped in SyntheticsAssertion. +func SyntheticsAssertionJavascriptAsSyntheticsAssertion(v *SyntheticsAssertionJavascript) SyntheticsAssertion { + return SyntheticsAssertion{SyntheticsAssertionJavascript: v} +} + // UnmarshalJSON turns data into one of the pointers in the struct. func (obj *SyntheticsAssertion) UnmarshalJSON(data []byte) error { var err error @@ -135,6 +141,23 @@ func (obj *SyntheticsAssertion) UnmarshalJSON(data []byte) error { obj.SyntheticsAssertionXPathTarget = nil } + // try to unmarshal data into SyntheticsAssertionJavascript + err = datadog.Unmarshal(data, &obj.SyntheticsAssertionJavascript) + if err == nil { + if obj.SyntheticsAssertionJavascript != nil && obj.SyntheticsAssertionJavascript.UnparsedObject == nil { + jsonSyntheticsAssertionJavascript, _ := datadog.Marshal(obj.SyntheticsAssertionJavascript) + if string(jsonSyntheticsAssertionJavascript) == "{}" { // empty struct + obj.SyntheticsAssertionJavascript = nil + } else { + match++ + } + } else { + obj.SyntheticsAssertionJavascript = nil + } + } else { + obj.SyntheticsAssertionJavascript = nil + } + if match != 1 { // more than 1 match // reset to nil obj.SyntheticsAssertionTarget = nil @@ -142,6 +165,7 @@ func (obj *SyntheticsAssertion) UnmarshalJSON(data []byte) error { obj.SyntheticsAssertionJSONPathTarget = nil obj.SyntheticsAssertionJSONSchemaTarget = nil obj.SyntheticsAssertionXPathTarget = nil + obj.SyntheticsAssertionJavascript = nil return datadog.Unmarshal(data, &obj.UnparsedObject) } return nil // exactly one match @@ -169,6 +193,10 @@ func (obj SyntheticsAssertion) MarshalJSON() ([]byte, error) { return datadog.Marshal(&obj.SyntheticsAssertionXPathTarget) } + if obj.SyntheticsAssertionJavascript != nil { + return datadog.Marshal(&obj.SyntheticsAssertionJavascript) + } + if obj.UnparsedObject != nil { return datadog.Marshal(obj.UnparsedObject) } @@ -197,6 +225,10 @@ func (obj *SyntheticsAssertion) GetActualInstance() interface{} { return obj.SyntheticsAssertionXPathTarget } + if obj.SyntheticsAssertionJavascript != nil { + return obj.SyntheticsAssertionJavascript + } + // all schemas are nil return nil } diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion_javascript.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion_javascript.go new file mode 100644 index 0000000000..83bdcbafd4 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion_javascript.go @@ -0,0 +1,143 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsAssertionJavascript A JavaScript assertion. +type SyntheticsAssertionJavascript struct { + // The JavaScript code that performs the assertions. + Code string `json:"code"` + // Type of the assertion. + Type SyntheticsAssertionJavascriptType `json:"type"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsAssertionJavascript instantiates a new SyntheticsAssertionJavascript object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsAssertionJavascript(code string, typeVar SyntheticsAssertionJavascriptType) *SyntheticsAssertionJavascript { + this := SyntheticsAssertionJavascript{} + this.Code = code + this.Type = typeVar + return &this +} + +// NewSyntheticsAssertionJavascriptWithDefaults instantiates a new SyntheticsAssertionJavascript object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsAssertionJavascriptWithDefaults() *SyntheticsAssertionJavascript { + this := SyntheticsAssertionJavascript{} + return &this +} + +// GetCode returns the Code field value. +func (o *SyntheticsAssertionJavascript) GetCode() string { + if o == nil { + var ret string + return ret + } + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *SyntheticsAssertionJavascript) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value. +func (o *SyntheticsAssertionJavascript) SetCode(v string) { + o.Code = v +} + +// GetType returns the Type field value. +func (o *SyntheticsAssertionJavascript) GetType() SyntheticsAssertionJavascriptType { + if o == nil { + var ret SyntheticsAssertionJavascriptType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SyntheticsAssertionJavascript) GetTypeOk() (*SyntheticsAssertionJavascriptType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *SyntheticsAssertionJavascript) SetType(v SyntheticsAssertionJavascriptType) { + o.Type = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsAssertionJavascript) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["code"] = o.Code + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsAssertionJavascript) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Code *string `json:"code"` + Type *SyntheticsAssertionJavascriptType `json:"type"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Code == nil { + return fmt.Errorf("required field code missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"code", "type"}) + } else { + return err + } + + hasInvalidField := false + o.Code = *all.Code + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion_javascript_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion_javascript_type.go new file mode 100644 index 0000000000..e069936a8b --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_assertion_javascript_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsAssertionJavascriptType Type of the assertion. +type SyntheticsAssertionJavascriptType string + +// List of SyntheticsAssertionJavascriptType. +const ( + SYNTHETICSASSERTIONJAVASCRIPTTYPE_JAVASCRIPT SyntheticsAssertionJavascriptType = "javascript" +) + +var allowedSyntheticsAssertionJavascriptTypeEnumValues = []SyntheticsAssertionJavascriptType{ + SYNTHETICSASSERTIONJAVASCRIPTTYPE_JAVASCRIPT, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsAssertionJavascriptType) GetAllowedValues() []SyntheticsAssertionJavascriptType { + return allowedSyntheticsAssertionJavascriptTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsAssertionJavascriptType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsAssertionJavascriptType(value) + return nil +} + +// NewSyntheticsAssertionJavascriptTypeFromValue returns a pointer to a valid SyntheticsAssertionJavascriptType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsAssertionJavascriptTypeFromValue(v string) (*SyntheticsAssertionJavascriptType, error) { + ev := SyntheticsAssertionJavascriptType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsAssertionJavascriptType: valid values are %v", v, allowedSyntheticsAssertionJavascriptTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsAssertionJavascriptType) IsValid() bool { + for _, existing := range allowedSyntheticsAssertionJavascriptTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsAssertionJavascriptType value. +func (v SyntheticsAssertionJavascriptType) Ptr() *SyntheticsAssertionJavascriptType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_config_variable_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_config_variable_type.go index d70cf96697..f93cf821c0 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_config_variable_type.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_config_variable_type.go @@ -17,11 +17,13 @@ type SyntheticsConfigVariableType string const ( SYNTHETICSCONFIGVARIABLETYPE_GLOBAL SyntheticsConfigVariableType = "global" SYNTHETICSCONFIGVARIABLETYPE_TEXT SyntheticsConfigVariableType = "text" + SYNTHETICSCONFIGVARIABLETYPE_EMAIL SyntheticsConfigVariableType = "email" ) var allowedSyntheticsConfigVariableTypeEnumValues = []SyntheticsConfigVariableType{ SYNTHETICSCONFIGVARIABLETYPE_GLOBAL, SYNTHETICSCONFIGVARIABLETYPE_TEXT, + SYNTHETICSCONFIGVARIABLETYPE_EMAIL, } // GetAllowedValues reeturns the list of possible values. diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_fetch_uptimes_payload.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_fetch_uptimes_payload.go new file mode 100644 index 0000000000..5fb2201982 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_fetch_uptimes_payload.go @@ -0,0 +1,165 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsFetchUptimesPayload Object containing IDs of Synthetic tests and a timeframe. +type SyntheticsFetchUptimesPayload struct { + // Timestamp in seconds (Unix epoch) for the start of uptime. + FromTs int64 `json:"from_ts"` + // An array of Synthetic test IDs you want to delete. + PublicIds []string `json:"public_ids"` + // Timestamp in seconds (Unix epoch) for the end of uptime. + ToTs int64 `json:"to_ts"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsFetchUptimesPayload instantiates a new SyntheticsFetchUptimesPayload object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsFetchUptimesPayload(fromTs int64, publicIds []string, toTs int64) *SyntheticsFetchUptimesPayload { + this := SyntheticsFetchUptimesPayload{} + this.FromTs = fromTs + this.PublicIds = publicIds + this.ToTs = toTs + return &this +} + +// NewSyntheticsFetchUptimesPayloadWithDefaults instantiates a new SyntheticsFetchUptimesPayload object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsFetchUptimesPayloadWithDefaults() *SyntheticsFetchUptimesPayload { + this := SyntheticsFetchUptimesPayload{} + return &this +} + +// GetFromTs returns the FromTs field value. +func (o *SyntheticsFetchUptimesPayload) GetFromTs() int64 { + if o == nil { + var ret int64 + return ret + } + return o.FromTs +} + +// GetFromTsOk returns a tuple with the FromTs field value +// and a boolean to check if the value has been set. +func (o *SyntheticsFetchUptimesPayload) GetFromTsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.FromTs, true +} + +// SetFromTs sets field value. +func (o *SyntheticsFetchUptimesPayload) SetFromTs(v int64) { + o.FromTs = v +} + +// GetPublicIds returns the PublicIds field value. +func (o *SyntheticsFetchUptimesPayload) GetPublicIds() []string { + if o == nil { + var ret []string + return ret + } + return o.PublicIds +} + +// GetPublicIdsOk returns a tuple with the PublicIds field value +// and a boolean to check if the value has been set. +func (o *SyntheticsFetchUptimesPayload) GetPublicIdsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.PublicIds, true +} + +// SetPublicIds sets field value. +func (o *SyntheticsFetchUptimesPayload) SetPublicIds(v []string) { + o.PublicIds = v +} + +// GetToTs returns the ToTs field value. +func (o *SyntheticsFetchUptimesPayload) GetToTs() int64 { + if o == nil { + var ret int64 + return ret + } + return o.ToTs +} + +// GetToTsOk returns a tuple with the ToTs field value +// and a boolean to check if the value has been set. +func (o *SyntheticsFetchUptimesPayload) GetToTsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ToTs, true +} + +// SetToTs sets field value. +func (o *SyntheticsFetchUptimesPayload) SetToTs(v int64) { + o.ToTs = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsFetchUptimesPayload) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["from_ts"] = o.FromTs + toSerialize["public_ids"] = o.PublicIds + toSerialize["to_ts"] = o.ToTs + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsFetchUptimesPayload) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + FromTs *int64 `json:"from_ts"` + PublicIds *[]string `json:"public_ids"` + ToTs *int64 `json:"to_ts"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.FromTs == nil { + return fmt.Errorf("required field from_ts missing") + } + if all.PublicIds == nil { + return fmt.Errorf("required field public_ids missing") + } + if all.ToTs == nil { + return fmt.Errorf("required field to_ts missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"from_ts", "public_ids", "to_ts"}) + } else { + return err + } + o.FromTs = *all.FromTs + o.PublicIds = *all.PublicIds + o.ToTs = *all.ToTs + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable.go index c3a4a83132..7b40da758e 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable.go @@ -18,6 +18,10 @@ type SyntheticsGlobalVariable struct { Description string `json:"description"` // Unique identifier of the global variable. Id *string `json:"id,omitempty"` + // Determines if the global variable is a FIDO variable. + IsFido *bool `json:"is_fido,omitempty"` + // Determines if the global variable is a TOTP/MFA variable. + IsTotp *bool `json:"is_totp,omitempty"` // Name of the global variable. Unique across Synthetic global variables. Name string `json:"name"` // Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with `parse_test_public_id`. @@ -133,6 +137,62 @@ func (o *SyntheticsGlobalVariable) SetId(v string) { o.Id = &v } +// GetIsFido returns the IsFido field value if set, zero value otherwise. +func (o *SyntheticsGlobalVariable) GetIsFido() bool { + if o == nil || o.IsFido == nil { + var ret bool + return ret + } + return *o.IsFido +} + +// GetIsFidoOk returns a tuple with the IsFido field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariable) GetIsFidoOk() (*bool, bool) { + if o == nil || o.IsFido == nil { + return nil, false + } + return o.IsFido, true +} + +// HasIsFido returns a boolean if a field has been set. +func (o *SyntheticsGlobalVariable) HasIsFido() bool { + return o != nil && o.IsFido != nil +} + +// SetIsFido gets a reference to the given bool and assigns it to the IsFido field. +func (o *SyntheticsGlobalVariable) SetIsFido(v bool) { + o.IsFido = &v +} + +// GetIsTotp returns the IsTotp field value if set, zero value otherwise. +func (o *SyntheticsGlobalVariable) GetIsTotp() bool { + if o == nil || o.IsTotp == nil { + var ret bool + return ret + } + return *o.IsTotp +} + +// GetIsTotpOk returns a tuple with the IsTotp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariable) GetIsTotpOk() (*bool, bool) { + if o == nil || o.IsTotp == nil { + return nil, false + } + return o.IsTotp, true +} + +// HasIsTotp returns a boolean if a field has been set. +func (o *SyntheticsGlobalVariable) HasIsTotp() bool { + return o != nil && o.IsTotp != nil +} + +// SetIsTotp gets a reference to the given bool and assigns it to the IsTotp field. +func (o *SyntheticsGlobalVariable) SetIsTotp(v bool) { + o.IsTotp = &v +} + // GetName returns the Name field value. func (o *SyntheticsGlobalVariable) GetName() string { if o == nil { @@ -271,6 +331,12 @@ func (o SyntheticsGlobalVariable) MarshalJSON() ([]byte, error) { if o.Id != nil { toSerialize["id"] = o.Id } + if o.IsFido != nil { + toSerialize["is_fido"] = o.IsFido + } + if o.IsTotp != nil { + toSerialize["is_totp"] = o.IsTotp + } toSerialize["name"] = o.Name if o.ParseTestOptions != nil { toSerialize["parse_test_options"] = o.ParseTestOptions @@ -293,6 +359,8 @@ func (o *SyntheticsGlobalVariable) UnmarshalJSON(bytes []byte) (err error) { Attributes *SyntheticsGlobalVariableAttributes `json:"attributes,omitempty"` Description *string `json:"description"` Id *string `json:"id,omitempty"` + IsFido *bool `json:"is_fido,omitempty"` + IsTotp *bool `json:"is_totp,omitempty"` Name *string `json:"name"` ParseTestOptions *SyntheticsGlobalVariableParseTestOptions `json:"parse_test_options,omitempty"` ParseTestPublicId *string `json:"parse_test_public_id,omitempty"` @@ -316,7 +384,7 @@ func (o *SyntheticsGlobalVariable) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "description", "id", "name", "parse_test_options", "parse_test_public_id", "tags", "value"}) + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "description", "id", "is_fido", "is_totp", "name", "parse_test_options", "parse_test_public_id", "tags", "value"}) } else { return err } @@ -328,6 +396,8 @@ func (o *SyntheticsGlobalVariable) UnmarshalJSON(bytes []byte) (err error) { o.Attributes = all.Attributes o.Description = *all.Description o.Id = all.Id + o.IsFido = all.IsFido + o.IsTotp = all.IsTotp o.Name = *all.Name if all.ParseTestOptions != nil && all.ParseTestOptions.UnparsedObject != nil && o.UnparsedObject == nil { hasInvalidField = true diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_parse_test_options.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_parse_test_options.go index 6ad199998a..b078b3cc31 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_parse_test_options.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_parse_test_options.go @@ -18,7 +18,7 @@ type SyntheticsGlobalVariableParseTestOptions struct { LocalVariableName *string `json:"localVariableName,omitempty"` // Details of the parser to use for the global variable. Parser *SyntheticsVariableParser `json:"parser,omitempty"` - // Property of the Synthetic Test Response to use for a Synthetic global variable. + // Type of value to extract from a test for a Synthetic global variable. Type SyntheticsGlobalVariableParseTestOptionsType `json:"type"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_parse_test_options_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_parse_test_options_type.go index 4f114c18fb..3478564377 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_parse_test_options_type.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_parse_test_options_type.go @@ -10,19 +10,21 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) -// SyntheticsGlobalVariableParseTestOptionsType Property of the Synthetic Test Response to use for a Synthetic global variable. +// SyntheticsGlobalVariableParseTestOptionsType Type of value to extract from a test for a Synthetic global variable. type SyntheticsGlobalVariableParseTestOptionsType string // List of SyntheticsGlobalVariableParseTestOptionsType. const ( - SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_HTTP_BODY SyntheticsGlobalVariableParseTestOptionsType = "http_body" - SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_HTTP_HEADER SyntheticsGlobalVariableParseTestOptionsType = "http_header" - SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_LOCAL_VARIABLE SyntheticsGlobalVariableParseTestOptionsType = "local_variable" + SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_HTTP_BODY SyntheticsGlobalVariableParseTestOptionsType = "http_body" + SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_HTTP_HEADER SyntheticsGlobalVariableParseTestOptionsType = "http_header" + SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_HTTP_STATUS_CODE SyntheticsGlobalVariableParseTestOptionsType = "http_status_code" + SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_LOCAL_VARIABLE SyntheticsGlobalVariableParseTestOptionsType = "local_variable" ) var allowedSyntheticsGlobalVariableParseTestOptionsTypeEnumValues = []SyntheticsGlobalVariableParseTestOptionsType{ SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_HTTP_BODY, SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_HTTP_HEADER, + SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_HTTP_STATUS_CODE, SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_LOCAL_VARIABLE, } diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_request.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_request.go new file mode 100644 index 0000000000..2bb457d168 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_global_variable_request.go @@ -0,0 +1,425 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsGlobalVariableRequest Details of the global variable to create. +type SyntheticsGlobalVariableRequest struct { + // Attributes of the global variable. + Attributes *SyntheticsGlobalVariableAttributes `json:"attributes,omitempty"` + // Description of the global variable. + Description string `json:"description"` + // Unique identifier of the global variable. + Id *string `json:"id,omitempty"` + // Determines if the global variable is a FIDO variable. + IsFido *bool `json:"is_fido,omitempty"` + // Determines if the global variable is a TOTP/MFA variable. + IsTotp *bool `json:"is_totp,omitempty"` + // Name of the global variable. Unique across Synthetic global variables. + Name string `json:"name"` + // Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with `parse_test_public_id`. + ParseTestOptions *SyntheticsGlobalVariableParseTestOptions `json:"parse_test_options,omitempty"` + // A Synthetic test ID to use as a test to generate the variable value. + ParseTestPublicId *string `json:"parse_test_public_id,omitempty"` + // Tags of the global variable. + Tags []string `json:"tags"` + // Value of the global variable. + Value *SyntheticsGlobalVariableValue `json:"value,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsGlobalVariableRequest instantiates a new SyntheticsGlobalVariableRequest object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsGlobalVariableRequest(description string, name string, tags []string) *SyntheticsGlobalVariableRequest { + this := SyntheticsGlobalVariableRequest{} + this.Description = description + this.Name = name + this.Tags = tags + return &this +} + +// NewSyntheticsGlobalVariableRequestWithDefaults instantiates a new SyntheticsGlobalVariableRequest object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsGlobalVariableRequestWithDefaults() *SyntheticsGlobalVariableRequest { + this := SyntheticsGlobalVariableRequest{} + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *SyntheticsGlobalVariableRequest) GetAttributes() SyntheticsGlobalVariableAttributes { + if o == nil || o.Attributes == nil { + var ret SyntheticsGlobalVariableAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetAttributesOk() (*SyntheticsGlobalVariableAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *SyntheticsGlobalVariableRequest) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given SyntheticsGlobalVariableAttributes and assigns it to the Attributes field. +func (o *SyntheticsGlobalVariableRequest) SetAttributes(v SyntheticsGlobalVariableAttributes) { + o.Attributes = &v +} + +// GetDescription returns the Description field value. +func (o *SyntheticsGlobalVariableRequest) GetDescription() string { + if o == nil { + var ret string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value. +func (o *SyntheticsGlobalVariableRequest) SetDescription(v string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SyntheticsGlobalVariableRequest) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SyntheticsGlobalVariableRequest) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SyntheticsGlobalVariableRequest) SetId(v string) { + o.Id = &v +} + +// GetIsFido returns the IsFido field value if set, zero value otherwise. +func (o *SyntheticsGlobalVariableRequest) GetIsFido() bool { + if o == nil || o.IsFido == nil { + var ret bool + return ret + } + return *o.IsFido +} + +// GetIsFidoOk returns a tuple with the IsFido field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetIsFidoOk() (*bool, bool) { + if o == nil || o.IsFido == nil { + return nil, false + } + return o.IsFido, true +} + +// HasIsFido returns a boolean if a field has been set. +func (o *SyntheticsGlobalVariableRequest) HasIsFido() bool { + return o != nil && o.IsFido != nil +} + +// SetIsFido gets a reference to the given bool and assigns it to the IsFido field. +func (o *SyntheticsGlobalVariableRequest) SetIsFido(v bool) { + o.IsFido = &v +} + +// GetIsTotp returns the IsTotp field value if set, zero value otherwise. +func (o *SyntheticsGlobalVariableRequest) GetIsTotp() bool { + if o == nil || o.IsTotp == nil { + var ret bool + return ret + } + return *o.IsTotp +} + +// GetIsTotpOk returns a tuple with the IsTotp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetIsTotpOk() (*bool, bool) { + if o == nil || o.IsTotp == nil { + return nil, false + } + return o.IsTotp, true +} + +// HasIsTotp returns a boolean if a field has been set. +func (o *SyntheticsGlobalVariableRequest) HasIsTotp() bool { + return o != nil && o.IsTotp != nil +} + +// SetIsTotp gets a reference to the given bool and assigns it to the IsTotp field. +func (o *SyntheticsGlobalVariableRequest) SetIsTotp(v bool) { + o.IsTotp = &v +} + +// GetName returns the Name field value. +func (o *SyntheticsGlobalVariableRequest) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *SyntheticsGlobalVariableRequest) SetName(v string) { + o.Name = v +} + +// GetParseTestOptions returns the ParseTestOptions field value if set, zero value otherwise. +func (o *SyntheticsGlobalVariableRequest) GetParseTestOptions() SyntheticsGlobalVariableParseTestOptions { + if o == nil || o.ParseTestOptions == nil { + var ret SyntheticsGlobalVariableParseTestOptions + return ret + } + return *o.ParseTestOptions +} + +// GetParseTestOptionsOk returns a tuple with the ParseTestOptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetParseTestOptionsOk() (*SyntheticsGlobalVariableParseTestOptions, bool) { + if o == nil || o.ParseTestOptions == nil { + return nil, false + } + return o.ParseTestOptions, true +} + +// HasParseTestOptions returns a boolean if a field has been set. +func (o *SyntheticsGlobalVariableRequest) HasParseTestOptions() bool { + return o != nil && o.ParseTestOptions != nil +} + +// SetParseTestOptions gets a reference to the given SyntheticsGlobalVariableParseTestOptions and assigns it to the ParseTestOptions field. +func (o *SyntheticsGlobalVariableRequest) SetParseTestOptions(v SyntheticsGlobalVariableParseTestOptions) { + o.ParseTestOptions = &v +} + +// GetParseTestPublicId returns the ParseTestPublicId field value if set, zero value otherwise. +func (o *SyntheticsGlobalVariableRequest) GetParseTestPublicId() string { + if o == nil || o.ParseTestPublicId == nil { + var ret string + return ret + } + return *o.ParseTestPublicId +} + +// GetParseTestPublicIdOk returns a tuple with the ParseTestPublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetParseTestPublicIdOk() (*string, bool) { + if o == nil || o.ParseTestPublicId == nil { + return nil, false + } + return o.ParseTestPublicId, true +} + +// HasParseTestPublicId returns a boolean if a field has been set. +func (o *SyntheticsGlobalVariableRequest) HasParseTestPublicId() bool { + return o != nil && o.ParseTestPublicId != nil +} + +// SetParseTestPublicId gets a reference to the given string and assigns it to the ParseTestPublicId field. +func (o *SyntheticsGlobalVariableRequest) SetParseTestPublicId(v string) { + o.ParseTestPublicId = &v +} + +// GetTags returns the Tags field value. +func (o *SyntheticsGlobalVariableRequest) GetTags() []string { + if o == nil { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetTagsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.Tags, true +} + +// SetTags sets field value. +func (o *SyntheticsGlobalVariableRequest) SetTags(v []string) { + o.Tags = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *SyntheticsGlobalVariableRequest) GetValue() SyntheticsGlobalVariableValue { + if o == nil || o.Value == nil { + var ret SyntheticsGlobalVariableValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsGlobalVariableRequest) GetValueOk() (*SyntheticsGlobalVariableValue, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *SyntheticsGlobalVariableRequest) HasValue() bool { + return o != nil && o.Value != nil +} + +// SetValue gets a reference to the given SyntheticsGlobalVariableValue and assigns it to the Value field. +func (o *SyntheticsGlobalVariableRequest) SetValue(v SyntheticsGlobalVariableValue) { + o.Value = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsGlobalVariableRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + toSerialize["description"] = o.Description + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.IsFido != nil { + toSerialize["is_fido"] = o.IsFido + } + if o.IsTotp != nil { + toSerialize["is_totp"] = o.IsTotp + } + toSerialize["name"] = o.Name + if o.ParseTestOptions != nil { + toSerialize["parse_test_options"] = o.ParseTestOptions + } + if o.ParseTestPublicId != nil { + toSerialize["parse_test_public_id"] = o.ParseTestPublicId + } + toSerialize["tags"] = o.Tags + if o.Value != nil { + toSerialize["value"] = o.Value + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsGlobalVariableRequest) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *SyntheticsGlobalVariableAttributes `json:"attributes,omitempty"` + Description *string `json:"description"` + Id *string `json:"id,omitempty"` + IsFido *bool `json:"is_fido,omitempty"` + IsTotp *bool `json:"is_totp,omitempty"` + Name *string `json:"name"` + ParseTestOptions *SyntheticsGlobalVariableParseTestOptions `json:"parse_test_options,omitempty"` + ParseTestPublicId *string `json:"parse_test_public_id,omitempty"` + Tags *[]string `json:"tags"` + Value *SyntheticsGlobalVariableValue `json:"value,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Description == nil { + return fmt.Errorf("required field description missing") + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + if all.Tags == nil { + return fmt.Errorf("required field tags missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "description", "id", "is_fido", "is_totp", "name", "parse_test_options", "parse_test_public_id", "tags", "value"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Description = *all.Description + o.Id = all.Id + o.IsFido = all.IsFido + o.IsTotp = all.IsTotp + o.Name = *all.Name + if all.ParseTestOptions != nil && all.ParseTestOptions.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.ParseTestOptions = all.ParseTestOptions + o.ParseTestPublicId = all.ParseTestPublicId + o.Tags = *all.Tags + if all.Value != nil && all.Value.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Value = all.Value + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_local_variable_parsing_options_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_local_variable_parsing_options_type.go new file mode 100644 index 0000000000..0ce8a2bbc2 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_local_variable_parsing_options_type.go @@ -0,0 +1,72 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsLocalVariableParsingOptionsType Property of the Synthetic Test Response to extract into a local variable. +type SyntheticsLocalVariableParsingOptionsType string + +// List of SyntheticsLocalVariableParsingOptionsType. +const ( + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_GRPC_MESSAGE SyntheticsLocalVariableParsingOptionsType = "grpc_message" + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_GRPC_METADATA SyntheticsLocalVariableParsingOptionsType = "grpc_metadata" + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_HTTP_BODY SyntheticsLocalVariableParsingOptionsType = "http_body" + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_HTTP_HEADER SyntheticsLocalVariableParsingOptionsType = "http_header" + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_HTTP_STATUS_CODE SyntheticsLocalVariableParsingOptionsType = "http_status_code" +) + +var allowedSyntheticsLocalVariableParsingOptionsTypeEnumValues = []SyntheticsLocalVariableParsingOptionsType{ + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_GRPC_MESSAGE, + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_GRPC_METADATA, + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_HTTP_BODY, + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_HTTP_HEADER, + SYNTHETICSLOCALVARIABLEPARSINGOPTIONSTYPE_HTTP_STATUS_CODE, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsLocalVariableParsingOptionsType) GetAllowedValues() []SyntheticsLocalVariableParsingOptionsType { + return allowedSyntheticsLocalVariableParsingOptionsTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsLocalVariableParsingOptionsType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsLocalVariableParsingOptionsType(value) + return nil +} + +// NewSyntheticsLocalVariableParsingOptionsTypeFromValue returns a pointer to a valid SyntheticsLocalVariableParsingOptionsType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsLocalVariableParsingOptionsTypeFromValue(v string) (*SyntheticsLocalVariableParsingOptionsType, error) { + ev := SyntheticsLocalVariableParsingOptionsType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsLocalVariableParsingOptionsType: valid values are %v", v, allowedSyntheticsLocalVariableParsingOptionsTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsLocalVariableParsingOptionsType) IsValid() bool { + for _, existing := range allowedSyntheticsLocalVariableParsingOptionsTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsLocalVariableParsingOptionsType value. +func (v SyntheticsLocalVariableParsingOptionsType) Ptr() *SyntheticsLocalVariableParsingOptionsType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_device_id.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_device_id.go new file mode 100644 index 0000000000..d4b9263d5b --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_device_id.go @@ -0,0 +1,514 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileDeviceID The device ID. +type SyntheticsMobileDeviceID string + +// List of SyntheticsMobileDeviceID. +const ( + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD__2022__16_4 SyntheticsMobileDeviceID = "apple ipad (2022),16.4" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD__2022__17_3_1 SyntheticsMobileDeviceID = "apple ipad (2022),17.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_7TH_GEN__2019__13_3 SyntheticsMobileDeviceID = "apple ipad 7th gen (2019),13.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_9TH_GEN__2021__15_0_2 SyntheticsMobileDeviceID = "apple ipad 9th gen (2021),15.0.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_9TH_GEN__2021__16_1 SyntheticsMobileDeviceID = "apple ipad 9th gen (2021),16.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_AIR__2022__15_4_1 SyntheticsMobileDeviceID = "apple ipad air (2022),15.4.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_MINI__5TH_GEN__14_6 SyntheticsMobileDeviceID = "apple ipad mini (5th gen),14.6" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_MINI__6TH_GEN__15_1 SyntheticsMobileDeviceID = "apple ipad mini (6th gen),15.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_11__2022__16_3 SyntheticsMobileDeviceID = "apple ipad pro 11 (2022),16.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2020__14_8 SyntheticsMobileDeviceID = "apple ipad pro 12.9 (2020),14.8" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2021__15_6_1 SyntheticsMobileDeviceID = "apple ipad pro 12.9 (2021),15.6.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2022__16_5 SyntheticsMobileDeviceID = "apple ipad pro 12.9 (2022),16.5" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_MAX_13_1_3 SyntheticsMobileDeviceID = "apple iphone 11 pro max,13.1.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_13_6 SyntheticsMobileDeviceID = "apple iphone 11 pro,13.6" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_15_5 SyntheticsMobileDeviceID = "apple iphone 11 pro,15.5" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_13_3_1 SyntheticsMobileDeviceID = "apple iphone 11,13.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_14_0 SyntheticsMobileDeviceID = "apple iphone 11,14.0" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_16_3 SyntheticsMobileDeviceID = "apple iphone 11,16.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_MINI_14_2 SyntheticsMobileDeviceID = "apple iphone 12 mini,14.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_MINI_16_5 SyntheticsMobileDeviceID = "apple iphone 12 mini,16.5" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_MAX_14_5_1 SyntheticsMobileDeviceID = "apple iphone 12 pro max,14.5.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_14_5_1 SyntheticsMobileDeviceID = "apple iphone 12 pro,14.5.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_14_8 SyntheticsMobileDeviceID = "apple iphone 12 pro,14.8" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_15_0_2 SyntheticsMobileDeviceID = "apple iphone 12 pro,15.0.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_16_2 SyntheticsMobileDeviceID = "apple iphone 12 pro,16.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_2 SyntheticsMobileDeviceID = "apple iphone 12,14.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_6 SyntheticsMobileDeviceID = "apple iphone 12,14.6" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_8 SyntheticsMobileDeviceID = "apple iphone 12,14.8" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_15_6_1 SyntheticsMobileDeviceID = "apple iphone 12,15.6.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_16_6_1 SyntheticsMobileDeviceID = "apple iphone 12,16.6.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_MINI_15_0_2 SyntheticsMobileDeviceID = "apple iphone 13 mini,15.0.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_MINI_16_6 SyntheticsMobileDeviceID = "apple iphone 13 mini,16.6" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_MAX_15_1 SyntheticsMobileDeviceID = "apple iphone 13 pro max,15.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_MAX_17_3 SyntheticsMobileDeviceID = "apple iphone 13 pro max,17.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_15_0_2 SyntheticsMobileDeviceID = "apple iphone 13 pro,15.0.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_15_2 SyntheticsMobileDeviceID = "apple iphone 13 pro,15.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PLUS_16_1 SyntheticsMobileDeviceID = "apple iphone 14 plus,16.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_MAX_16_2 SyntheticsMobileDeviceID = "apple iphone 14 pro max,16.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_16_1 SyntheticsMobileDeviceID = "apple iphone 14 pro,16.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_17_3_1 SyntheticsMobileDeviceID = "apple iphone 14 pro,17.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_16_1 SyntheticsMobileDeviceID = "apple iphone 14,16.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_PRO_MAX_17_3_1 SyntheticsMobileDeviceID = "apple iphone 15 pro max,17.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_PRO_17_3_1 SyntheticsMobileDeviceID = "apple iphone 15 pro,17.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_17_2_1 SyntheticsMobileDeviceID = "apple iphone 15,17.2.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_SE__2022__15_4_1 SyntheticsMobileDeviceID = "apple iphone se (2022),15.4.1" + SYNTHETICSMOBILEDEVICEID_GALAXY_A40_9 SyntheticsMobileDeviceID = "galaxy a40,9" + SYNTHETICSMOBILEDEVICEID_GALAXY_A5_8_0_0 SyntheticsMobileDeviceID = "galaxy a5,8.0.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_NOTE_10_9 SyntheticsMobileDeviceID = "galaxy note 10,9" + SYNTHETICSMOBILEDEVICEID_GALAXY_NOTE5__AT_T__7_0 SyntheticsMobileDeviceID = "galaxy note5 (at&t),7.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S10_9 SyntheticsMobileDeviceID = "galaxy s10,9" + SYNTHETICSMOBILEDEVICEID_GALAXY_S6_EDGE_SMNOT_G925F_7_0 SyntheticsMobileDeviceID = "galaxy s6 edge sm-g925f,7.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S8__TNOT_MOBILE__8_0_0 SyntheticsMobileDeviceID = "galaxy s8 (t-mobile),8.0.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S8_UNLOCKED_8_0_0 SyntheticsMobileDeviceID = "galaxy s8 unlocked,8.0.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S9__UNLOCKED__9 SyntheticsMobileDeviceID = "galaxy s9 (unlocked),9" + SYNTHETICSMOBILEDEVICEID_GALAXY_S9___UNLOCKED__8_0_0 SyntheticsMobileDeviceID = "galaxy s9+ (unlocked),8.0.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S9___UNLOCKED__9 SyntheticsMobileDeviceID = "galaxy s9+ (unlocked),9" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_2_8_0_0 SyntheticsMobileDeviceID = "google pixel 2,8.0.0" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_2_9 SyntheticsMobileDeviceID = "google pixel 2,9" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_XL_10 SyntheticsMobileDeviceID = "google pixel 3 xl,10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_XL_9 SyntheticsMobileDeviceID = "google pixel 3 xl,9" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_10 SyntheticsMobileDeviceID = "google pixel 3,10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_9 SyntheticsMobileDeviceID = "google pixel 3,9" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_XL_11 SyntheticsMobileDeviceID = "google pixel 3a xl,11" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_XL_12 SyntheticsMobileDeviceID = "google pixel 3a xl,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_10 SyntheticsMobileDeviceID = "google pixel 3a,10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4__UNLOCKED__10 SyntheticsMobileDeviceID = "google pixel 4 (unlocked),10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4__UNLOCKED__11 SyntheticsMobileDeviceID = "google pixel 4 (unlocked),11" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4_XL__UNLOCKED__10 SyntheticsMobileDeviceID = "google pixel 4 xl (unlocked),10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4A_11 SyntheticsMobileDeviceID = "google pixel 4a,11" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4A_12 SyntheticsMobileDeviceID = "google pixel 4a,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_5A_5G_12 SyntheticsMobileDeviceID = "google pixel 5a 5g,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6_PRO_12 SyntheticsMobileDeviceID = "google pixel 6 pro,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6_12 SyntheticsMobileDeviceID = "google pixel 6,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6A_13 SyntheticsMobileDeviceID = "google pixel 6a,13" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_PRO_13 SyntheticsMobileDeviceID = "google pixel 7 pro,13" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_13 SyntheticsMobileDeviceID = "google pixel 7,13" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_14 SyntheticsMobileDeviceID = "google pixel 7,14" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_8_PRO_14 SyntheticsMobileDeviceID = "google pixel 8 pro,14" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_8_14 SyntheticsMobileDeviceID = "google pixel 8,14" + SYNTHETICSMOBILEDEVICEID_IPAD_8TH_GEN__2020__14_8 SyntheticsMobileDeviceID = "ipad 8th gen (2020),14.8" + SYNTHETICSMOBILEDEVICEID_IPAD_AIR_2_13_6 SyntheticsMobileDeviceID = "ipad air 2,13.6" + SYNTHETICSMOBILEDEVICEID_IPAD_AIR_4TH_GEN__2020__14_8 SyntheticsMobileDeviceID = "ipad air 4th gen (2020),14.8" + SYNTHETICSMOBILEDEVICEID_IPHONE_13_15_0_2 SyntheticsMobileDeviceID = "iphone 13,15.0.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_13_16_0_2 SyntheticsMobileDeviceID = "iphone 13,16.0.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_6_12_5_4 SyntheticsMobileDeviceID = "iphone 6,12.5.4" + SYNTHETICSMOBILEDEVICEID_IPHONE_6S_14_4_2 SyntheticsMobileDeviceID = "iphone 6s,14.4.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_7_14_8 SyntheticsMobileDeviceID = "iphone 7,14.8" + SYNTHETICSMOBILEDEVICEID_IPHONE_8_13_5_1 SyntheticsMobileDeviceID = "iphone 8,13.5.1" + SYNTHETICSMOBILEDEVICEID_IPHONE_8_14_4_2 SyntheticsMobileDeviceID = "iphone 8,14.4.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__13_6 SyntheticsMobileDeviceID = "iphone se (2020),13.6" + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__14_6 SyntheticsMobileDeviceID = "iphone se (2020),14.6" + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__15_0_2 SyntheticsMobileDeviceID = "iphone se (2020),15.0.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_X_14_6 SyntheticsMobileDeviceID = "iphone x,14.6" + SYNTHETICSMOBILEDEVICEID_IPHONE_XR_12_0 SyntheticsMobileDeviceID = "iphone xr,12.0" + SYNTHETICSMOBILEDEVICEID_IPHONE_XR_14_0 SyntheticsMobileDeviceID = "iphone xr,14.0" + SYNTHETICSMOBILEDEVICEID_IPHONE_XS_MAX_12_1 SyntheticsMobileDeviceID = "iphone xs max,12.1" + SYNTHETICSMOBILEDEVICEID_IPHONE_XS_13_6 SyntheticsMobileDeviceID = "iphone xs,13.6" + SYNTHETICSMOBILEDEVICEID_LG_STYLO_5_9 SyntheticsMobileDeviceID = "lg stylo 5,9" + SYNTHETICSMOBILEDEVICEID_LG_STYLO_6_10 SyntheticsMobileDeviceID = "lg stylo 6,10" + SYNTHETICSMOBILEDEVICEID_MOTO_G_4_7_0 SyntheticsMobileDeviceID = "moto g 4,7.0" + SYNTHETICSMOBILEDEVICEID_MOTO_G7_PLAY_9 SyntheticsMobileDeviceID = "moto g7 play,9" + SYNTHETICSMOBILEDEVICEID_NEXUS_7_NOT__2ND_GEN__WIFI__6_0 SyntheticsMobileDeviceID = "nexus 7 - 2nd gen (wifi),6.0" + SYNTHETICSMOBILEDEVICEID_ONEPLUS_8T_11 SyntheticsMobileDeviceID = "oneplus 8t,11" + SYNTHETICSMOBILEDEVICEID_PIXEL_2_XL_8_1_0 SyntheticsMobileDeviceID = "pixel 2 xl,8.1.0" + SYNTHETICSMOBILEDEVICEID_PIXEL_2_XL_9 SyntheticsMobileDeviceID = "pixel 2 xl,9" + SYNTHETICSMOBILEDEVICEID_PIXEL_5_11 SyntheticsMobileDeviceID = "pixel 5,11" + SYNTHETICSMOBILEDEVICEID_PIXEL_5_12 SyntheticsMobileDeviceID = "pixel 5,12" + SYNTHETICSMOBILEDEVICEID_PIXEL_XL_8_0_0 SyntheticsMobileDeviceID = "pixel xl,8.0.0" + SYNTHETICSMOBILEDEVICEID_PIXEL_7_1_2 SyntheticsMobileDeviceID = "pixel,7.1.2" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_A51_10 SyntheticsMobileDeviceID = "samsung a51,10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A10S_10 SyntheticsMobileDeviceID = "samsung galaxy a10s,10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A13_5G_11 SyntheticsMobileDeviceID = "samsung galaxy a13 5g,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A53_5G_12 SyntheticsMobileDeviceID = "samsung galaxy a53 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A7_8_0_0 SyntheticsMobileDeviceID = "samsung galaxy a7,8.0.0" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A71_11 SyntheticsMobileDeviceID = "samsung galaxy a71,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A73_5G_12 SyntheticsMobileDeviceID = "samsung galaxy a73 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_J7__2018__8_0_0 SyntheticsMobileDeviceID = "samsung galaxy j7 (2018),8.0.0" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_NOTE20_11 SyntheticsMobileDeviceID = "samsung galaxy note20,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S20__UNLOCKED__10 SyntheticsMobileDeviceID = "samsung galaxy s20 (unlocked),10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S20___UNLOCKED__10 SyntheticsMobileDeviceID = "samsung galaxy s20+ (unlocked),10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_ULTRA_11 SyntheticsMobileDeviceID = "samsung galaxy s21 ultra,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_ULTRA_12 SyntheticsMobileDeviceID = "samsung galaxy s21 ultra,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21__11 SyntheticsMobileDeviceID = "samsung galaxy s21+,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_11 SyntheticsMobileDeviceID = "samsung galaxy s21,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_12 SyntheticsMobileDeviceID = "samsung galaxy s21,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_5G_12 SyntheticsMobileDeviceID = "samsung galaxy s22 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_5G_13 SyntheticsMobileDeviceID = "samsung galaxy s22 5g,13" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_ULTRA_5G_12 SyntheticsMobileDeviceID = "samsung galaxy s22 ultra 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22__5G_12 SyntheticsMobileDeviceID = "samsung galaxy s22+ 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_ULTRA_13 SyntheticsMobileDeviceID = "samsung galaxy s23 ultra,13" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23__13 SyntheticsMobileDeviceID = "samsung galaxy s23+,13" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_13 SyntheticsMobileDeviceID = "samsung galaxy s23,13" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_14 SyntheticsMobileDeviceID = "samsung galaxy s23,14" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A_10_1_10 SyntheticsMobileDeviceID = "samsung galaxy tab a 10.1,10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A_10_1_7_0 SyntheticsMobileDeviceID = "samsung galaxy tab a 10.1,7.0" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A8__2021__11 SyntheticsMobileDeviceID = "samsung galaxy tab a8 (2021),11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S4_8_1_0 SyntheticsMobileDeviceID = "samsung galaxy tab s4,8.1.0" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S6_9 SyntheticsMobileDeviceID = "samsung galaxy tab s6,9" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S7_11 SyntheticsMobileDeviceID = "samsung galaxy tab s7,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S8_12 SyntheticsMobileDeviceID = "samsung galaxy tab s8,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_S20_ULTRA_10 SyntheticsMobileDeviceID = "samsung s20 ultra,10" + SYNTHETICSMOBILEDEVICEID_SONY_XPERIA_XZ3_9 SyntheticsMobileDeviceID = "sony xperia xz3,9" + SYNTHETICSMOBILEDEVICEID_XIAOMI_REDMI_NOTE_10_5G_11 SyntheticsMobileDeviceID = "xiaomi redmi note 10 5g,11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_9TH_GEN_2021_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_9th_gen_2021_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_AIR_2022_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_air_2022_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_5TH_GEN_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_mini_5th_gen_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_6TH_GEN_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_mini_6th_gen_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_11_2022_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_pro_11_2022_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2020_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_pro_12_9_2020_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2021_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_pro_12_9_2021_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2022_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_pro_12_9_2022_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_11_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_11_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_PRO_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_11_pro_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_mini_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_mini_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_pro_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_MAX_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_pro_max_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_mini_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_mini_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_pro_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_pro_max_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_pro_max_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PLUS_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_plus_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_pro_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_pro_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_MAX_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_pro_max_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_6_IOS_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_6_ios_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_8_ios_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_8_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_se_2022_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_se_2022_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GALAXY_A5_ANDROID_8 SyntheticsMobileDeviceID = "synthetics:mobile:device:galaxy_a5_android_8" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GALAXY_NOTE5_ANDROID_7 SyntheticsMobileDeviceID = "synthetics:mobile:device:galaxy_note5_android_7" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_3A_XL_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_3a_xl_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_UNLOCKED_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_4_unlocked_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_XL_UNLOCKED_ANDROID_10 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_4_xl_unlocked_android_10" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4A_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_4a_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_6_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_PRO_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_6_pro_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6A_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_6a_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_7_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_7_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_PRO_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_7_pro_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_8_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_PRO_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_8_pro_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_2_IOS_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:ipad_air_2_ios_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_4TH_GEN_2020_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:ipad_air_4th_gen_2020_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_13_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_13_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_15_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_15_pro_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_MAX_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_15_pro_max_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_se_2020_ios_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_se_2020_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_X_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_x_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_XR_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_xr_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_XS_IOS_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_xs_ios_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_LG_STYLO_6_ANDROID_10 SyntheticsMobileDeviceID = "synthetics:mobile:device:lg_stylo_6_android_10" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_PIXEL_5_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:pixel_5_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_A51_ANDROID_10 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_a51_android_10" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_A71_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_a71_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_NOTE20_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_note20_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s21_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s21_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_PLUS_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s21_plus_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ULTRA_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s21_ultra_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s22_5g_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s22_5g_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_PLUS_5G_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s22_plus_5g_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_ULTRA_5G_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s22_ultra_5g_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_plus_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_plus_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ULTRA_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_ultra_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_A_10_1_ANDROID_7 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_tab_a_10_1_android_7" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S7_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_tab_s7_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S8_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_tab_s8_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_XIAOMI_REDMI_NOTE_10_5G_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:xiaomi_redmi_note_10_5g_android_11" +) + +var allowedSyntheticsMobileDeviceIDEnumValues = []SyntheticsMobileDeviceID{ + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD__2022__16_4, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD__2022__17_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_7TH_GEN__2019__13_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_9TH_GEN__2021__15_0_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_9TH_GEN__2021__16_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_AIR__2022__15_4_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_MINI__5TH_GEN__14_6, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_MINI__6TH_GEN__15_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_11__2022__16_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2020__14_8, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2021__15_6_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2022__16_5, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_MAX_13_1_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_13_6, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_15_5, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_13_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_14_0, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_16_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_MINI_14_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_MINI_16_5, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_MAX_14_5_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_14_5_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_14_8, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_15_0_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_16_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_6, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_8, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_15_6_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_16_6_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_MINI_15_0_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_MINI_16_6, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_MAX_15_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_MAX_17_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_15_0_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_15_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PLUS_16_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_MAX_16_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_16_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_17_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_16_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_PRO_MAX_17_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_PRO_17_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_17_2_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_SE__2022__15_4_1, + SYNTHETICSMOBILEDEVICEID_GALAXY_A40_9, + SYNTHETICSMOBILEDEVICEID_GALAXY_A5_8_0_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_NOTE_10_9, + SYNTHETICSMOBILEDEVICEID_GALAXY_NOTE5__AT_T__7_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S10_9, + SYNTHETICSMOBILEDEVICEID_GALAXY_S6_EDGE_SMNOT_G925F_7_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S8__TNOT_MOBILE__8_0_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S8_UNLOCKED_8_0_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S9__UNLOCKED__9, + SYNTHETICSMOBILEDEVICEID_GALAXY_S9___UNLOCKED__8_0_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S9___UNLOCKED__9, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_2_8_0_0, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_2_9, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_XL_10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_XL_9, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_9, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_XL_11, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_XL_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4__UNLOCKED__10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4__UNLOCKED__11, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4_XL__UNLOCKED__10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4A_11, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4A_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_5A_5G_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6_PRO_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6A_13, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_PRO_13, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_13, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_14, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_8_PRO_14, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_8_14, + SYNTHETICSMOBILEDEVICEID_IPAD_8TH_GEN__2020__14_8, + SYNTHETICSMOBILEDEVICEID_IPAD_AIR_2_13_6, + SYNTHETICSMOBILEDEVICEID_IPAD_AIR_4TH_GEN__2020__14_8, + SYNTHETICSMOBILEDEVICEID_IPHONE_13_15_0_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_13_16_0_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_6_12_5_4, + SYNTHETICSMOBILEDEVICEID_IPHONE_6S_14_4_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_7_14_8, + SYNTHETICSMOBILEDEVICEID_IPHONE_8_13_5_1, + SYNTHETICSMOBILEDEVICEID_IPHONE_8_14_4_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__13_6, + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__14_6, + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__15_0_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_X_14_6, + SYNTHETICSMOBILEDEVICEID_IPHONE_XR_12_0, + SYNTHETICSMOBILEDEVICEID_IPHONE_XR_14_0, + SYNTHETICSMOBILEDEVICEID_IPHONE_XS_MAX_12_1, + SYNTHETICSMOBILEDEVICEID_IPHONE_XS_13_6, + SYNTHETICSMOBILEDEVICEID_LG_STYLO_5_9, + SYNTHETICSMOBILEDEVICEID_LG_STYLO_6_10, + SYNTHETICSMOBILEDEVICEID_MOTO_G_4_7_0, + SYNTHETICSMOBILEDEVICEID_MOTO_G7_PLAY_9, + SYNTHETICSMOBILEDEVICEID_NEXUS_7_NOT__2ND_GEN__WIFI__6_0, + SYNTHETICSMOBILEDEVICEID_ONEPLUS_8T_11, + SYNTHETICSMOBILEDEVICEID_PIXEL_2_XL_8_1_0, + SYNTHETICSMOBILEDEVICEID_PIXEL_2_XL_9, + SYNTHETICSMOBILEDEVICEID_PIXEL_5_11, + SYNTHETICSMOBILEDEVICEID_PIXEL_5_12, + SYNTHETICSMOBILEDEVICEID_PIXEL_XL_8_0_0, + SYNTHETICSMOBILEDEVICEID_PIXEL_7_1_2, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_A51_10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A10S_10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A13_5G_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A53_5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A7_8_0_0, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A71_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A73_5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_J7__2018__8_0_0, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_NOTE20_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S20__UNLOCKED__10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S20___UNLOCKED__10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_ULTRA_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_ULTRA_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21__11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_5G_13, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_ULTRA_5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22__5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_ULTRA_13, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23__13, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_13, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_14, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A_10_1_10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A_10_1_7_0, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A8__2021__11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S4_8_1_0, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S6_9, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S7_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S8_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_S20_ULTRA_10, + SYNTHETICSMOBILEDEVICEID_SONY_XPERIA_XZ3_9, + SYNTHETICSMOBILEDEVICEID_XIAOMI_REDMI_NOTE_10_5G_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_9TH_GEN_2021_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_AIR_2022_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_5TH_GEN_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_6TH_GEN_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_11_2022_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2020_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2021_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2022_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_PRO_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_MAX_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PLUS_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_MAX_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_6_IOS_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GALAXY_A5_ANDROID_8, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GALAXY_NOTE5_ANDROID_7, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_3A_XL_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_UNLOCKED_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_XL_UNLOCKED_ANDROID_10, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4A_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_PRO_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6A_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_PRO_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_PRO_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_2_IOS_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_4TH_GEN_2020_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_MAX_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_X_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_XR_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_XS_IOS_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_LG_STYLO_6_ANDROID_10, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_PIXEL_5_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_A51_ANDROID_10, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_A71_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_NOTE20_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_PLUS_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ULTRA_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_PLUS_5G_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_ULTRA_5G_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ULTRA_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_A_10_1_ANDROID_7, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S7_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S8_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_XIAOMI_REDMI_NOTE_10_5G_ANDROID_11, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileDeviceID) GetAllowedValues() []SyntheticsMobileDeviceID { + return allowedSyntheticsMobileDeviceIDEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileDeviceID) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileDeviceID(value) + return nil +} + +// NewSyntheticsMobileDeviceIDFromValue returns a pointer to a valid SyntheticsMobileDeviceID +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileDeviceIDFromValue(v string) (*SyntheticsMobileDeviceID, error) { + ev := SyntheticsMobileDeviceID(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileDeviceID: valid values are %v", v, allowedSyntheticsMobileDeviceIDEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileDeviceID) IsValid() bool { + for _, existing := range allowedSyntheticsMobileDeviceIDEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileDeviceID value. +func (v SyntheticsMobileDeviceID) Ptr() *SyntheticsMobileDeviceID { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_step.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_step.go new file mode 100644 index 0000000000..556b0403ba --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_step.go @@ -0,0 +1,392 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileStep The steps used in a Synthetic mobile test. +type SyntheticsMobileStep struct { + // A boolean set to allow this step to fail. + AllowFailure *bool `json:"allowFailure,omitempty"` + // A boolean set to determine if the step has a new step element. + HasNewStepElement *bool `json:"hasNewStepElement,omitempty"` + // A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails. + IsCritical *bool `json:"isCritical,omitempty"` + // The name of the step. + Name *string `json:"name,omitempty"` + // A boolean set to not take a screenshot for the step. + NoScreenshot *bool `json:"noScreenshot,omitempty"` + // The parameters of the mobile step. + Params interface{} `json:"params,omitempty"` + // The public ID of the step. + PublicId *string `json:"publicId,omitempty"` + // The time before declaring a step failed. + Timeout *int64 `json:"timeout,omitempty"` + // Step type used in your mobile Synthetic test. + Type *SyntheticsMobileStepType `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileStep instantiates a new SyntheticsMobileStep object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileStep() *SyntheticsMobileStep { + this := SyntheticsMobileStep{} + return &this +} + +// NewSyntheticsMobileStepWithDefaults instantiates a new SyntheticsMobileStep object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileStepWithDefaults() *SyntheticsMobileStep { + this := SyntheticsMobileStep{} + return &this +} + +// GetAllowFailure returns the AllowFailure field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetAllowFailure() bool { + if o == nil || o.AllowFailure == nil { + var ret bool + return ret + } + return *o.AllowFailure +} + +// GetAllowFailureOk returns a tuple with the AllowFailure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetAllowFailureOk() (*bool, bool) { + if o == nil || o.AllowFailure == nil { + return nil, false + } + return o.AllowFailure, true +} + +// HasAllowFailure returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasAllowFailure() bool { + return o != nil && o.AllowFailure != nil +} + +// SetAllowFailure gets a reference to the given bool and assigns it to the AllowFailure field. +func (o *SyntheticsMobileStep) SetAllowFailure(v bool) { + o.AllowFailure = &v +} + +// GetHasNewStepElement returns the HasNewStepElement field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetHasNewStepElement() bool { + if o == nil || o.HasNewStepElement == nil { + var ret bool + return ret + } + return *o.HasNewStepElement +} + +// GetHasNewStepElementOk returns a tuple with the HasNewStepElement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetHasNewStepElementOk() (*bool, bool) { + if o == nil || o.HasNewStepElement == nil { + return nil, false + } + return o.HasNewStepElement, true +} + +// HasHasNewStepElement returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasHasNewStepElement() bool { + return o != nil && o.HasNewStepElement != nil +} + +// SetHasNewStepElement gets a reference to the given bool and assigns it to the HasNewStepElement field. +func (o *SyntheticsMobileStep) SetHasNewStepElement(v bool) { + o.HasNewStepElement = &v +} + +// GetIsCritical returns the IsCritical field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetIsCritical() bool { + if o == nil || o.IsCritical == nil { + var ret bool + return ret + } + return *o.IsCritical +} + +// GetIsCriticalOk returns a tuple with the IsCritical field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetIsCriticalOk() (*bool, bool) { + if o == nil || o.IsCritical == nil { + return nil, false + } + return o.IsCritical, true +} + +// HasIsCritical returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasIsCritical() bool { + return o != nil && o.IsCritical != nil +} + +// SetIsCritical gets a reference to the given bool and assigns it to the IsCritical field. +func (o *SyntheticsMobileStep) SetIsCritical(v bool) { + o.IsCritical = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SyntheticsMobileStep) SetName(v string) { + o.Name = &v +} + +// GetNoScreenshot returns the NoScreenshot field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetNoScreenshot() bool { + if o == nil || o.NoScreenshot == nil { + var ret bool + return ret + } + return *o.NoScreenshot +} + +// GetNoScreenshotOk returns a tuple with the NoScreenshot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetNoScreenshotOk() (*bool, bool) { + if o == nil || o.NoScreenshot == nil { + return nil, false + } + return o.NoScreenshot, true +} + +// HasNoScreenshot returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasNoScreenshot() bool { + return o != nil && o.NoScreenshot != nil +} + +// SetNoScreenshot gets a reference to the given bool and assigns it to the NoScreenshot field. +func (o *SyntheticsMobileStep) SetNoScreenshot(v bool) { + o.NoScreenshot = &v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetParams() interface{} { + if o == nil || o.Params == nil { + var ret interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetParamsOk() (*interface{}, bool) { + if o == nil || o.Params == nil { + return nil, false + } + return &o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasParams() bool { + return o != nil && o.Params != nil +} + +// SetParams gets a reference to the given interface{} and assigns it to the Params field. +func (o *SyntheticsMobileStep) SetParams(v interface{}) { + o.Params = v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasPublicId() bool { + return o != nil && o.PublicId != nil +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *SyntheticsMobileStep) SetPublicId(v string) { + o.PublicId = &v +} + +// GetTimeout returns the Timeout field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetTimeout() int64 { + if o == nil || o.Timeout == nil { + var ret int64 + return ret + } + return *o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetTimeoutOk() (*int64, bool) { + if o == nil || o.Timeout == nil { + return nil, false + } + return o.Timeout, true +} + +// HasTimeout returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasTimeout() bool { + return o != nil && o.Timeout != nil +} + +// SetTimeout gets a reference to the given int64 and assigns it to the Timeout field. +func (o *SyntheticsMobileStep) SetTimeout(v int64) { + o.Timeout = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetType() SyntheticsMobileStepType { + if o == nil || o.Type == nil { + var ret SyntheticsMobileStepType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetTypeOk() (*SyntheticsMobileStepType, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given SyntheticsMobileStepType and assigns it to the Type field. +func (o *SyntheticsMobileStep) SetType(v SyntheticsMobileStepType) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileStep) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.AllowFailure != nil { + toSerialize["allowFailure"] = o.AllowFailure + } + if o.HasNewStepElement != nil { + toSerialize["hasNewStepElement"] = o.HasNewStepElement + } + if o.IsCritical != nil { + toSerialize["isCritical"] = o.IsCritical + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.NoScreenshot != nil { + toSerialize["noScreenshot"] = o.NoScreenshot + } + if o.Params != nil { + toSerialize["params"] = o.Params + } + if o.PublicId != nil { + toSerialize["publicId"] = o.PublicId + } + if o.Timeout != nil { + toSerialize["timeout"] = o.Timeout + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileStep) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + AllowFailure *bool `json:"allowFailure,omitempty"` + HasNewStepElement *bool `json:"hasNewStepElement,omitempty"` + IsCritical *bool `json:"isCritical,omitempty"` + Name *string `json:"name,omitempty"` + NoScreenshot *bool `json:"noScreenshot,omitempty"` + Params interface{} `json:"params,omitempty"` + PublicId *string `json:"publicId,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + Type *SyntheticsMobileStepType `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"allowFailure", "hasNewStepElement", "isCritical", "name", "noScreenshot", "params", "publicId", "timeout", "type"}) + } else { + return err + } + + hasInvalidField := false + o.AllowFailure = all.AllowFailure + o.HasNewStepElement = all.HasNewStepElement + o.IsCritical = all.IsCritical + o.Name = all.Name + o.NoScreenshot = all.NoScreenshot + o.Params = all.Params + o.PublicId = all.PublicId + o.Timeout = all.Timeout + if all.Type != nil && !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_step_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_step_type.go new file mode 100644 index 0000000000..2955d5d822 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_step_type.go @@ -0,0 +1,96 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileStepType Step type used in your mobile Synthetic test. +type SyntheticsMobileStepType string + +// List of SyntheticsMobileStepType. +const ( + SYNTHETICSMOBILESTEPTYPE_ASSERTELEMENTCONTENT SyntheticsMobileStepType = "assertElementContent" + SYNTHETICSMOBILESTEPTYPE_ASSERTSCREENCONTAINS SyntheticsMobileStepType = "assertScreenContains" + SYNTHETICSMOBILESTEPTYPE_ASSERTSCREENLACKS SyntheticsMobileStepType = "assertScreenLacks" + SYNTHETICSMOBILESTEPTYPE_DOUBLETAP SyntheticsMobileStepType = "doubleTap" + SYNTHETICSMOBILESTEPTYPE_EXTRACTVARIABLE SyntheticsMobileStepType = "extractVariable" + SYNTHETICSMOBILESTEPTYPE_FLICK SyntheticsMobileStepType = "flick" + SYNTHETICSMOBILESTEPTYPE_OPENDEEPLINK SyntheticsMobileStepType = "openDeeplink" + SYNTHETICSMOBILESTEPTYPE_PLAYSUBTEST SyntheticsMobileStepType = "playSubTest" + SYNTHETICSMOBILESTEPTYPE_PRESSBACK SyntheticsMobileStepType = "pressBack" + SYNTHETICSMOBILESTEPTYPE_RESTARTAPPLICATION SyntheticsMobileStepType = "restartApplication" + SYNTHETICSMOBILESTEPTYPE_ROTATE SyntheticsMobileStepType = "rotate" + SYNTHETICSMOBILESTEPTYPE_SCROLL SyntheticsMobileStepType = "scroll" + SYNTHETICSMOBILESTEPTYPE_SCROLLTOELEMENT SyntheticsMobileStepType = "scrollToElement" + SYNTHETICSMOBILESTEPTYPE_TAP SyntheticsMobileStepType = "tap" + SYNTHETICSMOBILESTEPTYPE_TOGGLEWIFI SyntheticsMobileStepType = "toggleWiFi" + SYNTHETICSMOBILESTEPTYPE_TYPETEXT SyntheticsMobileStepType = "typeText" + SYNTHETICSMOBILESTEPTYPE_WAIT SyntheticsMobileStepType = "wait" +) + +var allowedSyntheticsMobileStepTypeEnumValues = []SyntheticsMobileStepType{ + SYNTHETICSMOBILESTEPTYPE_ASSERTELEMENTCONTENT, + SYNTHETICSMOBILESTEPTYPE_ASSERTSCREENCONTAINS, + SYNTHETICSMOBILESTEPTYPE_ASSERTSCREENLACKS, + SYNTHETICSMOBILESTEPTYPE_DOUBLETAP, + SYNTHETICSMOBILESTEPTYPE_EXTRACTVARIABLE, + SYNTHETICSMOBILESTEPTYPE_FLICK, + SYNTHETICSMOBILESTEPTYPE_OPENDEEPLINK, + SYNTHETICSMOBILESTEPTYPE_PLAYSUBTEST, + SYNTHETICSMOBILESTEPTYPE_PRESSBACK, + SYNTHETICSMOBILESTEPTYPE_RESTARTAPPLICATION, + SYNTHETICSMOBILESTEPTYPE_ROTATE, + SYNTHETICSMOBILESTEPTYPE_SCROLL, + SYNTHETICSMOBILESTEPTYPE_SCROLLTOELEMENT, + SYNTHETICSMOBILESTEPTYPE_TAP, + SYNTHETICSMOBILESTEPTYPE_TOGGLEWIFI, + SYNTHETICSMOBILESTEPTYPE_TYPETEXT, + SYNTHETICSMOBILESTEPTYPE_WAIT, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileStepType) GetAllowedValues() []SyntheticsMobileStepType { + return allowedSyntheticsMobileStepTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileStepType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileStepType(value) + return nil +} + +// NewSyntheticsMobileStepTypeFromValue returns a pointer to a valid SyntheticsMobileStepType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileStepTypeFromValue(v string) (*SyntheticsMobileStepType, error) { + ev := SyntheticsMobileStepType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileStepType: valid values are %v", v, allowedSyntheticsMobileStepTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileStepType) IsValid() bool { + for _, existing := range allowedSyntheticsMobileStepTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileStepType value. +func (v SyntheticsMobileStepType) Ptr() *SyntheticsMobileStepType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_.go new file mode 100644 index 0000000000..d049016bed --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_.go @@ -0,0 +1,465 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTest Object containing details about a Synthetic mobile test. +type SyntheticsMobileTest struct { + // Configuration object for a Synthetic mobile test. + Config SyntheticsMobileTestConfig `json:"config"` + // The `SyntheticsMobileTest` `device_ids`. + DeviceIds []SyntheticsMobileDeviceID `json:"device_ids,omitempty"` + // Notification message associated with the test. + Message *string `json:"message,omitempty"` + // The associated monitor ID. + MonitorId *int64 `json:"monitor_id,omitempty"` + // Name of the test. + Name string `json:"name"` + // Object describing the extra options for a Synthetic test. + Options SyntheticsMobileTestOptions `json:"options"` + // The public ID of the test. + PublicId *string `json:"public_id,omitempty"` + // Define whether you want to start (`live`) or pause (`paused`) a + // Synthetic test. + Status *SyntheticsTestPauseStatus `json:"status,omitempty"` + // Array of steps for the test. + Steps []SyntheticsMobileStep `json:"steps,omitempty"` + // Array of tags attached to the test. + Tags []string `json:"tags,omitempty"` + // Type of the Synthetic test, `mobile`. + Type SyntheticsMobileTestType `json:"type"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTest instantiates a new SyntheticsMobileTest object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTest(config SyntheticsMobileTestConfig, name string, options SyntheticsMobileTestOptions, typeVar SyntheticsMobileTestType) *SyntheticsMobileTest { + this := SyntheticsMobileTest{} + this.Config = config + this.Name = name + this.Options = options + this.Type = typeVar + return &this +} + +// NewSyntheticsMobileTestWithDefaults instantiates a new SyntheticsMobileTest object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestWithDefaults() *SyntheticsMobileTest { + this := SyntheticsMobileTest{} + var typeVar SyntheticsMobileTestType = SYNTHETICSMOBILETESTTYPE_MOBILE + this.Type = typeVar + return &this +} + +// GetConfig returns the Config field value. +func (o *SyntheticsMobileTest) GetConfig() SyntheticsMobileTestConfig { + if o == nil { + var ret SyntheticsMobileTestConfig + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetConfigOk() (*SyntheticsMobileTestConfig, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value. +func (o *SyntheticsMobileTest) SetConfig(v SyntheticsMobileTestConfig) { + o.Config = v +} + +// GetDeviceIds returns the DeviceIds field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetDeviceIds() []SyntheticsMobileDeviceID { + if o == nil || o.DeviceIds == nil { + var ret []SyntheticsMobileDeviceID + return ret + } + return o.DeviceIds +} + +// GetDeviceIdsOk returns a tuple with the DeviceIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetDeviceIdsOk() (*[]SyntheticsMobileDeviceID, bool) { + if o == nil || o.DeviceIds == nil { + return nil, false + } + return &o.DeviceIds, true +} + +// HasDeviceIds returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasDeviceIds() bool { + return o != nil && o.DeviceIds != nil +} + +// SetDeviceIds gets a reference to the given []SyntheticsMobileDeviceID and assigns it to the DeviceIds field. +func (o *SyntheticsMobileTest) SetDeviceIds(v []SyntheticsMobileDeviceID) { + o.DeviceIds = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasMessage() bool { + return o != nil && o.Message != nil +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *SyntheticsMobileTest) SetMessage(v string) { + o.Message = &v +} + +// GetMonitorId returns the MonitorId field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetMonitorId() int64 { + if o == nil || o.MonitorId == nil { + var ret int64 + return ret + } + return *o.MonitorId +} + +// GetMonitorIdOk returns a tuple with the MonitorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetMonitorIdOk() (*int64, bool) { + if o == nil || o.MonitorId == nil { + return nil, false + } + return o.MonitorId, true +} + +// HasMonitorId returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasMonitorId() bool { + return o != nil && o.MonitorId != nil +} + +// SetMonitorId gets a reference to the given int64 and assigns it to the MonitorId field. +func (o *SyntheticsMobileTest) SetMonitorId(v int64) { + o.MonitorId = &v +} + +// GetName returns the Name field value. +func (o *SyntheticsMobileTest) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *SyntheticsMobileTest) SetName(v string) { + o.Name = v +} + +// GetOptions returns the Options field value. +func (o *SyntheticsMobileTest) GetOptions() SyntheticsMobileTestOptions { + if o == nil { + var ret SyntheticsMobileTestOptions + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetOptionsOk() (*SyntheticsMobileTestOptions, bool) { + if o == nil { + return nil, false + } + return &o.Options, true +} + +// SetOptions sets field value. +func (o *SyntheticsMobileTest) SetOptions(v SyntheticsMobileTestOptions) { + o.Options = v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasPublicId() bool { + return o != nil && o.PublicId != nil +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *SyntheticsMobileTest) SetPublicId(v string) { + o.PublicId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetStatus() SyntheticsTestPauseStatus { + if o == nil || o.Status == nil { + var ret SyntheticsTestPauseStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetStatusOk() (*SyntheticsTestPauseStatus, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasStatus() bool { + return o != nil && o.Status != nil +} + +// SetStatus gets a reference to the given SyntheticsTestPauseStatus and assigns it to the Status field. +func (o *SyntheticsMobileTest) SetStatus(v SyntheticsTestPauseStatus) { + o.Status = &v +} + +// GetSteps returns the Steps field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetSteps() []SyntheticsMobileStep { + if o == nil || o.Steps == nil { + var ret []SyntheticsMobileStep + return ret + } + return o.Steps +} + +// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetStepsOk() (*[]SyntheticsMobileStep, bool) { + if o == nil || o.Steps == nil { + return nil, false + } + return &o.Steps, true +} + +// HasSteps returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasSteps() bool { + return o != nil && o.Steps != nil +} + +// SetSteps gets a reference to the given []SyntheticsMobileStep and assigns it to the Steps field. +func (o *SyntheticsMobileTest) SetSteps(v []SyntheticsMobileStep) { + o.Steps = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return &o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasTags() bool { + return o != nil && o.Tags != nil +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *SyntheticsMobileTest) SetTags(v []string) { + o.Tags = v +} + +// GetType returns the Type field value. +func (o *SyntheticsMobileTest) GetType() SyntheticsMobileTestType { + if o == nil { + var ret SyntheticsMobileTestType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetTypeOk() (*SyntheticsMobileTestType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *SyntheticsMobileTest) SetType(v SyntheticsMobileTestType) { + o.Type = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["config"] = o.Config + if o.DeviceIds != nil { + toSerialize["device_ids"] = o.DeviceIds + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if o.MonitorId != nil { + toSerialize["monitor_id"] = o.MonitorId + } + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Steps != nil { + toSerialize["steps"] = o.Steps + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Config *SyntheticsMobileTestConfig `json:"config"` + DeviceIds []SyntheticsMobileDeviceID `json:"device_ids,omitempty"` + Message *string `json:"message,omitempty"` + MonitorId *int64 `json:"monitor_id,omitempty"` + Name *string `json:"name"` + Options *SyntheticsMobileTestOptions `json:"options"` + PublicId *string `json:"public_id,omitempty"` + Status *SyntheticsTestPauseStatus `json:"status,omitempty"` + Steps []SyntheticsMobileStep `json:"steps,omitempty"` + Tags []string `json:"tags,omitempty"` + Type *SyntheticsMobileTestType `json:"type"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Config == nil { + return fmt.Errorf("required field config missing") + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + if all.Options == nil { + return fmt.Errorf("required field options missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"config", "device_ids", "message", "monitor_id", "name", "options", "public_id", "status", "steps", "tags", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Config.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Config = *all.Config + o.DeviceIds = all.DeviceIds + o.Message = all.Message + o.MonitorId = all.MonitorId + o.Name = *all.Name + if all.Options.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Options = *all.Options + o.PublicId = all.PublicId + if all.Status != nil && !all.Status.IsValid() { + hasInvalidField = true + } else { + o.Status = all.Status + } + o.Steps = all.Steps + o.Tags = all.Tags + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding.go new file mode 100644 index 0000000000..dd2e3032dd --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestBinding Objects describing the binding used for a mobile test. +type SyntheticsMobileTestBinding struct { + // Object describing the binding used for a mobile test. + Items *SyntheticsMobileTestBindingItems `json:"items,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestBinding instantiates a new SyntheticsMobileTestBinding object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestBinding() *SyntheticsMobileTestBinding { + this := SyntheticsMobileTestBinding{} + return &this +} + +// NewSyntheticsMobileTestBindingWithDefaults instantiates a new SyntheticsMobileTestBinding object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestBindingWithDefaults() *SyntheticsMobileTestBinding { + this := SyntheticsMobileTestBinding{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *SyntheticsMobileTestBinding) GetItems() SyntheticsMobileTestBindingItems { + if o == nil || o.Items == nil { + var ret SyntheticsMobileTestBindingItems + return ret + } + return *o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestBinding) GetItemsOk() (*SyntheticsMobileTestBindingItems, bool) { + if o == nil || o.Items == nil { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *SyntheticsMobileTestBinding) HasItems() bool { + return o != nil && o.Items != nil +} + +// SetItems gets a reference to the given SyntheticsMobileTestBindingItems and assigns it to the Items field. +func (o *SyntheticsMobileTestBinding) SetItems(v SyntheticsMobileTestBindingItems) { + o.Items = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestBinding) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Items != nil { + toSerialize["items"] = o.Items + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestBinding) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Items *SyntheticsMobileTestBindingItems `json:"items,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"items"}) + } else { + return err + } + + hasInvalidField := false + if all.Items != nil && all.Items.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Items = all.Items + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding_items.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding_items.go new file mode 100644 index 0000000000..ea531e2386 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding_items.go @@ -0,0 +1,147 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestBindingItems Object describing the binding used for a mobile test. +type SyntheticsMobileTestBindingItems struct { + // List of principals for a mobile test binding. + Principals []string `json:"principals,omitempty"` + // The definition of `SyntheticsMobileTestBindingItemsRole` object. + Role *SyntheticsMobileTestBindingItemsRole `json:"role,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestBindingItems instantiates a new SyntheticsMobileTestBindingItems object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestBindingItems() *SyntheticsMobileTestBindingItems { + this := SyntheticsMobileTestBindingItems{} + return &this +} + +// NewSyntheticsMobileTestBindingItemsWithDefaults instantiates a new SyntheticsMobileTestBindingItems object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestBindingItemsWithDefaults() *SyntheticsMobileTestBindingItems { + this := SyntheticsMobileTestBindingItems{} + return &this +} + +// GetPrincipals returns the Principals field value if set, zero value otherwise. +func (o *SyntheticsMobileTestBindingItems) GetPrincipals() []string { + if o == nil || o.Principals == nil { + var ret []string + return ret + } + return o.Principals +} + +// GetPrincipalsOk returns a tuple with the Principals field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestBindingItems) GetPrincipalsOk() (*[]string, bool) { + if o == nil || o.Principals == nil { + return nil, false + } + return &o.Principals, true +} + +// HasPrincipals returns a boolean if a field has been set. +func (o *SyntheticsMobileTestBindingItems) HasPrincipals() bool { + return o != nil && o.Principals != nil +} + +// SetPrincipals gets a reference to the given []string and assigns it to the Principals field. +func (o *SyntheticsMobileTestBindingItems) SetPrincipals(v []string) { + o.Principals = v +} + +// GetRole returns the Role field value if set, zero value otherwise. +func (o *SyntheticsMobileTestBindingItems) GetRole() SyntheticsMobileTestBindingItemsRole { + if o == nil || o.Role == nil { + var ret SyntheticsMobileTestBindingItemsRole + return ret + } + return *o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestBindingItems) GetRoleOk() (*SyntheticsMobileTestBindingItemsRole, bool) { + if o == nil || o.Role == nil { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *SyntheticsMobileTestBindingItems) HasRole() bool { + return o != nil && o.Role != nil +} + +// SetRole gets a reference to the given SyntheticsMobileTestBindingItemsRole and assigns it to the Role field. +func (o *SyntheticsMobileTestBindingItems) SetRole(v SyntheticsMobileTestBindingItemsRole) { + o.Role = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestBindingItems) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Principals != nil { + toSerialize["principals"] = o.Principals + } + if o.Role != nil { + toSerialize["role"] = o.Role + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestBindingItems) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Principals []string `json:"principals,omitempty"` + Role *SyntheticsMobileTestBindingItemsRole `json:"role,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"principals", "role"}) + } else { + return err + } + + hasInvalidField := false + o.Principals = all.Principals + if all.Role != nil && !all.Role.IsValid() { + hasInvalidField = true + } else { + o.Role = all.Role + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding_items_role.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding_items_role.go new file mode 100644 index 0000000000..e32f120c02 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_binding_items_role.go @@ -0,0 +1,66 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestBindingItemsRole The definition of `SyntheticsMobileTestBindingItemsRole` object. +type SyntheticsMobileTestBindingItemsRole string + +// List of SyntheticsMobileTestBindingItemsRole. +const ( + SYNTHETICSMOBILETESTBINDINGITEMSROLE_EDITOR SyntheticsMobileTestBindingItemsRole = "editor" + SYNTHETICSMOBILETESTBINDINGITEMSROLE_VIEWER SyntheticsMobileTestBindingItemsRole = "viewer" +) + +var allowedSyntheticsMobileTestBindingItemsRoleEnumValues = []SyntheticsMobileTestBindingItemsRole{ + SYNTHETICSMOBILETESTBINDINGITEMSROLE_EDITOR, + SYNTHETICSMOBILETESTBINDINGITEMSROLE_VIEWER, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileTestBindingItemsRole) GetAllowedValues() []SyntheticsMobileTestBindingItemsRole { + return allowedSyntheticsMobileTestBindingItemsRoleEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileTestBindingItemsRole) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileTestBindingItemsRole(value) + return nil +} + +// NewSyntheticsMobileTestBindingItemsRoleFromValue returns a pointer to a valid SyntheticsMobileTestBindingItemsRole +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileTestBindingItemsRoleFromValue(v string) (*SyntheticsMobileTestBindingItemsRole, error) { + ev := SyntheticsMobileTestBindingItemsRole(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileTestBindingItemsRole: valid values are %v", v, allowedSyntheticsMobileTestBindingItemsRoleEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileTestBindingItemsRole) IsValid() bool { + for _, existing := range allowedSyntheticsMobileTestBindingItemsRoleEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileTestBindingItemsRole value. +func (v SyntheticsMobileTestBindingItemsRole) Ptr() *SyntheticsMobileTestBindingItemsRole { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_ci_options.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_ci_options.go new file mode 100644 index 0000000000..ee68fe3bd5 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_ci_options.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestCiOptions CI/CD options for a Synthetic test. +type SyntheticsMobileTestCiOptions struct { + // Execution rule for a Synthetic test. + ExecutionRule SyntheticsTestExecutionRule `json:"executionRule"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestCiOptions instantiates a new SyntheticsMobileTestCiOptions object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestCiOptions(executionRule SyntheticsTestExecutionRule) *SyntheticsMobileTestCiOptions { + this := SyntheticsMobileTestCiOptions{} + this.ExecutionRule = executionRule + return &this +} + +// NewSyntheticsMobileTestCiOptionsWithDefaults instantiates a new SyntheticsMobileTestCiOptions object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestCiOptionsWithDefaults() *SyntheticsMobileTestCiOptions { + this := SyntheticsMobileTestCiOptions{} + return &this +} + +// GetExecutionRule returns the ExecutionRule field value. +func (o *SyntheticsMobileTestCiOptions) GetExecutionRule() SyntheticsTestExecutionRule { + if o == nil { + var ret SyntheticsTestExecutionRule + return ret + } + return o.ExecutionRule +} + +// GetExecutionRuleOk returns a tuple with the ExecutionRule field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestCiOptions) GetExecutionRuleOk() (*SyntheticsTestExecutionRule, bool) { + if o == nil { + return nil, false + } + return &o.ExecutionRule, true +} + +// SetExecutionRule sets field value. +func (o *SyntheticsMobileTestCiOptions) SetExecutionRule(v SyntheticsTestExecutionRule) { + o.ExecutionRule = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestCiOptions) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["executionRule"] = o.ExecutionRule + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestCiOptions) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ExecutionRule *SyntheticsTestExecutionRule `json:"executionRule"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.ExecutionRule == nil { + return fmt.Errorf("required field executionRule missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"executionRule"}) + } else { + return err + } + + hasInvalidField := false + if !all.ExecutionRule.IsValid() { + hasInvalidField = true + } else { + o.ExecutionRule = *all.ExecutionRule + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_config.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_config.go new file mode 100644 index 0000000000..806db6c379 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_config.go @@ -0,0 +1,146 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestConfig Configuration object for a Synthetic mobile test. +type SyntheticsMobileTestConfig struct { + // Initial application arguments for a mobile test. + InitialApplicationArguments *SyntheticsMobileTestInitialApplicationArguments `json:"initialApplicationArguments,omitempty"` + // Array of variables used for the test steps. + Variables []SyntheticsConfigVariable `json:"variables,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestConfig instantiates a new SyntheticsMobileTestConfig object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestConfig() *SyntheticsMobileTestConfig { + this := SyntheticsMobileTestConfig{} + return &this +} + +// NewSyntheticsMobileTestConfigWithDefaults instantiates a new SyntheticsMobileTestConfig object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestConfigWithDefaults() *SyntheticsMobileTestConfig { + this := SyntheticsMobileTestConfig{} + return &this +} + +// GetInitialApplicationArguments returns the InitialApplicationArguments field value if set, zero value otherwise. +func (o *SyntheticsMobileTestConfig) GetInitialApplicationArguments() SyntheticsMobileTestInitialApplicationArguments { + if o == nil || o.InitialApplicationArguments == nil { + var ret SyntheticsMobileTestInitialApplicationArguments + return ret + } + return *o.InitialApplicationArguments +} + +// GetInitialApplicationArgumentsOk returns a tuple with the InitialApplicationArguments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestConfig) GetInitialApplicationArgumentsOk() (*SyntheticsMobileTestInitialApplicationArguments, bool) { + if o == nil || o.InitialApplicationArguments == nil { + return nil, false + } + return o.InitialApplicationArguments, true +} + +// HasInitialApplicationArguments returns a boolean if a field has been set. +func (o *SyntheticsMobileTestConfig) HasInitialApplicationArguments() bool { + return o != nil && o.InitialApplicationArguments != nil +} + +// SetInitialApplicationArguments gets a reference to the given SyntheticsMobileTestInitialApplicationArguments and assigns it to the InitialApplicationArguments field. +func (o *SyntheticsMobileTestConfig) SetInitialApplicationArguments(v SyntheticsMobileTestInitialApplicationArguments) { + o.InitialApplicationArguments = &v +} + +// GetVariables returns the Variables field value if set, zero value otherwise. +func (o *SyntheticsMobileTestConfig) GetVariables() []SyntheticsConfigVariable { + if o == nil || o.Variables == nil { + var ret []SyntheticsConfigVariable + return ret + } + return o.Variables +} + +// GetVariablesOk returns a tuple with the Variables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestConfig) GetVariablesOk() (*[]SyntheticsConfigVariable, bool) { + if o == nil || o.Variables == nil { + return nil, false + } + return &o.Variables, true +} + +// HasVariables returns a boolean if a field has been set. +func (o *SyntheticsMobileTestConfig) HasVariables() bool { + return o != nil && o.Variables != nil +} + +// SetVariables gets a reference to the given []SyntheticsConfigVariable and assigns it to the Variables field. +func (o *SyntheticsMobileTestConfig) SetVariables(v []SyntheticsConfigVariable) { + o.Variables = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestConfig) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.InitialApplicationArguments != nil { + toSerialize["initialApplicationArguments"] = o.InitialApplicationArguments + } + if o.Variables != nil { + toSerialize["variables"] = o.Variables + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestConfig) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + InitialApplicationArguments *SyntheticsMobileTestInitialApplicationArguments `json:"initialApplicationArguments,omitempty"` + Variables []SyntheticsConfigVariable `json:"variables,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"initialApplicationArguments", "variables"}) + } else { + return err + } + + hasInvalidField := false + if all.InitialApplicationArguments != nil && all.InitialApplicationArguments.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.InitialApplicationArguments = all.InitialApplicationArguments + o.Variables = all.Variables + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments.go new file mode 100644 index 0000000000..c6997606eb --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestInitialApplicationArguments Initial application arguments for a mobile test. +type SyntheticsMobileTestInitialApplicationArguments struct { + // Name of the property. + PropertyNames *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames `json:"propertyNames,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestInitialApplicationArguments instantiates a new SyntheticsMobileTestInitialApplicationArguments object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestInitialApplicationArguments() *SyntheticsMobileTestInitialApplicationArguments { + this := SyntheticsMobileTestInitialApplicationArguments{} + return &this +} + +// NewSyntheticsMobileTestInitialApplicationArgumentsWithDefaults instantiates a new SyntheticsMobileTestInitialApplicationArguments object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestInitialApplicationArgumentsWithDefaults() *SyntheticsMobileTestInitialApplicationArguments { + this := SyntheticsMobileTestInitialApplicationArguments{} + return &this +} + +// GetPropertyNames returns the PropertyNames field value if set, zero value otherwise. +func (o *SyntheticsMobileTestInitialApplicationArguments) GetPropertyNames() SyntheticsMobileTestInitialApplicationArgumentsPropertyNames { + if o == nil || o.PropertyNames == nil { + var ret SyntheticsMobileTestInitialApplicationArgumentsPropertyNames + return ret + } + return *o.PropertyNames +} + +// GetPropertyNamesOk returns a tuple with the PropertyNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestInitialApplicationArguments) GetPropertyNamesOk() (*SyntheticsMobileTestInitialApplicationArgumentsPropertyNames, bool) { + if o == nil || o.PropertyNames == nil { + return nil, false + } + return o.PropertyNames, true +} + +// HasPropertyNames returns a boolean if a field has been set. +func (o *SyntheticsMobileTestInitialApplicationArguments) HasPropertyNames() bool { + return o != nil && o.PropertyNames != nil +} + +// SetPropertyNames gets a reference to the given SyntheticsMobileTestInitialApplicationArgumentsPropertyNames and assigns it to the PropertyNames field. +func (o *SyntheticsMobileTestInitialApplicationArguments) SetPropertyNames(v SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) { + o.PropertyNames = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestInitialApplicationArguments) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.PropertyNames != nil { + toSerialize["propertyNames"] = o.PropertyNames + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestInitialApplicationArguments) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + PropertyNames *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames `json:"propertyNames,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"propertyNames"}) + } else { + return err + } + + hasInvalidField := false + if all.PropertyNames != nil && all.PropertyNames.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.PropertyNames = all.PropertyNames + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments_property_names.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments_property_names.go new file mode 100644 index 0000000000..52bc1b8a89 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments_property_names.go @@ -0,0 +1,102 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestInitialApplicationArgumentsPropertyNames Name of the property. +type SyntheticsMobileTestInitialApplicationArgumentsPropertyNames struct { + // The `propertyNames` `pattern`. + Pattern *string `json:"pattern,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestInitialApplicationArgumentsPropertyNames instantiates a new SyntheticsMobileTestInitialApplicationArgumentsPropertyNames object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestInitialApplicationArgumentsPropertyNames() *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames { + this := SyntheticsMobileTestInitialApplicationArgumentsPropertyNames{} + return &this +} + +// NewSyntheticsMobileTestInitialApplicationArgumentsPropertyNamesWithDefaults instantiates a new SyntheticsMobileTestInitialApplicationArgumentsPropertyNames object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestInitialApplicationArgumentsPropertyNamesWithDefaults() *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames { + this := SyntheticsMobileTestInitialApplicationArgumentsPropertyNames{} + return &this +} + +// GetPattern returns the Pattern field value if set, zero value otherwise. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) GetPattern() string { + if o == nil || o.Pattern == nil { + var ret string + return ret + } + return *o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) GetPatternOk() (*string, bool) { + if o == nil || o.Pattern == nil { + return nil, false + } + return o.Pattern, true +} + +// HasPattern returns a boolean if a field has been set. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) HasPattern() bool { + return o != nil && o.Pattern != nil +} + +// SetPattern gets a reference to the given string and assigns it to the Pattern field. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) SetPattern(v string) { + o.Pattern = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Pattern != nil { + toSerialize["pattern"] = o.Pattern + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Pattern *string `json:"pattern,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"pattern"}) + } else { + return err + } + o.Pattern = all.Pattern + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options.go new file mode 100644 index 0000000000..e8ce9751c5 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options.go @@ -0,0 +1,684 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestOptions Object describing the extra options for a Synthetic test. +type SyntheticsMobileTestOptions struct { + // The `SyntheticsMobileTestOptions` `allowApplicationCrash`. + AllowApplicationCrash *bool `json:"allowApplicationCrash,omitempty"` + // Array of bindings used for the mobile test. + Bindings []SyntheticsMobileTestBinding `json:"bindings,omitempty"` + // CI/CD options for a Synthetic test. + Ci *SyntheticsMobileTestCiOptions `json:"ci,omitempty"` + // The `SyntheticsMobileTestOptions` `defaultStepTimeout`. + DefaultStepTimeout *int32 `json:"defaultStepTimeout,omitempty"` + // For mobile test, array with the different device IDs used to run the test. + DeviceIds []SyntheticsMobileDeviceID `json:"device_ids,omitempty"` + // The `SyntheticsMobileTestOptions` `disableAutoAcceptAlert`. + DisableAutoAcceptAlert *bool `json:"disableAutoAcceptAlert,omitempty"` + // Minimum amount of time in failure required to trigger an alert. + MinFailureDuration *int64 `json:"min_failure_duration,omitempty"` + // Mobile application for mobile synthetics test. + MobileApplication *SyntheticsMobileTestsMobileApplication `json:"mobileApplication,omitempty"` + // The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs. + MonitorName *string `json:"monitor_name,omitempty"` + // Object containing the options for a mobile Synthetic test as a monitor + // (for example, renotification). + MonitorOptions *SyntheticsMobileTestOptionsMonitorOptions `json:"monitor_options,omitempty"` + // Integer from 1 (high) to 5 (low) indicating alert severity. + MonitorPriority *int32 `json:"monitor_priority,omitempty"` + // The `SyntheticsMobileTestOptions` `noScreenshot`. + NoScreenshot *bool `json:"noScreenshot,omitempty"` + // A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + RestrictedRoles []string `json:"restricted_roles,omitempty"` + // Object describing the retry strategy to apply to a Synthetic test. + Retry *SyntheticsTestOptionsRetry `json:"retry,omitempty"` + // Object containing timeframes and timezone used for advanced scheduling. + Scheduling *SyntheticsTestOptionsScheduling `json:"scheduling,omitempty"` + // The frequency at which to run the Synthetic test (in seconds). + TickEvery *int64 `json:"tick_every,omitempty"` + // The `SyntheticsMobileTestOptions` `verbosity`. + Verbosity *int32 `json:"verbosity,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestOptions instantiates a new SyntheticsMobileTestOptions object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestOptions() *SyntheticsMobileTestOptions { + this := SyntheticsMobileTestOptions{} + return &this +} + +// NewSyntheticsMobileTestOptionsWithDefaults instantiates a new SyntheticsMobileTestOptions object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestOptionsWithDefaults() *SyntheticsMobileTestOptions { + this := SyntheticsMobileTestOptions{} + return &this +} + +// GetAllowApplicationCrash returns the AllowApplicationCrash field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetAllowApplicationCrash() bool { + if o == nil || o.AllowApplicationCrash == nil { + var ret bool + return ret + } + return *o.AllowApplicationCrash +} + +// GetAllowApplicationCrashOk returns a tuple with the AllowApplicationCrash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetAllowApplicationCrashOk() (*bool, bool) { + if o == nil || o.AllowApplicationCrash == nil { + return nil, false + } + return o.AllowApplicationCrash, true +} + +// HasAllowApplicationCrash returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasAllowApplicationCrash() bool { + return o != nil && o.AllowApplicationCrash != nil +} + +// SetAllowApplicationCrash gets a reference to the given bool and assigns it to the AllowApplicationCrash field. +func (o *SyntheticsMobileTestOptions) SetAllowApplicationCrash(v bool) { + o.AllowApplicationCrash = &v +} + +// GetBindings returns the Bindings field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetBindings() []SyntheticsMobileTestBinding { + if o == nil || o.Bindings == nil { + var ret []SyntheticsMobileTestBinding + return ret + } + return o.Bindings +} + +// GetBindingsOk returns a tuple with the Bindings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetBindingsOk() (*[]SyntheticsMobileTestBinding, bool) { + if o == nil || o.Bindings == nil { + return nil, false + } + return &o.Bindings, true +} + +// HasBindings returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasBindings() bool { + return o != nil && o.Bindings != nil +} + +// SetBindings gets a reference to the given []SyntheticsMobileTestBinding and assigns it to the Bindings field. +func (o *SyntheticsMobileTestOptions) SetBindings(v []SyntheticsMobileTestBinding) { + o.Bindings = v +} + +// GetCi returns the Ci field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetCi() SyntheticsMobileTestCiOptions { + if o == nil || o.Ci == nil { + var ret SyntheticsMobileTestCiOptions + return ret + } + return *o.Ci +} + +// GetCiOk returns a tuple with the Ci field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetCiOk() (*SyntheticsMobileTestCiOptions, bool) { + if o == nil || o.Ci == nil { + return nil, false + } + return o.Ci, true +} + +// HasCi returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasCi() bool { + return o != nil && o.Ci != nil +} + +// SetCi gets a reference to the given SyntheticsMobileTestCiOptions and assigns it to the Ci field. +func (o *SyntheticsMobileTestOptions) SetCi(v SyntheticsMobileTestCiOptions) { + o.Ci = &v +} + +// GetDefaultStepTimeout returns the DefaultStepTimeout field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetDefaultStepTimeout() int32 { + if o == nil || o.DefaultStepTimeout == nil { + var ret int32 + return ret + } + return *o.DefaultStepTimeout +} + +// GetDefaultStepTimeoutOk returns a tuple with the DefaultStepTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetDefaultStepTimeoutOk() (*int32, bool) { + if o == nil || o.DefaultStepTimeout == nil { + return nil, false + } + return o.DefaultStepTimeout, true +} + +// HasDefaultStepTimeout returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasDefaultStepTimeout() bool { + return o != nil && o.DefaultStepTimeout != nil +} + +// SetDefaultStepTimeout gets a reference to the given int32 and assigns it to the DefaultStepTimeout field. +func (o *SyntheticsMobileTestOptions) SetDefaultStepTimeout(v int32) { + o.DefaultStepTimeout = &v +} + +// GetDeviceIds returns the DeviceIds field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetDeviceIds() []SyntheticsMobileDeviceID { + if o == nil || o.DeviceIds == nil { + var ret []SyntheticsMobileDeviceID + return ret + } + return o.DeviceIds +} + +// GetDeviceIdsOk returns a tuple with the DeviceIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetDeviceIdsOk() (*[]SyntheticsMobileDeviceID, bool) { + if o == nil || o.DeviceIds == nil { + return nil, false + } + return &o.DeviceIds, true +} + +// HasDeviceIds returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasDeviceIds() bool { + return o != nil && o.DeviceIds != nil +} + +// SetDeviceIds gets a reference to the given []SyntheticsMobileDeviceID and assigns it to the DeviceIds field. +func (o *SyntheticsMobileTestOptions) SetDeviceIds(v []SyntheticsMobileDeviceID) { + o.DeviceIds = v +} + +// GetDisableAutoAcceptAlert returns the DisableAutoAcceptAlert field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetDisableAutoAcceptAlert() bool { + if o == nil || o.DisableAutoAcceptAlert == nil { + var ret bool + return ret + } + return *o.DisableAutoAcceptAlert +} + +// GetDisableAutoAcceptAlertOk returns a tuple with the DisableAutoAcceptAlert field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetDisableAutoAcceptAlertOk() (*bool, bool) { + if o == nil || o.DisableAutoAcceptAlert == nil { + return nil, false + } + return o.DisableAutoAcceptAlert, true +} + +// HasDisableAutoAcceptAlert returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasDisableAutoAcceptAlert() bool { + return o != nil && o.DisableAutoAcceptAlert != nil +} + +// SetDisableAutoAcceptAlert gets a reference to the given bool and assigns it to the DisableAutoAcceptAlert field. +func (o *SyntheticsMobileTestOptions) SetDisableAutoAcceptAlert(v bool) { + o.DisableAutoAcceptAlert = &v +} + +// GetMinFailureDuration returns the MinFailureDuration field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMinFailureDuration() int64 { + if o == nil || o.MinFailureDuration == nil { + var ret int64 + return ret + } + return *o.MinFailureDuration +} + +// GetMinFailureDurationOk returns a tuple with the MinFailureDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMinFailureDurationOk() (*int64, bool) { + if o == nil || o.MinFailureDuration == nil { + return nil, false + } + return o.MinFailureDuration, true +} + +// HasMinFailureDuration returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMinFailureDuration() bool { + return o != nil && o.MinFailureDuration != nil +} + +// SetMinFailureDuration gets a reference to the given int64 and assigns it to the MinFailureDuration field. +func (o *SyntheticsMobileTestOptions) SetMinFailureDuration(v int64) { + o.MinFailureDuration = &v +} + +// GetMobileApplication returns the MobileApplication field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMobileApplication() SyntheticsMobileTestsMobileApplication { + if o == nil || o.MobileApplication == nil { + var ret SyntheticsMobileTestsMobileApplication + return ret + } + return *o.MobileApplication +} + +// GetMobileApplicationOk returns a tuple with the MobileApplication field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMobileApplicationOk() (*SyntheticsMobileTestsMobileApplication, bool) { + if o == nil || o.MobileApplication == nil { + return nil, false + } + return o.MobileApplication, true +} + +// HasMobileApplication returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMobileApplication() bool { + return o != nil && o.MobileApplication != nil +} + +// SetMobileApplication gets a reference to the given SyntheticsMobileTestsMobileApplication and assigns it to the MobileApplication field. +func (o *SyntheticsMobileTestOptions) SetMobileApplication(v SyntheticsMobileTestsMobileApplication) { + o.MobileApplication = &v +} + +// GetMonitorName returns the MonitorName field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMonitorName() string { + if o == nil || o.MonitorName == nil { + var ret string + return ret + } + return *o.MonitorName +} + +// GetMonitorNameOk returns a tuple with the MonitorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMonitorNameOk() (*string, bool) { + if o == nil || o.MonitorName == nil { + return nil, false + } + return o.MonitorName, true +} + +// HasMonitorName returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMonitorName() bool { + return o != nil && o.MonitorName != nil +} + +// SetMonitorName gets a reference to the given string and assigns it to the MonitorName field. +func (o *SyntheticsMobileTestOptions) SetMonitorName(v string) { + o.MonitorName = &v +} + +// GetMonitorOptions returns the MonitorOptions field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMonitorOptions() SyntheticsMobileTestOptionsMonitorOptions { + if o == nil || o.MonitorOptions == nil { + var ret SyntheticsMobileTestOptionsMonitorOptions + return ret + } + return *o.MonitorOptions +} + +// GetMonitorOptionsOk returns a tuple with the MonitorOptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMonitorOptionsOk() (*SyntheticsMobileTestOptionsMonitorOptions, bool) { + if o == nil || o.MonitorOptions == nil { + return nil, false + } + return o.MonitorOptions, true +} + +// HasMonitorOptions returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMonitorOptions() bool { + return o != nil && o.MonitorOptions != nil +} + +// SetMonitorOptions gets a reference to the given SyntheticsMobileTestOptionsMonitorOptions and assigns it to the MonitorOptions field. +func (o *SyntheticsMobileTestOptions) SetMonitorOptions(v SyntheticsMobileTestOptionsMonitorOptions) { + o.MonitorOptions = &v +} + +// GetMonitorPriority returns the MonitorPriority field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMonitorPriority() int32 { + if o == nil || o.MonitorPriority == nil { + var ret int32 + return ret + } + return *o.MonitorPriority +} + +// GetMonitorPriorityOk returns a tuple with the MonitorPriority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMonitorPriorityOk() (*int32, bool) { + if o == nil || o.MonitorPriority == nil { + return nil, false + } + return o.MonitorPriority, true +} + +// HasMonitorPriority returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMonitorPriority() bool { + return o != nil && o.MonitorPriority != nil +} + +// SetMonitorPriority gets a reference to the given int32 and assigns it to the MonitorPriority field. +func (o *SyntheticsMobileTestOptions) SetMonitorPriority(v int32) { + o.MonitorPriority = &v +} + +// GetNoScreenshot returns the NoScreenshot field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetNoScreenshot() bool { + if o == nil || o.NoScreenshot == nil { + var ret bool + return ret + } + return *o.NoScreenshot +} + +// GetNoScreenshotOk returns a tuple with the NoScreenshot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetNoScreenshotOk() (*bool, bool) { + if o == nil || o.NoScreenshot == nil { + return nil, false + } + return o.NoScreenshot, true +} + +// HasNoScreenshot returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasNoScreenshot() bool { + return o != nil && o.NoScreenshot != nil +} + +// SetNoScreenshot gets a reference to the given bool and assigns it to the NoScreenshot field. +func (o *SyntheticsMobileTestOptions) SetNoScreenshot(v bool) { + o.NoScreenshot = &v +} + +// GetRestrictedRoles returns the RestrictedRoles field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetRestrictedRoles() []string { + if o == nil || o.RestrictedRoles == nil { + var ret []string + return ret + } + return o.RestrictedRoles +} + +// GetRestrictedRolesOk returns a tuple with the RestrictedRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetRestrictedRolesOk() (*[]string, bool) { + if o == nil || o.RestrictedRoles == nil { + return nil, false + } + return &o.RestrictedRoles, true +} + +// HasRestrictedRoles returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasRestrictedRoles() bool { + return o != nil && o.RestrictedRoles != nil +} + +// SetRestrictedRoles gets a reference to the given []string and assigns it to the RestrictedRoles field. +func (o *SyntheticsMobileTestOptions) SetRestrictedRoles(v []string) { + o.RestrictedRoles = v +} + +// GetRetry returns the Retry field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetRetry() SyntheticsTestOptionsRetry { + if o == nil || o.Retry == nil { + var ret SyntheticsTestOptionsRetry + return ret + } + return *o.Retry +} + +// GetRetryOk returns a tuple with the Retry field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetRetryOk() (*SyntheticsTestOptionsRetry, bool) { + if o == nil || o.Retry == nil { + return nil, false + } + return o.Retry, true +} + +// HasRetry returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasRetry() bool { + return o != nil && o.Retry != nil +} + +// SetRetry gets a reference to the given SyntheticsTestOptionsRetry and assigns it to the Retry field. +func (o *SyntheticsMobileTestOptions) SetRetry(v SyntheticsTestOptionsRetry) { + o.Retry = &v +} + +// GetScheduling returns the Scheduling field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetScheduling() SyntheticsTestOptionsScheduling { + if o == nil || o.Scheduling == nil { + var ret SyntheticsTestOptionsScheduling + return ret + } + return *o.Scheduling +} + +// GetSchedulingOk returns a tuple with the Scheduling field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetSchedulingOk() (*SyntheticsTestOptionsScheduling, bool) { + if o == nil || o.Scheduling == nil { + return nil, false + } + return o.Scheduling, true +} + +// HasScheduling returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasScheduling() bool { + return o != nil && o.Scheduling != nil +} + +// SetScheduling gets a reference to the given SyntheticsTestOptionsScheduling and assigns it to the Scheduling field. +func (o *SyntheticsMobileTestOptions) SetScheduling(v SyntheticsTestOptionsScheduling) { + o.Scheduling = &v +} + +// GetTickEvery returns the TickEvery field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetTickEvery() int64 { + if o == nil || o.TickEvery == nil { + var ret int64 + return ret + } + return *o.TickEvery +} + +// GetTickEveryOk returns a tuple with the TickEvery field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetTickEveryOk() (*int64, bool) { + if o == nil || o.TickEvery == nil { + return nil, false + } + return o.TickEvery, true +} + +// HasTickEvery returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasTickEvery() bool { + return o != nil && o.TickEvery != nil +} + +// SetTickEvery gets a reference to the given int64 and assigns it to the TickEvery field. +func (o *SyntheticsMobileTestOptions) SetTickEvery(v int64) { + o.TickEvery = &v +} + +// GetVerbosity returns the Verbosity field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetVerbosity() int32 { + if o == nil || o.Verbosity == nil { + var ret int32 + return ret + } + return *o.Verbosity +} + +// GetVerbosityOk returns a tuple with the Verbosity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetVerbosityOk() (*int32, bool) { + if o == nil || o.Verbosity == nil { + return nil, false + } + return o.Verbosity, true +} + +// HasVerbosity returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasVerbosity() bool { + return o != nil && o.Verbosity != nil +} + +// SetVerbosity gets a reference to the given int32 and assigns it to the Verbosity field. +func (o *SyntheticsMobileTestOptions) SetVerbosity(v int32) { + o.Verbosity = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestOptions) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.AllowApplicationCrash != nil { + toSerialize["allowApplicationCrash"] = o.AllowApplicationCrash + } + if o.Bindings != nil { + toSerialize["bindings"] = o.Bindings + } + if o.Ci != nil { + toSerialize["ci"] = o.Ci + } + if o.DefaultStepTimeout != nil { + toSerialize["defaultStepTimeout"] = o.DefaultStepTimeout + } + if o.DeviceIds != nil { + toSerialize["device_ids"] = o.DeviceIds + } + if o.DisableAutoAcceptAlert != nil { + toSerialize["disableAutoAcceptAlert"] = o.DisableAutoAcceptAlert + } + if o.MinFailureDuration != nil { + toSerialize["min_failure_duration"] = o.MinFailureDuration + } + if o.MobileApplication != nil { + toSerialize["mobileApplication"] = o.MobileApplication + } + if o.MonitorName != nil { + toSerialize["monitor_name"] = o.MonitorName + } + if o.MonitorOptions != nil { + toSerialize["monitor_options"] = o.MonitorOptions + } + if o.MonitorPriority != nil { + toSerialize["monitor_priority"] = o.MonitorPriority + } + if o.NoScreenshot != nil { + toSerialize["noScreenshot"] = o.NoScreenshot + } + if o.RestrictedRoles != nil { + toSerialize["restricted_roles"] = o.RestrictedRoles + } + if o.Retry != nil { + toSerialize["retry"] = o.Retry + } + if o.Scheduling != nil { + toSerialize["scheduling"] = o.Scheduling + } + if o.TickEvery != nil { + toSerialize["tick_every"] = o.TickEvery + } + if o.Verbosity != nil { + toSerialize["verbosity"] = o.Verbosity + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestOptions) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + AllowApplicationCrash *bool `json:"allowApplicationCrash,omitempty"` + Bindings []SyntheticsMobileTestBinding `json:"bindings,omitempty"` + Ci *SyntheticsMobileTestCiOptions `json:"ci,omitempty"` + DefaultStepTimeout *int32 `json:"defaultStepTimeout,omitempty"` + DeviceIds []SyntheticsMobileDeviceID `json:"device_ids,omitempty"` + DisableAutoAcceptAlert *bool `json:"disableAutoAcceptAlert,omitempty"` + MinFailureDuration *int64 `json:"min_failure_duration,omitempty"` + MobileApplication *SyntheticsMobileTestsMobileApplication `json:"mobileApplication,omitempty"` + MonitorName *string `json:"monitor_name,omitempty"` + MonitorOptions *SyntheticsMobileTestOptionsMonitorOptions `json:"monitor_options,omitempty"` + MonitorPriority *int32 `json:"monitor_priority,omitempty"` + NoScreenshot *bool `json:"noScreenshot,omitempty"` + RestrictedRoles []string `json:"restricted_roles,omitempty"` + Retry *SyntheticsTestOptionsRetry `json:"retry,omitempty"` + Scheduling *SyntheticsTestOptionsScheduling `json:"scheduling,omitempty"` + TickEvery *int64 `json:"tick_every,omitempty"` + Verbosity *int32 `json:"verbosity,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"allowApplicationCrash", "bindings", "ci", "defaultStepTimeout", "device_ids", "disableAutoAcceptAlert", "min_failure_duration", "mobileApplication", "monitor_name", "monitor_options", "monitor_priority", "noScreenshot", "restricted_roles", "retry", "scheduling", "tick_every", "verbosity"}) + } else { + return err + } + + hasInvalidField := false + o.AllowApplicationCrash = all.AllowApplicationCrash + o.Bindings = all.Bindings + if all.Ci != nil && all.Ci.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Ci = all.Ci + o.DefaultStepTimeout = all.DefaultStepTimeout + o.DeviceIds = all.DeviceIds + o.DisableAutoAcceptAlert = all.DisableAutoAcceptAlert + o.MinFailureDuration = all.MinFailureDuration + if all.MobileApplication != nil && all.MobileApplication.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.MobileApplication = all.MobileApplication + o.MonitorName = all.MonitorName + if all.MonitorOptions != nil && all.MonitorOptions.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.MonitorOptions = all.MonitorOptions + o.MonitorPriority = all.MonitorPriority + o.NoScreenshot = all.NoScreenshot + o.RestrictedRoles = all.RestrictedRoles + if all.Retry != nil && all.Retry.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Retry = all.Retry + if all.Scheduling != nil && all.Scheduling.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Scheduling = all.Scheduling + o.TickEvery = all.TickEvery + o.Verbosity = all.Verbosity + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options_monitor_options.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options_monitor_options.go new file mode 100644 index 0000000000..e9f58d439a --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options_monitor_options.go @@ -0,0 +1,219 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestOptionsMonitorOptions Object containing the options for a mobile Synthetic test as a monitor +// (for example, renotification). +type SyntheticsMobileTestOptionsMonitorOptions struct { + // Message to include in the escalation notification. + EscalationMessage *string `json:"escalation_message,omitempty"` + // The definition of `SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName` object. + NotificationPresetName *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName `json:"notification_preset_name,omitempty"` + // Time interval before renotifying if the test is still failing + // (in minutes). + RenotifyInterval *int64 `json:"renotify_interval,omitempty"` + // The `SyntheticsMobileTestOptionsMonitorOptions` `renotify_occurrences`. + RenotifyOccurrences *int64 `json:"renotify_occurrences,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestOptionsMonitorOptions instantiates a new SyntheticsMobileTestOptionsMonitorOptions object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestOptionsMonitorOptions() *SyntheticsMobileTestOptionsMonitorOptions { + this := SyntheticsMobileTestOptionsMonitorOptions{} + return &this +} + +// NewSyntheticsMobileTestOptionsMonitorOptionsWithDefaults instantiates a new SyntheticsMobileTestOptionsMonitorOptions object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestOptionsMonitorOptionsWithDefaults() *SyntheticsMobileTestOptionsMonitorOptions { + this := SyntheticsMobileTestOptionsMonitorOptions{} + return &this +} + +// GetEscalationMessage returns the EscalationMessage field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetEscalationMessage() string { + if o == nil || o.EscalationMessage == nil { + var ret string + return ret + } + return *o.EscalationMessage +} + +// GetEscalationMessageOk returns a tuple with the EscalationMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetEscalationMessageOk() (*string, bool) { + if o == nil || o.EscalationMessage == nil { + return nil, false + } + return o.EscalationMessage, true +} + +// HasEscalationMessage returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) HasEscalationMessage() bool { + return o != nil && o.EscalationMessage != nil +} + +// SetEscalationMessage gets a reference to the given string and assigns it to the EscalationMessage field. +func (o *SyntheticsMobileTestOptionsMonitorOptions) SetEscalationMessage(v string) { + o.EscalationMessage = &v +} + +// GetNotificationPresetName returns the NotificationPresetName field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetNotificationPresetName() SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName { + if o == nil || o.NotificationPresetName == nil { + var ret SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName + return ret + } + return *o.NotificationPresetName +} + +// GetNotificationPresetNameOk returns a tuple with the NotificationPresetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetNotificationPresetNameOk() (*SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName, bool) { + if o == nil || o.NotificationPresetName == nil { + return nil, false + } + return o.NotificationPresetName, true +} + +// HasNotificationPresetName returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) HasNotificationPresetName() bool { + return o != nil && o.NotificationPresetName != nil +} + +// SetNotificationPresetName gets a reference to the given SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName and assigns it to the NotificationPresetName field. +func (o *SyntheticsMobileTestOptionsMonitorOptions) SetNotificationPresetName(v SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) { + o.NotificationPresetName = &v +} + +// GetRenotifyInterval returns the RenotifyInterval field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetRenotifyInterval() int64 { + if o == nil || o.RenotifyInterval == nil { + var ret int64 + return ret + } + return *o.RenotifyInterval +} + +// GetRenotifyIntervalOk returns a tuple with the RenotifyInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetRenotifyIntervalOk() (*int64, bool) { + if o == nil || o.RenotifyInterval == nil { + return nil, false + } + return o.RenotifyInterval, true +} + +// HasRenotifyInterval returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) HasRenotifyInterval() bool { + return o != nil && o.RenotifyInterval != nil +} + +// SetRenotifyInterval gets a reference to the given int64 and assigns it to the RenotifyInterval field. +func (o *SyntheticsMobileTestOptionsMonitorOptions) SetRenotifyInterval(v int64) { + o.RenotifyInterval = &v +} + +// GetRenotifyOccurrences returns the RenotifyOccurrences field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetRenotifyOccurrences() int64 { + if o == nil || o.RenotifyOccurrences == nil { + var ret int64 + return ret + } + return *o.RenotifyOccurrences +} + +// GetRenotifyOccurrencesOk returns a tuple with the RenotifyOccurrences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetRenotifyOccurrencesOk() (*int64, bool) { + if o == nil || o.RenotifyOccurrences == nil { + return nil, false + } + return o.RenotifyOccurrences, true +} + +// HasRenotifyOccurrences returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) HasRenotifyOccurrences() bool { + return o != nil && o.RenotifyOccurrences != nil +} + +// SetRenotifyOccurrences gets a reference to the given int64 and assigns it to the RenotifyOccurrences field. +func (o *SyntheticsMobileTestOptionsMonitorOptions) SetRenotifyOccurrences(v int64) { + o.RenotifyOccurrences = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestOptionsMonitorOptions) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.EscalationMessage != nil { + toSerialize["escalation_message"] = o.EscalationMessage + } + if o.NotificationPresetName != nil { + toSerialize["notification_preset_name"] = o.NotificationPresetName + } + if o.RenotifyInterval != nil { + toSerialize["renotify_interval"] = o.RenotifyInterval + } + if o.RenotifyOccurrences != nil { + toSerialize["renotify_occurrences"] = o.RenotifyOccurrences + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestOptionsMonitorOptions) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + EscalationMessage *string `json:"escalation_message,omitempty"` + NotificationPresetName *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName `json:"notification_preset_name,omitempty"` + RenotifyInterval *int64 `json:"renotify_interval,omitempty"` + RenotifyOccurrences *int64 `json:"renotify_occurrences,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"escalation_message", "notification_preset_name", "renotify_interval", "renotify_occurrences"}) + } else { + return err + } + + hasInvalidField := false + o.EscalationMessage = all.EscalationMessage + if all.NotificationPresetName != nil && !all.NotificationPresetName.IsValid() { + hasInvalidField = true + } else { + o.NotificationPresetName = all.NotificationPresetName + } + o.RenotifyInterval = all.RenotifyInterval + o.RenotifyOccurrences = all.RenotifyOccurrences + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options_monitor_options_notification_preset_name.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options_monitor_options_notification_preset_name.go new file mode 100644 index 0000000000..73cff926a3 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_options_monitor_options_notification_preset_name.go @@ -0,0 +1,70 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName The definition of `SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName` object. +type SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName string + +// List of SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName. +const ( + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_SHOW_ALL SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName = "show_all" + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_ALL SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName = "hide_all" + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_QUERY SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName = "hide_query" + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_HANDLES SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName = "hide_handles" +) + +var allowedSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameEnumValues = []SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName{ + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_SHOW_ALL, + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_ALL, + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_QUERY, + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_HANDLES, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) GetAllowedValues() []SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName { + return allowedSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName(value) + return nil +} + +// NewSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameFromValue returns a pointer to a valid SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameFromValue(v string) (*SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName, error) { + ev := SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName: valid values are %v", v, allowedSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) IsValid() bool { + for _, existing := range allowedSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName value. +func (v SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) Ptr() *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_type.go new file mode 100644 index 0000000000..72ecacef9a --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_test_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestType Type of the Synthetic test, `mobile`. +type SyntheticsMobileTestType string + +// List of SyntheticsMobileTestType. +const ( + SYNTHETICSMOBILETESTTYPE_MOBILE SyntheticsMobileTestType = "mobile" +) + +var allowedSyntheticsMobileTestTypeEnumValues = []SyntheticsMobileTestType{ + SYNTHETICSMOBILETESTTYPE_MOBILE, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileTestType) GetAllowedValues() []SyntheticsMobileTestType { + return allowedSyntheticsMobileTestTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileTestType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileTestType(value) + return nil +} + +// NewSyntheticsMobileTestTypeFromValue returns a pointer to a valid SyntheticsMobileTestType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileTestTypeFromValue(v string) (*SyntheticsMobileTestType, error) { + ev := SyntheticsMobileTestType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileTestType: valid values are %v", v, allowedSyntheticsMobileTestTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileTestType) IsValid() bool { + for _, existing := range allowedSyntheticsMobileTestTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileTestType value. +func (v SyntheticsMobileTestType) Ptr() *SyntheticsMobileTestType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_tests_mobile_application.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_tests_mobile_application.go new file mode 100644 index 0000000000..02d7d5928a --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_tests_mobile_application.go @@ -0,0 +1,182 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestsMobileApplication Mobile application for mobile synthetics test. +type SyntheticsMobileTestsMobileApplication struct { + // Application ID of the mobile application. + ApplicationId *string `json:"applicationId,omitempty"` + // Reference ID of the mobile application. + ReferenceId *string `json:"referenceId,omitempty"` + // Reference type for the mobile application for a mobile synthetics test. + ReferenceType *SyntheticsMobileTestsMobileApplicationReferenceType `json:"referenceType,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestsMobileApplication instantiates a new SyntheticsMobileTestsMobileApplication object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestsMobileApplication() *SyntheticsMobileTestsMobileApplication { + this := SyntheticsMobileTestsMobileApplication{} + return &this +} + +// NewSyntheticsMobileTestsMobileApplicationWithDefaults instantiates a new SyntheticsMobileTestsMobileApplication object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestsMobileApplicationWithDefaults() *SyntheticsMobileTestsMobileApplication { + this := SyntheticsMobileTestsMobileApplication{} + return &this +} + +// GetApplicationId returns the ApplicationId field value if set, zero value otherwise. +func (o *SyntheticsMobileTestsMobileApplication) GetApplicationId() string { + if o == nil || o.ApplicationId == nil { + var ret string + return ret + } + return *o.ApplicationId +} + +// GetApplicationIdOk returns a tuple with the ApplicationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestsMobileApplication) GetApplicationIdOk() (*string, bool) { + if o == nil || o.ApplicationId == nil { + return nil, false + } + return o.ApplicationId, true +} + +// HasApplicationId returns a boolean if a field has been set. +func (o *SyntheticsMobileTestsMobileApplication) HasApplicationId() bool { + return o != nil && o.ApplicationId != nil +} + +// SetApplicationId gets a reference to the given string and assigns it to the ApplicationId field. +func (o *SyntheticsMobileTestsMobileApplication) SetApplicationId(v string) { + o.ApplicationId = &v +} + +// GetReferenceId returns the ReferenceId field value if set, zero value otherwise. +func (o *SyntheticsMobileTestsMobileApplication) GetReferenceId() string { + if o == nil || o.ReferenceId == nil { + var ret string + return ret + } + return *o.ReferenceId +} + +// GetReferenceIdOk returns a tuple with the ReferenceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestsMobileApplication) GetReferenceIdOk() (*string, bool) { + if o == nil || o.ReferenceId == nil { + return nil, false + } + return o.ReferenceId, true +} + +// HasReferenceId returns a boolean if a field has been set. +func (o *SyntheticsMobileTestsMobileApplication) HasReferenceId() bool { + return o != nil && o.ReferenceId != nil +} + +// SetReferenceId gets a reference to the given string and assigns it to the ReferenceId field. +func (o *SyntheticsMobileTestsMobileApplication) SetReferenceId(v string) { + o.ReferenceId = &v +} + +// GetReferenceType returns the ReferenceType field value if set, zero value otherwise. +func (o *SyntheticsMobileTestsMobileApplication) GetReferenceType() SyntheticsMobileTestsMobileApplicationReferenceType { + if o == nil || o.ReferenceType == nil { + var ret SyntheticsMobileTestsMobileApplicationReferenceType + return ret + } + return *o.ReferenceType +} + +// GetReferenceTypeOk returns a tuple with the ReferenceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestsMobileApplication) GetReferenceTypeOk() (*SyntheticsMobileTestsMobileApplicationReferenceType, bool) { + if o == nil || o.ReferenceType == nil { + return nil, false + } + return o.ReferenceType, true +} + +// HasReferenceType returns a boolean if a field has been set. +func (o *SyntheticsMobileTestsMobileApplication) HasReferenceType() bool { + return o != nil && o.ReferenceType != nil +} + +// SetReferenceType gets a reference to the given SyntheticsMobileTestsMobileApplicationReferenceType and assigns it to the ReferenceType field. +func (o *SyntheticsMobileTestsMobileApplication) SetReferenceType(v SyntheticsMobileTestsMobileApplicationReferenceType) { + o.ReferenceType = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestsMobileApplication) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.ApplicationId != nil { + toSerialize["applicationId"] = o.ApplicationId + } + if o.ReferenceId != nil { + toSerialize["referenceId"] = o.ReferenceId + } + if o.ReferenceType != nil { + toSerialize["referenceType"] = o.ReferenceType + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestsMobileApplication) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ApplicationId *string `json:"applicationId,omitempty"` + ReferenceId *string `json:"referenceId,omitempty"` + ReferenceType *SyntheticsMobileTestsMobileApplicationReferenceType `json:"referenceType,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"applicationId", "referenceId", "referenceType"}) + } else { + return err + } + + hasInvalidField := false + o.ApplicationId = all.ApplicationId + o.ReferenceId = all.ReferenceId + if all.ReferenceType != nil && !all.ReferenceType.IsValid() { + hasInvalidField = true + } else { + o.ReferenceType = all.ReferenceType + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_tests_mobile_application_reference_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_tests_mobile_application_reference_type.go new file mode 100644 index 0000000000..645dea3785 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_mobile_tests_mobile_application_reference_type.go @@ -0,0 +1,66 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestsMobileApplicationReferenceType Reference type for the mobile application for a mobile synthetics test. +type SyntheticsMobileTestsMobileApplicationReferenceType string + +// List of SyntheticsMobileTestsMobileApplicationReferenceType. +const ( + SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_LATEST SyntheticsMobileTestsMobileApplicationReferenceType = "latest" + SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_VERSION SyntheticsMobileTestsMobileApplicationReferenceType = "version" +) + +var allowedSyntheticsMobileTestsMobileApplicationReferenceTypeEnumValues = []SyntheticsMobileTestsMobileApplicationReferenceType{ + SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_LATEST, + SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_VERSION, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileTestsMobileApplicationReferenceType) GetAllowedValues() []SyntheticsMobileTestsMobileApplicationReferenceType { + return allowedSyntheticsMobileTestsMobileApplicationReferenceTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileTestsMobileApplicationReferenceType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileTestsMobileApplicationReferenceType(value) + return nil +} + +// NewSyntheticsMobileTestsMobileApplicationReferenceTypeFromValue returns a pointer to a valid SyntheticsMobileTestsMobileApplicationReferenceType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileTestsMobileApplicationReferenceTypeFromValue(v string) (*SyntheticsMobileTestsMobileApplicationReferenceType, error) { + ev := SyntheticsMobileTestsMobileApplicationReferenceType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileTestsMobileApplicationReferenceType: valid values are %v", v, allowedSyntheticsMobileTestsMobileApplicationReferenceTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileTestsMobileApplicationReferenceType) IsValid() bool { + for _, existing := range allowedSyntheticsMobileTestsMobileApplicationReferenceTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileTestsMobileApplicationReferenceType value. +func (v SyntheticsMobileTestsMobileApplicationReferenceType) Ptr() *SyntheticsMobileTestsMobileApplicationReferenceType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_parsing_options.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_parsing_options.go index cc43464ab7..e7db00cc79 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_parsing_options.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_parsing_options.go @@ -10,7 +10,7 @@ import ( // SyntheticsParsingOptions Parsing options for variables to extract. type SyntheticsParsingOptions struct { - // When type is `http_header`, name of the header to use to extract the value. + // When type is `http_header` or `grpc_metadata`, name of the header or metadatum to extract. Field *string `json:"field,omitempty"` // Name of the variable to extract. Name *string `json:"name,omitempty"` @@ -18,8 +18,8 @@ type SyntheticsParsingOptions struct { Parser *SyntheticsVariableParser `json:"parser,omitempty"` // Determines whether or not the extracted value will be obfuscated. Secure *bool `json:"secure,omitempty"` - // Property of the Synthetic Test Response to use for a Synthetic global variable. - Type *SyntheticsGlobalVariableParseTestOptionsType `json:"type,omitempty"` + // Property of the Synthetic Test Response to extract into a local variable. + Type *SyntheticsLocalVariableParsingOptionsType `json:"type,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -155,9 +155,9 @@ func (o *SyntheticsParsingOptions) SetSecure(v bool) { } // GetType returns the Type field value if set, zero value otherwise. -func (o *SyntheticsParsingOptions) GetType() SyntheticsGlobalVariableParseTestOptionsType { +func (o *SyntheticsParsingOptions) GetType() SyntheticsLocalVariableParsingOptionsType { if o == nil || o.Type == nil { - var ret SyntheticsGlobalVariableParseTestOptionsType + var ret SyntheticsLocalVariableParsingOptionsType return ret } return *o.Type @@ -165,7 +165,7 @@ func (o *SyntheticsParsingOptions) GetType() SyntheticsGlobalVariableParseTestOp // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SyntheticsParsingOptions) GetTypeOk() (*SyntheticsGlobalVariableParseTestOptionsType, bool) { +func (o *SyntheticsParsingOptions) GetTypeOk() (*SyntheticsLocalVariableParsingOptionsType, bool) { if o == nil || o.Type == nil { return nil, false } @@ -177,8 +177,8 @@ func (o *SyntheticsParsingOptions) HasType() bool { return o != nil && o.Type != nil } -// SetType gets a reference to the given SyntheticsGlobalVariableParseTestOptionsType and assigns it to the Type field. -func (o *SyntheticsParsingOptions) SetType(v SyntheticsGlobalVariableParseTestOptionsType) { +// SetType gets a reference to the given SyntheticsLocalVariableParsingOptionsType and assigns it to the Type field. +func (o *SyntheticsParsingOptions) SetType(v SyntheticsLocalVariableParsingOptionsType) { o.Type = &v } @@ -213,11 +213,11 @@ func (o SyntheticsParsingOptions) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *SyntheticsParsingOptions) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Field *string `json:"field,omitempty"` - Name *string `json:"name,omitempty"` - Parser *SyntheticsVariableParser `json:"parser,omitempty"` - Secure *bool `json:"secure,omitempty"` - Type *SyntheticsGlobalVariableParseTestOptionsType `json:"type,omitempty"` + Field *string `json:"field,omitempty"` + Name *string `json:"name,omitempty"` + Parser *SyntheticsVariableParser `json:"parser,omitempty"` + Secure *bool `json:"secure,omitempty"` + Type *SyntheticsLocalVariableParsingOptionsType `json:"type,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_request.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_request.go index 5b8856a658..a6f42acaf6 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_request.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_request.go @@ -31,7 +31,7 @@ type SyntheticsTestRequest struct { // DNS server to use for DNS tests. DnsServer *string `json:"dnsServer,omitempty"` // DNS server port to use for DNS tests. - DnsServerPort *int32 `json:"dnsServerPort,omitempty"` + DnsServerPort *string `json:"dnsServerPort,omitempty"` // Files to be used as part of the request in the test. Files []SyntheticsTestRequestBodyFile `json:"files,omitempty"` // Specifies whether or not the request follows redirects. @@ -55,7 +55,7 @@ type SyntheticsTestRequest struct { // Persist cookies across redirects. PersistCookies *bool `json:"persistCookies,omitempty"` // Port to use when performing the test. - Port *int64 `json:"port,omitempty"` + Port *SyntheticsTestRequestPort `json:"port,omitempty"` // The proxy to perform the test. Proxy *SyntheticsTestRequestProxy `json:"proxy,omitempty"` // Query to use for the test. @@ -375,9 +375,9 @@ func (o *SyntheticsTestRequest) SetDnsServer(v string) { } // GetDnsServerPort returns the DnsServerPort field value if set, zero value otherwise. -func (o *SyntheticsTestRequest) GetDnsServerPort() int32 { +func (o *SyntheticsTestRequest) GetDnsServerPort() string { if o == nil || o.DnsServerPort == nil { - var ret int32 + var ret string return ret } return *o.DnsServerPort @@ -385,7 +385,7 @@ func (o *SyntheticsTestRequest) GetDnsServerPort() int32 { // GetDnsServerPortOk returns a tuple with the DnsServerPort field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SyntheticsTestRequest) GetDnsServerPortOk() (*int32, bool) { +func (o *SyntheticsTestRequest) GetDnsServerPortOk() (*string, bool) { if o == nil || o.DnsServerPort == nil { return nil, false } @@ -397,8 +397,8 @@ func (o *SyntheticsTestRequest) HasDnsServerPort() bool { return o != nil && o.DnsServerPort != nil } -// SetDnsServerPort gets a reference to the given int32 and assigns it to the DnsServerPort field. -func (o *SyntheticsTestRequest) SetDnsServerPort(v int32) { +// SetDnsServerPort gets a reference to the given string and assigns it to the DnsServerPort field. +func (o *SyntheticsTestRequest) SetDnsServerPort(v string) { o.DnsServerPort = &v } @@ -711,9 +711,9 @@ func (o *SyntheticsTestRequest) SetPersistCookies(v bool) { } // GetPort returns the Port field value if set, zero value otherwise. -func (o *SyntheticsTestRequest) GetPort() int64 { +func (o *SyntheticsTestRequest) GetPort() SyntheticsTestRequestPort { if o == nil || o.Port == nil { - var ret int64 + var ret SyntheticsTestRequestPort return ret } return *o.Port @@ -721,7 +721,7 @@ func (o *SyntheticsTestRequest) GetPort() int64 { // GetPortOk returns a tuple with the Port field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SyntheticsTestRequest) GetPortOk() (*int64, bool) { +func (o *SyntheticsTestRequest) GetPortOk() (*SyntheticsTestRequestPort, bool) { if o == nil || o.Port == nil { return nil, false } @@ -733,8 +733,8 @@ func (o *SyntheticsTestRequest) HasPort() bool { return o != nil && o.Port != nil } -// SetPort gets a reference to the given int64 and assigns it to the Port field. -func (o *SyntheticsTestRequest) SetPort(v int64) { +// SetPort gets a reference to the given SyntheticsTestRequestPort and assigns it to the Port field. +func (o *SyntheticsTestRequest) SetPort(v SyntheticsTestRequestPort) { o.Port = &v } @@ -1050,7 +1050,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) { CompressedJsonDescriptor *string `json:"compressedJsonDescriptor,omitempty"` CompressedProtoFile *string `json:"compressedProtoFile,omitempty"` DnsServer *string `json:"dnsServer,omitempty"` - DnsServerPort *int32 `json:"dnsServerPort,omitempty"` + DnsServerPort *string `json:"dnsServerPort,omitempty"` Files []SyntheticsTestRequestBodyFile `json:"files,omitempty"` FollowRedirects *bool `json:"follow_redirects,omitempty"` Headers map[string]string `json:"headers,omitempty"` @@ -1062,7 +1062,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) { NoSavingResponseBody *bool `json:"noSavingResponseBody,omitempty"` NumberOfPackets *int32 `json:"numberOfPackets,omitempty"` PersistCookies *bool `json:"persistCookies,omitempty"` - Port *int64 `json:"port,omitempty"` + Port *SyntheticsTestRequestPort `json:"port,omitempty"` Proxy *SyntheticsTestRequestProxy `json:"proxy,omitempty"` Query interface{} `json:"query,omitempty"` Servername *string `json:"servername,omitempty"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_request_port.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_request_port.go new file mode 100644 index 0000000000..83227c428c --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_request_port.go @@ -0,0 +1,105 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsTestRequestPort - Port to use when performing the test. +type SyntheticsTestRequestPort struct { + SyntheticsTestRequestNumericalPort *int64 + SyntheticsTestRequestVariablePort *string + + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject interface{} +} + +// SyntheticsTestRequestNumericalPortAsSyntheticsTestRequestPort is a convenience function that returns int64 wrapped in SyntheticsTestRequestPort. +func SyntheticsTestRequestNumericalPortAsSyntheticsTestRequestPort(v *int64) SyntheticsTestRequestPort { + return SyntheticsTestRequestPort{SyntheticsTestRequestNumericalPort: v} +} + +// SyntheticsTestRequestVariablePortAsSyntheticsTestRequestPort is a convenience function that returns string wrapped in SyntheticsTestRequestPort. +func SyntheticsTestRequestVariablePortAsSyntheticsTestRequestPort(v *string) SyntheticsTestRequestPort { + return SyntheticsTestRequestPort{SyntheticsTestRequestVariablePort: v} +} + +// UnmarshalJSON turns data into one of the pointers in the struct. +func (obj *SyntheticsTestRequestPort) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into SyntheticsTestRequestNumericalPort + err = datadog.Unmarshal(data, &obj.SyntheticsTestRequestNumericalPort) + if err == nil { + if obj.SyntheticsTestRequestNumericalPort != nil { + jsonSyntheticsTestRequestNumericalPort, _ := datadog.Marshal(obj.SyntheticsTestRequestNumericalPort) + if string(jsonSyntheticsTestRequestNumericalPort) == "{}" { // empty struct + obj.SyntheticsTestRequestNumericalPort = nil + } else { + match++ + } + } else { + obj.SyntheticsTestRequestNumericalPort = nil + } + } else { + obj.SyntheticsTestRequestNumericalPort = nil + } + + // try to unmarshal data into SyntheticsTestRequestVariablePort + err = datadog.Unmarshal(data, &obj.SyntheticsTestRequestVariablePort) + if err == nil { + if obj.SyntheticsTestRequestVariablePort != nil { + jsonSyntheticsTestRequestVariablePort, _ := datadog.Marshal(obj.SyntheticsTestRequestVariablePort) + if string(jsonSyntheticsTestRequestVariablePort) == "{}" { // empty struct + obj.SyntheticsTestRequestVariablePort = nil + } else { + match++ + } + } else { + obj.SyntheticsTestRequestVariablePort = nil + } + } else { + obj.SyntheticsTestRequestVariablePort = nil + } + + if match != 1 { // more than 1 match + // reset to nil + obj.SyntheticsTestRequestNumericalPort = nil + obj.SyntheticsTestRequestVariablePort = nil + return datadog.Unmarshal(data, &obj.UnparsedObject) + } + return nil // exactly one match +} + +// MarshalJSON turns data from the first non-nil pointers in the struct to JSON. +func (obj SyntheticsTestRequestPort) MarshalJSON() ([]byte, error) { + if obj.SyntheticsTestRequestNumericalPort != nil { + return datadog.Marshal(&obj.SyntheticsTestRequestNumericalPort) + } + + if obj.SyntheticsTestRequestVariablePort != nil { + return datadog.Marshal(&obj.SyntheticsTestRequestVariablePort) + } + + if obj.UnparsedObject != nil { + return datadog.Marshal(obj.UnparsedObject) + } + return nil, nil // no data in oneOf schemas +} + +// GetActualInstance returns the actual instance. +func (obj *SyntheticsTestRequestPort) GetActualInstance() interface{} { + if obj.SyntheticsTestRequestNumericalPort != nil { + return obj.SyntheticsTestRequestNumericalPort + } + + if obj.SyntheticsTestRequestVariablePort != nil { + return obj.SyntheticsTestRequestVariablePort + } + + // all schemas are nil + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_uptime.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_uptime.go new file mode 100644 index 0000000000..735815af9d --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_test_uptime.go @@ -0,0 +1,216 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsTestUptime Object containing the uptime for a Synthetic test ID. +type SyntheticsTestUptime struct { + // Timestamp in seconds for the start of uptime. + FromTs *int64 `json:"from_ts,omitempty"` + // Object containing the uptime information. + Overall *SyntheticsUptime `json:"overall,omitempty"` + // A Synthetic test ID. + PublicId *string `json:"public_id,omitempty"` + // Timestamp in seconds for the end of uptime. + ToTs *int64 `json:"to_ts,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsTestUptime instantiates a new SyntheticsTestUptime object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsTestUptime() *SyntheticsTestUptime { + this := SyntheticsTestUptime{} + return &this +} + +// NewSyntheticsTestUptimeWithDefaults instantiates a new SyntheticsTestUptime object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsTestUptimeWithDefaults() *SyntheticsTestUptime { + this := SyntheticsTestUptime{} + return &this +} + +// GetFromTs returns the FromTs field value if set, zero value otherwise. +func (o *SyntheticsTestUptime) GetFromTs() int64 { + if o == nil || o.FromTs == nil { + var ret int64 + return ret + } + return *o.FromTs +} + +// GetFromTsOk returns a tuple with the FromTs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsTestUptime) GetFromTsOk() (*int64, bool) { + if o == nil || o.FromTs == nil { + return nil, false + } + return o.FromTs, true +} + +// HasFromTs returns a boolean if a field has been set. +func (o *SyntheticsTestUptime) HasFromTs() bool { + return o != nil && o.FromTs != nil +} + +// SetFromTs gets a reference to the given int64 and assigns it to the FromTs field. +func (o *SyntheticsTestUptime) SetFromTs(v int64) { + o.FromTs = &v +} + +// GetOverall returns the Overall field value if set, zero value otherwise. +func (o *SyntheticsTestUptime) GetOverall() SyntheticsUptime { + if o == nil || o.Overall == nil { + var ret SyntheticsUptime + return ret + } + return *o.Overall +} + +// GetOverallOk returns a tuple with the Overall field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsTestUptime) GetOverallOk() (*SyntheticsUptime, bool) { + if o == nil || o.Overall == nil { + return nil, false + } + return o.Overall, true +} + +// HasOverall returns a boolean if a field has been set. +func (o *SyntheticsTestUptime) HasOverall() bool { + return o != nil && o.Overall != nil +} + +// SetOverall gets a reference to the given SyntheticsUptime and assigns it to the Overall field. +func (o *SyntheticsTestUptime) SetOverall(v SyntheticsUptime) { + o.Overall = &v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *SyntheticsTestUptime) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsTestUptime) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *SyntheticsTestUptime) HasPublicId() bool { + return o != nil && o.PublicId != nil +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *SyntheticsTestUptime) SetPublicId(v string) { + o.PublicId = &v +} + +// GetToTs returns the ToTs field value if set, zero value otherwise. +func (o *SyntheticsTestUptime) GetToTs() int64 { + if o == nil || o.ToTs == nil { + var ret int64 + return ret + } + return *o.ToTs +} + +// GetToTsOk returns a tuple with the ToTs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsTestUptime) GetToTsOk() (*int64, bool) { + if o == nil || o.ToTs == nil { + return nil, false + } + return o.ToTs, true +} + +// HasToTs returns a boolean if a field has been set. +func (o *SyntheticsTestUptime) HasToTs() bool { + return o != nil && o.ToTs != nil +} + +// SetToTs gets a reference to the given int64 and assigns it to the ToTs field. +func (o *SyntheticsTestUptime) SetToTs(v int64) { + o.ToTs = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsTestUptime) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.FromTs != nil { + toSerialize["from_ts"] = o.FromTs + } + if o.Overall != nil { + toSerialize["overall"] = o.Overall + } + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } + if o.ToTs != nil { + toSerialize["to_ts"] = o.ToTs + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsTestUptime) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + FromTs *int64 `json:"from_ts,omitempty"` + Overall *SyntheticsUptime `json:"overall,omitempty"` + PublicId *string `json:"public_id,omitempty"` + ToTs *int64 `json:"to_ts,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"from_ts", "overall", "public_id", "to_ts"}) + } else { + return err + } + + hasInvalidField := false + o.FromTs = all.FromTs + if all.Overall != nil && all.Overall.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Overall = all.Overall + o.PublicId = all.PublicId + o.ToTs = all.ToTs + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_uptime.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_uptime.go new file mode 100644 index 0000000000..76b0750e0d --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_synthetics_uptime.go @@ -0,0 +1,247 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsUptime Object containing the uptime information. +type SyntheticsUptime struct { + // An array of error objects returned while querying the history data for the service level objective. + Errors []SLOHistoryResponseErrorWithType `json:"errors,omitempty"` + // The location name + Group *string `json:"group,omitempty"` + // The state transition history for the monitor, represented as an array of + // pairs. Each pair is an array where the first element is the transition timestamp + // in Unix epoch format (integer) and the second element is the state (integer). + // For the state, an integer value of `0` indicates uptime, `1` indicates downtime, + // and `2` indicates no data. + History [][]float64 `json:"history,omitempty"` + // The number of decimal places to which the SLI value is accurate for the given from-to timestamps. + SpanPrecision *float64 `json:"span_precision,omitempty"` + // The overall uptime. + Uptime *float64 `json:"uptime,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsUptime instantiates a new SyntheticsUptime object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsUptime() *SyntheticsUptime { + this := SyntheticsUptime{} + return &this +} + +// NewSyntheticsUptimeWithDefaults instantiates a new SyntheticsUptime object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsUptimeWithDefaults() *SyntheticsUptime { + this := SyntheticsUptime{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SyntheticsUptime) GetErrors() []SLOHistoryResponseErrorWithType { + if o == nil { + var ret []SLOHistoryResponseErrorWithType + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. +func (o *SyntheticsUptime) GetErrorsOk() (*[]SLOHistoryResponseErrorWithType, bool) { + if o == nil || o.Errors == nil { + return nil, false + } + return &o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *SyntheticsUptime) HasErrors() bool { + return o != nil && o.Errors != nil +} + +// SetErrors gets a reference to the given []SLOHistoryResponseErrorWithType and assigns it to the Errors field. +func (o *SyntheticsUptime) SetErrors(v []SLOHistoryResponseErrorWithType) { + o.Errors = v +} + +// GetGroup returns the Group field value if set, zero value otherwise. +func (o *SyntheticsUptime) GetGroup() string { + if o == nil || o.Group == nil { + var ret string + return ret + } + return *o.Group +} + +// GetGroupOk returns a tuple with the Group field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsUptime) GetGroupOk() (*string, bool) { + if o == nil || o.Group == nil { + return nil, false + } + return o.Group, true +} + +// HasGroup returns a boolean if a field has been set. +func (o *SyntheticsUptime) HasGroup() bool { + return o != nil && o.Group != nil +} + +// SetGroup gets a reference to the given string and assigns it to the Group field. +func (o *SyntheticsUptime) SetGroup(v string) { + o.Group = &v +} + +// GetHistory returns the History field value if set, zero value otherwise. +func (o *SyntheticsUptime) GetHistory() [][]float64 { + if o == nil || o.History == nil { + var ret [][]float64 + return ret + } + return o.History +} + +// GetHistoryOk returns a tuple with the History field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsUptime) GetHistoryOk() (*[][]float64, bool) { + if o == nil || o.History == nil { + return nil, false + } + return &o.History, true +} + +// HasHistory returns a boolean if a field has been set. +func (o *SyntheticsUptime) HasHistory() bool { + return o != nil && o.History != nil +} + +// SetHistory gets a reference to the given [][]float64 and assigns it to the History field. +func (o *SyntheticsUptime) SetHistory(v [][]float64) { + o.History = v +} + +// GetSpanPrecision returns the SpanPrecision field value if set, zero value otherwise. +func (o *SyntheticsUptime) GetSpanPrecision() float64 { + if o == nil || o.SpanPrecision == nil { + var ret float64 + return ret + } + return *o.SpanPrecision +} + +// GetSpanPrecisionOk returns a tuple with the SpanPrecision field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsUptime) GetSpanPrecisionOk() (*float64, bool) { + if o == nil || o.SpanPrecision == nil { + return nil, false + } + return o.SpanPrecision, true +} + +// HasSpanPrecision returns a boolean if a field has been set. +func (o *SyntheticsUptime) HasSpanPrecision() bool { + return o != nil && o.SpanPrecision != nil +} + +// SetSpanPrecision gets a reference to the given float64 and assigns it to the SpanPrecision field. +func (o *SyntheticsUptime) SetSpanPrecision(v float64) { + o.SpanPrecision = &v +} + +// GetUptime returns the Uptime field value if set, zero value otherwise. +func (o *SyntheticsUptime) GetUptime() float64 { + if o == nil || o.Uptime == nil { + var ret float64 + return ret + } + return *o.Uptime +} + +// GetUptimeOk returns a tuple with the Uptime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsUptime) GetUptimeOk() (*float64, bool) { + if o == nil || o.Uptime == nil { + return nil, false + } + return o.Uptime, true +} + +// HasUptime returns a boolean if a field has been set. +func (o *SyntheticsUptime) HasUptime() bool { + return o != nil && o.Uptime != nil +} + +// SetUptime gets a reference to the given float64 and assigns it to the Uptime field. +func (o *SyntheticsUptime) SetUptime(v float64) { + o.Uptime = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsUptime) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + if o.Group != nil { + toSerialize["group"] = o.Group + } + if o.History != nil { + toSerialize["history"] = o.History + } + if o.SpanPrecision != nil { + toSerialize["span_precision"] = o.SpanPrecision + } + if o.Uptime != nil { + toSerialize["uptime"] = o.Uptime + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsUptime) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Errors []SLOHistoryResponseErrorWithType `json:"errors,omitempty"` + Group *string `json:"group,omitempty"` + History [][]float64 `json:"history,omitempty"` + SpanPrecision *float64 `json:"span_precision,omitempty"` + Uptime *float64 `json:"uptime,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"errors", "group", "history", "span_precision", "uptime"}) + } else { + return err + } + o.Errors = all.Errors + o.Group = all.Group + o.History = all.History + o.SpanPrecision = all.SpanPrecision + o.Uptime = all.Uptime + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_definition.go index bff394ca36..8470812ce0 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_definition.go @@ -337,9 +337,6 @@ func (o *TableWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { o.HasSearchBar = all.HasSearchBar } o.Requests = *all.Requests - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_request.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_request.go index 9bf2931574..85d5e77869 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_request.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_request.go @@ -50,6 +50,8 @@ type TableWidgetRequest struct { SecurityQuery *LogQueryDefinition `json:"security_query,omitempty"` // The controls for sorting the widget. Sort *WidgetSortBy `json:"sort,omitempty"` + // List of text formats for columns produced by tags. + TextFormats [][]TableWidgetTextFormatRule `json:"text_formats,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -632,6 +634,34 @@ func (o *TableWidgetRequest) SetSort(v WidgetSortBy) { o.Sort = &v } +// GetTextFormats returns the TextFormats field value if set, zero value otherwise. +func (o *TableWidgetRequest) GetTextFormats() [][]TableWidgetTextFormatRule { + if o == nil || o.TextFormats == nil { + var ret [][]TableWidgetTextFormatRule + return ret + } + return o.TextFormats +} + +// GetTextFormatsOk returns a tuple with the TextFormats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TableWidgetRequest) GetTextFormatsOk() (*[][]TableWidgetTextFormatRule, bool) { + if o == nil || o.TextFormats == nil { + return nil, false + } + return &o.TextFormats, true +} + +// HasTextFormats returns a boolean if a field has been set. +func (o *TableWidgetRequest) HasTextFormats() bool { + return o != nil && o.TextFormats != nil +} + +// SetTextFormats gets a reference to the given [][]TableWidgetTextFormatRule and assigns it to the TextFormats field. +func (o *TableWidgetRequest) SetTextFormats(v [][]TableWidgetTextFormatRule) { + o.TextFormats = v +} + // MarshalJSON serializes the struct using spec logic. func (o TableWidgetRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} @@ -698,6 +728,9 @@ func (o TableWidgetRequest) MarshalJSON() ([]byte, error) { if o.Sort != nil { toSerialize["sort"] = o.Sort } + if o.TextFormats != nil { + toSerialize["text_formats"] = o.TextFormats + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -728,13 +761,14 @@ func (o *TableWidgetRequest) UnmarshalJSON(bytes []byte) (err error) { RumQuery *LogQueryDefinition `json:"rum_query,omitempty"` SecurityQuery *LogQueryDefinition `json:"security_query,omitempty"` Sort *WidgetSortBy `json:"sort,omitempty"` + TextFormats [][]TableWidgetTextFormatRule `json:"text_formats,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"aggregator", "alias", "apm_query", "apm_stats_query", "cell_display_mode", "conditional_formats", "event_query", "formulas", "limit", "log_query", "network_query", "order", "process_query", "profile_metrics_query", "q", "queries", "response_format", "rum_query", "security_query", "sort"}) + datadog.DeleteKeys(additionalProperties, &[]string{"aggregator", "alias", "apm_query", "apm_stats_query", "cell_display_mode", "conditional_formats", "event_query", "formulas", "limit", "log_query", "network_query", "order", "process_query", "profile_metrics_query", "q", "queries", "response_format", "rum_query", "security_query", "sort", "text_formats"}) } else { return err } @@ -802,6 +836,7 @@ func (o *TableWidgetRequest) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField = true } o.Sort = all.Sort + o.TextFormats = all.TextFormats if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_match.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_match.go new file mode 100644 index 0000000000..2cce790a1b --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_match.go @@ -0,0 +1,143 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TableWidgetTextFormatMatch Match rule for the table widget text format. +type TableWidgetTextFormatMatch struct { + // Match or compare option. + Type TableWidgetTextFormatMatchType `json:"type"` + // Table Widget Match String. + Value string `json:"value"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewTableWidgetTextFormatMatch instantiates a new TableWidgetTextFormatMatch object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewTableWidgetTextFormatMatch(typeVar TableWidgetTextFormatMatchType, value string) *TableWidgetTextFormatMatch { + this := TableWidgetTextFormatMatch{} + this.Type = typeVar + this.Value = value + return &this +} + +// NewTableWidgetTextFormatMatchWithDefaults instantiates a new TableWidgetTextFormatMatch object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewTableWidgetTextFormatMatchWithDefaults() *TableWidgetTextFormatMatch { + this := TableWidgetTextFormatMatch{} + return &this +} + +// GetType returns the Type field value. +func (o *TableWidgetTextFormatMatch) GetType() TableWidgetTextFormatMatchType { + if o == nil { + var ret TableWidgetTextFormatMatchType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatMatch) GetTypeOk() (*TableWidgetTextFormatMatchType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *TableWidgetTextFormatMatch) SetType(v TableWidgetTextFormatMatchType) { + o.Type = v +} + +// GetValue returns the Value field value. +func (o *TableWidgetTextFormatMatch) GetValue() string { + if o == nil { + var ret string + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatMatch) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value. +func (o *TableWidgetTextFormatMatch) SetValue(v string) { + o.Value = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o TableWidgetTextFormatMatch) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["type"] = o.Type + toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *TableWidgetTextFormatMatch) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Type *TableWidgetTextFormatMatchType `json:"type"` + Value *string `json:"value"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + if all.Value == nil { + return fmt.Errorf("required field value missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"type", "value"}) + } else { + return err + } + + hasInvalidField := false + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + o.Value = *all.Value + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_match_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_match_type.go new file mode 100644 index 0000000000..1d6b2ca7ef --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_match_type.go @@ -0,0 +1,74 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TableWidgetTextFormatMatchType Match or compare option. +type TableWidgetTextFormatMatchType string + +// List of TableWidgetTextFormatMatchType. +const ( + TABLEWIDGETTEXTFORMATMATCHTYPE_IS TableWidgetTextFormatMatchType = "is" + TABLEWIDGETTEXTFORMATMATCHTYPE_IS_NOT TableWidgetTextFormatMatchType = "is_not" + TABLEWIDGETTEXTFORMATMATCHTYPE_CONTAINS TableWidgetTextFormatMatchType = "contains" + TABLEWIDGETTEXTFORMATMATCHTYPE_DOES_NOT_CONTAIN TableWidgetTextFormatMatchType = "does_not_contain" + TABLEWIDGETTEXTFORMATMATCHTYPE_STARTS_WITH TableWidgetTextFormatMatchType = "starts_with" + TABLEWIDGETTEXTFORMATMATCHTYPE_ENDS_WITH TableWidgetTextFormatMatchType = "ends_with" +) + +var allowedTableWidgetTextFormatMatchTypeEnumValues = []TableWidgetTextFormatMatchType{ + TABLEWIDGETTEXTFORMATMATCHTYPE_IS, + TABLEWIDGETTEXTFORMATMATCHTYPE_IS_NOT, + TABLEWIDGETTEXTFORMATMATCHTYPE_CONTAINS, + TABLEWIDGETTEXTFORMATMATCHTYPE_DOES_NOT_CONTAIN, + TABLEWIDGETTEXTFORMATMATCHTYPE_STARTS_WITH, + TABLEWIDGETTEXTFORMATMATCHTYPE_ENDS_WITH, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *TableWidgetTextFormatMatchType) GetAllowedValues() []TableWidgetTextFormatMatchType { + return allowedTableWidgetTextFormatMatchTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *TableWidgetTextFormatMatchType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = TableWidgetTextFormatMatchType(value) + return nil +} + +// NewTableWidgetTextFormatMatchTypeFromValue returns a pointer to a valid TableWidgetTextFormatMatchType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewTableWidgetTextFormatMatchTypeFromValue(v string) (*TableWidgetTextFormatMatchType, error) { + ev := TableWidgetTextFormatMatchType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for TableWidgetTextFormatMatchType: valid values are %v", v, allowedTableWidgetTextFormatMatchTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v TableWidgetTextFormatMatchType) IsValid() bool { + for _, existing := range allowedTableWidgetTextFormatMatchTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TableWidgetTextFormatMatchType value. +func (v TableWidgetTextFormatMatchType) Ptr() *TableWidgetTextFormatMatchType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_palette.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_palette.go new file mode 100644 index 0000000000..5801dc52a6 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_palette.go @@ -0,0 +1,84 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TableWidgetTextFormatPalette Color-on-color palette to highlight replaced text. +type TableWidgetTextFormatPalette string + +// List of TableWidgetTextFormatPalette. +const ( + TABLEWIDGETTEXTFORMATPALETTE_WHITE_ON_RED TableWidgetTextFormatPalette = "white_on_red" + TABLEWIDGETTEXTFORMATPALETTE_WHITE_ON_YELLOW TableWidgetTextFormatPalette = "white_on_yellow" + TABLEWIDGETTEXTFORMATPALETTE_WHITE_ON_GREEN TableWidgetTextFormatPalette = "white_on_green" + TABLEWIDGETTEXTFORMATPALETTE_BLACK_ON_LIGHT_RED TableWidgetTextFormatPalette = "black_on_light_red" + TABLEWIDGETTEXTFORMATPALETTE_BLACK_ON_LIGHT_YELLOW TableWidgetTextFormatPalette = "black_on_light_yellow" + TABLEWIDGETTEXTFORMATPALETTE_BLACK_ON_LIGHT_GREEN TableWidgetTextFormatPalette = "black_on_light_green" + TABLEWIDGETTEXTFORMATPALETTE_RED_ON_WHITE TableWidgetTextFormatPalette = "red_on_white" + TABLEWIDGETTEXTFORMATPALETTE_YELLOW_ON_WHITE TableWidgetTextFormatPalette = "yellow_on_white" + TABLEWIDGETTEXTFORMATPALETTE_GREEN_ON_WHITE TableWidgetTextFormatPalette = "green_on_white" + TABLEWIDGETTEXTFORMATPALETTE_CUSTOM_BG TableWidgetTextFormatPalette = "custom_bg" + TABLEWIDGETTEXTFORMATPALETTE_CUSTOM_TEXT TableWidgetTextFormatPalette = "custom_text" +) + +var allowedTableWidgetTextFormatPaletteEnumValues = []TableWidgetTextFormatPalette{ + TABLEWIDGETTEXTFORMATPALETTE_WHITE_ON_RED, + TABLEWIDGETTEXTFORMATPALETTE_WHITE_ON_YELLOW, + TABLEWIDGETTEXTFORMATPALETTE_WHITE_ON_GREEN, + TABLEWIDGETTEXTFORMATPALETTE_BLACK_ON_LIGHT_RED, + TABLEWIDGETTEXTFORMATPALETTE_BLACK_ON_LIGHT_YELLOW, + TABLEWIDGETTEXTFORMATPALETTE_BLACK_ON_LIGHT_GREEN, + TABLEWIDGETTEXTFORMATPALETTE_RED_ON_WHITE, + TABLEWIDGETTEXTFORMATPALETTE_YELLOW_ON_WHITE, + TABLEWIDGETTEXTFORMATPALETTE_GREEN_ON_WHITE, + TABLEWIDGETTEXTFORMATPALETTE_CUSTOM_BG, + TABLEWIDGETTEXTFORMATPALETTE_CUSTOM_TEXT, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *TableWidgetTextFormatPalette) GetAllowedValues() []TableWidgetTextFormatPalette { + return allowedTableWidgetTextFormatPaletteEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *TableWidgetTextFormatPalette) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = TableWidgetTextFormatPalette(value) + return nil +} + +// NewTableWidgetTextFormatPaletteFromValue returns a pointer to a valid TableWidgetTextFormatPalette +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewTableWidgetTextFormatPaletteFromValue(v string) (*TableWidgetTextFormatPalette, error) { + ev := TableWidgetTextFormatPalette(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for TableWidgetTextFormatPalette: valid values are %v", v, allowedTableWidgetTextFormatPaletteEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v TableWidgetTextFormatPalette) IsValid() bool { + for _, existing := range allowedTableWidgetTextFormatPaletteEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TableWidgetTextFormatPalette value. +func (v TableWidgetTextFormatPalette) Ptr() *TableWidgetTextFormatPalette { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace.go new file mode 100644 index 0000000000..60742ebf62 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace.go @@ -0,0 +1,105 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TableWidgetTextFormatReplace - Replace rule for the table widget text format. +type TableWidgetTextFormatReplace struct { + TableWidgetTextFormatReplaceAll *TableWidgetTextFormatReplaceAll + TableWidgetTextFormatReplaceSubstring *TableWidgetTextFormatReplaceSubstring + + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject interface{} +} + +// TableWidgetTextFormatReplaceAllAsTableWidgetTextFormatReplace is a convenience function that returns TableWidgetTextFormatReplaceAll wrapped in TableWidgetTextFormatReplace. +func TableWidgetTextFormatReplaceAllAsTableWidgetTextFormatReplace(v *TableWidgetTextFormatReplaceAll) TableWidgetTextFormatReplace { + return TableWidgetTextFormatReplace{TableWidgetTextFormatReplaceAll: v} +} + +// TableWidgetTextFormatReplaceSubstringAsTableWidgetTextFormatReplace is a convenience function that returns TableWidgetTextFormatReplaceSubstring wrapped in TableWidgetTextFormatReplace. +func TableWidgetTextFormatReplaceSubstringAsTableWidgetTextFormatReplace(v *TableWidgetTextFormatReplaceSubstring) TableWidgetTextFormatReplace { + return TableWidgetTextFormatReplace{TableWidgetTextFormatReplaceSubstring: v} +} + +// UnmarshalJSON turns data into one of the pointers in the struct. +func (obj *TableWidgetTextFormatReplace) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into TableWidgetTextFormatReplaceAll + err = datadog.Unmarshal(data, &obj.TableWidgetTextFormatReplaceAll) + if err == nil { + if obj.TableWidgetTextFormatReplaceAll != nil && obj.TableWidgetTextFormatReplaceAll.UnparsedObject == nil { + jsonTableWidgetTextFormatReplaceAll, _ := datadog.Marshal(obj.TableWidgetTextFormatReplaceAll) + if string(jsonTableWidgetTextFormatReplaceAll) == "{}" { // empty struct + obj.TableWidgetTextFormatReplaceAll = nil + } else { + match++ + } + } else { + obj.TableWidgetTextFormatReplaceAll = nil + } + } else { + obj.TableWidgetTextFormatReplaceAll = nil + } + + // try to unmarshal data into TableWidgetTextFormatReplaceSubstring + err = datadog.Unmarshal(data, &obj.TableWidgetTextFormatReplaceSubstring) + if err == nil { + if obj.TableWidgetTextFormatReplaceSubstring != nil && obj.TableWidgetTextFormatReplaceSubstring.UnparsedObject == nil { + jsonTableWidgetTextFormatReplaceSubstring, _ := datadog.Marshal(obj.TableWidgetTextFormatReplaceSubstring) + if string(jsonTableWidgetTextFormatReplaceSubstring) == "{}" { // empty struct + obj.TableWidgetTextFormatReplaceSubstring = nil + } else { + match++ + } + } else { + obj.TableWidgetTextFormatReplaceSubstring = nil + } + } else { + obj.TableWidgetTextFormatReplaceSubstring = nil + } + + if match != 1 { // more than 1 match + // reset to nil + obj.TableWidgetTextFormatReplaceAll = nil + obj.TableWidgetTextFormatReplaceSubstring = nil + return datadog.Unmarshal(data, &obj.UnparsedObject) + } + return nil // exactly one match +} + +// MarshalJSON turns data from the first non-nil pointers in the struct to JSON. +func (obj TableWidgetTextFormatReplace) MarshalJSON() ([]byte, error) { + if obj.TableWidgetTextFormatReplaceAll != nil { + return datadog.Marshal(&obj.TableWidgetTextFormatReplaceAll) + } + + if obj.TableWidgetTextFormatReplaceSubstring != nil { + return datadog.Marshal(&obj.TableWidgetTextFormatReplaceSubstring) + } + + if obj.UnparsedObject != nil { + return datadog.Marshal(obj.UnparsedObject) + } + return nil, nil // no data in oneOf schemas +} + +// GetActualInstance returns the actual instance. +func (obj *TableWidgetTextFormatReplace) GetActualInstance() interface{} { + if obj.TableWidgetTextFormatReplaceAll != nil { + return obj.TableWidgetTextFormatReplaceAll + } + + if obj.TableWidgetTextFormatReplaceSubstring != nil { + return obj.TableWidgetTextFormatReplaceSubstring + } + + // all schemas are nil + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_all.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_all.go new file mode 100644 index 0000000000..91d0743441 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_all.go @@ -0,0 +1,143 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TableWidgetTextFormatReplaceAll Match All definition. +type TableWidgetTextFormatReplaceAll struct { + // Table widget text format replace all type. + Type TableWidgetTextFormatReplaceAllType `json:"type"` + // Replace All type. + With string `json:"with"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewTableWidgetTextFormatReplaceAll instantiates a new TableWidgetTextFormatReplaceAll object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewTableWidgetTextFormatReplaceAll(typeVar TableWidgetTextFormatReplaceAllType, with string) *TableWidgetTextFormatReplaceAll { + this := TableWidgetTextFormatReplaceAll{} + this.Type = typeVar + this.With = with + return &this +} + +// NewTableWidgetTextFormatReplaceAllWithDefaults instantiates a new TableWidgetTextFormatReplaceAll object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewTableWidgetTextFormatReplaceAllWithDefaults() *TableWidgetTextFormatReplaceAll { + this := TableWidgetTextFormatReplaceAll{} + return &this +} + +// GetType returns the Type field value. +func (o *TableWidgetTextFormatReplaceAll) GetType() TableWidgetTextFormatReplaceAllType { + if o == nil { + var ret TableWidgetTextFormatReplaceAllType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatReplaceAll) GetTypeOk() (*TableWidgetTextFormatReplaceAllType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *TableWidgetTextFormatReplaceAll) SetType(v TableWidgetTextFormatReplaceAllType) { + o.Type = v +} + +// GetWith returns the With field value. +func (o *TableWidgetTextFormatReplaceAll) GetWith() string { + if o == nil { + var ret string + return ret + } + return o.With +} + +// GetWithOk returns a tuple with the With field value +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatReplaceAll) GetWithOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.With, true +} + +// SetWith sets field value. +func (o *TableWidgetTextFormatReplaceAll) SetWith(v string) { + o.With = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o TableWidgetTextFormatReplaceAll) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["type"] = o.Type + toSerialize["with"] = o.With + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *TableWidgetTextFormatReplaceAll) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Type *TableWidgetTextFormatReplaceAllType `json:"type"` + With *string `json:"with"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + if all.With == nil { + return fmt.Errorf("required field with missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"type", "with"}) + } else { + return err + } + + hasInvalidField := false + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + o.With = *all.With + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_all_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_all_type.go new file mode 100644 index 0000000000..59e00d97ea --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_all_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TableWidgetTextFormatReplaceAllType Table widget text format replace all type. +type TableWidgetTextFormatReplaceAllType string + +// List of TableWidgetTextFormatReplaceAllType. +const ( + TABLEWIDGETTEXTFORMATREPLACEALLTYPE_ALL TableWidgetTextFormatReplaceAllType = "all" +) + +var allowedTableWidgetTextFormatReplaceAllTypeEnumValues = []TableWidgetTextFormatReplaceAllType{ + TABLEWIDGETTEXTFORMATREPLACEALLTYPE_ALL, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *TableWidgetTextFormatReplaceAllType) GetAllowedValues() []TableWidgetTextFormatReplaceAllType { + return allowedTableWidgetTextFormatReplaceAllTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *TableWidgetTextFormatReplaceAllType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = TableWidgetTextFormatReplaceAllType(value) + return nil +} + +// NewTableWidgetTextFormatReplaceAllTypeFromValue returns a pointer to a valid TableWidgetTextFormatReplaceAllType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewTableWidgetTextFormatReplaceAllTypeFromValue(v string) (*TableWidgetTextFormatReplaceAllType, error) { + ev := TableWidgetTextFormatReplaceAllType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for TableWidgetTextFormatReplaceAllType: valid values are %v", v, allowedTableWidgetTextFormatReplaceAllTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v TableWidgetTextFormatReplaceAllType) IsValid() bool { + for _, existing := range allowedTableWidgetTextFormatReplaceAllTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TableWidgetTextFormatReplaceAllType value. +func (v TableWidgetTextFormatReplaceAllType) Ptr() *TableWidgetTextFormatReplaceAllType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_substring.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_substring.go new file mode 100644 index 0000000000..b70d9e40fb --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_substring.go @@ -0,0 +1,175 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TableWidgetTextFormatReplaceSubstring Match Sub-string definition. +type TableWidgetTextFormatReplaceSubstring struct { + // Text that will be replaced. + Substring string `json:"substring"` + // Table widget text format replace sub-string type. + Type TableWidgetTextFormatReplaceSubstringType `json:"type"` + // Text that will replace original sub-string. + With string `json:"with"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewTableWidgetTextFormatReplaceSubstring instantiates a new TableWidgetTextFormatReplaceSubstring object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewTableWidgetTextFormatReplaceSubstring(substring string, typeVar TableWidgetTextFormatReplaceSubstringType, with string) *TableWidgetTextFormatReplaceSubstring { + this := TableWidgetTextFormatReplaceSubstring{} + this.Substring = substring + this.Type = typeVar + this.With = with + return &this +} + +// NewTableWidgetTextFormatReplaceSubstringWithDefaults instantiates a new TableWidgetTextFormatReplaceSubstring object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewTableWidgetTextFormatReplaceSubstringWithDefaults() *TableWidgetTextFormatReplaceSubstring { + this := TableWidgetTextFormatReplaceSubstring{} + return &this +} + +// GetSubstring returns the Substring field value. +func (o *TableWidgetTextFormatReplaceSubstring) GetSubstring() string { + if o == nil { + var ret string + return ret + } + return o.Substring +} + +// GetSubstringOk returns a tuple with the Substring field value +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatReplaceSubstring) GetSubstringOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Substring, true +} + +// SetSubstring sets field value. +func (o *TableWidgetTextFormatReplaceSubstring) SetSubstring(v string) { + o.Substring = v +} + +// GetType returns the Type field value. +func (o *TableWidgetTextFormatReplaceSubstring) GetType() TableWidgetTextFormatReplaceSubstringType { + if o == nil { + var ret TableWidgetTextFormatReplaceSubstringType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatReplaceSubstring) GetTypeOk() (*TableWidgetTextFormatReplaceSubstringType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *TableWidgetTextFormatReplaceSubstring) SetType(v TableWidgetTextFormatReplaceSubstringType) { + o.Type = v +} + +// GetWith returns the With field value. +func (o *TableWidgetTextFormatReplaceSubstring) GetWith() string { + if o == nil { + var ret string + return ret + } + return o.With +} + +// GetWithOk returns a tuple with the With field value +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatReplaceSubstring) GetWithOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.With, true +} + +// SetWith sets field value. +func (o *TableWidgetTextFormatReplaceSubstring) SetWith(v string) { + o.With = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o TableWidgetTextFormatReplaceSubstring) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["substring"] = o.Substring + toSerialize["type"] = o.Type + toSerialize["with"] = o.With + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *TableWidgetTextFormatReplaceSubstring) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Substring *string `json:"substring"` + Type *TableWidgetTextFormatReplaceSubstringType `json:"type"` + With *string `json:"with"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Substring == nil { + return fmt.Errorf("required field substring missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + if all.With == nil { + return fmt.Errorf("required field with missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"substring", "type", "with"}) + } else { + return err + } + + hasInvalidField := false + o.Substring = *all.Substring + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + o.With = *all.With + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_substring_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_substring_type.go new file mode 100644 index 0000000000..270f314d44 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_replace_substring_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TableWidgetTextFormatReplaceSubstringType Table widget text format replace sub-string type. +type TableWidgetTextFormatReplaceSubstringType string + +// List of TableWidgetTextFormatReplaceSubstringType. +const ( + TABLEWIDGETTEXTFORMATREPLACESUBSTRINGTYPE_SUBSTRING TableWidgetTextFormatReplaceSubstringType = "substring" +) + +var allowedTableWidgetTextFormatReplaceSubstringTypeEnumValues = []TableWidgetTextFormatReplaceSubstringType{ + TABLEWIDGETTEXTFORMATREPLACESUBSTRINGTYPE_SUBSTRING, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *TableWidgetTextFormatReplaceSubstringType) GetAllowedValues() []TableWidgetTextFormatReplaceSubstringType { + return allowedTableWidgetTextFormatReplaceSubstringTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *TableWidgetTextFormatReplaceSubstringType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = TableWidgetTextFormatReplaceSubstringType(value) + return nil +} + +// NewTableWidgetTextFormatReplaceSubstringTypeFromValue returns a pointer to a valid TableWidgetTextFormatReplaceSubstringType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewTableWidgetTextFormatReplaceSubstringTypeFromValue(v string) (*TableWidgetTextFormatReplaceSubstringType, error) { + ev := TableWidgetTextFormatReplaceSubstringType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for TableWidgetTextFormatReplaceSubstringType: valid values are %v", v, allowedTableWidgetTextFormatReplaceSubstringTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v TableWidgetTextFormatReplaceSubstringType) IsValid() bool { + for _, existing := range allowedTableWidgetTextFormatReplaceSubstringTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TableWidgetTextFormatReplaceSubstringType value. +func (v TableWidgetTextFormatReplaceSubstringType) Ptr() *TableWidgetTextFormatReplaceSubstringType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_rule.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_rule.go new file mode 100644 index 0000000000..a6da7d6ca0 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_table_widget_text_format_rule.go @@ -0,0 +1,258 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TableWidgetTextFormatRule Text format rules. +type TableWidgetTextFormatRule struct { + // Hex representation of the custom background color. Used with custom background palette option. + CustomBgColor *string `json:"custom_bg_color,omitempty"` + // Hex representation of the custom text color. Used with custom text palette option. + CustomFgColor *string `json:"custom_fg_color,omitempty"` + // Match rule for the table widget text format. + Match TableWidgetTextFormatMatch `json:"match"` + // Color-on-color palette to highlight replaced text. + Palette *TableWidgetTextFormatPalette `json:"palette,omitempty"` + // Replace rule for the table widget text format. + Replace *TableWidgetTextFormatReplace `json:"replace,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewTableWidgetTextFormatRule instantiates a new TableWidgetTextFormatRule object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewTableWidgetTextFormatRule(match TableWidgetTextFormatMatch) *TableWidgetTextFormatRule { + this := TableWidgetTextFormatRule{} + this.Match = match + var palette TableWidgetTextFormatPalette = TABLEWIDGETTEXTFORMATPALETTE_WHITE_ON_GREEN + this.Palette = &palette + return &this +} + +// NewTableWidgetTextFormatRuleWithDefaults instantiates a new TableWidgetTextFormatRule object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewTableWidgetTextFormatRuleWithDefaults() *TableWidgetTextFormatRule { + this := TableWidgetTextFormatRule{} + var palette TableWidgetTextFormatPalette = TABLEWIDGETTEXTFORMATPALETTE_WHITE_ON_GREEN + this.Palette = &palette + return &this +} + +// GetCustomBgColor returns the CustomBgColor field value if set, zero value otherwise. +func (o *TableWidgetTextFormatRule) GetCustomBgColor() string { + if o == nil || o.CustomBgColor == nil { + var ret string + return ret + } + return *o.CustomBgColor +} + +// GetCustomBgColorOk returns a tuple with the CustomBgColor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatRule) GetCustomBgColorOk() (*string, bool) { + if o == nil || o.CustomBgColor == nil { + return nil, false + } + return o.CustomBgColor, true +} + +// HasCustomBgColor returns a boolean if a field has been set. +func (o *TableWidgetTextFormatRule) HasCustomBgColor() bool { + return o != nil && o.CustomBgColor != nil +} + +// SetCustomBgColor gets a reference to the given string and assigns it to the CustomBgColor field. +func (o *TableWidgetTextFormatRule) SetCustomBgColor(v string) { + o.CustomBgColor = &v +} + +// GetCustomFgColor returns the CustomFgColor field value if set, zero value otherwise. +func (o *TableWidgetTextFormatRule) GetCustomFgColor() string { + if o == nil || o.CustomFgColor == nil { + var ret string + return ret + } + return *o.CustomFgColor +} + +// GetCustomFgColorOk returns a tuple with the CustomFgColor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatRule) GetCustomFgColorOk() (*string, bool) { + if o == nil || o.CustomFgColor == nil { + return nil, false + } + return o.CustomFgColor, true +} + +// HasCustomFgColor returns a boolean if a field has been set. +func (o *TableWidgetTextFormatRule) HasCustomFgColor() bool { + return o != nil && o.CustomFgColor != nil +} + +// SetCustomFgColor gets a reference to the given string and assigns it to the CustomFgColor field. +func (o *TableWidgetTextFormatRule) SetCustomFgColor(v string) { + o.CustomFgColor = &v +} + +// GetMatch returns the Match field value. +func (o *TableWidgetTextFormatRule) GetMatch() TableWidgetTextFormatMatch { + if o == nil { + var ret TableWidgetTextFormatMatch + return ret + } + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatRule) GetMatchOk() (*TableWidgetTextFormatMatch, bool) { + if o == nil { + return nil, false + } + return &o.Match, true +} + +// SetMatch sets field value. +func (o *TableWidgetTextFormatRule) SetMatch(v TableWidgetTextFormatMatch) { + o.Match = v +} + +// GetPalette returns the Palette field value if set, zero value otherwise. +func (o *TableWidgetTextFormatRule) GetPalette() TableWidgetTextFormatPalette { + if o == nil || o.Palette == nil { + var ret TableWidgetTextFormatPalette + return ret + } + return *o.Palette +} + +// GetPaletteOk returns a tuple with the Palette field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatRule) GetPaletteOk() (*TableWidgetTextFormatPalette, bool) { + if o == nil || o.Palette == nil { + return nil, false + } + return o.Palette, true +} + +// HasPalette returns a boolean if a field has been set. +func (o *TableWidgetTextFormatRule) HasPalette() bool { + return o != nil && o.Palette != nil +} + +// SetPalette gets a reference to the given TableWidgetTextFormatPalette and assigns it to the Palette field. +func (o *TableWidgetTextFormatRule) SetPalette(v TableWidgetTextFormatPalette) { + o.Palette = &v +} + +// GetReplace returns the Replace field value if set, zero value otherwise. +func (o *TableWidgetTextFormatRule) GetReplace() TableWidgetTextFormatReplace { + if o == nil || o.Replace == nil { + var ret TableWidgetTextFormatReplace + return ret + } + return *o.Replace +} + +// GetReplaceOk returns a tuple with the Replace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TableWidgetTextFormatRule) GetReplaceOk() (*TableWidgetTextFormatReplace, bool) { + if o == nil || o.Replace == nil { + return nil, false + } + return o.Replace, true +} + +// HasReplace returns a boolean if a field has been set. +func (o *TableWidgetTextFormatRule) HasReplace() bool { + return o != nil && o.Replace != nil +} + +// SetReplace gets a reference to the given TableWidgetTextFormatReplace and assigns it to the Replace field. +func (o *TableWidgetTextFormatRule) SetReplace(v TableWidgetTextFormatReplace) { + o.Replace = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o TableWidgetTextFormatRule) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.CustomBgColor != nil { + toSerialize["custom_bg_color"] = o.CustomBgColor + } + if o.CustomFgColor != nil { + toSerialize["custom_fg_color"] = o.CustomFgColor + } + toSerialize["match"] = o.Match + if o.Palette != nil { + toSerialize["palette"] = o.Palette + } + if o.Replace != nil { + toSerialize["replace"] = o.Replace + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *TableWidgetTextFormatRule) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + CustomBgColor *string `json:"custom_bg_color,omitempty"` + CustomFgColor *string `json:"custom_fg_color,omitempty"` + Match *TableWidgetTextFormatMatch `json:"match"` + Palette *TableWidgetTextFormatPalette `json:"palette,omitempty"` + Replace *TableWidgetTextFormatReplace `json:"replace,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Match == nil { + return fmt.Errorf("required field match missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"custom_bg_color", "custom_fg_color", "match", "palette", "replace"}) + } else { + return err + } + + hasInvalidField := false + o.CustomBgColor = all.CustomBgColor + o.CustomFgColor = all.CustomFgColor + if all.Match.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Match = *all.Match + if all.Palette != nil && !all.Palette.IsValid() { + hasInvalidField = true + } else { + o.Palette = all.Palette + } + o.Replace = all.Replace + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_timeseries_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_timeseries_widget_definition.go index 718bdbeb37..56f90e4703 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_timeseries_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_timeseries_widget_definition.go @@ -584,9 +584,6 @@ func (o *TimeseriesWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { } o.RightYaxis = all.RightYaxis o.ShowLegend = all.ShowLegend - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_toplist_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_toplist_widget_definition.go index 047d2d010f..bf6031df78 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_toplist_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_toplist_widget_definition.go @@ -336,9 +336,6 @@ func (o *ToplistWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField = true } o.Style = all.Style - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if all.TitleAlign != nil && !all.TitleAlign.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_toplist_widget_style.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_toplist_widget_style.go index ae2ab1f0c3..c21d1e70ce 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_toplist_widget_style.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_toplist_widget_style.go @@ -12,6 +12,8 @@ import ( type ToplistWidgetStyle struct { // Top list widget display options. Display *ToplistWidgetDisplay `json:"display,omitempty"` + // Color palette to apply to the widget. + Palette *string `json:"palette,omitempty"` // Top list widget scaling definition. Scaling *ToplistWidgetScaling `json:"scaling,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -64,6 +66,34 @@ func (o *ToplistWidgetStyle) SetDisplay(v ToplistWidgetDisplay) { o.Display = &v } +// GetPalette returns the Palette field value if set, zero value otherwise. +func (o *ToplistWidgetStyle) GetPalette() string { + if o == nil || o.Palette == nil { + var ret string + return ret + } + return *o.Palette +} + +// GetPaletteOk returns a tuple with the Palette field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToplistWidgetStyle) GetPaletteOk() (*string, bool) { + if o == nil || o.Palette == nil { + return nil, false + } + return o.Palette, true +} + +// HasPalette returns a boolean if a field has been set. +func (o *ToplistWidgetStyle) HasPalette() bool { + return o != nil && o.Palette != nil +} + +// SetPalette gets a reference to the given string and assigns it to the Palette field. +func (o *ToplistWidgetStyle) SetPalette(v string) { + o.Palette = &v +} + // GetScaling returns the Scaling field value if set, zero value otherwise. func (o *ToplistWidgetStyle) GetScaling() ToplistWidgetScaling { if o == nil || o.Scaling == nil { @@ -101,6 +131,9 @@ func (o ToplistWidgetStyle) MarshalJSON() ([]byte, error) { if o.Display != nil { toSerialize["display"] = o.Display } + if o.Palette != nil { + toSerialize["palette"] = o.Palette + } if o.Scaling != nil { toSerialize["scaling"] = o.Scaling } @@ -115,6 +148,7 @@ func (o ToplistWidgetStyle) MarshalJSON() ([]byte, error) { func (o *ToplistWidgetStyle) UnmarshalJSON(bytes []byte) (err error) { all := struct { Display *ToplistWidgetDisplay `json:"display,omitempty"` + Palette *string `json:"palette,omitempty"` Scaling *ToplistWidgetScaling `json:"scaling,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { @@ -122,13 +156,14 @@ func (o *ToplistWidgetStyle) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"display", "scaling"}) + datadog.DeleteKeys(additionalProperties, &[]string{"display", "palette", "scaling"}) } else { return err } hasInvalidField := false o.Display = all.Display + o.Palette = all.Palette if all.Scaling != nil && !all.Scaling.IsValid() { hasInvalidField = true } else { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_tree_map_widget_definition.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_tree_map_widget_definition.go index bd671b5de0..35b12fb4f1 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_tree_map_widget_definition.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_tree_map_widget_definition.go @@ -363,9 +363,6 @@ func (o *TreeMapWidgetDefinition) UnmarshalJSON(bytes []byte) (err error) { } else { o.SizeBy = all.SizeBy } - if all.Time != nil && all.Time.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } o.Time = all.Time o.Title = all.Title if !all.Type.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_date.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_date.go index 3ae536fef7..90c1489935 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_date.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_date.go @@ -117,6 +117,8 @@ type UsageSummaryDate struct { CwsContainerCountAvg *int64 `json:"cws_container_count_avg,omitempty"` // Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current date for all organizations. CwsHostTop99p *int64 `json:"cws_host_top99p,omitempty"` + // Shows the sum of all Data Jobs Monitoring hosts over all hours in the current date for the given org. + DataJobsMonitoringHostHrSum *int64 `json:"data_jobs_monitoring_host_hr_sum,omitempty"` // The date for the usage. Date *time.Time `json:"date,omitempty"` // Shows the 99th percentile of all Database Monitoring hosts over all hours in the current date for all organizations. @@ -196,6 +198,10 @@ type UsageSummaryDate struct { NpmHostTop99p *int64 `json:"npm_host_top99p,omitempty"` // Sum of all observability pipelines bytes processed over all hours in the current date for the given org. ObservabilityPipelinesBytesProcessedSum *int64 `json:"observability_pipelines_bytes_processed_sum,omitempty"` + // Shows the sum of all Oracle Cloud Infrastructure hosts over all hours in the current date for the given org. + OciHostSum *int64 `json:"oci_host_sum,omitempty"` + // Shows the 99th percentile of all Oracle Cloud Infrastructure hosts over all hours in the current date for the given org. + OciHostTop99p *int64 `json:"oci_host_top99p,omitempty"` // Sum of all online archived events over all hours in the current date for all organizations. OnlineArchiveEventsCountSum *int64 `json:"online_archive_events_count_sum,omitempty"` // Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for all organizations. @@ -1749,6 +1755,34 @@ func (o *UsageSummaryDate) SetCwsHostTop99p(v int64) { o.CwsHostTop99p = &v } +// GetDataJobsMonitoringHostHrSum returns the DataJobsMonitoringHostHrSum field value if set, zero value otherwise. +func (o *UsageSummaryDate) GetDataJobsMonitoringHostHrSum() int64 { + if o == nil || o.DataJobsMonitoringHostHrSum == nil { + var ret int64 + return ret + } + return *o.DataJobsMonitoringHostHrSum +} + +// GetDataJobsMonitoringHostHrSumOk returns a tuple with the DataJobsMonitoringHostHrSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDate) GetDataJobsMonitoringHostHrSumOk() (*int64, bool) { + if o == nil || o.DataJobsMonitoringHostHrSum == nil { + return nil, false + } + return o.DataJobsMonitoringHostHrSum, true +} + +// HasDataJobsMonitoringHostHrSum returns a boolean if a field has been set. +func (o *UsageSummaryDate) HasDataJobsMonitoringHostHrSum() bool { + return o != nil && o.DataJobsMonitoringHostHrSum != nil +} + +// SetDataJobsMonitoringHostHrSum gets a reference to the given int64 and assigns it to the DataJobsMonitoringHostHrSum field. +func (o *UsageSummaryDate) SetDataJobsMonitoringHostHrSum(v int64) { + o.DataJobsMonitoringHostHrSum = &v +} + // GetDate returns the Date field value if set, zero value otherwise. func (o *UsageSummaryDate) GetDate() time.Time { if o == nil || o.Date == nil { @@ -2756,6 +2790,62 @@ func (o *UsageSummaryDate) SetObservabilityPipelinesBytesProcessedSum(v int64) { o.ObservabilityPipelinesBytesProcessedSum = &v } +// GetOciHostSum returns the OciHostSum field value if set, zero value otherwise. +func (o *UsageSummaryDate) GetOciHostSum() int64 { + if o == nil || o.OciHostSum == nil { + var ret int64 + return ret + } + return *o.OciHostSum +} + +// GetOciHostSumOk returns a tuple with the OciHostSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDate) GetOciHostSumOk() (*int64, bool) { + if o == nil || o.OciHostSum == nil { + return nil, false + } + return o.OciHostSum, true +} + +// HasOciHostSum returns a boolean if a field has been set. +func (o *UsageSummaryDate) HasOciHostSum() bool { + return o != nil && o.OciHostSum != nil +} + +// SetOciHostSum gets a reference to the given int64 and assigns it to the OciHostSum field. +func (o *UsageSummaryDate) SetOciHostSum(v int64) { + o.OciHostSum = &v +} + +// GetOciHostTop99p returns the OciHostTop99p field value if set, zero value otherwise. +func (o *UsageSummaryDate) GetOciHostTop99p() int64 { + if o == nil || o.OciHostTop99p == nil { + var ret int64 + return ret + } + return *o.OciHostTop99p +} + +// GetOciHostTop99pOk returns a tuple with the OciHostTop99p field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDate) GetOciHostTop99pOk() (*int64, bool) { + if o == nil || o.OciHostTop99p == nil { + return nil, false + } + return o.OciHostTop99p, true +} + +// HasOciHostTop99p returns a boolean if a field has been set. +func (o *UsageSummaryDate) HasOciHostTop99p() bool { + return o != nil && o.OciHostTop99p != nil +} + +// SetOciHostTop99p gets a reference to the given int64 and assigns it to the OciHostTop99p field. +func (o *UsageSummaryDate) SetOciHostTop99p(v int64) { + o.OciHostTop99p = &v +} + // GetOnlineArchiveEventsCountSum returns the OnlineArchiveEventsCountSum field value if set, zero value otherwise. func (o *UsageSummaryDate) GetOnlineArchiveEventsCountSum() int64 { if o == nil || o.OnlineArchiveEventsCountSum == nil { @@ -4209,6 +4299,9 @@ func (o UsageSummaryDate) MarshalJSON() ([]byte, error) { if o.CwsHostTop99p != nil { toSerialize["cws_host_top99p"] = o.CwsHostTop99p } + if o.DataJobsMonitoringHostHrSum != nil { + toSerialize["data_jobs_monitoring_host_hr_sum"] = o.DataJobsMonitoringHostHrSum + } if o.Date != nil { if o.Date.Nanosecond() == 0 { toSerialize["date"] = o.Date.Format("2006-01-02T15:04:05Z07:00") @@ -4318,6 +4411,12 @@ func (o UsageSummaryDate) MarshalJSON() ([]byte, error) { if o.ObservabilityPipelinesBytesProcessedSum != nil { toSerialize["observability_pipelines_bytes_processed_sum"] = o.ObservabilityPipelinesBytesProcessedSum } + if o.OciHostSum != nil { + toSerialize["oci_host_sum"] = o.OciHostSum + } + if o.OciHostTop99p != nil { + toSerialize["oci_host_top99p"] = o.OciHostTop99p + } if o.OnlineArchiveEventsCountSum != nil { toSerialize["online_archive_events_count_sum"] = o.OnlineArchiveEventsCountSum } @@ -4517,6 +4616,7 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) { CustomTsAvg *int64 `json:"custom_ts_avg,omitempty"` CwsContainerCountAvg *int64 `json:"cws_container_count_avg,omitempty"` CwsHostTop99p *int64 `json:"cws_host_top99p,omitempty"` + DataJobsMonitoringHostHrSum *int64 `json:"data_jobs_monitoring_host_hr_sum,omitempty"` Date *time.Time `json:"date,omitempty"` DbmHostTop99p *int64 `json:"dbm_host_top99p,omitempty"` DbmQueriesCountAvg *int64 `json:"dbm_queries_count_avg,omitempty"` @@ -4552,6 +4652,8 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) { NetflowIndexedEventsCountSum *int64 `json:"netflow_indexed_events_count_sum,omitempty"` NpmHostTop99p *int64 `json:"npm_host_top99p,omitempty"` ObservabilityPipelinesBytesProcessedSum *int64 `json:"observability_pipelines_bytes_processed_sum,omitempty"` + OciHostSum *int64 `json:"oci_host_sum,omitempty"` + OciHostTop99p *int64 `json:"oci_host_top99p,omitempty"` OnlineArchiveEventsCountSum *int64 `json:"online_archive_events_count_sum,omitempty"` OpentelemetryApmHostTop99p *int64 `json:"opentelemetry_apm_host_top99p,omitempty"` OpentelemetryHostTop99p *int64 `json:"opentelemetry_host_top99p,omitempty"` @@ -4604,7 +4706,7 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"agent_host_top99p", "apm_azure_app_service_host_top99p", "apm_devsecops_host_top99p", "apm_fargate_count_avg", "apm_host_top99p", "appsec_fargate_count_avg", "asm_serverless_sum", "audit_logs_lines_indexed_sum", "audit_trail_enabled_hwm", "avg_profiled_fargate_tasks", "aws_host_top99p", "aws_lambda_func_count", "aws_lambda_invocations_sum", "azure_app_service_top99p", "billable_ingested_bytes_sum", "browser_rum_lite_session_count_sum", "browser_rum_replay_session_count_sum", "browser_rum_units_sum", "ci_pipeline_indexed_spans_sum", "ci_test_indexed_spans_sum", "ci_visibility_itr_committers_hwm", "ci_visibility_pipeline_committers_hwm", "ci_visibility_test_committers_hwm", "cloud_cost_management_aws_host_count_avg", "cloud_cost_management_azure_host_count_avg", "cloud_cost_management_gcp_host_count_avg", "cloud_cost_management_host_count_avg", "cloud_siem_events_sum", "container_avg", "container_excl_agent_avg", "container_hwm", "csm_container_enterprise_compliance_count_sum", "csm_container_enterprise_cws_count_sum", "csm_container_enterprise_total_count_sum", "csm_host_enterprise_aas_host_count_top99p", "csm_host_enterprise_aws_host_count_top99p", "csm_host_enterprise_azure_host_count_top99p", "csm_host_enterprise_compliance_host_count_top99p", "csm_host_enterprise_cws_host_count_top99p", "csm_host_enterprise_gcp_host_count_top99p", "csm_host_enterprise_total_host_count_top99p", "cspm_aas_host_top99p", "cspm_aws_host_top99p", "cspm_azure_host_top99p", "cspm_container_avg", "cspm_container_hwm", "cspm_gcp_host_top99p", "cspm_host_top99p", "custom_ts_avg", "cws_container_count_avg", "cws_host_top99p", "date", "dbm_host_top99p", "dbm_queries_count_avg", "error_tracking_events_sum", "fargate_tasks_count_avg", "fargate_tasks_count_hwm", "flex_logs_compute_large_avg", "flex_logs_compute_medium_avg", "flex_logs_compute_small_avg", "flex_logs_compute_xsmall_avg", "flex_logs_starter_avg", "flex_logs_starter_storage_index_avg", "flex_logs_starter_storage_retention_adjustment_avg", "flex_stored_logs_avg", "forwarding_events_bytes_sum", "gcp_host_top99p", "heroku_host_top99p", "incident_management_monthly_active_users_hwm", "indexed_events_count_sum", "infra_host_top99p", "ingested_events_bytes_sum", "iot_device_sum", "iot_device_top99p", "mobile_rum_lite_session_count_sum", "mobile_rum_session_count_android_sum", "mobile_rum_session_count_flutter_sum", "mobile_rum_session_count_ios_sum", "mobile_rum_session_count_reactnative_sum", "mobile_rum_session_count_roku_sum", "mobile_rum_session_count_sum", "mobile_rum_units_sum", "ndm_netflow_events_sum", "netflow_indexed_events_count_sum", "npm_host_top99p", "observability_pipelines_bytes_processed_sum", "online_archive_events_count_sum", "opentelemetry_apm_host_top99p", "opentelemetry_host_top99p", "orgs", "profiling_aas_count_top99p", "profiling_host_top99p", "rum_browser_and_mobile_session_count", "rum_browser_legacy_session_count_sum", "rum_browser_lite_session_count_sum", "rum_browser_replay_session_count_sum", "rum_lite_session_count_sum", "rum_mobile_legacy_session_count_android_sum", "rum_mobile_legacy_session_count_flutter_sum", "rum_mobile_legacy_session_count_ios_sum", "rum_mobile_legacy_session_count_reactnative_sum", "rum_mobile_legacy_session_count_roku_sum", "rum_mobile_lite_session_count_android_sum", "rum_mobile_lite_session_count_flutter_sum", "rum_mobile_lite_session_count_ios_sum", "rum_mobile_lite_session_count_reactnative_sum", "rum_mobile_lite_session_count_roku_sum", "rum_replay_session_count_sum", "rum_session_count_sum", "rum_total_session_count_sum", "rum_units_sum", "sca_fargate_count_avg", "sca_fargate_count_hwm", "sds_apm_scanned_bytes_sum", "sds_events_scanned_bytes_sum", "sds_logs_scanned_bytes_sum", "sds_rum_scanned_bytes_sum", "sds_total_scanned_bytes_sum", "serverless_apps_azure_count_avg", "serverless_apps_google_count_avg", "serverless_apps_total_count_avg", "siem_analyzed_logs_add_on_count_sum", "synthetics_browser_check_calls_count_sum", "synthetics_check_calls_count_sum", "synthetics_mobile_test_runs_sum", "synthetics_parallel_testing_max_slots_hwm", "trace_search_indexed_events_count_sum", "twol_ingested_events_bytes_sum", "universal_service_monitoring_host_top99p", "vsphere_host_top99p", "vuln_management_host_count_top99p", "workflow_executions_usage_sum"}) + datadog.DeleteKeys(additionalProperties, &[]string{"agent_host_top99p", "apm_azure_app_service_host_top99p", "apm_devsecops_host_top99p", "apm_fargate_count_avg", "apm_host_top99p", "appsec_fargate_count_avg", "asm_serverless_sum", "audit_logs_lines_indexed_sum", "audit_trail_enabled_hwm", "avg_profiled_fargate_tasks", "aws_host_top99p", "aws_lambda_func_count", "aws_lambda_invocations_sum", "azure_app_service_top99p", "billable_ingested_bytes_sum", "browser_rum_lite_session_count_sum", "browser_rum_replay_session_count_sum", "browser_rum_units_sum", "ci_pipeline_indexed_spans_sum", "ci_test_indexed_spans_sum", "ci_visibility_itr_committers_hwm", "ci_visibility_pipeline_committers_hwm", "ci_visibility_test_committers_hwm", "cloud_cost_management_aws_host_count_avg", "cloud_cost_management_azure_host_count_avg", "cloud_cost_management_gcp_host_count_avg", "cloud_cost_management_host_count_avg", "cloud_siem_events_sum", "container_avg", "container_excl_agent_avg", "container_hwm", "csm_container_enterprise_compliance_count_sum", "csm_container_enterprise_cws_count_sum", "csm_container_enterprise_total_count_sum", "csm_host_enterprise_aas_host_count_top99p", "csm_host_enterprise_aws_host_count_top99p", "csm_host_enterprise_azure_host_count_top99p", "csm_host_enterprise_compliance_host_count_top99p", "csm_host_enterprise_cws_host_count_top99p", "csm_host_enterprise_gcp_host_count_top99p", "csm_host_enterprise_total_host_count_top99p", "cspm_aas_host_top99p", "cspm_aws_host_top99p", "cspm_azure_host_top99p", "cspm_container_avg", "cspm_container_hwm", "cspm_gcp_host_top99p", "cspm_host_top99p", "custom_ts_avg", "cws_container_count_avg", "cws_host_top99p", "data_jobs_monitoring_host_hr_sum", "date", "dbm_host_top99p", "dbm_queries_count_avg", "error_tracking_events_sum", "fargate_tasks_count_avg", "fargate_tasks_count_hwm", "flex_logs_compute_large_avg", "flex_logs_compute_medium_avg", "flex_logs_compute_small_avg", "flex_logs_compute_xsmall_avg", "flex_logs_starter_avg", "flex_logs_starter_storage_index_avg", "flex_logs_starter_storage_retention_adjustment_avg", "flex_stored_logs_avg", "forwarding_events_bytes_sum", "gcp_host_top99p", "heroku_host_top99p", "incident_management_monthly_active_users_hwm", "indexed_events_count_sum", "infra_host_top99p", "ingested_events_bytes_sum", "iot_device_sum", "iot_device_top99p", "mobile_rum_lite_session_count_sum", "mobile_rum_session_count_android_sum", "mobile_rum_session_count_flutter_sum", "mobile_rum_session_count_ios_sum", "mobile_rum_session_count_reactnative_sum", "mobile_rum_session_count_roku_sum", "mobile_rum_session_count_sum", "mobile_rum_units_sum", "ndm_netflow_events_sum", "netflow_indexed_events_count_sum", "npm_host_top99p", "observability_pipelines_bytes_processed_sum", "oci_host_sum", "oci_host_top99p", "online_archive_events_count_sum", "opentelemetry_apm_host_top99p", "opentelemetry_host_top99p", "orgs", "profiling_aas_count_top99p", "profiling_host_top99p", "rum_browser_and_mobile_session_count", "rum_browser_legacy_session_count_sum", "rum_browser_lite_session_count_sum", "rum_browser_replay_session_count_sum", "rum_lite_session_count_sum", "rum_mobile_legacy_session_count_android_sum", "rum_mobile_legacy_session_count_flutter_sum", "rum_mobile_legacy_session_count_ios_sum", "rum_mobile_legacy_session_count_reactnative_sum", "rum_mobile_legacy_session_count_roku_sum", "rum_mobile_lite_session_count_android_sum", "rum_mobile_lite_session_count_flutter_sum", "rum_mobile_lite_session_count_ios_sum", "rum_mobile_lite_session_count_reactnative_sum", "rum_mobile_lite_session_count_roku_sum", "rum_replay_session_count_sum", "rum_session_count_sum", "rum_total_session_count_sum", "rum_units_sum", "sca_fargate_count_avg", "sca_fargate_count_hwm", "sds_apm_scanned_bytes_sum", "sds_events_scanned_bytes_sum", "sds_logs_scanned_bytes_sum", "sds_rum_scanned_bytes_sum", "sds_total_scanned_bytes_sum", "serverless_apps_azure_count_avg", "serverless_apps_google_count_avg", "serverless_apps_total_count_avg", "siem_analyzed_logs_add_on_count_sum", "synthetics_browser_check_calls_count_sum", "synthetics_check_calls_count_sum", "synthetics_mobile_test_runs_sum", "synthetics_parallel_testing_max_slots_hwm", "trace_search_indexed_events_count_sum", "twol_ingested_events_bytes_sum", "universal_service_monitoring_host_top99p", "vsphere_host_top99p", "vuln_management_host_count_top99p", "workflow_executions_usage_sum"}) } else { return err } @@ -4659,6 +4761,7 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) { o.CustomTsAvg = all.CustomTsAvg o.CwsContainerCountAvg = all.CwsContainerCountAvg o.CwsHostTop99p = all.CwsHostTop99p + o.DataJobsMonitoringHostHrSum = all.DataJobsMonitoringHostHrSum o.Date = all.Date o.DbmHostTop99p = all.DbmHostTop99p o.DbmQueriesCountAvg = all.DbmQueriesCountAvg @@ -4694,6 +4797,8 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) { o.NetflowIndexedEventsCountSum = all.NetflowIndexedEventsCountSum o.NpmHostTop99p = all.NpmHostTop99p o.ObservabilityPipelinesBytesProcessedSum = all.ObservabilityPipelinesBytesProcessedSum + o.OciHostSum = all.OciHostSum + o.OciHostTop99p = all.OciHostTop99p o.OnlineArchiveEventsCountSum = all.OnlineArchiveEventsCountSum o.OpentelemetryApmHostTop99p = all.OpentelemetryApmHostTop99p o.OpentelemetryHostTop99p = all.OpentelemetryHostTop99p diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_date_org.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_date_org.go index 04f20a045f..39855689b6 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_date_org.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_date_org.go @@ -123,6 +123,8 @@ type UsageSummaryDateOrg struct { CwsContainerCountAvg *int64 `json:"cws_container_count_avg,omitempty"` // Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current date for the given org. CwsHostTop99p *int64 `json:"cws_host_top99p,omitempty"` + // Shows the sum of all Data Jobs Monitoring hosts over all hours in the current date for the given org. + DataJobsMonitoringHostHrSum *int64 `json:"data_jobs_monitoring_host_hr_sum,omitempty"` // Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month for the given org. DbmHostTop99pSum *int64 `json:"dbm_host_top99p_sum,omitempty"` // Shows the average of all distinct Database Monitoring normalized queries over all hours in the current month for the given org. @@ -205,6 +207,10 @@ type UsageSummaryDateOrg struct { NpmHostTop99p *int64 `json:"npm_host_top99p,omitempty"` // Sum of all observability pipelines bytes processed over all hours in the current date for the given org. ObservabilityPipelinesBytesProcessedSum *int64 `json:"observability_pipelines_bytes_processed_sum,omitempty"` + // Shows the sum of all Oracle Cloud Infrastructure hosts over all hours in the current date for the given org. + OciHostSum *int64 `json:"oci_host_sum,omitempty"` + // Shows the 99th percentile of all Oracle Cloud Infrastructure hosts over all hours in the current date for the given org. + OciHostTop99p *int64 `json:"oci_host_top99p,omitempty"` // Sum of all online archived events over all hours in the current date for the given org. OnlineArchiveEventsCountSum *int64 `json:"online_archive_events_count_sum,omitempty"` // Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current date for the given org. @@ -1872,6 +1878,34 @@ func (o *UsageSummaryDateOrg) SetCwsHostTop99p(v int64) { o.CwsHostTop99p = &v } +// GetDataJobsMonitoringHostHrSum returns the DataJobsMonitoringHostHrSum field value if set, zero value otherwise. +func (o *UsageSummaryDateOrg) GetDataJobsMonitoringHostHrSum() int64 { + if o == nil || o.DataJobsMonitoringHostHrSum == nil { + var ret int64 + return ret + } + return *o.DataJobsMonitoringHostHrSum +} + +// GetDataJobsMonitoringHostHrSumOk returns a tuple with the DataJobsMonitoringHostHrSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDateOrg) GetDataJobsMonitoringHostHrSumOk() (*int64, bool) { + if o == nil || o.DataJobsMonitoringHostHrSum == nil { + return nil, false + } + return o.DataJobsMonitoringHostHrSum, true +} + +// HasDataJobsMonitoringHostHrSum returns a boolean if a field has been set. +func (o *UsageSummaryDateOrg) HasDataJobsMonitoringHostHrSum() bool { + return o != nil && o.DataJobsMonitoringHostHrSum != nil +} + +// SetDataJobsMonitoringHostHrSum gets a reference to the given int64 and assigns it to the DataJobsMonitoringHostHrSum field. +func (o *UsageSummaryDateOrg) SetDataJobsMonitoringHostHrSum(v int64) { + o.DataJobsMonitoringHostHrSum = &v +} + // GetDbmHostTop99pSum returns the DbmHostTop99pSum field value if set, zero value otherwise. func (o *UsageSummaryDateOrg) GetDbmHostTop99pSum() int64 { if o == nil || o.DbmHostTop99pSum == nil { @@ -2910,6 +2944,62 @@ func (o *UsageSummaryDateOrg) SetObservabilityPipelinesBytesProcessedSum(v int64 o.ObservabilityPipelinesBytesProcessedSum = &v } +// GetOciHostSum returns the OciHostSum field value if set, zero value otherwise. +func (o *UsageSummaryDateOrg) GetOciHostSum() int64 { + if o == nil || o.OciHostSum == nil { + var ret int64 + return ret + } + return *o.OciHostSum +} + +// GetOciHostSumOk returns a tuple with the OciHostSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDateOrg) GetOciHostSumOk() (*int64, bool) { + if o == nil || o.OciHostSum == nil { + return nil, false + } + return o.OciHostSum, true +} + +// HasOciHostSum returns a boolean if a field has been set. +func (o *UsageSummaryDateOrg) HasOciHostSum() bool { + return o != nil && o.OciHostSum != nil +} + +// SetOciHostSum gets a reference to the given int64 and assigns it to the OciHostSum field. +func (o *UsageSummaryDateOrg) SetOciHostSum(v int64) { + o.OciHostSum = &v +} + +// GetOciHostTop99p returns the OciHostTop99p field value if set, zero value otherwise. +func (o *UsageSummaryDateOrg) GetOciHostTop99p() int64 { + if o == nil || o.OciHostTop99p == nil { + var ret int64 + return ret + } + return *o.OciHostTop99p +} + +// GetOciHostTop99pOk returns a tuple with the OciHostTop99p field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryDateOrg) GetOciHostTop99pOk() (*int64, bool) { + if o == nil || o.OciHostTop99p == nil { + return nil, false + } + return o.OciHostTop99p, true +} + +// HasOciHostTop99p returns a boolean if a field has been set. +func (o *UsageSummaryDateOrg) HasOciHostTop99p() bool { + return o != nil && o.OciHostTop99p != nil +} + +// SetOciHostTop99p gets a reference to the given int64 and assigns it to the OciHostTop99p field. +func (o *UsageSummaryDateOrg) SetOciHostTop99p(v int64) { + o.OciHostTop99p = &v +} + // GetOnlineArchiveEventsCountSum returns the OnlineArchiveEventsCountSum field value if set, zero value otherwise. func (o *UsageSummaryDateOrg) GetOnlineArchiveEventsCountSum() int64 { if o == nil || o.OnlineArchiveEventsCountSum == nil { @@ -4403,6 +4493,9 @@ func (o UsageSummaryDateOrg) MarshalJSON() ([]byte, error) { if o.CwsHostTop99p != nil { toSerialize["cws_host_top99p"] = o.CwsHostTop99p } + if o.DataJobsMonitoringHostHrSum != nil { + toSerialize["data_jobs_monitoring_host_hr_sum"] = o.DataJobsMonitoringHostHrSum + } if o.DbmHostTop99pSum != nil { toSerialize["dbm_host_top99p_sum"] = o.DbmHostTop99pSum } @@ -4511,6 +4604,12 @@ func (o UsageSummaryDateOrg) MarshalJSON() ([]byte, error) { if o.ObservabilityPipelinesBytesProcessedSum != nil { toSerialize["observability_pipelines_bytes_processed_sum"] = o.ObservabilityPipelinesBytesProcessedSum } + if o.OciHostSum != nil { + toSerialize["oci_host_sum"] = o.OciHostSum + } + if o.OciHostTop99p != nil { + toSerialize["oci_host_top99p"] = o.OciHostTop99p + } if o.OnlineArchiveEventsCountSum != nil { toSerialize["online_archive_events_count_sum"] = o.OnlineArchiveEventsCountSum } @@ -4717,6 +4816,7 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) { CustomTsAvg *int64 `json:"custom_ts_avg,omitempty"` CwsContainerCountAvg *int64 `json:"cws_container_count_avg,omitempty"` CwsHostTop99p *int64 `json:"cws_host_top99p,omitempty"` + DataJobsMonitoringHostHrSum *int64 `json:"data_jobs_monitoring_host_hr_sum,omitempty"` DbmHostTop99pSum *int64 `json:"dbm_host_top99p_sum,omitempty"` DbmQueriesAvgSum *int64 `json:"dbm_queries_avg_sum,omitempty"` ErrorTrackingEventsSum *int64 `json:"error_tracking_events_sum,omitempty"` @@ -4753,6 +4853,8 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) { NetflowIndexedEventsCountSum *int64 `json:"netflow_indexed_events_count_sum,omitempty"` NpmHostTop99p *int64 `json:"npm_host_top99p,omitempty"` ObservabilityPipelinesBytesProcessedSum *int64 `json:"observability_pipelines_bytes_processed_sum,omitempty"` + OciHostSum *int64 `json:"oci_host_sum,omitempty"` + OciHostTop99p *int64 `json:"oci_host_top99p,omitempty"` OnlineArchiveEventsCountSum *int64 `json:"online_archive_events_count_sum,omitempty"` OpentelemetryApmHostTop99p *int64 `json:"opentelemetry_apm_host_top99p,omitempty"` OpentelemetryHostTop99p *int64 `json:"opentelemetry_host_top99p,omitempty"` @@ -4806,7 +4908,7 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"account_name", "account_public_id", "agent_host_top99p", "apm_azure_app_service_host_top99p", "apm_devsecops_host_top99p", "apm_fargate_count_avg", "apm_host_top99p", "appsec_fargate_count_avg", "asm_serverless_sum", "audit_logs_lines_indexed_sum", "audit_trail_enabled_hwm", "avg_profiled_fargate_tasks", "aws_host_top99p", "aws_lambda_func_count", "aws_lambda_invocations_sum", "azure_app_service_top99p", "billable_ingested_bytes_sum", "browser_rum_lite_session_count_sum", "browser_rum_replay_session_count_sum", "browser_rum_units_sum", "ci_pipeline_indexed_spans_sum", "ci_test_indexed_spans_sum", "ci_visibility_itr_committers_hwm", "ci_visibility_pipeline_committers_hwm", "ci_visibility_test_committers_hwm", "cloud_cost_management_aws_host_count_avg", "cloud_cost_management_azure_host_count_avg", "cloud_cost_management_gcp_host_count_avg", "cloud_cost_management_host_count_avg", "cloud_siem_events_sum", "container_avg", "container_excl_agent_avg", "container_hwm", "csm_container_enterprise_compliance_count_sum", "csm_container_enterprise_cws_count_sum", "csm_container_enterprise_total_count_sum", "csm_host_enterprise_aas_host_count_top99p", "csm_host_enterprise_aws_host_count_top99p", "csm_host_enterprise_azure_host_count_top99p", "csm_host_enterprise_compliance_host_count_top99p", "csm_host_enterprise_cws_host_count_top99p", "csm_host_enterprise_gcp_host_count_top99p", "csm_host_enterprise_total_host_count_top99p", "cspm_aas_host_top99p", "cspm_aws_host_top99p", "cspm_azure_host_top99p", "cspm_container_avg", "cspm_container_hwm", "cspm_gcp_host_top99p", "cspm_host_top99p", "custom_historical_ts_avg", "custom_live_ts_avg", "custom_ts_avg", "cws_container_count_avg", "cws_host_top99p", "dbm_host_top99p_sum", "dbm_queries_avg_sum", "error_tracking_events_sum", "fargate_tasks_count_avg", "fargate_tasks_count_hwm", "flex_logs_compute_large_avg", "flex_logs_compute_medium_avg", "flex_logs_compute_small_avg", "flex_logs_compute_xsmall_avg", "flex_logs_starter_avg", "flex_logs_starter_storage_index_avg", "flex_logs_starter_storage_retention_adjustment_avg", "flex_stored_logs_avg", "forwarding_events_bytes_sum", "gcp_host_top99p", "heroku_host_top99p", "id", "incident_management_monthly_active_users_hwm", "indexed_events_count_sum", "infra_host_top99p", "ingested_events_bytes_sum", "iot_device_agg_sum", "iot_device_top99p_sum", "mobile_rum_lite_session_count_sum", "mobile_rum_session_count_android_sum", "mobile_rum_session_count_flutter_sum", "mobile_rum_session_count_ios_sum", "mobile_rum_session_count_reactnative_sum", "mobile_rum_session_count_roku_sum", "mobile_rum_session_count_sum", "mobile_rum_units_sum", "name", "ndm_netflow_events_sum", "netflow_indexed_events_count_sum", "npm_host_top99p", "observability_pipelines_bytes_processed_sum", "online_archive_events_count_sum", "opentelemetry_apm_host_top99p", "opentelemetry_host_top99p", "profiling_aas_count_top99p", "profiling_host_top99p", "public_id", "region", "rum_browser_and_mobile_session_count", "rum_browser_legacy_session_count_sum", "rum_browser_lite_session_count_sum", "rum_browser_replay_session_count_sum", "rum_lite_session_count_sum", "rum_mobile_legacy_session_count_android_sum", "rum_mobile_legacy_session_count_flutter_sum", "rum_mobile_legacy_session_count_ios_sum", "rum_mobile_legacy_session_count_reactnative_sum", "rum_mobile_legacy_session_count_roku_sum", "rum_mobile_lite_session_count_android_sum", "rum_mobile_lite_session_count_flutter_sum", "rum_mobile_lite_session_count_ios_sum", "rum_mobile_lite_session_count_reactnative_sum", "rum_mobile_lite_session_count_roku_sum", "rum_replay_session_count_sum", "rum_session_count_sum", "rum_total_session_count_sum", "rum_units_sum", "sca_fargate_count_avg", "sca_fargate_count_hwm", "sds_apm_scanned_bytes_sum", "sds_events_scanned_bytes_sum", "sds_logs_scanned_bytes_sum", "sds_rum_scanned_bytes_sum", "sds_total_scanned_bytes_sum", "serverless_apps_azure_count_avg", "serverless_apps_google_count_avg", "serverless_apps_total_count_avg", "siem_analyzed_logs_add_on_count_sum", "synthetics_browser_check_calls_count_sum", "synthetics_check_calls_count_sum", "synthetics_mobile_test_runs_sum", "synthetics_parallel_testing_max_slots_hwm", "trace_search_indexed_events_count_sum", "twol_ingested_events_bytes_sum", "universal_service_monitoring_host_top99p", "vsphere_host_top99p", "vuln_management_host_count_top99p", "workflow_executions_usage_sum"}) + datadog.DeleteKeys(additionalProperties, &[]string{"account_name", "account_public_id", "agent_host_top99p", "apm_azure_app_service_host_top99p", "apm_devsecops_host_top99p", "apm_fargate_count_avg", "apm_host_top99p", "appsec_fargate_count_avg", "asm_serverless_sum", "audit_logs_lines_indexed_sum", "audit_trail_enabled_hwm", "avg_profiled_fargate_tasks", "aws_host_top99p", "aws_lambda_func_count", "aws_lambda_invocations_sum", "azure_app_service_top99p", "billable_ingested_bytes_sum", "browser_rum_lite_session_count_sum", "browser_rum_replay_session_count_sum", "browser_rum_units_sum", "ci_pipeline_indexed_spans_sum", "ci_test_indexed_spans_sum", "ci_visibility_itr_committers_hwm", "ci_visibility_pipeline_committers_hwm", "ci_visibility_test_committers_hwm", "cloud_cost_management_aws_host_count_avg", "cloud_cost_management_azure_host_count_avg", "cloud_cost_management_gcp_host_count_avg", "cloud_cost_management_host_count_avg", "cloud_siem_events_sum", "container_avg", "container_excl_agent_avg", "container_hwm", "csm_container_enterprise_compliance_count_sum", "csm_container_enterprise_cws_count_sum", "csm_container_enterprise_total_count_sum", "csm_host_enterprise_aas_host_count_top99p", "csm_host_enterprise_aws_host_count_top99p", "csm_host_enterprise_azure_host_count_top99p", "csm_host_enterprise_compliance_host_count_top99p", "csm_host_enterprise_cws_host_count_top99p", "csm_host_enterprise_gcp_host_count_top99p", "csm_host_enterprise_total_host_count_top99p", "cspm_aas_host_top99p", "cspm_aws_host_top99p", "cspm_azure_host_top99p", "cspm_container_avg", "cspm_container_hwm", "cspm_gcp_host_top99p", "cspm_host_top99p", "custom_historical_ts_avg", "custom_live_ts_avg", "custom_ts_avg", "cws_container_count_avg", "cws_host_top99p", "data_jobs_monitoring_host_hr_sum", "dbm_host_top99p_sum", "dbm_queries_avg_sum", "error_tracking_events_sum", "fargate_tasks_count_avg", "fargate_tasks_count_hwm", "flex_logs_compute_large_avg", "flex_logs_compute_medium_avg", "flex_logs_compute_small_avg", "flex_logs_compute_xsmall_avg", "flex_logs_starter_avg", "flex_logs_starter_storage_index_avg", "flex_logs_starter_storage_retention_adjustment_avg", "flex_stored_logs_avg", "forwarding_events_bytes_sum", "gcp_host_top99p", "heroku_host_top99p", "id", "incident_management_monthly_active_users_hwm", "indexed_events_count_sum", "infra_host_top99p", "ingested_events_bytes_sum", "iot_device_agg_sum", "iot_device_top99p_sum", "mobile_rum_lite_session_count_sum", "mobile_rum_session_count_android_sum", "mobile_rum_session_count_flutter_sum", "mobile_rum_session_count_ios_sum", "mobile_rum_session_count_reactnative_sum", "mobile_rum_session_count_roku_sum", "mobile_rum_session_count_sum", "mobile_rum_units_sum", "name", "ndm_netflow_events_sum", "netflow_indexed_events_count_sum", "npm_host_top99p", "observability_pipelines_bytes_processed_sum", "oci_host_sum", "oci_host_top99p", "online_archive_events_count_sum", "opentelemetry_apm_host_top99p", "opentelemetry_host_top99p", "profiling_aas_count_top99p", "profiling_host_top99p", "public_id", "region", "rum_browser_and_mobile_session_count", "rum_browser_legacy_session_count_sum", "rum_browser_lite_session_count_sum", "rum_browser_replay_session_count_sum", "rum_lite_session_count_sum", "rum_mobile_legacy_session_count_android_sum", "rum_mobile_legacy_session_count_flutter_sum", "rum_mobile_legacy_session_count_ios_sum", "rum_mobile_legacy_session_count_reactnative_sum", "rum_mobile_legacy_session_count_roku_sum", "rum_mobile_lite_session_count_android_sum", "rum_mobile_lite_session_count_flutter_sum", "rum_mobile_lite_session_count_ios_sum", "rum_mobile_lite_session_count_reactnative_sum", "rum_mobile_lite_session_count_roku_sum", "rum_replay_session_count_sum", "rum_session_count_sum", "rum_total_session_count_sum", "rum_units_sum", "sca_fargate_count_avg", "sca_fargate_count_hwm", "sds_apm_scanned_bytes_sum", "sds_events_scanned_bytes_sum", "sds_logs_scanned_bytes_sum", "sds_rum_scanned_bytes_sum", "sds_total_scanned_bytes_sum", "serverless_apps_azure_count_avg", "serverless_apps_google_count_avg", "serverless_apps_total_count_avg", "siem_analyzed_logs_add_on_count_sum", "synthetics_browser_check_calls_count_sum", "synthetics_check_calls_count_sum", "synthetics_mobile_test_runs_sum", "synthetics_parallel_testing_max_slots_hwm", "trace_search_indexed_events_count_sum", "twol_ingested_events_bytes_sum", "universal_service_monitoring_host_top99p", "vsphere_host_top99p", "vuln_management_host_count_top99p", "workflow_executions_usage_sum"}) } else { return err } @@ -4865,6 +4967,7 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) { o.CustomTsAvg = all.CustomTsAvg o.CwsContainerCountAvg = all.CwsContainerCountAvg o.CwsHostTop99p = all.CwsHostTop99p + o.DataJobsMonitoringHostHrSum = all.DataJobsMonitoringHostHrSum o.DbmHostTop99pSum = all.DbmHostTop99pSum o.DbmQueriesAvgSum = all.DbmQueriesAvgSum o.ErrorTrackingEventsSum = all.ErrorTrackingEventsSum @@ -4901,6 +5004,8 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) { o.NetflowIndexedEventsCountSum = all.NetflowIndexedEventsCountSum o.NpmHostTop99p = all.NpmHostTop99p o.ObservabilityPipelinesBytesProcessedSum = all.ObservabilityPipelinesBytesProcessedSum + o.OciHostSum = all.OciHostSum + o.OciHostTop99p = all.OciHostTop99p o.OnlineArchiveEventsCountSum = all.OnlineArchiveEventsCountSum o.OpentelemetryApmHostTop99p = all.OpentelemetryApmHostTop99p o.OpentelemetryHostTop99p = all.OpentelemetryHostTop99p diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_response.go index bc2d025634..4d1243e7fb 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_response.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_usage_summary_response.go @@ -123,6 +123,8 @@ type UsageSummaryResponse struct { CwsContainersAvgSum *int64 `json:"cws_containers_avg_sum,omitempty"` // Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current month for all organizations. CwsHostTop99pSum *int64 `json:"cws_host_top99p_sum,omitempty"` + // Shows the sum of Data Jobs Monitoring hosts over all hours in the current months for all organizations + DataJobsMonitoringHostHrAggSum *int64 `json:"data_jobs_monitoring_host_hr_agg_sum,omitempty"` // Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month for all organizations. DbmHostTop99pSum *int64 `json:"dbm_host_top99p_sum,omitempty"` // Shows the average of all distinct Database Monitoring Normalized Queries over all hours in the current month for all organizations. @@ -212,6 +214,10 @@ type UsageSummaryResponse struct { NpmHostTop99pSum *int64 `json:"npm_host_top99p_sum,omitempty"` // Sum of all observability pipelines bytes processed over all hours in the current month for all organizations. ObservabilityPipelinesBytesProcessedAggSum *int64 `json:"observability_pipelines_bytes_processed_agg_sum,omitempty"` + // Shows the sum of Oracle Cloud Infrastructure hosts over all hours in the current months for all organizations + OciHostAggSum *int64 `json:"oci_host_agg_sum,omitempty"` + // Shows the 99th percentile of Oracle Cloud Infrastructure hosts over all hours in the current months for all organizations + OciHostTop99pSum *int64 `json:"oci_host_top99p_sum,omitempty"` // Sum of all online archived events over all hours in the current month for all organizations. OnlineArchiveEventsCountAggSum *int64 `json:"online_archive_events_count_agg_sum,omitempty"` // Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current month for all organizations. @@ -1858,6 +1864,34 @@ func (o *UsageSummaryResponse) SetCwsHostTop99pSum(v int64) { o.CwsHostTop99pSum = &v } +// GetDataJobsMonitoringHostHrAggSum returns the DataJobsMonitoringHostHrAggSum field value if set, zero value otherwise. +func (o *UsageSummaryResponse) GetDataJobsMonitoringHostHrAggSum() int64 { + if o == nil || o.DataJobsMonitoringHostHrAggSum == nil { + var ret int64 + return ret + } + return *o.DataJobsMonitoringHostHrAggSum +} + +// GetDataJobsMonitoringHostHrAggSumOk returns a tuple with the DataJobsMonitoringHostHrAggSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryResponse) GetDataJobsMonitoringHostHrAggSumOk() (*int64, bool) { + if o == nil || o.DataJobsMonitoringHostHrAggSum == nil { + return nil, false + } + return o.DataJobsMonitoringHostHrAggSum, true +} + +// HasDataJobsMonitoringHostHrAggSum returns a boolean if a field has been set. +func (o *UsageSummaryResponse) HasDataJobsMonitoringHostHrAggSum() bool { + return o != nil && o.DataJobsMonitoringHostHrAggSum != nil +} + +// SetDataJobsMonitoringHostHrAggSum gets a reference to the given int64 and assigns it to the DataJobsMonitoringHostHrAggSum field. +func (o *UsageSummaryResponse) SetDataJobsMonitoringHostHrAggSum(v int64) { + o.DataJobsMonitoringHostHrAggSum = &v +} + // GetDbmHostTop99pSum returns the DbmHostTop99pSum field value if set, zero value otherwise. func (o *UsageSummaryResponse) GetDbmHostTop99pSum() int64 { if o == nil || o.DbmHostTop99pSum == nil { @@ -2983,6 +3017,62 @@ func (o *UsageSummaryResponse) SetObservabilityPipelinesBytesProcessedAggSum(v i o.ObservabilityPipelinesBytesProcessedAggSum = &v } +// GetOciHostAggSum returns the OciHostAggSum field value if set, zero value otherwise. +func (o *UsageSummaryResponse) GetOciHostAggSum() int64 { + if o == nil || o.OciHostAggSum == nil { + var ret int64 + return ret + } + return *o.OciHostAggSum +} + +// GetOciHostAggSumOk returns a tuple with the OciHostAggSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryResponse) GetOciHostAggSumOk() (*int64, bool) { + if o == nil || o.OciHostAggSum == nil { + return nil, false + } + return o.OciHostAggSum, true +} + +// HasOciHostAggSum returns a boolean if a field has been set. +func (o *UsageSummaryResponse) HasOciHostAggSum() bool { + return o != nil && o.OciHostAggSum != nil +} + +// SetOciHostAggSum gets a reference to the given int64 and assigns it to the OciHostAggSum field. +func (o *UsageSummaryResponse) SetOciHostAggSum(v int64) { + o.OciHostAggSum = &v +} + +// GetOciHostTop99pSum returns the OciHostTop99pSum field value if set, zero value otherwise. +func (o *UsageSummaryResponse) GetOciHostTop99pSum() int64 { + if o == nil || o.OciHostTop99pSum == nil { + var ret int64 + return ret + } + return *o.OciHostTop99pSum +} + +// GetOciHostTop99pSumOk returns a tuple with the OciHostTop99pSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageSummaryResponse) GetOciHostTop99pSumOk() (*int64, bool) { + if o == nil || o.OciHostTop99pSum == nil { + return nil, false + } + return o.OciHostTop99pSum, true +} + +// HasOciHostTop99pSum returns a boolean if a field has been set. +func (o *UsageSummaryResponse) HasOciHostTop99pSum() bool { + return o != nil && o.OciHostTop99pSum != nil +} + +// SetOciHostTop99pSum gets a reference to the given int64 and assigns it to the OciHostTop99pSum field. +func (o *UsageSummaryResponse) SetOciHostTop99pSum(v int64) { + o.OciHostTop99pSum = &v +} + // GetOnlineArchiveEventsCountAggSum returns the OnlineArchiveEventsCountAggSum field value if set, zero value otherwise. func (o *UsageSummaryResponse) GetOnlineArchiveEventsCountAggSum() int64 { if o == nil || o.OnlineArchiveEventsCountAggSum == nil { @@ -4560,6 +4650,9 @@ func (o UsageSummaryResponse) MarshalJSON() ([]byte, error) { if o.CwsHostTop99pSum != nil { toSerialize["cws_host_top99p_sum"] = o.CwsHostTop99pSum } + if o.DataJobsMonitoringHostHrAggSum != nil { + toSerialize["data_jobs_monitoring_host_hr_agg_sum"] = o.DataJobsMonitoringHostHrAggSum + } if o.DbmHostTop99pSum != nil { toSerialize["dbm_host_top99p_sum"] = o.DbmHostTop99pSum } @@ -4685,6 +4778,12 @@ func (o UsageSummaryResponse) MarshalJSON() ([]byte, error) { if o.ObservabilityPipelinesBytesProcessedAggSum != nil { toSerialize["observability_pipelines_bytes_processed_agg_sum"] = o.ObservabilityPipelinesBytesProcessedAggSum } + if o.OciHostAggSum != nil { + toSerialize["oci_host_agg_sum"] = o.OciHostAggSum + } + if o.OciHostTop99pSum != nil { + toSerialize["oci_host_top99p_sum"] = o.OciHostTop99pSum + } if o.OnlineArchiveEventsCountAggSum != nil { toSerialize["online_archive_events_count_agg_sum"] = o.OnlineArchiveEventsCountAggSum } @@ -4903,6 +5002,7 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { CustomTsSum *int64 `json:"custom_ts_sum,omitempty"` CwsContainersAvgSum *int64 `json:"cws_containers_avg_sum,omitempty"` CwsHostTop99pSum *int64 `json:"cws_host_top99p_sum,omitempty"` + DataJobsMonitoringHostHrAggSum *int64 `json:"data_jobs_monitoring_host_hr_agg_sum,omitempty"` DbmHostTop99pSum *int64 `json:"dbm_host_top99p_sum,omitempty"` DbmQueriesAvgSum *int64 `json:"dbm_queries_avg_sum,omitempty"` EndDate *time.Time `json:"end_date,omitempty"` @@ -4942,6 +5042,8 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { NetflowIndexedEventsCountAggSum *int64 `json:"netflow_indexed_events_count_agg_sum,omitempty"` NpmHostTop99pSum *int64 `json:"npm_host_top99p_sum,omitempty"` ObservabilityPipelinesBytesProcessedAggSum *int64 `json:"observability_pipelines_bytes_processed_agg_sum,omitempty"` + OciHostAggSum *int64 `json:"oci_host_agg_sum,omitempty"` + OciHostTop99pSum *int64 `json:"oci_host_top99p_sum,omitempty"` OnlineArchiveEventsCountAggSum *int64 `json:"online_archive_events_count_agg_sum,omitempty"` OpentelemetryApmHostTop99pSum *int64 `json:"opentelemetry_apm_host_top99p_sum,omitempty"` OpentelemetryHostTop99pSum *int64 `json:"opentelemetry_host_top99p_sum,omitempty"` @@ -4998,7 +5100,7 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"agent_host_top99p_sum", "apm_azure_app_service_host_top99p_sum", "apm_devsecops_host_top99p_sum", "apm_fargate_count_avg_sum", "apm_host_top99p_sum", "appsec_fargate_count_avg_sum", "asm_serverless_agg_sum", "audit_logs_lines_indexed_agg_sum", "audit_trail_enabled_hwm_sum", "avg_profiled_fargate_tasks_sum", "aws_host_top99p_sum", "aws_lambda_func_count", "aws_lambda_invocations_sum", "azure_app_service_top99p_sum", "azure_host_top99p_sum", "billable_ingested_bytes_agg_sum", "browser_rum_lite_session_count_agg_sum", "browser_rum_replay_session_count_agg_sum", "browser_rum_units_agg_sum", "ci_pipeline_indexed_spans_agg_sum", "ci_test_indexed_spans_agg_sum", "ci_visibility_itr_committers_hwm_sum", "ci_visibility_pipeline_committers_hwm_sum", "ci_visibility_test_committers_hwm_sum", "cloud_cost_management_aws_host_count_avg_sum", "cloud_cost_management_azure_host_count_avg_sum", "cloud_cost_management_gcp_host_count_avg_sum", "cloud_cost_management_host_count_avg_sum", "cloud_siem_events_agg_sum", "container_avg_sum", "container_excl_agent_avg_sum", "container_hwm_sum", "csm_container_enterprise_compliance_count_agg_sum", "csm_container_enterprise_cws_count_agg_sum", "csm_container_enterprise_total_count_agg_sum", "csm_host_enterprise_aas_host_count_top99p_sum", "csm_host_enterprise_aws_host_count_top99p_sum", "csm_host_enterprise_azure_host_count_top99p_sum", "csm_host_enterprise_compliance_host_count_top99p_sum", "csm_host_enterprise_cws_host_count_top99p_sum", "csm_host_enterprise_gcp_host_count_top99p_sum", "csm_host_enterprise_total_host_count_top99p_sum", "cspm_aas_host_top99p_sum", "cspm_aws_host_top99p_sum", "cspm_azure_host_top99p_sum", "cspm_container_avg_sum", "cspm_container_hwm_sum", "cspm_gcp_host_top99p_sum", "cspm_host_top99p_sum", "custom_historical_ts_sum", "custom_live_ts_sum", "custom_ts_sum", "cws_containers_avg_sum", "cws_host_top99p_sum", "dbm_host_top99p_sum", "dbm_queries_avg_sum", "end_date", "error_tracking_events_agg_sum", "fargate_tasks_count_avg_sum", "fargate_tasks_count_hwm_sum", "flex_logs_compute_large_avg_sum", "flex_logs_compute_medium_avg_sum", "flex_logs_compute_small_avg_sum", "flex_logs_compute_xsmall_avg_sum", "flex_logs_starter_avg_sum", "flex_logs_starter_storage_index_avg_sum", "flex_logs_starter_storage_retention_adjustment_avg_sum", "flex_stored_logs_avg_sum", "forwarding_events_bytes_agg_sum", "gcp_host_top99p_sum", "heroku_host_top99p_sum", "incident_management_monthly_active_users_hwm_sum", "indexed_events_count_agg_sum", "infra_host_top99p_sum", "ingested_events_bytes_agg_sum", "iot_device_agg_sum", "iot_device_top99p_sum", "last_updated", "live_indexed_events_agg_sum", "live_ingested_bytes_agg_sum", "logs_by_retention", "mobile_rum_lite_session_count_agg_sum", "mobile_rum_session_count_agg_sum", "mobile_rum_session_count_android_agg_sum", "mobile_rum_session_count_flutter_agg_sum", "mobile_rum_session_count_ios_agg_sum", "mobile_rum_session_count_reactnative_agg_sum", "mobile_rum_session_count_roku_agg_sum", "mobile_rum_units_agg_sum", "ndm_netflow_events_agg_sum", "netflow_indexed_events_count_agg_sum", "npm_host_top99p_sum", "observability_pipelines_bytes_processed_agg_sum", "online_archive_events_count_agg_sum", "opentelemetry_apm_host_top99p_sum", "opentelemetry_host_top99p_sum", "profiling_aas_count_top99p_sum", "profiling_container_agent_count_avg", "profiling_host_count_top99p_sum", "rehydrated_indexed_events_agg_sum", "rehydrated_ingested_bytes_agg_sum", "rum_browser_and_mobile_session_count", "rum_browser_legacy_session_count_agg_sum", "rum_browser_lite_session_count_agg_sum", "rum_browser_replay_session_count_agg_sum", "rum_lite_session_count_agg_sum", "rum_mobile_legacy_session_count_android_agg_sum", "rum_mobile_legacy_session_count_flutter_agg_sum", "rum_mobile_legacy_session_count_ios_agg_sum", "rum_mobile_legacy_session_count_reactnative_agg_sum", "rum_mobile_legacy_session_count_roku_agg_sum", "rum_mobile_lite_session_count_android_agg_sum", "rum_mobile_lite_session_count_flutter_agg_sum", "rum_mobile_lite_session_count_ios_agg_sum", "rum_mobile_lite_session_count_reactnative_agg_sum", "rum_mobile_lite_session_count_roku_agg_sum", "rum_replay_session_count_agg_sum", "rum_session_count_agg_sum", "rum_total_session_count_agg_sum", "rum_units_agg_sum", "sca_fargate_count_avg_sum", "sca_fargate_count_hwm_sum", "sds_apm_scanned_bytes_sum", "sds_events_scanned_bytes_sum", "sds_logs_scanned_bytes_sum", "sds_rum_scanned_bytes_sum", "sds_total_scanned_bytes_sum", "serverless_apps_azure_count_avg_sum", "serverless_apps_google_count_avg_sum", "serverless_apps_total_count_avg_sum", "siem_analyzed_logs_add_on_count_agg_sum", "start_date", "synthetics_browser_check_calls_count_agg_sum", "synthetics_check_calls_count_agg_sum", "synthetics_mobile_test_runs_agg_sum", "synthetics_parallel_testing_max_slots_hwm_sum", "trace_search_indexed_events_count_agg_sum", "twol_ingested_events_bytes_agg_sum", "universal_service_monitoring_host_top99p_sum", "usage", "vsphere_host_top99p_sum", "vuln_management_host_count_top99p_sum", "workflow_executions_usage_agg_sum"}) + datadog.DeleteKeys(additionalProperties, &[]string{"agent_host_top99p_sum", "apm_azure_app_service_host_top99p_sum", "apm_devsecops_host_top99p_sum", "apm_fargate_count_avg_sum", "apm_host_top99p_sum", "appsec_fargate_count_avg_sum", "asm_serverless_agg_sum", "audit_logs_lines_indexed_agg_sum", "audit_trail_enabled_hwm_sum", "avg_profiled_fargate_tasks_sum", "aws_host_top99p_sum", "aws_lambda_func_count", "aws_lambda_invocations_sum", "azure_app_service_top99p_sum", "azure_host_top99p_sum", "billable_ingested_bytes_agg_sum", "browser_rum_lite_session_count_agg_sum", "browser_rum_replay_session_count_agg_sum", "browser_rum_units_agg_sum", "ci_pipeline_indexed_spans_agg_sum", "ci_test_indexed_spans_agg_sum", "ci_visibility_itr_committers_hwm_sum", "ci_visibility_pipeline_committers_hwm_sum", "ci_visibility_test_committers_hwm_sum", "cloud_cost_management_aws_host_count_avg_sum", "cloud_cost_management_azure_host_count_avg_sum", "cloud_cost_management_gcp_host_count_avg_sum", "cloud_cost_management_host_count_avg_sum", "cloud_siem_events_agg_sum", "container_avg_sum", "container_excl_agent_avg_sum", "container_hwm_sum", "csm_container_enterprise_compliance_count_agg_sum", "csm_container_enterprise_cws_count_agg_sum", "csm_container_enterprise_total_count_agg_sum", "csm_host_enterprise_aas_host_count_top99p_sum", "csm_host_enterprise_aws_host_count_top99p_sum", "csm_host_enterprise_azure_host_count_top99p_sum", "csm_host_enterprise_compliance_host_count_top99p_sum", "csm_host_enterprise_cws_host_count_top99p_sum", "csm_host_enterprise_gcp_host_count_top99p_sum", "csm_host_enterprise_total_host_count_top99p_sum", "cspm_aas_host_top99p_sum", "cspm_aws_host_top99p_sum", "cspm_azure_host_top99p_sum", "cspm_container_avg_sum", "cspm_container_hwm_sum", "cspm_gcp_host_top99p_sum", "cspm_host_top99p_sum", "custom_historical_ts_sum", "custom_live_ts_sum", "custom_ts_sum", "cws_containers_avg_sum", "cws_host_top99p_sum", "data_jobs_monitoring_host_hr_agg_sum", "dbm_host_top99p_sum", "dbm_queries_avg_sum", "end_date", "error_tracking_events_agg_sum", "fargate_tasks_count_avg_sum", "fargate_tasks_count_hwm_sum", "flex_logs_compute_large_avg_sum", "flex_logs_compute_medium_avg_sum", "flex_logs_compute_small_avg_sum", "flex_logs_compute_xsmall_avg_sum", "flex_logs_starter_avg_sum", "flex_logs_starter_storage_index_avg_sum", "flex_logs_starter_storage_retention_adjustment_avg_sum", "flex_stored_logs_avg_sum", "forwarding_events_bytes_agg_sum", "gcp_host_top99p_sum", "heroku_host_top99p_sum", "incident_management_monthly_active_users_hwm_sum", "indexed_events_count_agg_sum", "infra_host_top99p_sum", "ingested_events_bytes_agg_sum", "iot_device_agg_sum", "iot_device_top99p_sum", "last_updated", "live_indexed_events_agg_sum", "live_ingested_bytes_agg_sum", "logs_by_retention", "mobile_rum_lite_session_count_agg_sum", "mobile_rum_session_count_agg_sum", "mobile_rum_session_count_android_agg_sum", "mobile_rum_session_count_flutter_agg_sum", "mobile_rum_session_count_ios_agg_sum", "mobile_rum_session_count_reactnative_agg_sum", "mobile_rum_session_count_roku_agg_sum", "mobile_rum_units_agg_sum", "ndm_netflow_events_agg_sum", "netflow_indexed_events_count_agg_sum", "npm_host_top99p_sum", "observability_pipelines_bytes_processed_agg_sum", "oci_host_agg_sum", "oci_host_top99p_sum", "online_archive_events_count_agg_sum", "opentelemetry_apm_host_top99p_sum", "opentelemetry_host_top99p_sum", "profiling_aas_count_top99p_sum", "profiling_container_agent_count_avg", "profiling_host_count_top99p_sum", "rehydrated_indexed_events_agg_sum", "rehydrated_ingested_bytes_agg_sum", "rum_browser_and_mobile_session_count", "rum_browser_legacy_session_count_agg_sum", "rum_browser_lite_session_count_agg_sum", "rum_browser_replay_session_count_agg_sum", "rum_lite_session_count_agg_sum", "rum_mobile_legacy_session_count_android_agg_sum", "rum_mobile_legacy_session_count_flutter_agg_sum", "rum_mobile_legacy_session_count_ios_agg_sum", "rum_mobile_legacy_session_count_reactnative_agg_sum", "rum_mobile_legacy_session_count_roku_agg_sum", "rum_mobile_lite_session_count_android_agg_sum", "rum_mobile_lite_session_count_flutter_agg_sum", "rum_mobile_lite_session_count_ios_agg_sum", "rum_mobile_lite_session_count_reactnative_agg_sum", "rum_mobile_lite_session_count_roku_agg_sum", "rum_replay_session_count_agg_sum", "rum_session_count_agg_sum", "rum_total_session_count_agg_sum", "rum_units_agg_sum", "sca_fargate_count_avg_sum", "sca_fargate_count_hwm_sum", "sds_apm_scanned_bytes_sum", "sds_events_scanned_bytes_sum", "sds_logs_scanned_bytes_sum", "sds_rum_scanned_bytes_sum", "sds_total_scanned_bytes_sum", "serverless_apps_azure_count_avg_sum", "serverless_apps_google_count_avg_sum", "serverless_apps_total_count_avg_sum", "siem_analyzed_logs_add_on_count_agg_sum", "start_date", "synthetics_browser_check_calls_count_agg_sum", "synthetics_check_calls_count_agg_sum", "synthetics_mobile_test_runs_agg_sum", "synthetics_parallel_testing_max_slots_hwm_sum", "trace_search_indexed_events_count_agg_sum", "twol_ingested_events_bytes_agg_sum", "universal_service_monitoring_host_top99p_sum", "usage", "vsphere_host_top99p_sum", "vuln_management_host_count_top99p_sum", "workflow_executions_usage_agg_sum"}) } else { return err } @@ -5058,6 +5160,7 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { o.CustomTsSum = all.CustomTsSum o.CwsContainersAvgSum = all.CwsContainersAvgSum o.CwsHostTop99pSum = all.CwsHostTop99pSum + o.DataJobsMonitoringHostHrAggSum = all.DataJobsMonitoringHostHrAggSum o.DbmHostTop99pSum = all.DbmHostTop99pSum o.DbmQueriesAvgSum = all.DbmQueriesAvgSum o.EndDate = all.EndDate @@ -5100,6 +5203,8 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { o.NetflowIndexedEventsCountAggSum = all.NetflowIndexedEventsCountAggSum o.NpmHostTop99pSum = all.NpmHostTop99pSum o.ObservabilityPipelinesBytesProcessedAggSum = all.ObservabilityPipelinesBytesProcessedAggSum + o.OciHostAggSum = all.OciHostAggSum + o.OciHostTop99pSum = all.OciHostTop99pSum o.OnlineArchiveEventsCountAggSum = all.OnlineArchiveEventsCountAggSum o.OpentelemetryApmHostTop99pSum = all.OpentelemetryApmHostTop99pSum o.OpentelemetryHostTop99pSum = all.OpentelemetryHostTop99pSum diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_legacy_live_span.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_legacy_live_span.go new file mode 100644 index 0000000000..c0b35aa2f4 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_legacy_live_span.go @@ -0,0 +1,97 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// WidgetLegacyLiveSpan Wrapper for live span +type WidgetLegacyLiveSpan struct { + // The available timeframes depend on the widget you are using. + LiveSpan *WidgetLiveSpan `json:"live_span,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewWidgetLegacyLiveSpan instantiates a new WidgetLegacyLiveSpan object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewWidgetLegacyLiveSpan() *WidgetLegacyLiveSpan { + this := WidgetLegacyLiveSpan{} + return &this +} + +// NewWidgetLegacyLiveSpanWithDefaults instantiates a new WidgetLegacyLiveSpan object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewWidgetLegacyLiveSpanWithDefaults() *WidgetLegacyLiveSpan { + this := WidgetLegacyLiveSpan{} + return &this +} + +// GetLiveSpan returns the LiveSpan field value if set, zero value otherwise. +func (o *WidgetLegacyLiveSpan) GetLiveSpan() WidgetLiveSpan { + if o == nil || o.LiveSpan == nil { + var ret WidgetLiveSpan + return ret + } + return *o.LiveSpan +} + +// GetLiveSpanOk returns a tuple with the LiveSpan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WidgetLegacyLiveSpan) GetLiveSpanOk() (*WidgetLiveSpan, bool) { + if o == nil || o.LiveSpan == nil { + return nil, false + } + return o.LiveSpan, true +} + +// HasLiveSpan returns a boolean if a field has been set. +func (o *WidgetLegacyLiveSpan) HasLiveSpan() bool { + return o != nil && o.LiveSpan != nil +} + +// SetLiveSpan gets a reference to the given WidgetLiveSpan and assigns it to the LiveSpan field. +func (o *WidgetLegacyLiveSpan) SetLiveSpan(v WidgetLiveSpan) { + o.LiveSpan = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o WidgetLegacyLiveSpan) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.LiveSpan != nil { + toSerialize["live_span"] = o.LiveSpan + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *WidgetLegacyLiveSpan) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + LiveSpan *WidgetLiveSpan `json:"live_span,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + hasInvalidField := false + if all.LiveSpan != nil && !all.LiveSpan.IsValid() { + hasInvalidField = true + } else { + o.LiveSpan = all.LiveSpan + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_live_span_unit.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_live_span_unit.go new file mode 100644 index 0000000000..ce7c1a08ca --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_live_span_unit.go @@ -0,0 +1,74 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// WidgetLiveSpanUnit Unit of the time span. +type WidgetLiveSpanUnit string + +// List of WidgetLiveSpanUnit. +const ( + WIDGETLIVESPANUNIT_MINUTE WidgetLiveSpanUnit = "minute" + WIDGETLIVESPANUNIT_HOUR WidgetLiveSpanUnit = "hour" + WIDGETLIVESPANUNIT_DAY WidgetLiveSpanUnit = "day" + WIDGETLIVESPANUNIT_WEEK WidgetLiveSpanUnit = "week" + WIDGETLIVESPANUNIT_MONTH WidgetLiveSpanUnit = "month" + WIDGETLIVESPANUNIT_YEAR WidgetLiveSpanUnit = "year" +) + +var allowedWidgetLiveSpanUnitEnumValues = []WidgetLiveSpanUnit{ + WIDGETLIVESPANUNIT_MINUTE, + WIDGETLIVESPANUNIT_HOUR, + WIDGETLIVESPANUNIT_DAY, + WIDGETLIVESPANUNIT_WEEK, + WIDGETLIVESPANUNIT_MONTH, + WIDGETLIVESPANUNIT_YEAR, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *WidgetLiveSpanUnit) GetAllowedValues() []WidgetLiveSpanUnit { + return allowedWidgetLiveSpanUnitEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *WidgetLiveSpanUnit) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = WidgetLiveSpanUnit(value) + return nil +} + +// NewWidgetLiveSpanUnitFromValue returns a pointer to a valid WidgetLiveSpanUnit +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewWidgetLiveSpanUnitFromValue(v string) (*WidgetLiveSpanUnit, error) { + ev := WidgetLiveSpanUnit(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for WidgetLiveSpanUnit: valid values are %v", v, allowedWidgetLiveSpanUnitEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v WidgetLiveSpanUnit) IsValid() bool { + for _, existing := range allowedWidgetLiveSpanUnitEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to WidgetLiveSpanUnit value. +func (v WidgetLiveSpanUnit) Ptr() *WidgetLiveSpanUnit { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_fixed_span.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_fixed_span.go new file mode 100644 index 0000000000..26405fff17 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_fixed_span.go @@ -0,0 +1,175 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// WidgetNewFixedSpan Used for fixed span times, such as 'March 1 to March 7'. +type WidgetNewFixedSpan struct { + // Start time in seconds since epoch. + From int64 `json:"from"` + // End time in seconds since epoch. + To int64 `json:"to"` + // Type "fixed" denotes a fixed span. + Type WidgetNewFixedSpanType `json:"type"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewWidgetNewFixedSpan instantiates a new WidgetNewFixedSpan object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewWidgetNewFixedSpan(from int64, to int64, typeVar WidgetNewFixedSpanType) *WidgetNewFixedSpan { + this := WidgetNewFixedSpan{} + this.From = from + this.To = to + this.Type = typeVar + return &this +} + +// NewWidgetNewFixedSpanWithDefaults instantiates a new WidgetNewFixedSpan object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewWidgetNewFixedSpanWithDefaults() *WidgetNewFixedSpan { + this := WidgetNewFixedSpan{} + return &this +} + +// GetFrom returns the From field value. +func (o *WidgetNewFixedSpan) GetFrom() int64 { + if o == nil { + var ret int64 + return ret + } + return o.From +} + +// GetFromOk returns a tuple with the From field value +// and a boolean to check if the value has been set. +func (o *WidgetNewFixedSpan) GetFromOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.From, true +} + +// SetFrom sets field value. +func (o *WidgetNewFixedSpan) SetFrom(v int64) { + o.From = v +} + +// GetTo returns the To field value. +func (o *WidgetNewFixedSpan) GetTo() int64 { + if o == nil { + var ret int64 + return ret + } + return o.To +} + +// GetToOk returns a tuple with the To field value +// and a boolean to check if the value has been set. +func (o *WidgetNewFixedSpan) GetToOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.To, true +} + +// SetTo sets field value. +func (o *WidgetNewFixedSpan) SetTo(v int64) { + o.To = v +} + +// GetType returns the Type field value. +func (o *WidgetNewFixedSpan) GetType() WidgetNewFixedSpanType { + if o == nil { + var ret WidgetNewFixedSpanType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WidgetNewFixedSpan) GetTypeOk() (*WidgetNewFixedSpanType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *WidgetNewFixedSpan) SetType(v WidgetNewFixedSpanType) { + o.Type = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o WidgetNewFixedSpan) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["from"] = o.From + toSerialize["to"] = o.To + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *WidgetNewFixedSpan) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + From *int64 `json:"from"` + To *int64 `json:"to"` + Type *WidgetNewFixedSpanType `json:"type"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.From == nil { + return fmt.Errorf("required field from missing") + } + if all.To == nil { + return fmt.Errorf("required field to missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"from", "to", "type"}) + } else { + return err + } + + hasInvalidField := false + o.From = *all.From + o.To = *all.To + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_fixed_span_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_fixed_span_type.go new file mode 100644 index 0000000000..6060877fe5 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_fixed_span_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// WidgetNewFixedSpanType Type "fixed" denotes a fixed span. +type WidgetNewFixedSpanType string + +// List of WidgetNewFixedSpanType. +const ( + WIDGETNEWFIXEDSPANTYPE_FIXED WidgetNewFixedSpanType = "fixed" +) + +var allowedWidgetNewFixedSpanTypeEnumValues = []WidgetNewFixedSpanType{ + WIDGETNEWFIXEDSPANTYPE_FIXED, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *WidgetNewFixedSpanType) GetAllowedValues() []WidgetNewFixedSpanType { + return allowedWidgetNewFixedSpanTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *WidgetNewFixedSpanType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = WidgetNewFixedSpanType(value) + return nil +} + +// NewWidgetNewFixedSpanTypeFromValue returns a pointer to a valid WidgetNewFixedSpanType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewWidgetNewFixedSpanTypeFromValue(v string) (*WidgetNewFixedSpanType, error) { + ev := WidgetNewFixedSpanType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for WidgetNewFixedSpanType: valid values are %v", v, allowedWidgetNewFixedSpanTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v WidgetNewFixedSpanType) IsValid() bool { + for _, existing := range allowedWidgetNewFixedSpanTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to WidgetNewFixedSpanType value. +func (v WidgetNewFixedSpanType) Ptr() *WidgetNewFixedSpanType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_live_span.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_live_span.go new file mode 100644 index 0000000000..6eaa061578 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_live_span.go @@ -0,0 +1,179 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// WidgetNewLiveSpan Used for arbitrary live span times, such as 17 minutes or 6 hours. +type WidgetNewLiveSpan struct { + // Type "live" denotes a live span in the new format. + Type WidgetNewLiveSpanType `json:"type"` + // Unit of the time span. + Unit WidgetLiveSpanUnit `json:"unit"` + // Value of the time span. + Value int64 `json:"value"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewWidgetNewLiveSpan instantiates a new WidgetNewLiveSpan object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewWidgetNewLiveSpan(typeVar WidgetNewLiveSpanType, unit WidgetLiveSpanUnit, value int64) *WidgetNewLiveSpan { + this := WidgetNewLiveSpan{} + this.Type = typeVar + this.Unit = unit + this.Value = value + return &this +} + +// NewWidgetNewLiveSpanWithDefaults instantiates a new WidgetNewLiveSpan object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewWidgetNewLiveSpanWithDefaults() *WidgetNewLiveSpan { + this := WidgetNewLiveSpan{} + return &this +} + +// GetType returns the Type field value. +func (o *WidgetNewLiveSpan) GetType() WidgetNewLiveSpanType { + if o == nil { + var ret WidgetNewLiveSpanType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WidgetNewLiveSpan) GetTypeOk() (*WidgetNewLiveSpanType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *WidgetNewLiveSpan) SetType(v WidgetNewLiveSpanType) { + o.Type = v +} + +// GetUnit returns the Unit field value. +func (o *WidgetNewLiveSpan) GetUnit() WidgetLiveSpanUnit { + if o == nil { + var ret WidgetLiveSpanUnit + return ret + } + return o.Unit +} + +// GetUnitOk returns a tuple with the Unit field value +// and a boolean to check if the value has been set. +func (o *WidgetNewLiveSpan) GetUnitOk() (*WidgetLiveSpanUnit, bool) { + if o == nil { + return nil, false + } + return &o.Unit, true +} + +// SetUnit sets field value. +func (o *WidgetNewLiveSpan) SetUnit(v WidgetLiveSpanUnit) { + o.Unit = v +} + +// GetValue returns the Value field value. +func (o *WidgetNewLiveSpan) GetValue() int64 { + if o == nil { + var ret int64 + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *WidgetNewLiveSpan) GetValueOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value. +func (o *WidgetNewLiveSpan) SetValue(v int64) { + o.Value = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o WidgetNewLiveSpan) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["type"] = o.Type + toSerialize["unit"] = o.Unit + toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *WidgetNewLiveSpan) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Type *WidgetNewLiveSpanType `json:"type"` + Unit *WidgetLiveSpanUnit `json:"unit"` + Value *int64 `json:"value"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + if all.Unit == nil { + return fmt.Errorf("required field unit missing") + } + if all.Value == nil { + return fmt.Errorf("required field value missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"type", "unit", "value"}) + } else { + return err + } + + hasInvalidField := false + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + if !all.Unit.IsValid() { + hasInvalidField = true + } else { + o.Unit = *all.Unit + } + o.Value = *all.Value + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_live_span_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_live_span_type.go new file mode 100644 index 0000000000..6565d93181 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_new_live_span_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// WidgetNewLiveSpanType Type "live" denotes a live span in the new format. +type WidgetNewLiveSpanType string + +// List of WidgetNewLiveSpanType. +const ( + WIDGETNEWLIVESPANTYPE_LIVE WidgetNewLiveSpanType = "live" +) + +var allowedWidgetNewLiveSpanTypeEnumValues = []WidgetNewLiveSpanType{ + WIDGETNEWLIVESPANTYPE_LIVE, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *WidgetNewLiveSpanType) GetAllowedValues() []WidgetNewLiveSpanType { + return allowedWidgetNewLiveSpanTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *WidgetNewLiveSpanType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = WidgetNewLiveSpanType(value) + return nil +} + +// NewWidgetNewLiveSpanTypeFromValue returns a pointer to a valid WidgetNewLiveSpanType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewWidgetNewLiveSpanTypeFromValue(v string) (*WidgetNewLiveSpanType, error) { + ev := WidgetNewLiveSpanType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for WidgetNewLiveSpanType: valid values are %v", v, allowedWidgetNewLiveSpanTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v WidgetNewLiveSpanType) IsValid() bool { + for _, existing := range allowedWidgetNewLiveSpanTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to WidgetNewLiveSpanType value. +func (v WidgetNewLiveSpanType) Ptr() *WidgetNewLiveSpanType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_time.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_time.go index 483f86756b..c29b77e319 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_time.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV1/model_widget_time.go @@ -8,105 +8,130 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) -// WidgetTime Time setting for the widget. +// WidgetTime - Time setting for the widget. type WidgetTime struct { - // The available timeframes depend on the widget you are using. - LiveSpan *WidgetLiveSpan `json:"live_span,omitempty"` + WidgetLegacyLiveSpan *WidgetLegacyLiveSpan + WidgetNewLiveSpan *WidgetNewLiveSpan + WidgetNewFixedSpan *WidgetNewFixedSpan + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct - UnparsedObject map[string]interface{} `json:"-"` - AdditionalProperties map[string]interface{} `json:"-"` + UnparsedObject interface{} } -// NewWidgetTime instantiates a new WidgetTime object. -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewWidgetTime() *WidgetTime { - this := WidgetTime{} - return &this +// WidgetLegacyLiveSpanAsWidgetTime is a convenience function that returns WidgetLegacyLiveSpan wrapped in WidgetTime. +func WidgetLegacyLiveSpanAsWidgetTime(v *WidgetLegacyLiveSpan) WidgetTime { + return WidgetTime{WidgetLegacyLiveSpan: v} } -// NewWidgetTimeWithDefaults instantiates a new WidgetTime object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set. -func NewWidgetTimeWithDefaults() *WidgetTime { - this := WidgetTime{} - return &this +// WidgetNewLiveSpanAsWidgetTime is a convenience function that returns WidgetNewLiveSpan wrapped in WidgetTime. +func WidgetNewLiveSpanAsWidgetTime(v *WidgetNewLiveSpan) WidgetTime { + return WidgetTime{WidgetNewLiveSpan: v} } -// GetLiveSpan returns the LiveSpan field value if set, zero value otherwise. -func (o *WidgetTime) GetLiveSpan() WidgetLiveSpan { - if o == nil || o.LiveSpan == nil { - var ret WidgetLiveSpan - return ret - } - return *o.LiveSpan +// WidgetNewFixedSpanAsWidgetTime is a convenience function that returns WidgetNewFixedSpan wrapped in WidgetTime. +func WidgetNewFixedSpanAsWidgetTime(v *WidgetNewFixedSpan) WidgetTime { + return WidgetTime{WidgetNewFixedSpan: v} } -// GetLiveSpanOk returns a tuple with the LiveSpan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *WidgetTime) GetLiveSpanOk() (*WidgetLiveSpan, bool) { - if o == nil || o.LiveSpan == nil { - return nil, false +// UnmarshalJSON turns data into one of the pointers in the struct. +func (obj *WidgetTime) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into WidgetLegacyLiveSpan + err = datadog.Unmarshal(data, &obj.WidgetLegacyLiveSpan) + if err == nil { + if obj.WidgetLegacyLiveSpan != nil && obj.WidgetLegacyLiveSpan.UnparsedObject == nil { + jsonWidgetLegacyLiveSpan, _ := datadog.Marshal(obj.WidgetLegacyLiveSpan) + if string(jsonWidgetLegacyLiveSpan) == "{}" && string(data) != "{}" { // empty struct + obj.WidgetLegacyLiveSpan = nil + } else { + match++ + } + } else { + obj.WidgetLegacyLiveSpan = nil + } + } else { + obj.WidgetLegacyLiveSpan = nil } - return o.LiveSpan, true -} -// HasLiveSpan returns a boolean if a field has been set. -func (o *WidgetTime) HasLiveSpan() bool { - return o != nil && o.LiveSpan != nil -} + // try to unmarshal data into WidgetNewLiveSpan + err = datadog.Unmarshal(data, &obj.WidgetNewLiveSpan) + if err == nil { + if obj.WidgetNewLiveSpan != nil && obj.WidgetNewLiveSpan.UnparsedObject == nil { + jsonWidgetNewLiveSpan, _ := datadog.Marshal(obj.WidgetNewLiveSpan) + if string(jsonWidgetNewLiveSpan) == "{}" { // empty struct + obj.WidgetNewLiveSpan = nil + } else { + match++ + } + } else { + obj.WidgetNewLiveSpan = nil + } + } else { + obj.WidgetNewLiveSpan = nil + } -// SetLiveSpan gets a reference to the given WidgetLiveSpan and assigns it to the LiveSpan field. -func (o *WidgetTime) SetLiveSpan(v WidgetLiveSpan) { - o.LiveSpan = &v -} + // try to unmarshal data into WidgetNewFixedSpan + err = datadog.Unmarshal(data, &obj.WidgetNewFixedSpan) + if err == nil { + if obj.WidgetNewFixedSpan != nil && obj.WidgetNewFixedSpan.UnparsedObject == nil { + jsonWidgetNewFixedSpan, _ := datadog.Marshal(obj.WidgetNewFixedSpan) + if string(jsonWidgetNewFixedSpan) == "{}" { // empty struct + obj.WidgetNewFixedSpan = nil + } else { + match++ + } + } else { + obj.WidgetNewFixedSpan = nil + } + } else { + obj.WidgetNewFixedSpan = nil + } -// MarshalJSON serializes the struct using spec logic. -func (o WidgetTime) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.UnparsedObject != nil { - return datadog.Marshal(o.UnparsedObject) + if match != 1 { // more than 1 match + // reset to nil + obj.WidgetLegacyLiveSpan = nil + obj.WidgetNewLiveSpan = nil + obj.WidgetNewFixedSpan = nil + return datadog.Unmarshal(data, &obj.UnparsedObject) } - if o.LiveSpan != nil { - toSerialize["live_span"] = o.LiveSpan + return nil // exactly one match +} + +// MarshalJSON turns data from the first non-nil pointers in the struct to JSON. +func (obj WidgetTime) MarshalJSON() ([]byte, error) { + if obj.WidgetLegacyLiveSpan != nil { + return datadog.Marshal(&obj.WidgetLegacyLiveSpan) } - for key, value := range o.AdditionalProperties { - toSerialize[key] = value + if obj.WidgetNewLiveSpan != nil { + return datadog.Marshal(&obj.WidgetNewLiveSpan) } - return datadog.Marshal(toSerialize) -} -// UnmarshalJSON deserializes the given payload. -func (o *WidgetTime) UnmarshalJSON(bytes []byte) (err error) { - all := struct { - LiveSpan *WidgetLiveSpan `json:"live_span,omitempty"` - }{} - if err = datadog.Unmarshal(bytes, &all); err != nil { - return datadog.Unmarshal(bytes, &o.UnparsedObject) + if obj.WidgetNewFixedSpan != nil { + return datadog.Marshal(&obj.WidgetNewFixedSpan) } - additionalProperties := make(map[string]interface{}) - if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"live_span"}) - } else { - return err + + if obj.UnparsedObject != nil { + return datadog.Marshal(obj.UnparsedObject) } + return nil, nil // no data in oneOf schemas +} - hasInvalidField := false - if all.LiveSpan != nil && !all.LiveSpan.IsValid() { - hasInvalidField = true - } else { - o.LiveSpan = all.LiveSpan +// GetActualInstance returns the actual instance. +func (obj *WidgetTime) GetActualInstance() interface{} { + if obj.WidgetLegacyLiveSpan != nil { + return obj.WidgetLegacyLiveSpan } - if len(additionalProperties) > 0 { - o.AdditionalProperties = additionalProperties + if obj.WidgetNewLiveSpan != nil { + return obj.WidgetNewLiveSpan } - if hasInvalidField { - return datadog.Unmarshal(bytes, &o.UnparsedObject) + if obj.WidgetNewFixedSpan != nil { + return obj.WidgetNewFixedSpan } + // all schemas are nil return nil } diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_metrics.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_metrics.go index 8420e5707c..4f790fd88d 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_metrics.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_metrics.go @@ -697,7 +697,7 @@ func (a *MetricsApi) ListTagConfigurationByName(ctx _context.Context, metricName type ListTagConfigurationsOptionalParameters struct { FilterConfigured *bool FilterTagsConfigured *string - FilterMetricType *MetricTagConfigurationMetricTypes + FilterMetricType *MetricTagConfigurationMetricTypeCategory FilterIncludePercentiles *bool FilterQueried *bool FilterTags *string @@ -723,7 +723,7 @@ func (r *ListTagConfigurationsOptionalParameters) WithFilterTagsConfigured(filte } // WithFilterMetricType sets the corresponding parameter name and returns the struct. -func (r *ListTagConfigurationsOptionalParameters) WithFilterMetricType(filterMetricType MetricTagConfigurationMetricTypes) *ListTagConfigurationsOptionalParameters { +func (r *ListTagConfigurationsOptionalParameters) WithFilterMetricType(filterMetricType MetricTagConfigurationMetricTypeCategory) *ListTagConfigurationsOptionalParameters { r.FilterMetricType = &filterMetricType return r } diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_microsoft_teams_integration.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_microsoft_teams_integration.go new file mode 100644 index 0000000000..ae26bc290a --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_microsoft_teams_integration.go @@ -0,0 +1,545 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + _context "context" + _nethttp "net/http" + _neturl "net/url" + "strings" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsIntegrationApi service type +type MicrosoftTeamsIntegrationApi datadog.Service + +// CreateApiHandle Create handle. +// Create a handle in the Datadog Microsoft Teams integration. +func (a *MicrosoftTeamsIntegrationApi) CreateApiHandle(ctx _context.Context, body MicrosoftTeamsCreateApiHandleRequest) (MicrosoftTeamsCreateApiHandleResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarReturnValue MicrosoftTeamsCreateApiHandleResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MicrosoftTeamsIntegrationApi.CreateApiHandle") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/integration/ms-teams/configuration/tenant-based-handles" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "application/json" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 409 || localVarHTTPResponse.StatusCode == 412 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// DeleteApiHandle Delete handle. +// Delete a handle from the Datadog Microsoft Teams integration. +func (a *MicrosoftTeamsIntegrationApi) DeleteApiHandle(ctx _context.Context, handleId string) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MicrosoftTeamsIntegrationApi.DeleteApiHandle") + if err != nil { + return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}" + localVarPath = strings.Replace(localVarPath, "{"+"handle_id"+"}", _neturl.PathEscape(datadog.ParameterToString(handleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "*/*" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 412 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +// GetApiHandle Get handle information. +// Get the tenant, team, and channel information of a handle from the Datadog Microsoft Teams integration. +func (a *MicrosoftTeamsIntegrationApi) GetApiHandle(ctx _context.Context, handleId string) (MicrosoftTeamsApiHandleInfoResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarReturnValue MicrosoftTeamsApiHandleInfoResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MicrosoftTeamsIntegrationApi.GetApiHandle") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}" + localVarPath = strings.Replace(localVarPath, "{"+"handle_id"+"}", _neturl.PathEscape(datadog.ParameterToString(handleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "application/json" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 412 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// GetApiHandleByName Get handle information by name. +// Get the tenant, team, and channel information of a handle by name from the Datadog Microsoft Teams integration. +func (a *MicrosoftTeamsIntegrationApi) GetApiHandleByName(ctx _context.Context, handleName string) (MicrosoftTeamsApiHandleInfoResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarReturnValue MicrosoftTeamsApiHandleInfoResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MicrosoftTeamsIntegrationApi.GetApiHandleByName") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/integration/ms-teams/configuration/tenant-based-handles/name/{handle_name}" + localVarPath = strings.Replace(localVarPath, "{"+"handle_name"+"}", _neturl.PathEscape(datadog.ParameterToString(handleName, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "application/json" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 412 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// GetChannelByName Get channel information by name. +// Get the tenant, team, and channel ID of a channel in the Datadog Microsoft Teams integration. +func (a *MicrosoftTeamsIntegrationApi) GetChannelByName(ctx _context.Context, tenantName string, teamName string, channelName string) (MicrosoftTeamsGetChannelByNameResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarReturnValue MicrosoftTeamsGetChannelByNameResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MicrosoftTeamsIntegrationApi.GetChannelByName") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}" + localVarPath = strings.Replace(localVarPath, "{"+"tenant_name"+"}", _neturl.PathEscape(datadog.ParameterToString(tenantName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"team_name"+"}", _neturl.PathEscape(datadog.ParameterToString(teamName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"channel_name"+"}", _neturl.PathEscape(datadog.ParameterToString(channelName, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "application/json" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// ListApiHandlesOptionalParameters holds optional parameters for ListApiHandles. +type ListApiHandlesOptionalParameters struct { + TenantId *string +} + +// NewListApiHandlesOptionalParameters creates an empty struct for parameters. +func NewListApiHandlesOptionalParameters() *ListApiHandlesOptionalParameters { + this := ListApiHandlesOptionalParameters{} + return &this +} + +// WithTenantId sets the corresponding parameter name and returns the struct. +func (r *ListApiHandlesOptionalParameters) WithTenantId(tenantId string) *ListApiHandlesOptionalParameters { + r.TenantId = &tenantId + return r +} + +// ListApiHandles Get all handles. +// Get a list of all handles from the Datadog Microsoft Teams integration. +func (a *MicrosoftTeamsIntegrationApi) ListApiHandles(ctx _context.Context, o ...ListApiHandlesOptionalParameters) (MicrosoftTeamsApiHandlesResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarReturnValue MicrosoftTeamsApiHandlesResponse + optionalParams ListApiHandlesOptionalParameters + ) + + if len(o) > 1 { + return localVarReturnValue, nil, datadog.ReportError("only one argument of type ListApiHandlesOptionalParameters is allowed") + } + if len(o) == 1 { + optionalParams = o[0] + } + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MicrosoftTeamsIntegrationApi.ListApiHandles") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/integration/ms-teams/configuration/tenant-based-handles" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if optionalParams.TenantId != nil { + localVarQueryParams.Add("tenant_id", datadog.ParameterToString(*optionalParams.TenantId, "")) + } + localVarHeaderParams["Accept"] = "application/json" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 412 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// UpdateApiHandle Update handle. +// Update a handle from the Datadog Microsoft Teams integration. +func (a *MicrosoftTeamsIntegrationApi) UpdateApiHandle(ctx _context.Context, handleId string, body MicrosoftTeamsUpdateApiHandleRequest) (MicrosoftTeamsApiHandleInfoResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarReturnValue MicrosoftTeamsApiHandleInfoResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MicrosoftTeamsIntegrationApi.UpdateApiHandle") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}" + localVarPath = strings.Replace(localVarPath, "{"+"handle_id"+"}", _neturl.PathEscape(datadog.ParameterToString(handleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "application/json" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 409 || localVarHTTPResponse.StatusCode == 412 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// NewMicrosoftTeamsIntegrationApi Returns NewMicrosoftTeamsIntegrationApi. +func NewMicrosoftTeamsIntegrationApi(client *datadog.APIClient) *MicrosoftTeamsIntegrationApi { + return &MicrosoftTeamsIntegrationApi{ + Client: client, + } +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_restriction_policies.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_restriction_policies.go index a3036ca81b..18fb23c1c4 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_restriction_policies.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_restriction_policies.go @@ -158,9 +158,9 @@ func (a *RestrictionPoliciesApi) GetRestrictionPolicy(ctx _context.Context, reso // - Powerpacks: `powerpack` // - Security Rules: `security-rule` // - Service Level Objectives: `slo` -// - Synthetic Global Variables: `synthetic-global-variable` -// - Synthetic Tests: `synthetic-test` -// - Synthetic Private Locations: `synthetic-private-location` +// - Synthetic Global Variables: `synthetics-global-variable` +// - Synthetic Tests: `synthetics-test` +// - Synthetic Private Locations: `synthetics-private-location` // - Monitors: `monitor` // // #### Supported relations for resources diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_software_catalog.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_software_catalog.go new file mode 100644 index 0000000000..4019cbbc3f --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/api_software_catalog.go @@ -0,0 +1,394 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + _context "context" + _nethttp "net/http" + _neturl "net/url" + "strings" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SoftwareCatalogApi service type +type SoftwareCatalogApi datadog.Service + +// DeleteCatalogEntity Delete a single entity. +// Delete a single entity in Software Catalog. +func (a *SoftwareCatalogApi) DeleteCatalogEntity(ctx _context.Context, entityId string) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SoftwareCatalogApi.DeleteCatalogEntity") + if err != nil { + return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/catalog/entity/{entity_id}" + localVarPath = strings.Replace(localVarPath, "{"+"entity_id"+"}", _neturl.PathEscape(datadog.ParameterToString(entityId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "*/*" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +// ListCatalogEntityOptionalParameters holds optional parameters for ListCatalogEntity. +type ListCatalogEntityOptionalParameters struct { + PageOffset *int64 + PageLimit *int64 + FitlerId *string + FitlerRef *string + FitlerName *string + FitlerKind *string + FitlerOwner *string + FitlerRelationType *RelationType + FitlerExcludeSnapshot *string + Include *IncludeType +} + +// NewListCatalogEntityOptionalParameters creates an empty struct for parameters. +func NewListCatalogEntityOptionalParameters() *ListCatalogEntityOptionalParameters { + this := ListCatalogEntityOptionalParameters{} + return &this +} + +// WithPageOffset sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithPageOffset(pageOffset int64) *ListCatalogEntityOptionalParameters { + r.PageOffset = &pageOffset + return r +} + +// WithPageLimit sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithPageLimit(pageLimit int64) *ListCatalogEntityOptionalParameters { + r.PageLimit = &pageLimit + return r +} + +// WithFitlerId sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithFitlerId(fitlerId string) *ListCatalogEntityOptionalParameters { + r.FitlerId = &fitlerId + return r +} + +// WithFitlerRef sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithFitlerRef(fitlerRef string) *ListCatalogEntityOptionalParameters { + r.FitlerRef = &fitlerRef + return r +} + +// WithFitlerName sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithFitlerName(fitlerName string) *ListCatalogEntityOptionalParameters { + r.FitlerName = &fitlerName + return r +} + +// WithFitlerKind sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithFitlerKind(fitlerKind string) *ListCatalogEntityOptionalParameters { + r.FitlerKind = &fitlerKind + return r +} + +// WithFitlerOwner sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithFitlerOwner(fitlerOwner string) *ListCatalogEntityOptionalParameters { + r.FitlerOwner = &fitlerOwner + return r +} + +// WithFitlerRelationType sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithFitlerRelationType(fitlerRelationType RelationType) *ListCatalogEntityOptionalParameters { + r.FitlerRelationType = &fitlerRelationType + return r +} + +// WithFitlerExcludeSnapshot sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithFitlerExcludeSnapshot(fitlerExcludeSnapshot string) *ListCatalogEntityOptionalParameters { + r.FitlerExcludeSnapshot = &fitlerExcludeSnapshot + return r +} + +// WithInclude sets the corresponding parameter name and returns the struct. +func (r *ListCatalogEntityOptionalParameters) WithInclude(include IncludeType) *ListCatalogEntityOptionalParameters { + r.Include = &include + return r +} + +// ListCatalogEntity Get a list of entities. +// Get a list of entities from Software Catalog. +func (a *SoftwareCatalogApi) ListCatalogEntity(ctx _context.Context, o ...ListCatalogEntityOptionalParameters) (ListEntityCatalogResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarReturnValue ListEntityCatalogResponse + optionalParams ListCatalogEntityOptionalParameters + ) + + if len(o) > 1 { + return localVarReturnValue, nil, datadog.ReportError("only one argument of type ListCatalogEntityOptionalParameters is allowed") + } + if len(o) == 1 { + optionalParams = o[0] + } + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SoftwareCatalogApi.ListCatalogEntity") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/catalog/entity" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if optionalParams.PageOffset != nil { + localVarQueryParams.Add("page[offset]", datadog.ParameterToString(*optionalParams.PageOffset, "")) + } + if optionalParams.PageLimit != nil { + localVarQueryParams.Add("page[limit]", datadog.ParameterToString(*optionalParams.PageLimit, "")) + } + if optionalParams.FitlerId != nil { + localVarQueryParams.Add("fitler[id]", datadog.ParameterToString(*optionalParams.FitlerId, "")) + } + if optionalParams.FitlerRef != nil { + localVarQueryParams.Add("fitler[ref]", datadog.ParameterToString(*optionalParams.FitlerRef, "")) + } + if optionalParams.FitlerName != nil { + localVarQueryParams.Add("fitler[name]", datadog.ParameterToString(*optionalParams.FitlerName, "")) + } + if optionalParams.FitlerKind != nil { + localVarQueryParams.Add("fitler[kind]", datadog.ParameterToString(*optionalParams.FitlerKind, "")) + } + if optionalParams.FitlerOwner != nil { + localVarQueryParams.Add("fitler[owner]", datadog.ParameterToString(*optionalParams.FitlerOwner, "")) + } + if optionalParams.FitlerRelationType != nil { + localVarQueryParams.Add("fitler[relation][type]", datadog.ParameterToString(*optionalParams.FitlerRelationType, "")) + } + if optionalParams.FitlerExcludeSnapshot != nil { + localVarQueryParams.Add("fitler[exclude_snapshot]", datadog.ParameterToString(*optionalParams.FitlerExcludeSnapshot, "")) + } + if optionalParams.Include != nil { + localVarQueryParams.Add("include", datadog.ParameterToString(*optionalParams.Include, "")) + } + localVarHeaderParams["Accept"] = "application/json" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// ListCatalogEntityWithPagination provides a paginated version of ListCatalogEntity returning a channel with all items. +func (a *SoftwareCatalogApi) ListCatalogEntityWithPagination(ctx _context.Context, o ...ListCatalogEntityOptionalParameters) (<-chan datadog.PaginationResult[EntityData], func()) { + ctx, cancel := _context.WithCancel(ctx) + pageSize_ := int64(100) + if len(o) == 0 { + o = append(o, ListCatalogEntityOptionalParameters{}) + } + if o[0].PageLimit != nil { + pageSize_ = *o[0].PageLimit + } + o[0].PageLimit = &pageSize_ + page_ := int64(0) + o[0].PageOffset = &page_ + + items := make(chan datadog.PaginationResult[EntityData], pageSize_) + go func() { + for { + resp, _, err := a.ListCatalogEntity(ctx, o...) + if err != nil { + var returnItem EntityData + items <- datadog.PaginationResult[EntityData]{Item: returnItem, Error: err} + break + } + respData, ok := resp.GetDataOk() + if !ok { + break + } + results := *respData + + for _, item := range results { + select { + case items <- datadog.PaginationResult[EntityData]{Item: item, Error: nil}: + case <-ctx.Done(): + close(items) + return + } + } + if len(results) < int(pageSize_) { + break + } + pageOffset_ := *o[0].PageOffset + 1 + o[0].PageOffset = &pageOffset_ + } + close(items) + }() + return items, cancel +} + +// UpsertCatalogEntity Create or update entities. +// Create or update entities in Software Catalog. +func (a *SoftwareCatalogApi) UpsertCatalogEntity(ctx _context.Context, body UpsertCatalogEntityRequest) (UpsertCatalogEntityResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarReturnValue UpsertCatalogEntityResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SoftwareCatalogApi.UpsertCatalogEntity") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/catalog/entity" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "application/json" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// NewSoftwareCatalogApi Returns NewSoftwareCatalogApi. +func NewSoftwareCatalogApi(client *datadog.APIClient) *SoftwareCatalogApi { + return &SoftwareCatalogApi{ + Client: client, + } +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/doc.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/doc.go index 381029a65d..bac7fb034c 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/doc.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/doc.go @@ -197,6 +197,13 @@ // - [MetricsApi.QueryTimeseriesData] // - [MetricsApi.SubmitMetrics] // - [MetricsApi.UpdateTagConfiguration] +// - [MicrosoftTeamsIntegrationApi.CreateApiHandle] +// - [MicrosoftTeamsIntegrationApi.DeleteApiHandle] +// - [MicrosoftTeamsIntegrationApi.GetApiHandle] +// - [MicrosoftTeamsIntegrationApi.GetApiHandleByName] +// - [MicrosoftTeamsIntegrationApi.GetChannelByName] +// - [MicrosoftTeamsIntegrationApi.ListApiHandles] +// - [MicrosoftTeamsIntegrationApi.UpdateApiHandle] // - [MonitorsApi.CreateMonitorConfigPolicy] // - [MonitorsApi.DeleteMonitorConfigPolicy] // - [MonitorsApi.GetMonitorConfigPolicy] @@ -308,6 +315,9 @@ // - [ServiceScorecardsApi.ListScorecardOutcomes] // - [ServiceScorecardsApi.ListScorecardRules] // - [ServiceScorecardsApi.UpdateScorecardRule] +// - [SoftwareCatalogApi.DeleteCatalogEntity] +// - [SoftwareCatalogApi.ListCatalogEntity] +// - [SoftwareCatalogApi.UpsertCatalogEntity] // - [SpansApi.AggregateSpans] // - [SpansApi.ListSpans] // - [SpansApi.ListSpansGet] diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_create_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_create_attributes.go index 4812b2477d..9fb77cae0e 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_create_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_create_attributes.go @@ -12,8 +12,12 @@ import ( // APIKeyCreateAttributes Attributes used to create an API Key. type APIKeyCreateAttributes struct { + // The APIKeyCreateAttributes category. + Category *string `json:"category,omitempty"` // Name of the API key. Name string `json:"name"` + // The APIKeyCreateAttributes remote_config_read_enabled. + RemoteConfigReadEnabled *bool `json:"remote_config_read_enabled,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -37,6 +41,34 @@ func NewAPIKeyCreateAttributesWithDefaults() *APIKeyCreateAttributes { return &this } +// GetCategory returns the Category field value if set, zero value otherwise. +func (o *APIKeyCreateAttributes) GetCategory() string { + if o == nil || o.Category == nil { + var ret string + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIKeyCreateAttributes) GetCategoryOk() (*string, bool) { + if o == nil || o.Category == nil { + return nil, false + } + return o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *APIKeyCreateAttributes) HasCategory() bool { + return o != nil && o.Category != nil +} + +// SetCategory gets a reference to the given string and assigns it to the Category field. +func (o *APIKeyCreateAttributes) SetCategory(v string) { + o.Category = &v +} + // GetName returns the Name field value. func (o *APIKeyCreateAttributes) GetName() string { if o == nil { @@ -60,13 +92,47 @@ func (o *APIKeyCreateAttributes) SetName(v string) { o.Name = v } +// GetRemoteConfigReadEnabled returns the RemoteConfigReadEnabled field value if set, zero value otherwise. +func (o *APIKeyCreateAttributes) GetRemoteConfigReadEnabled() bool { + if o == nil || o.RemoteConfigReadEnabled == nil { + var ret bool + return ret + } + return *o.RemoteConfigReadEnabled +} + +// GetRemoteConfigReadEnabledOk returns a tuple with the RemoteConfigReadEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIKeyCreateAttributes) GetRemoteConfigReadEnabledOk() (*bool, bool) { + if o == nil || o.RemoteConfigReadEnabled == nil { + return nil, false + } + return o.RemoteConfigReadEnabled, true +} + +// HasRemoteConfigReadEnabled returns a boolean if a field has been set. +func (o *APIKeyCreateAttributes) HasRemoteConfigReadEnabled() bool { + return o != nil && o.RemoteConfigReadEnabled != nil +} + +// SetRemoteConfigReadEnabled gets a reference to the given bool and assigns it to the RemoteConfigReadEnabled field. +func (o *APIKeyCreateAttributes) SetRemoteConfigReadEnabled(v bool) { + o.RemoteConfigReadEnabled = &v +} + // MarshalJSON serializes the struct using spec logic. func (o APIKeyCreateAttributes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + if o.Category != nil { + toSerialize["category"] = o.Category + } toSerialize["name"] = o.Name + if o.RemoteConfigReadEnabled != nil { + toSerialize["remote_config_read_enabled"] = o.RemoteConfigReadEnabled + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -77,7 +143,9 @@ func (o APIKeyCreateAttributes) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *APIKeyCreateAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Name *string `json:"name"` + Category *string `json:"category,omitempty"` + Name *string `json:"name"` + RemoteConfigReadEnabled *bool `json:"remote_config_read_enabled,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) @@ -87,11 +155,13 @@ func (o *APIKeyCreateAttributes) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"name"}) + datadog.DeleteKeys(additionalProperties, &[]string{"category", "name", "remote_config_read_enabled"}) } else { return err } + o.Category = all.Category o.Name = *all.Name + o.RemoteConfigReadEnabled = all.RemoteConfigReadEnabled if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_response_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_response_included_item.go index b59621da6b..923fd76da4 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_response_included_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_response_included_item.go @@ -10,7 +10,8 @@ import ( // APIKeyResponseIncludedItem - An object related to an API key. type APIKeyResponseIncludedItem struct { - User *User + User *User + LeakedKey *LeakedKey // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject interface{} @@ -21,6 +22,11 @@ func UserAsAPIKeyResponseIncludedItem(v *User) APIKeyResponseIncludedItem { return APIKeyResponseIncludedItem{User: v} } +// LeakedKeyAsAPIKeyResponseIncludedItem is a convenience function that returns LeakedKey wrapped in APIKeyResponseIncludedItem. +func LeakedKeyAsAPIKeyResponseIncludedItem(v *LeakedKey) APIKeyResponseIncludedItem { + return APIKeyResponseIncludedItem{LeakedKey: v} +} + // UnmarshalJSON turns data into one of the pointers in the struct. func (obj *APIKeyResponseIncludedItem) UnmarshalJSON(data []byte) error { var err error @@ -30,7 +36,7 @@ func (obj *APIKeyResponseIncludedItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ @@ -42,9 +48,27 @@ func (obj *APIKeyResponseIncludedItem) UnmarshalJSON(data []byte) error { obj.User = nil } + // try to unmarshal data into LeakedKey + err = datadog.Unmarshal(data, &obj.LeakedKey) + if err == nil { + if obj.LeakedKey != nil && obj.LeakedKey.UnparsedObject == nil { + jsonLeakedKey, _ := datadog.Marshal(obj.LeakedKey) + if string(jsonLeakedKey) == "{}" { // empty struct + obj.LeakedKey = nil + } else { + match++ + } + } else { + obj.LeakedKey = nil + } + } else { + obj.LeakedKey = nil + } + if match != 1 { // more than 1 match // reset to nil obj.User = nil + obj.LeakedKey = nil return datadog.Unmarshal(data, &obj.UnparsedObject) } return nil // exactly one match @@ -56,6 +80,10 @@ func (obj APIKeyResponseIncludedItem) MarshalJSON() ([]byte, error) { return datadog.Marshal(&obj.User) } + if obj.LeakedKey != nil { + return datadog.Marshal(&obj.LeakedKey) + } + if obj.UnparsedObject != nil { return datadog.Marshal(obj.UnparsedObject) } @@ -68,6 +96,10 @@ func (obj *APIKeyResponseIncludedItem) GetActualInstance() interface{} { return obj.User } + if obj.LeakedKey != nil { + return obj.LeakedKey + } + // all schemas are nil return nil } diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_update_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_update_attributes.go index c34e6af0b2..c983b0a691 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_update_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_api_key_update_attributes.go @@ -12,8 +12,12 @@ import ( // APIKeyUpdateAttributes Attributes used to update an API Key. type APIKeyUpdateAttributes struct { + // The APIKeyUpdateAttributes category. + Category *string `json:"category,omitempty"` // Name of the API key. Name string `json:"name"` + // The APIKeyUpdateAttributes remote_config_read_enabled. + RemoteConfigReadEnabled *bool `json:"remote_config_read_enabled,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -37,6 +41,34 @@ func NewAPIKeyUpdateAttributesWithDefaults() *APIKeyUpdateAttributes { return &this } +// GetCategory returns the Category field value if set, zero value otherwise. +func (o *APIKeyUpdateAttributes) GetCategory() string { + if o == nil || o.Category == nil { + var ret string + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIKeyUpdateAttributes) GetCategoryOk() (*string, bool) { + if o == nil || o.Category == nil { + return nil, false + } + return o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *APIKeyUpdateAttributes) HasCategory() bool { + return o != nil && o.Category != nil +} + +// SetCategory gets a reference to the given string and assigns it to the Category field. +func (o *APIKeyUpdateAttributes) SetCategory(v string) { + o.Category = &v +} + // GetName returns the Name field value. func (o *APIKeyUpdateAttributes) GetName() string { if o == nil { @@ -60,13 +92,47 @@ func (o *APIKeyUpdateAttributes) SetName(v string) { o.Name = v } +// GetRemoteConfigReadEnabled returns the RemoteConfigReadEnabled field value if set, zero value otherwise. +func (o *APIKeyUpdateAttributes) GetRemoteConfigReadEnabled() bool { + if o == nil || o.RemoteConfigReadEnabled == nil { + var ret bool + return ret + } + return *o.RemoteConfigReadEnabled +} + +// GetRemoteConfigReadEnabledOk returns a tuple with the RemoteConfigReadEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *APIKeyUpdateAttributes) GetRemoteConfigReadEnabledOk() (*bool, bool) { + if o == nil || o.RemoteConfigReadEnabled == nil { + return nil, false + } + return o.RemoteConfigReadEnabled, true +} + +// HasRemoteConfigReadEnabled returns a boolean if a field has been set. +func (o *APIKeyUpdateAttributes) HasRemoteConfigReadEnabled() bool { + return o != nil && o.RemoteConfigReadEnabled != nil +} + +// SetRemoteConfigReadEnabled gets a reference to the given bool and assigns it to the RemoteConfigReadEnabled field. +func (o *APIKeyUpdateAttributes) SetRemoteConfigReadEnabled(v bool) { + o.RemoteConfigReadEnabled = &v +} + // MarshalJSON serializes the struct using spec logic. func (o APIKeyUpdateAttributes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + if o.Category != nil { + toSerialize["category"] = o.Category + } toSerialize["name"] = o.Name + if o.RemoteConfigReadEnabled != nil { + toSerialize["remote_config_read_enabled"] = o.RemoteConfigReadEnabled + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -77,7 +143,9 @@ func (o APIKeyUpdateAttributes) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *APIKeyUpdateAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Name *string `json:"name"` + Category *string `json:"category,omitempty"` + Name *string `json:"name"` + RemoteConfigReadEnabled *bool `json:"remote_config_read_enabled,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) @@ -87,11 +155,13 @@ func (o *APIKeyUpdateAttributes) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"name"}) + datadog.DeleteKeys(additionalProperties, &[]string{"category", "name", "remote_config_read_enabled"}) } else { return err } + o.Category = all.Category o.Name = *all.Name + o.RemoteConfigReadEnabled = all.RemoteConfigReadEnabled if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_application_key_response_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_application_key_response_included_item.go index 5443d96573..8ea9fa0bf8 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_application_key_response_included_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_application_key_response_included_item.go @@ -10,8 +10,9 @@ import ( // ApplicationKeyResponseIncludedItem - An object related to an application key. type ApplicationKeyResponseIncludedItem struct { - User *User - Role *Role + User *User + Role *Role + LeakedKey *LeakedKey // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject interface{} @@ -27,6 +28,11 @@ func RoleAsApplicationKeyResponseIncludedItem(v *Role) ApplicationKeyResponseInc return ApplicationKeyResponseIncludedItem{Role: v} } +// LeakedKeyAsApplicationKeyResponseIncludedItem is a convenience function that returns LeakedKey wrapped in ApplicationKeyResponseIncludedItem. +func LeakedKeyAsApplicationKeyResponseIncludedItem(v *LeakedKey) ApplicationKeyResponseIncludedItem { + return ApplicationKeyResponseIncludedItem{LeakedKey: v} +} + // UnmarshalJSON turns data into one of the pointers in the struct. func (obj *ApplicationKeyResponseIncludedItem) UnmarshalJSON(data []byte) error { var err error @@ -36,7 +42,7 @@ func (obj *ApplicationKeyResponseIncludedItem) UnmarshalJSON(data []byte) error if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ @@ -65,10 +71,28 @@ func (obj *ApplicationKeyResponseIncludedItem) UnmarshalJSON(data []byte) error obj.Role = nil } + // try to unmarshal data into LeakedKey + err = datadog.Unmarshal(data, &obj.LeakedKey) + if err == nil { + if obj.LeakedKey != nil && obj.LeakedKey.UnparsedObject == nil { + jsonLeakedKey, _ := datadog.Marshal(obj.LeakedKey) + if string(jsonLeakedKey) == "{}" { // empty struct + obj.LeakedKey = nil + } else { + match++ + } + } else { + obj.LeakedKey = nil + } + } else { + obj.LeakedKey = nil + } + if match != 1 { // more than 1 match // reset to nil obj.User = nil obj.Role = nil + obj.LeakedKey = nil return datadog.Unmarshal(data, &obj.UnparsedObject) } return nil // exactly one match @@ -84,6 +108,10 @@ func (obj ApplicationKeyResponseIncludedItem) MarshalJSON() ([]byte, error) { return datadog.Marshal(&obj.Role) } + if obj.LeakedKey != nil { + return datadog.Marshal(&obj.LeakedKey) + } + if obj.UnparsedObject != nil { return datadog.Marshal(obj.UnparsedObject) } @@ -100,6 +128,10 @@ func (obj *ApplicationKeyResponseIncludedItem) GetActualInstance() interface{} { return obj.Role } + if obj.LeakedKey != nil { + return obj.LeakedKey + } + // all schemas are nil return nil } diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_auth_n_mapping_included.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_auth_n_mapping_included.go index 7b43d49de8..05bd7a7687 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_auth_n_mapping_included.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_auth_n_mapping_included.go @@ -76,7 +76,7 @@ func (obj *AuthNMappingIncluded) UnmarshalJSON(data []byte) error { if err == nil { if obj.AuthNMappingTeam != nil && obj.AuthNMappingTeam.UnparsedObject == nil { jsonAuthNMappingTeam, _ := datadog.Marshal(obj.AuthNMappingTeam) - if string(jsonAuthNMappingTeam) == "{}" { // empty struct + if string(jsonAuthNMappingTeam) == "{}" && string(data) != "{}" { // empty struct obj.AuthNMappingTeam = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_ci_app_aggregate_bucket_value.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_ci_app_aggregate_bucket_value.go index 918ba4dd3d..9d564c6400 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_ci_app_aggregate_bucket_value.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_ci_app_aggregate_bucket_value.go @@ -76,7 +76,7 @@ func (obj *CIAppAggregateBucketValue) UnmarshalJSON(data []byte) error { if err == nil { if obj.CIAppAggregateBucketValueTimeseries != nil { jsonCIAppAggregateBucketValueTimeseries, _ := datadog.Marshal(obj.CIAppAggregateBucketValueTimeseries) - if string(jsonCIAppAggregateBucketValueTimeseries) == "{}" { // empty struct + if string(jsonCIAppAggregateBucketValueTimeseries) == "{}" && string(data) != "{}" { // empty struct obj.CIAppAggregateBucketValueTimeseries = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_cloudflare_account_update_request_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_cloudflare_account_update_request_attributes.go index 16af69e152..67924dedb4 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_cloudflare_account_update_request_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_cloudflare_account_update_request_attributes.go @@ -16,6 +16,8 @@ type CloudflareAccountUpdateRequestAttributes struct { ApiKey string `json:"api_key"` // The email associated with the Cloudflare account. If an API key is provided (and not a token), this field is also required. Email *string `json:"email,omitempty"` + // The name of the Cloudflare account. + Name *string `json:"name,omitempty"` // An allowlist of resources to restrict pulling metrics for. Resources []string `json:"resources,omitempty"` // An allowlist of zones to restrict pulling metrics for. @@ -94,6 +96,34 @@ func (o *CloudflareAccountUpdateRequestAttributes) SetEmail(v string) { o.Email = &v } +// GetName returns the Name field value if set, zero value otherwise. +func (o *CloudflareAccountUpdateRequestAttributes) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloudflareAccountUpdateRequestAttributes) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CloudflareAccountUpdateRequestAttributes) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CloudflareAccountUpdateRequestAttributes) SetName(v string) { + o.Name = &v +} + // GetResources returns the Resources field value if set, zero value otherwise. func (o *CloudflareAccountUpdateRequestAttributes) GetResources() []string { if o == nil || o.Resources == nil { @@ -160,6 +190,9 @@ func (o CloudflareAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error) if o.Email != nil { toSerialize["email"] = o.Email } + if o.Name != nil { + toSerialize["name"] = o.Name + } if o.Resources != nil { toSerialize["resources"] = o.Resources } @@ -178,6 +211,7 @@ func (o *CloudflareAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) ( all := struct { ApiKey *string `json:"api_key"` Email *string `json:"email,omitempty"` + Name *string `json:"name,omitempty"` Resources []string `json:"resources,omitempty"` Zones []string `json:"zones,omitempty"` }{} @@ -189,12 +223,13 @@ func (o *CloudflareAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) ( } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"api_key", "email", "resources", "zones"}) + datadog.DeleteKeys(additionalProperties, &[]string{"api_key", "email", "name", "resources", "zones"}) } else { return err } o.ApiKey = *all.ApiKey o.Email = all.Email + o.Name = all.Name o.Resources = all.Resources o.Zones = all.Zones diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_container_image_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_container_image_item.go index b05971f55a..fc802c8edf 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_container_image_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_container_image_item.go @@ -36,7 +36,7 @@ func (obj *ContainerImageItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.ContainerImage != nil && obj.ContainerImage.UnparsedObject == nil { jsonContainerImage, _ := datadog.Marshal(obj.ContainerImage) - if string(jsonContainerImage) == "{}" { // empty struct + if string(jsonContainerImage) == "{}" && string(data) != "{}" { // empty struct obj.ContainerImage = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *ContainerImageItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.ContainerImageGroup != nil && obj.ContainerImageGroup.UnparsedObject == nil { jsonContainerImageGroup, _ := datadog.Marshal(obj.ContainerImageGroup) - if string(jsonContainerImageGroup) == "{}" { // empty struct + if string(jsonContainerImageGroup) == "{}" && string(data) != "{}" { // empty struct obj.ContainerImageGroup = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_container_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_container_item.go index 403313cc3e..ab5c72bafe 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_container_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_container_item.go @@ -36,7 +36,7 @@ func (obj *ContainerItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.Container != nil && obj.Container.UnparsedObject == nil { jsonContainer, _ := datadog.Marshal(obj.Container) - if string(jsonContainer) == "{}" { // empty struct + if string(jsonContainer) == "{}" && string(data) != "{}" { // empty struct obj.Container = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *ContainerItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.ContainerGroup != nil && obj.ContainerGroup.UnparsedObject == nil { jsonContainerGroup, _ := datadog.Marshal(obj.ContainerGroup) - if string(jsonContainerGroup) == "{}" { // empty struct + if string(jsonContainerGroup) == "{}" && string(data) != "{}" { // empty struct obj.ContainerGroup = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_dora_deployment_request_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_dora_deployment_request_attributes.go index bdb1d243aa..18a3b0d094 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_dora_deployment_request_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_dora_deployment_request_attributes.go @@ -20,10 +20,12 @@ type DORADeploymentRequestAttributes struct { Git *DORAGitInfo `json:"git,omitempty"` // Deployment ID. Id *string `json:"id,omitempty"` - // Service name from a service available in the Service Catalog. + // Service name. Service string `json:"service"` // Unix timestamp when the deployment started. It must be in nanoseconds, milliseconds, or seconds. StartedAt int64 `json:"started_at"` + // Name of the team owning the deployed service. If not provided, this is automatically populated with the team associated with the service in the Service Catalog. + Team *string `json:"team,omitempty"` // Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/). Version *string `json:"version,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -204,6 +206,34 @@ func (o *DORADeploymentRequestAttributes) SetStartedAt(v int64) { o.StartedAt = v } +// GetTeam returns the Team field value if set, zero value otherwise. +func (o *DORADeploymentRequestAttributes) GetTeam() string { + if o == nil || o.Team == nil { + var ret string + return ret + } + return *o.Team +} + +// GetTeamOk returns a tuple with the Team field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DORADeploymentRequestAttributes) GetTeamOk() (*string, bool) { + if o == nil || o.Team == nil { + return nil, false + } + return o.Team, true +} + +// HasTeam returns a boolean if a field has been set. +func (o *DORADeploymentRequestAttributes) HasTeam() bool { + return o != nil && o.Team != nil +} + +// SetTeam gets a reference to the given string and assigns it to the Team field. +func (o *DORADeploymentRequestAttributes) SetTeam(v string) { + o.Team = &v +} + // GetVersion returns the Version field value if set, zero value otherwise. func (o *DORADeploymentRequestAttributes) GetVersion() string { if o == nil || o.Version == nil { @@ -250,6 +280,9 @@ func (o DORADeploymentRequestAttributes) MarshalJSON() ([]byte, error) { } toSerialize["service"] = o.Service toSerialize["started_at"] = o.StartedAt + if o.Team != nil { + toSerialize["team"] = o.Team + } if o.Version != nil { toSerialize["version"] = o.Version } @@ -269,6 +302,7 @@ func (o *DORADeploymentRequestAttributes) UnmarshalJSON(bytes []byte) (err error Id *string `json:"id,omitempty"` Service *string `json:"service"` StartedAt *int64 `json:"started_at"` + Team *string `json:"team,omitempty"` Version *string `json:"version,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { @@ -285,7 +319,7 @@ func (o *DORADeploymentRequestAttributes) UnmarshalJSON(bytes []byte) (err error } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"env", "finished_at", "git", "id", "service", "started_at", "version"}) + datadog.DeleteKeys(additionalProperties, &[]string{"env", "finished_at", "git", "id", "service", "started_at", "team", "version"}) } else { return err } @@ -300,6 +334,7 @@ func (o *DORADeploymentRequestAttributes) UnmarshalJSON(bytes []byte) (err error o.Id = all.Id o.Service = *all.Service o.StartedAt = *all.StartedAt + o.Team = all.Team o.Version = all.Version if len(additionalProperties) > 0 { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_response_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_response_included_item.go index 62e1f23081..c53b343293 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_response_included_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_response_included_item.go @@ -36,7 +36,7 @@ func (obj *DowntimeResponseIncludedItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *DowntimeResponseIncludedItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.DowntimeMonitorIncludedItem != nil && obj.DowntimeMonitorIncludedItem.UnparsedObject == nil { jsonDowntimeMonitorIncludedItem, _ := datadog.Marshal(obj.DowntimeMonitorIncludedItem) - if string(jsonDowntimeMonitorIncludedItem) == "{}" { // empty struct + if string(jsonDowntimeMonitorIncludedItem) == "{}" && string(data) != "{}" { // empty struct obj.DowntimeMonitorIncludedItem = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_schedule_create_request.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_schedule_create_request.go index b4b128c0bc..2cb9ac7d40 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_schedule_create_request.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_schedule_create_request.go @@ -53,7 +53,7 @@ func (obj *DowntimeScheduleCreateRequest) UnmarshalJSON(data []byte) error { if err == nil { if obj.DowntimeScheduleOneTimeCreateUpdateRequest != nil && obj.DowntimeScheduleOneTimeCreateUpdateRequest.UnparsedObject == nil { jsonDowntimeScheduleOneTimeCreateUpdateRequest, _ := datadog.Marshal(obj.DowntimeScheduleOneTimeCreateUpdateRequest) - if string(jsonDowntimeScheduleOneTimeCreateUpdateRequest) == "{}" { // empty struct + if string(jsonDowntimeScheduleOneTimeCreateUpdateRequest) == "{}" && string(data) != "{}" { // empty struct obj.DowntimeScheduleOneTimeCreateUpdateRequest = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_schedule_update_request.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_schedule_update_request.go index e0dca76f53..647bf51fda 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_schedule_update_request.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_downtime_schedule_update_request.go @@ -36,7 +36,7 @@ func (obj *DowntimeScheduleUpdateRequest) UnmarshalJSON(data []byte) error { if err == nil { if obj.DowntimeScheduleRecurrencesUpdateRequest != nil && obj.DowntimeScheduleRecurrencesUpdateRequest.UnparsedObject == nil { jsonDowntimeScheduleRecurrencesUpdateRequest, _ := datadog.Marshal(obj.DowntimeScheduleRecurrencesUpdateRequest) - if string(jsonDowntimeScheduleRecurrencesUpdateRequest) == "{}" { // empty struct + if string(jsonDowntimeScheduleRecurrencesUpdateRequest) == "{}" && string(data) != "{}" { // empty struct obj.DowntimeScheduleRecurrencesUpdateRequest = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *DowntimeScheduleUpdateRequest) UnmarshalJSON(data []byte) error { if err == nil { if obj.DowntimeScheduleOneTimeCreateUpdateRequest != nil && obj.DowntimeScheduleOneTimeCreateUpdateRequest.UnparsedObject == nil { jsonDowntimeScheduleOneTimeCreateUpdateRequest, _ := datadog.Marshal(obj.DowntimeScheduleOneTimeCreateUpdateRequest) - if string(jsonDowntimeScheduleOneTimeCreateUpdateRequest) == "{}" { // empty struct + if string(jsonDowntimeScheduleOneTimeCreateUpdateRequest) == "{}" && string(data) != "{}" { // empty struct obj.DowntimeScheduleOneTimeCreateUpdateRequest = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_attributes.go new file mode 100644 index 0000000000..21efd7101a --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_attributes.go @@ -0,0 +1,347 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityAttributes Entity attributes. +type EntityAttributes struct { + // The api version. + ApiVersion *string `json:"apiVersion,omitempty"` + // The description. + Description *string `json:"description,omitempty"` + // The display name. + DisplayName *string `json:"displayName,omitempty"` + // The kind. + Kind *string `json:"kind,omitempty"` + // The name. + Name *string `json:"name,omitempty"` + // The namespace. + Namespace *string `json:"namespace,omitempty"` + // The owner. + Owner *string `json:"owner,omitempty"` + // The tags. + Tags []string `json:"tags,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityAttributes instantiates a new EntityAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityAttributes() *EntityAttributes { + this := EntityAttributes{} + return &this +} + +// NewEntityAttributesWithDefaults instantiates a new EntityAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityAttributesWithDefaults() *EntityAttributes { + this := EntityAttributes{} + return &this +} + +// GetApiVersion returns the ApiVersion field value if set, zero value otherwise. +func (o *EntityAttributes) GetApiVersion() string { + if o == nil || o.ApiVersion == nil { + var ret string + return ret + } + return *o.ApiVersion +} + +// GetApiVersionOk returns a tuple with the ApiVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityAttributes) GetApiVersionOk() (*string, bool) { + if o == nil || o.ApiVersion == nil { + return nil, false + } + return o.ApiVersion, true +} + +// HasApiVersion returns a boolean if a field has been set. +func (o *EntityAttributes) HasApiVersion() bool { + return o != nil && o.ApiVersion != nil +} + +// SetApiVersion gets a reference to the given string and assigns it to the ApiVersion field. +func (o *EntityAttributes) SetApiVersion(v string) { + o.ApiVersion = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *EntityAttributes) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityAttributes) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *EntityAttributes) HasDescription() bool { + return o != nil && o.Description != nil +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *EntityAttributes) SetDescription(v string) { + o.Description = &v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *EntityAttributes) GetDisplayName() string { + if o == nil || o.DisplayName == nil { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityAttributes) GetDisplayNameOk() (*string, bool) { + if o == nil || o.DisplayName == nil { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *EntityAttributes) HasDisplayName() bool { + return o != nil && o.DisplayName != nil +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *EntityAttributes) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetKind returns the Kind field value if set, zero value otherwise. +func (o *EntityAttributes) GetKind() string { + if o == nil || o.Kind == nil { + var ret string + return ret + } + return *o.Kind +} + +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityAttributes) GetKindOk() (*string, bool) { + if o == nil || o.Kind == nil { + return nil, false + } + return o.Kind, true +} + +// HasKind returns a boolean if a field has been set. +func (o *EntityAttributes) HasKind() bool { + return o != nil && o.Kind != nil +} + +// SetKind gets a reference to the given string and assigns it to the Kind field. +func (o *EntityAttributes) SetKind(v string) { + o.Kind = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EntityAttributes) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityAttributes) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EntityAttributes) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EntityAttributes) SetName(v string) { + o.Name = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *EntityAttributes) GetNamespace() string { + if o == nil || o.Namespace == nil { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityAttributes) GetNamespaceOk() (*string, bool) { + if o == nil || o.Namespace == nil { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *EntityAttributes) HasNamespace() bool { + return o != nil && o.Namespace != nil +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *EntityAttributes) SetNamespace(v string) { + o.Namespace = &v +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *EntityAttributes) GetOwner() string { + if o == nil || o.Owner == nil { + var ret string + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityAttributes) GetOwnerOk() (*string, bool) { + if o == nil || o.Owner == nil { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *EntityAttributes) HasOwner() bool { + return o != nil && o.Owner != nil +} + +// SetOwner gets a reference to the given string and assigns it to the Owner field. +func (o *EntityAttributes) SetOwner(v string) { + o.Owner = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *EntityAttributes) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityAttributes) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return &o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *EntityAttributes) HasTags() bool { + return o != nil && o.Tags != nil +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *EntityAttributes) SetTags(v []string) { + o.Tags = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.ApiVersion != nil { + toSerialize["apiVersion"] = o.ApiVersion + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.DisplayName != nil { + toSerialize["displayName"] = o.DisplayName + } + if o.Kind != nil { + toSerialize["kind"] = o.Kind + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Namespace != nil { + toSerialize["namespace"] = o.Namespace + } + if o.Owner != nil { + toSerialize["owner"] = o.Owner + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ApiVersion *string `json:"apiVersion,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Kind *string `json:"kind,omitempty"` + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Owner *string `json:"owner,omitempty"` + Tags []string `json:"tags,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"apiVersion", "description", "displayName", "kind", "name", "namespace", "owner", "tags"}) + } else { + return err + } + o.ApiVersion = all.ApiVersion + o.Description = all.Description + o.DisplayName = all.DisplayName + o.Kind = all.Kind + o.Name = all.Name + o.Namespace = all.Namespace + o.Owner = all.Owner + o.Tags = all.Tags + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_data.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_data.go new file mode 100644 index 0000000000..0642daf353 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_data.go @@ -0,0 +1,257 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityData Entity data. +type EntityData struct { + // Entity attributes. + Attributes *EntityAttributes `json:"attributes,omitempty"` + // Entity id. + Id *string `json:"id,omitempty"` + // Entity metadata. + Meta *EntityMeta `json:"meta,omitempty"` + // Entity relationships. + Relationships *EntityRelationships `json:"relationships,omitempty"` + // Entity. + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityData instantiates a new EntityData object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityData() *EntityData { + this := EntityData{} + return &this +} + +// NewEntityDataWithDefaults instantiates a new EntityData object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityDataWithDefaults() *EntityData { + this := EntityData{} + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *EntityData) GetAttributes() EntityAttributes { + if o == nil || o.Attributes == nil { + var ret EntityAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityData) GetAttributesOk() (*EntityAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *EntityData) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given EntityAttributes and assigns it to the Attributes field. +func (o *EntityData) SetAttributes(v EntityAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EntityData) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityData) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EntityData) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EntityData) SetId(v string) { + o.Id = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *EntityData) GetMeta() EntityMeta { + if o == nil || o.Meta == nil { + var ret EntityMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityData) GetMetaOk() (*EntityMeta, bool) { + if o == nil || o.Meta == nil { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *EntityData) HasMeta() bool { + return o != nil && o.Meta != nil +} + +// SetMeta gets a reference to the given EntityMeta and assigns it to the Meta field. +func (o *EntityData) SetMeta(v EntityMeta) { + o.Meta = &v +} + +// GetRelationships returns the Relationships field value if set, zero value otherwise. +func (o *EntityData) GetRelationships() EntityRelationships { + if o == nil || o.Relationships == nil { + var ret EntityRelationships + return ret + } + return *o.Relationships +} + +// GetRelationshipsOk returns a tuple with the Relationships field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityData) GetRelationshipsOk() (*EntityRelationships, bool) { + if o == nil || o.Relationships == nil { + return nil, false + } + return o.Relationships, true +} + +// HasRelationships returns a boolean if a field has been set. +func (o *EntityData) HasRelationships() bool { + return o != nil && o.Relationships != nil +} + +// SetRelationships gets a reference to the given EntityRelationships and assigns it to the Relationships field. +func (o *EntityData) SetRelationships(v EntityRelationships) { + o.Relationships = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityData) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityData) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityData) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityData) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + if o.Relationships != nil { + toSerialize["relationships"] = o.Relationships + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityData) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *EntityAttributes `json:"attributes,omitempty"` + Id *string `json:"id,omitempty"` + Meta *EntityMeta `json:"meta,omitempty"` + Relationships *EntityRelationships `json:"relationships,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "meta", "relationships", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Id = all.Id + if all.Meta != nil && all.Meta.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Meta = all.Meta + if all.Relationships != nil && all.Relationships.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Relationships = all.Relationships + o.Type = all.Type + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_meta.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_meta.go new file mode 100644 index 0000000000..d9d7bba343 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_meta.go @@ -0,0 +1,207 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityMeta Entity metadata. +type EntityMeta struct { + // The creation time. + CreatedAt *string `json:"createdAt,omitempty"` + // The ingestion source. + IngestionSource *string `json:"ingestionSource,omitempty"` + // The modification time. + ModifiedAt *string `json:"modifiedAt,omitempty"` + // The origin. + Origin *string `json:"origin,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityMeta instantiates a new EntityMeta object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityMeta() *EntityMeta { + this := EntityMeta{} + return &this +} + +// NewEntityMetaWithDefaults instantiates a new EntityMeta object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityMetaWithDefaults() *EntityMeta { + this := EntityMeta{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EntityMeta) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityMeta) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EntityMeta) HasCreatedAt() bool { + return o != nil && o.CreatedAt != nil +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *EntityMeta) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetIngestionSource returns the IngestionSource field value if set, zero value otherwise. +func (o *EntityMeta) GetIngestionSource() string { + if o == nil || o.IngestionSource == nil { + var ret string + return ret + } + return *o.IngestionSource +} + +// GetIngestionSourceOk returns a tuple with the IngestionSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityMeta) GetIngestionSourceOk() (*string, bool) { + if o == nil || o.IngestionSource == nil { + return nil, false + } + return o.IngestionSource, true +} + +// HasIngestionSource returns a boolean if a field has been set. +func (o *EntityMeta) HasIngestionSource() bool { + return o != nil && o.IngestionSource != nil +} + +// SetIngestionSource gets a reference to the given string and assigns it to the IngestionSource field. +func (o *EntityMeta) SetIngestionSource(v string) { + o.IngestionSource = &v +} + +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +func (o *EntityMeta) GetModifiedAt() string { + if o == nil || o.ModifiedAt == nil { + var ret string + return ret + } + return *o.ModifiedAt +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityMeta) GetModifiedAtOk() (*string, bool) { + if o == nil || o.ModifiedAt == nil { + return nil, false + } + return o.ModifiedAt, true +} + +// HasModifiedAt returns a boolean if a field has been set. +func (o *EntityMeta) HasModifiedAt() bool { + return o != nil && o.ModifiedAt != nil +} + +// SetModifiedAt gets a reference to the given string and assigns it to the ModifiedAt field. +func (o *EntityMeta) SetModifiedAt(v string) { + o.ModifiedAt = &v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *EntityMeta) GetOrigin() string { + if o == nil || o.Origin == nil { + var ret string + return ret + } + return *o.Origin +} + +// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityMeta) GetOriginOk() (*string, bool) { + if o == nil || o.Origin == nil { + return nil, false + } + return o.Origin, true +} + +// HasOrigin returns a boolean if a field has been set. +func (o *EntityMeta) HasOrigin() bool { + return o != nil && o.Origin != nil +} + +// SetOrigin gets a reference to the given string and assigns it to the Origin field. +func (o *EntityMeta) SetOrigin(v string) { + o.Origin = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityMeta) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.CreatedAt != nil { + toSerialize["createdAt"] = o.CreatedAt + } + if o.IngestionSource != nil { + toSerialize["ingestionSource"] = o.IngestionSource + } + if o.ModifiedAt != nil { + toSerialize["modifiedAt"] = o.ModifiedAt + } + if o.Origin != nil { + toSerialize["origin"] = o.Origin + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityMeta) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + CreatedAt *string `json:"createdAt,omitempty"` + IngestionSource *string `json:"ingestionSource,omitempty"` + ModifiedAt *string `json:"modifiedAt,omitempty"` + Origin *string `json:"origin,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"createdAt", "ingestionSource", "modifiedAt", "origin"}) + } else { + return err + } + o.CreatedAt = all.CreatedAt + o.IngestionSource = all.IngestionSource + o.ModifiedAt = all.ModifiedAt + o.Origin = all.Origin + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_relationships.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_relationships.go new file mode 100644 index 0000000000..2b71d3d87c --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_relationships.go @@ -0,0 +1,263 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityRelationships Entity relationships. +type EntityRelationships struct { + // Entity to incidents relationship. + Incidents *EntityToIncidents `json:"incidents,omitempty"` + // Entity to oncalls relationship. + Oncall *EntityToOncalls `json:"oncall,omitempty"` + // Entity to raw schema relationship. + RawSchema *EntityToRawSchema `json:"rawSchema,omitempty"` + // Entity to related entities relationship. + RelatedEntities *EntityToRelatedEntities `json:"relatedEntities,omitempty"` + // Entity to detail schema relationship. + Schema *EntityToSchema `json:"schema,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityRelationships instantiates a new EntityRelationships object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityRelationships() *EntityRelationships { + this := EntityRelationships{} + return &this +} + +// NewEntityRelationshipsWithDefaults instantiates a new EntityRelationships object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityRelationshipsWithDefaults() *EntityRelationships { + this := EntityRelationships{} + return &this +} + +// GetIncidents returns the Incidents field value if set, zero value otherwise. +func (o *EntityRelationships) GetIncidents() EntityToIncidents { + if o == nil || o.Incidents == nil { + var ret EntityToIncidents + return ret + } + return *o.Incidents +} + +// GetIncidentsOk returns a tuple with the Incidents field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityRelationships) GetIncidentsOk() (*EntityToIncidents, bool) { + if o == nil || o.Incidents == nil { + return nil, false + } + return o.Incidents, true +} + +// HasIncidents returns a boolean if a field has been set. +func (o *EntityRelationships) HasIncidents() bool { + return o != nil && o.Incidents != nil +} + +// SetIncidents gets a reference to the given EntityToIncidents and assigns it to the Incidents field. +func (o *EntityRelationships) SetIncidents(v EntityToIncidents) { + o.Incidents = &v +} + +// GetOncall returns the Oncall field value if set, zero value otherwise. +func (o *EntityRelationships) GetOncall() EntityToOncalls { + if o == nil || o.Oncall == nil { + var ret EntityToOncalls + return ret + } + return *o.Oncall +} + +// GetOncallOk returns a tuple with the Oncall field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityRelationships) GetOncallOk() (*EntityToOncalls, bool) { + if o == nil || o.Oncall == nil { + return nil, false + } + return o.Oncall, true +} + +// HasOncall returns a boolean if a field has been set. +func (o *EntityRelationships) HasOncall() bool { + return o != nil && o.Oncall != nil +} + +// SetOncall gets a reference to the given EntityToOncalls and assigns it to the Oncall field. +func (o *EntityRelationships) SetOncall(v EntityToOncalls) { + o.Oncall = &v +} + +// GetRawSchema returns the RawSchema field value if set, zero value otherwise. +func (o *EntityRelationships) GetRawSchema() EntityToRawSchema { + if o == nil || o.RawSchema == nil { + var ret EntityToRawSchema + return ret + } + return *o.RawSchema +} + +// GetRawSchemaOk returns a tuple with the RawSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityRelationships) GetRawSchemaOk() (*EntityToRawSchema, bool) { + if o == nil || o.RawSchema == nil { + return nil, false + } + return o.RawSchema, true +} + +// HasRawSchema returns a boolean if a field has been set. +func (o *EntityRelationships) HasRawSchema() bool { + return o != nil && o.RawSchema != nil +} + +// SetRawSchema gets a reference to the given EntityToRawSchema and assigns it to the RawSchema field. +func (o *EntityRelationships) SetRawSchema(v EntityToRawSchema) { + o.RawSchema = &v +} + +// GetRelatedEntities returns the RelatedEntities field value if set, zero value otherwise. +func (o *EntityRelationships) GetRelatedEntities() EntityToRelatedEntities { + if o == nil || o.RelatedEntities == nil { + var ret EntityToRelatedEntities + return ret + } + return *o.RelatedEntities +} + +// GetRelatedEntitiesOk returns a tuple with the RelatedEntities field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityRelationships) GetRelatedEntitiesOk() (*EntityToRelatedEntities, bool) { + if o == nil || o.RelatedEntities == nil { + return nil, false + } + return o.RelatedEntities, true +} + +// HasRelatedEntities returns a boolean if a field has been set. +func (o *EntityRelationships) HasRelatedEntities() bool { + return o != nil && o.RelatedEntities != nil +} + +// SetRelatedEntities gets a reference to the given EntityToRelatedEntities and assigns it to the RelatedEntities field. +func (o *EntityRelationships) SetRelatedEntities(v EntityToRelatedEntities) { + o.RelatedEntities = &v +} + +// GetSchema returns the Schema field value if set, zero value otherwise. +func (o *EntityRelationships) GetSchema() EntityToSchema { + if o == nil || o.Schema == nil { + var ret EntityToSchema + return ret + } + return *o.Schema +} + +// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityRelationships) GetSchemaOk() (*EntityToSchema, bool) { + if o == nil || o.Schema == nil { + return nil, false + } + return o.Schema, true +} + +// HasSchema returns a boolean if a field has been set. +func (o *EntityRelationships) HasSchema() bool { + return o != nil && o.Schema != nil +} + +// SetSchema gets a reference to the given EntityToSchema and assigns it to the Schema field. +func (o *EntityRelationships) SetSchema(v EntityToSchema) { + o.Schema = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityRelationships) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Incidents != nil { + toSerialize["incidents"] = o.Incidents + } + if o.Oncall != nil { + toSerialize["oncall"] = o.Oncall + } + if o.RawSchema != nil { + toSerialize["rawSchema"] = o.RawSchema + } + if o.RelatedEntities != nil { + toSerialize["relatedEntities"] = o.RelatedEntities + } + if o.Schema != nil { + toSerialize["schema"] = o.Schema + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityRelationships) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Incidents *EntityToIncidents `json:"incidents,omitempty"` + Oncall *EntityToOncalls `json:"oncall,omitempty"` + RawSchema *EntityToRawSchema `json:"rawSchema,omitempty"` + RelatedEntities *EntityToRelatedEntities `json:"relatedEntities,omitempty"` + Schema *EntityToSchema `json:"schema,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"incidents", "oncall", "rawSchema", "relatedEntities", "schema"}) + } else { + return err + } + + hasInvalidField := false + if all.Incidents != nil && all.Incidents.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Incidents = all.Incidents + if all.Oncall != nil && all.Oncall.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Oncall = all.Oncall + if all.RawSchema != nil && all.RawSchema.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.RawSchema = all.RawSchema + if all.RelatedEntities != nil && all.RelatedEntities.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.RelatedEntities = all.RelatedEntities + if all.Schema != nil && all.Schema.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Schema = all.Schema + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_incident.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_incident.go new file mode 100644 index 0000000000..d5b1b5a849 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_incident.go @@ -0,0 +1,181 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedIncident Included incident. +type EntityResponseIncludedIncident struct { + // Incident attributes. + Attributes *EntityResponseIncludedRelatedIncidentAttributes `json:"attributes,omitempty"` + // Incident id. + Id *string `json:"id,omitempty"` + // Incident description. + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedIncident instantiates a new EntityResponseIncludedIncident object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedIncident() *EntityResponseIncludedIncident { + this := EntityResponseIncludedIncident{} + return &this +} + +// NewEntityResponseIncludedIncidentWithDefaults instantiates a new EntityResponseIncludedIncident object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedIncidentWithDefaults() *EntityResponseIncludedIncident { + this := EntityResponseIncludedIncident{} + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *EntityResponseIncludedIncident) GetAttributes() EntityResponseIncludedRelatedIncidentAttributes { + if o == nil || o.Attributes == nil { + var ret EntityResponseIncludedRelatedIncidentAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedIncident) GetAttributesOk() (*EntityResponseIncludedRelatedIncidentAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *EntityResponseIncludedIncident) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given EntityResponseIncludedRelatedIncidentAttributes and assigns it to the Attributes field. +func (o *EntityResponseIncludedIncident) SetAttributes(v EntityResponseIncludedRelatedIncidentAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EntityResponseIncludedIncident) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedIncident) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EntityResponseIncludedIncident) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EntityResponseIncludedIncident) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityResponseIncludedIncident) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedIncident) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityResponseIncludedIncident) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityResponseIncludedIncident) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedIncident) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedIncident) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *EntityResponseIncludedRelatedIncidentAttributes `json:"attributes,omitempty"` + Id *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Id = all.Id + o.Type = all.Type + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_oncall.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_oncall.go new file mode 100644 index 0000000000..6c262922ae --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_oncall.go @@ -0,0 +1,181 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedOncall Included oncall. +type EntityResponseIncludedOncall struct { + // Included related oncall attributes. + Attributes *EntityResponseIncludedRelatedOncallAttributes `json:"attributes,omitempty"` + // Oncall ID. + Id *string `json:"id,omitempty"` + // Oncall type. + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedOncall instantiates a new EntityResponseIncludedOncall object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedOncall() *EntityResponseIncludedOncall { + this := EntityResponseIncludedOncall{} + return &this +} + +// NewEntityResponseIncludedOncallWithDefaults instantiates a new EntityResponseIncludedOncall object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedOncallWithDefaults() *EntityResponseIncludedOncall { + this := EntityResponseIncludedOncall{} + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *EntityResponseIncludedOncall) GetAttributes() EntityResponseIncludedRelatedOncallAttributes { + if o == nil || o.Attributes == nil { + var ret EntityResponseIncludedRelatedOncallAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedOncall) GetAttributesOk() (*EntityResponseIncludedRelatedOncallAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *EntityResponseIncludedOncall) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given EntityResponseIncludedRelatedOncallAttributes and assigns it to the Attributes field. +func (o *EntityResponseIncludedOncall) SetAttributes(v EntityResponseIncludedRelatedOncallAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EntityResponseIncludedOncall) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedOncall) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EntityResponseIncludedOncall) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EntityResponseIncludedOncall) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityResponseIncludedOncall) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedOncall) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityResponseIncludedOncall) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityResponseIncludedOncall) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedOncall) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedOncall) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *EntityResponseIncludedRelatedOncallAttributes `json:"attributes,omitempty"` + Id *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Id = all.Id + o.Type = all.Type + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_raw_schema.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_raw_schema.go new file mode 100644 index 0000000000..f03987c95c --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_raw_schema.go @@ -0,0 +1,181 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedRawSchema Included raw schema. +type EntityResponseIncludedRawSchema struct { + // Included raw schema attributes. + Attributes *EntityResponseIncludedRawSchemaAttributes `json:"attributes,omitempty"` + // Raw schema id. + Id *string `json:"id,omitempty"` + // Raw schema type. + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedRawSchema instantiates a new EntityResponseIncludedRawSchema object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedRawSchema() *EntityResponseIncludedRawSchema { + this := EntityResponseIncludedRawSchema{} + return &this +} + +// NewEntityResponseIncludedRawSchemaWithDefaults instantiates a new EntityResponseIncludedRawSchema object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedRawSchemaWithDefaults() *EntityResponseIncludedRawSchema { + this := EntityResponseIncludedRawSchema{} + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *EntityResponseIncludedRawSchema) GetAttributes() EntityResponseIncludedRawSchemaAttributes { + if o == nil || o.Attributes == nil { + var ret EntityResponseIncludedRawSchemaAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRawSchema) GetAttributesOk() (*EntityResponseIncludedRawSchemaAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *EntityResponseIncludedRawSchema) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given EntityResponseIncludedRawSchemaAttributes and assigns it to the Attributes field. +func (o *EntityResponseIncludedRawSchema) SetAttributes(v EntityResponseIncludedRawSchemaAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EntityResponseIncludedRawSchema) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRawSchema) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EntityResponseIncludedRawSchema) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EntityResponseIncludedRawSchema) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityResponseIncludedRawSchema) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRawSchema) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityResponseIncludedRawSchema) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityResponseIncludedRawSchema) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedRawSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedRawSchema) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *EntityResponseIncludedRawSchemaAttributes `json:"attributes,omitempty"` + Id *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Id = all.Id + o.Type = all.Type + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_raw_schema_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_raw_schema_attributes.go new file mode 100644 index 0000000000..86f34806e7 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_raw_schema_attributes.go @@ -0,0 +1,102 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedRawSchemaAttributes Included raw schema attributes. +type EntityResponseIncludedRawSchemaAttributes struct { + // Schema from user input in base64 encoding. + RawSchema *string `json:"rawSchema,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedRawSchemaAttributes instantiates a new EntityResponseIncludedRawSchemaAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedRawSchemaAttributes() *EntityResponseIncludedRawSchemaAttributes { + this := EntityResponseIncludedRawSchemaAttributes{} + return &this +} + +// NewEntityResponseIncludedRawSchemaAttributesWithDefaults instantiates a new EntityResponseIncludedRawSchemaAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedRawSchemaAttributesWithDefaults() *EntityResponseIncludedRawSchemaAttributes { + this := EntityResponseIncludedRawSchemaAttributes{} + return &this +} + +// GetRawSchema returns the RawSchema field value if set, zero value otherwise. +func (o *EntityResponseIncludedRawSchemaAttributes) GetRawSchema() string { + if o == nil || o.RawSchema == nil { + var ret string + return ret + } + return *o.RawSchema +} + +// GetRawSchemaOk returns a tuple with the RawSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRawSchemaAttributes) GetRawSchemaOk() (*string, bool) { + if o == nil || o.RawSchema == nil { + return nil, false + } + return o.RawSchema, true +} + +// HasRawSchema returns a boolean if a field has been set. +func (o *EntityResponseIncludedRawSchemaAttributes) HasRawSchema() bool { + return o != nil && o.RawSchema != nil +} + +// SetRawSchema gets a reference to the given string and assigns it to the RawSchema field. +func (o *EntityResponseIncludedRawSchemaAttributes) SetRawSchema(v string) { + o.RawSchema = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedRawSchemaAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.RawSchema != nil { + toSerialize["rawSchema"] = o.RawSchema + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedRawSchemaAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + RawSchema *string `json:"rawSchema,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"rawSchema"}) + } else { + return err + } + o.RawSchema = all.RawSchema + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity.go new file mode 100644 index 0000000000..b1adfb3d2c --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity.go @@ -0,0 +1,219 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedRelatedEntity Included related entity. +type EntityResponseIncludedRelatedEntity struct { + // Related entity attributes. + Attributes *EntityResponseIncludedRelatedEntityAttributes `json:"attributes,omitempty"` + // Entity UUID. + Id *string `json:"id,omitempty"` + // Included related entity meta. + Meta *EntityResponseIncludedRelatedEntityMeta `json:"meta,omitempty"` + // Related entity. + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedRelatedEntity instantiates a new EntityResponseIncludedRelatedEntity object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedRelatedEntity() *EntityResponseIncludedRelatedEntity { + this := EntityResponseIncludedRelatedEntity{} + return &this +} + +// NewEntityResponseIncludedRelatedEntityWithDefaults instantiates a new EntityResponseIncludedRelatedEntity object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedRelatedEntityWithDefaults() *EntityResponseIncludedRelatedEntity { + this := EntityResponseIncludedRelatedEntity{} + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntity) GetAttributes() EntityResponseIncludedRelatedEntityAttributes { + if o == nil || o.Attributes == nil { + var ret EntityResponseIncludedRelatedEntityAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntity) GetAttributesOk() (*EntityResponseIncludedRelatedEntityAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntity) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given EntityResponseIncludedRelatedEntityAttributes and assigns it to the Attributes field. +func (o *EntityResponseIncludedRelatedEntity) SetAttributes(v EntityResponseIncludedRelatedEntityAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntity) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntity) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntity) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EntityResponseIncludedRelatedEntity) SetId(v string) { + o.Id = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntity) GetMeta() EntityResponseIncludedRelatedEntityMeta { + if o == nil || o.Meta == nil { + var ret EntityResponseIncludedRelatedEntityMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntity) GetMetaOk() (*EntityResponseIncludedRelatedEntityMeta, bool) { + if o == nil || o.Meta == nil { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntity) HasMeta() bool { + return o != nil && o.Meta != nil +} + +// SetMeta gets a reference to the given EntityResponseIncludedRelatedEntityMeta and assigns it to the Meta field. +func (o *EntityResponseIncludedRelatedEntity) SetMeta(v EntityResponseIncludedRelatedEntityMeta) { + o.Meta = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntity) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntity) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntity) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityResponseIncludedRelatedEntity) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedRelatedEntity) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedRelatedEntity) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *EntityResponseIncludedRelatedEntityAttributes `json:"attributes,omitempty"` + Id *string `json:"id,omitempty"` + Meta *EntityResponseIncludedRelatedEntityMeta `json:"meta,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "meta", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Id = all.Id + if all.Meta != nil && all.Meta.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Meta = all.Meta + o.Type = all.Type + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity_attributes.go new file mode 100644 index 0000000000..98b4d5f17f --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity_attributes.go @@ -0,0 +1,207 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedRelatedEntityAttributes Related entity attributes. +type EntityResponseIncludedRelatedEntityAttributes struct { + // Entity kind. + Kind *string `json:"kind,omitempty"` + // Entity name. + Name *string `json:"name,omitempty"` + // Entity namespace. + Namespace *string `json:"namespace,omitempty"` + // Entity relation type to the associated entity. + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedRelatedEntityAttributes instantiates a new EntityResponseIncludedRelatedEntityAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedRelatedEntityAttributes() *EntityResponseIncludedRelatedEntityAttributes { + this := EntityResponseIncludedRelatedEntityAttributes{} + return &this +} + +// NewEntityResponseIncludedRelatedEntityAttributesWithDefaults instantiates a new EntityResponseIncludedRelatedEntityAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedRelatedEntityAttributesWithDefaults() *EntityResponseIncludedRelatedEntityAttributes { + this := EntityResponseIncludedRelatedEntityAttributes{} + return &this +} + +// GetKind returns the Kind field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntityAttributes) GetKind() string { + if o == nil || o.Kind == nil { + var ret string + return ret + } + return *o.Kind +} + +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntityAttributes) GetKindOk() (*string, bool) { + if o == nil || o.Kind == nil { + return nil, false + } + return o.Kind, true +} + +// HasKind returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntityAttributes) HasKind() bool { + return o != nil && o.Kind != nil +} + +// SetKind gets a reference to the given string and assigns it to the Kind field. +func (o *EntityResponseIncludedRelatedEntityAttributes) SetKind(v string) { + o.Kind = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntityAttributes) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntityAttributes) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntityAttributes) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EntityResponseIncludedRelatedEntityAttributes) SetName(v string) { + o.Name = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntityAttributes) GetNamespace() string { + if o == nil || o.Namespace == nil { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntityAttributes) GetNamespaceOk() (*string, bool) { + if o == nil || o.Namespace == nil { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntityAttributes) HasNamespace() bool { + return o != nil && o.Namespace != nil +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *EntityResponseIncludedRelatedEntityAttributes) SetNamespace(v string) { + o.Namespace = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntityAttributes) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntityAttributes) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntityAttributes) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityResponseIncludedRelatedEntityAttributes) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedRelatedEntityAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Kind != nil { + toSerialize["kind"] = o.Kind + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Namespace != nil { + toSerialize["namespace"] = o.Namespace + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedRelatedEntityAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Kind *string `json:"kind,omitempty"` + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"kind", "name", "namespace", "type"}) + } else { + return err + } + o.Kind = all.Kind + o.Name = all.Name + o.Namespace = all.Namespace + o.Type = all.Type + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity_meta.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity_meta.go new file mode 100644 index 0000000000..9eaa6d96ab --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_entity_meta.go @@ -0,0 +1,217 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedRelatedEntityMeta Included related entity meta. +type EntityResponseIncludedRelatedEntityMeta struct { + // Entity creation time. + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Entity relation defined by. + DefinedBy *string `json:"defined_by,omitempty"` + // Entity modification time. + ModifiedAt *time.Time `json:"modifiedAt,omitempty"` + // Entity relation source. + Source *string `json:"source,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedRelatedEntityMeta instantiates a new EntityResponseIncludedRelatedEntityMeta object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedRelatedEntityMeta() *EntityResponseIncludedRelatedEntityMeta { + this := EntityResponseIncludedRelatedEntityMeta{} + return &this +} + +// NewEntityResponseIncludedRelatedEntityMetaWithDefaults instantiates a new EntityResponseIncludedRelatedEntityMeta object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedRelatedEntityMetaWithDefaults() *EntityResponseIncludedRelatedEntityMeta { + this := EntityResponseIncludedRelatedEntityMeta{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntityMeta) GetCreatedAt() time.Time { + if o == nil || o.CreatedAt == nil { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntityMeta) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntityMeta) HasCreatedAt() bool { + return o != nil && o.CreatedAt != nil +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EntityResponseIncludedRelatedEntityMeta) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetDefinedBy returns the DefinedBy field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntityMeta) GetDefinedBy() string { + if o == nil || o.DefinedBy == nil { + var ret string + return ret + } + return *o.DefinedBy +} + +// GetDefinedByOk returns a tuple with the DefinedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntityMeta) GetDefinedByOk() (*string, bool) { + if o == nil || o.DefinedBy == nil { + return nil, false + } + return o.DefinedBy, true +} + +// HasDefinedBy returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntityMeta) HasDefinedBy() bool { + return o != nil && o.DefinedBy != nil +} + +// SetDefinedBy gets a reference to the given string and assigns it to the DefinedBy field. +func (o *EntityResponseIncludedRelatedEntityMeta) SetDefinedBy(v string) { + o.DefinedBy = &v +} + +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntityMeta) GetModifiedAt() time.Time { + if o == nil || o.ModifiedAt == nil { + var ret time.Time + return ret + } + return *o.ModifiedAt +} + +// GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntityMeta) GetModifiedAtOk() (*time.Time, bool) { + if o == nil || o.ModifiedAt == nil { + return nil, false + } + return o.ModifiedAt, true +} + +// HasModifiedAt returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntityMeta) HasModifiedAt() bool { + return o != nil && o.ModifiedAt != nil +} + +// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +func (o *EntityResponseIncludedRelatedEntityMeta) SetModifiedAt(v time.Time) { + o.ModifiedAt = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedEntityMeta) GetSource() string { + if o == nil || o.Source == nil { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedEntityMeta) GetSourceOk() (*string, bool) { + if o == nil || o.Source == nil { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedEntityMeta) HasSource() bool { + return o != nil && o.Source != nil +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *EntityResponseIncludedRelatedEntityMeta) SetSource(v string) { + o.Source = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedRelatedEntityMeta) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.CreatedAt != nil { + if o.CreatedAt.Nanosecond() == 0 { + toSerialize["createdAt"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00") + } else { + toSerialize["createdAt"] = o.CreatedAt.Format("2006-01-02T15:04:05.000Z07:00") + } + } + if o.DefinedBy != nil { + toSerialize["defined_by"] = o.DefinedBy + } + if o.ModifiedAt != nil { + if o.ModifiedAt.Nanosecond() == 0 { + toSerialize["modifiedAt"] = o.ModifiedAt.Format("2006-01-02T15:04:05Z07:00") + } else { + toSerialize["modifiedAt"] = o.ModifiedAt.Format("2006-01-02T15:04:05.000Z07:00") + } + } + if o.Source != nil { + toSerialize["source"] = o.Source + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedRelatedEntityMeta) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + DefinedBy *string `json:"defined_by,omitempty"` + ModifiedAt *time.Time `json:"modifiedAt,omitempty"` + Source *string `json:"source,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"createdAt", "defined_by", "modifiedAt", "source"}) + } else { + return err + } + o.CreatedAt = all.CreatedAt + o.DefinedBy = all.DefinedBy + o.ModifiedAt = all.ModifiedAt + o.Source = all.Source + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_incident_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_incident_attributes.go new file mode 100644 index 0000000000..af09df4565 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_incident_attributes.go @@ -0,0 +1,248 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedRelatedIncidentAttributes Incident attributes. +type EntityResponseIncludedRelatedIncidentAttributes struct { + // Incident creation time. + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Incident URL. + HtmlUrl *string `json:"htmlURL,omitempty"` + // Incident provider. + Provider *string `json:"provider,omitempty"` + // Incident status. + Status *string `json:"status,omitempty"` + // Incident title. + Title *string `json:"title,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedRelatedIncidentAttributes instantiates a new EntityResponseIncludedRelatedIncidentAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedRelatedIncidentAttributes() *EntityResponseIncludedRelatedIncidentAttributes { + this := EntityResponseIncludedRelatedIncidentAttributes{} + return &this +} + +// NewEntityResponseIncludedRelatedIncidentAttributesWithDefaults instantiates a new EntityResponseIncludedRelatedIncidentAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedRelatedIncidentAttributesWithDefaults() *EntityResponseIncludedRelatedIncidentAttributes { + this := EntityResponseIncludedRelatedIncidentAttributes{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetCreatedAt() time.Time { + if o == nil || o.CreatedAt == nil { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) HasCreatedAt() bool { + return o != nil && o.CreatedAt != nil +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *EntityResponseIncludedRelatedIncidentAttributes) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetHtmlUrl returns the HtmlUrl field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetHtmlUrl() string { + if o == nil || o.HtmlUrl == nil { + var ret string + return ret + } + return *o.HtmlUrl +} + +// GetHtmlUrlOk returns a tuple with the HtmlUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetHtmlUrlOk() (*string, bool) { + if o == nil || o.HtmlUrl == nil { + return nil, false + } + return o.HtmlUrl, true +} + +// HasHtmlUrl returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) HasHtmlUrl() bool { + return o != nil && o.HtmlUrl != nil +} + +// SetHtmlUrl gets a reference to the given string and assigns it to the HtmlUrl field. +func (o *EntityResponseIncludedRelatedIncidentAttributes) SetHtmlUrl(v string) { + o.HtmlUrl = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetProvider() string { + if o == nil || o.Provider == nil { + var ret string + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetProviderOk() (*string, bool) { + if o == nil || o.Provider == nil { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) HasProvider() bool { + return o != nil && o.Provider != nil +} + +// SetProvider gets a reference to the given string and assigns it to the Provider field. +func (o *EntityResponseIncludedRelatedIncidentAttributes) SetProvider(v string) { + o.Provider = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) HasStatus() bool { + return o != nil && o.Status != nil +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *EntityResponseIncludedRelatedIncidentAttributes) SetStatus(v string) { + o.Status = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetTitle() string { + if o == nil || o.Title == nil { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) GetTitleOk() (*string, bool) { + if o == nil || o.Title == nil { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedIncidentAttributes) HasTitle() bool { + return o != nil && o.Title != nil +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *EntityResponseIncludedRelatedIncidentAttributes) SetTitle(v string) { + o.Title = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedRelatedIncidentAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.CreatedAt != nil { + if o.CreatedAt.Nanosecond() == 0 { + toSerialize["createdAt"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00") + } else { + toSerialize["createdAt"] = o.CreatedAt.Format("2006-01-02T15:04:05.000Z07:00") + } + } + if o.HtmlUrl != nil { + toSerialize["htmlURL"] = o.HtmlUrl + } + if o.Provider != nil { + toSerialize["provider"] = o.Provider + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Title != nil { + toSerialize["title"] = o.Title + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedRelatedIncidentAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + HtmlUrl *string `json:"htmlURL,omitempty"` + Provider *string `json:"provider,omitempty"` + Status *string `json:"status,omitempty"` + Title *string `json:"title,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"createdAt", "htmlURL", "provider", "status", "title"}) + } else { + return err + } + o.CreatedAt = all.CreatedAt + o.HtmlUrl = all.HtmlUrl + o.Provider = all.Provider + o.Status = all.Status + o.Title = all.Title + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_oncall_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_oncall_attributes.go new file mode 100644 index 0000000000..878da895f4 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_oncall_attributes.go @@ -0,0 +1,137 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedRelatedOncallAttributes Included related oncall attributes. +type EntityResponseIncludedRelatedOncallAttributes struct { + // Oncall escalations + Escalations []EntityResponseIncludedRelatedOncallEscalationItem `json:"escalations,omitempty"` + // Oncall provider. + Provider *string `json:"provider,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedRelatedOncallAttributes instantiates a new EntityResponseIncludedRelatedOncallAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedRelatedOncallAttributes() *EntityResponseIncludedRelatedOncallAttributes { + this := EntityResponseIncludedRelatedOncallAttributes{} + return &this +} + +// NewEntityResponseIncludedRelatedOncallAttributesWithDefaults instantiates a new EntityResponseIncludedRelatedOncallAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedRelatedOncallAttributesWithDefaults() *EntityResponseIncludedRelatedOncallAttributes { + this := EntityResponseIncludedRelatedOncallAttributes{} + return &this +} + +// GetEscalations returns the Escalations field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedOncallAttributes) GetEscalations() []EntityResponseIncludedRelatedOncallEscalationItem { + if o == nil || o.Escalations == nil { + var ret []EntityResponseIncludedRelatedOncallEscalationItem + return ret + } + return o.Escalations +} + +// GetEscalationsOk returns a tuple with the Escalations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedOncallAttributes) GetEscalationsOk() (*[]EntityResponseIncludedRelatedOncallEscalationItem, bool) { + if o == nil || o.Escalations == nil { + return nil, false + } + return &o.Escalations, true +} + +// HasEscalations returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedOncallAttributes) HasEscalations() bool { + return o != nil && o.Escalations != nil +} + +// SetEscalations gets a reference to the given []EntityResponseIncludedRelatedOncallEscalationItem and assigns it to the Escalations field. +func (o *EntityResponseIncludedRelatedOncallAttributes) SetEscalations(v []EntityResponseIncludedRelatedOncallEscalationItem) { + o.Escalations = v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedOncallAttributes) GetProvider() string { + if o == nil || o.Provider == nil { + var ret string + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedOncallAttributes) GetProviderOk() (*string, bool) { + if o == nil || o.Provider == nil { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedOncallAttributes) HasProvider() bool { + return o != nil && o.Provider != nil +} + +// SetProvider gets a reference to the given string and assigns it to the Provider field. +func (o *EntityResponseIncludedRelatedOncallAttributes) SetProvider(v string) { + o.Provider = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedRelatedOncallAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Escalations != nil { + toSerialize["escalations"] = o.Escalations + } + if o.Provider != nil { + toSerialize["provider"] = o.Provider + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedRelatedOncallAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Escalations []EntityResponseIncludedRelatedOncallEscalationItem `json:"escalations,omitempty"` + Provider *string `json:"provider,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"escalations", "provider"}) + } else { + return err + } + o.Escalations = all.Escalations + o.Provider = all.Provider + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_oncall_escalation_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_oncall_escalation_item.go new file mode 100644 index 0000000000..d9e01a9e21 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_related_oncall_escalation_item.go @@ -0,0 +1,172 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedRelatedOncallEscalationItem Oncall escalation +type EntityResponseIncludedRelatedOncallEscalationItem struct { + // Oncall email. + Email *string `json:"email,omitempty"` + // Oncall level. + EscalationLevel *int64 `json:"escalationLevel,omitempty"` + // Oncall name. + Name *string `json:"name,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedRelatedOncallEscalationItem instantiates a new EntityResponseIncludedRelatedOncallEscalationItem object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedRelatedOncallEscalationItem() *EntityResponseIncludedRelatedOncallEscalationItem { + this := EntityResponseIncludedRelatedOncallEscalationItem{} + return &this +} + +// NewEntityResponseIncludedRelatedOncallEscalationItemWithDefaults instantiates a new EntityResponseIncludedRelatedOncallEscalationItem object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedRelatedOncallEscalationItemWithDefaults() *EntityResponseIncludedRelatedOncallEscalationItem { + this := EntityResponseIncludedRelatedOncallEscalationItem{} + return &this +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) GetEmail() string { + if o == nil || o.Email == nil { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) GetEmailOk() (*string, bool) { + if o == nil || o.Email == nil { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) HasEmail() bool { + return o != nil && o.Email != nil +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) SetEmail(v string) { + o.Email = &v +} + +// GetEscalationLevel returns the EscalationLevel field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) GetEscalationLevel() int64 { + if o == nil || o.EscalationLevel == nil { + var ret int64 + return ret + } + return *o.EscalationLevel +} + +// GetEscalationLevelOk returns a tuple with the EscalationLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) GetEscalationLevelOk() (*int64, bool) { + if o == nil || o.EscalationLevel == nil { + return nil, false + } + return o.EscalationLevel, true +} + +// HasEscalationLevel returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) HasEscalationLevel() bool { + return o != nil && o.EscalationLevel != nil +} + +// SetEscalationLevel gets a reference to the given int64 and assigns it to the EscalationLevel field. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) SetEscalationLevel(v int64) { + o.EscalationLevel = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) SetName(v string) { + o.Name = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedRelatedOncallEscalationItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Email != nil { + toSerialize["email"] = o.Email + } + if o.EscalationLevel != nil { + toSerialize["escalationLevel"] = o.EscalationLevel + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedRelatedOncallEscalationItem) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Email *string `json:"email,omitempty"` + EscalationLevel *int64 `json:"escalationLevel,omitempty"` + Name *string `json:"name,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"email", "escalationLevel", "name"}) + } else { + return err + } + o.Email = all.Email + o.EscalationLevel = all.EscalationLevel + o.Name = all.Name + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_schema.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_schema.go new file mode 100644 index 0000000000..1b3cacd5c0 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_schema.go @@ -0,0 +1,181 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedSchema Included detail entity schema. +type EntityResponseIncludedSchema struct { + // Included schema. + Attributes *EntityResponseIncludedSchemaAttributes `json:"attributes,omitempty"` + // Entity id. + Id *string `json:"id,omitempty"` + // Schema type. + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedSchema instantiates a new EntityResponseIncludedSchema object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedSchema() *EntityResponseIncludedSchema { + this := EntityResponseIncludedSchema{} + return &this +} + +// NewEntityResponseIncludedSchemaWithDefaults instantiates a new EntityResponseIncludedSchema object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedSchemaWithDefaults() *EntityResponseIncludedSchema { + this := EntityResponseIncludedSchema{} + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *EntityResponseIncludedSchema) GetAttributes() EntityResponseIncludedSchemaAttributes { + if o == nil || o.Attributes == nil { + var ret EntityResponseIncludedSchemaAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedSchema) GetAttributesOk() (*EntityResponseIncludedSchemaAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *EntityResponseIncludedSchema) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given EntityResponseIncludedSchemaAttributes and assigns it to the Attributes field. +func (o *EntityResponseIncludedSchema) SetAttributes(v EntityResponseIncludedSchemaAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EntityResponseIncludedSchema) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedSchema) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EntityResponseIncludedSchema) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EntityResponseIncludedSchema) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityResponseIncludedSchema) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedSchema) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityResponseIncludedSchema) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityResponseIncludedSchema) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedSchema) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *EntityResponseIncludedSchemaAttributes `json:"attributes,omitempty"` + Id *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Id = all.Id + o.Type = all.Type + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_schema_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_schema_attributes.go new file mode 100644 index 0000000000..d90b5b2f0d --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_included_schema_attributes.go @@ -0,0 +1,102 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseIncludedSchemaAttributes Included schema. +type EntityResponseIncludedSchemaAttributes struct { + // Entity schema v3. + Schema *EntityV3 `json:"schema,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseIncludedSchemaAttributes instantiates a new EntityResponseIncludedSchemaAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseIncludedSchemaAttributes() *EntityResponseIncludedSchemaAttributes { + this := EntityResponseIncludedSchemaAttributes{} + return &this +} + +// NewEntityResponseIncludedSchemaAttributesWithDefaults instantiates a new EntityResponseIncludedSchemaAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseIncludedSchemaAttributesWithDefaults() *EntityResponseIncludedSchemaAttributes { + this := EntityResponseIncludedSchemaAttributes{} + return &this +} + +// GetSchema returns the Schema field value if set, zero value otherwise. +func (o *EntityResponseIncludedSchemaAttributes) GetSchema() EntityV3 { + if o == nil || o.Schema == nil { + var ret EntityV3 + return ret + } + return *o.Schema +} + +// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseIncludedSchemaAttributes) GetSchemaOk() (*EntityV3, bool) { + if o == nil || o.Schema == nil { + return nil, false + } + return o.Schema, true +} + +// HasSchema returns a boolean if a field has been set. +func (o *EntityResponseIncludedSchemaAttributes) HasSchema() bool { + return o != nil && o.Schema != nil +} + +// SetSchema gets a reference to the given EntityV3 and assigns it to the Schema field. +func (o *EntityResponseIncludedSchemaAttributes) SetSchema(v EntityV3) { + o.Schema = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseIncludedSchemaAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Schema != nil { + toSerialize["schema"] = o.Schema + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseIncludedSchemaAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Schema *EntityV3 `json:"schema,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"schema"}) + } else { + return err + } + o.Schema = all.Schema + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_meta.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_meta.go new file mode 100644 index 0000000000..98010823c2 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_response_meta.go @@ -0,0 +1,137 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityResponseMeta Entity metadata. +type EntityResponseMeta struct { + // Total entities count. + Count *int64 `json:"count,omitempty"` + // Total included data count. + IncludeCount *int64 `json:"includeCount,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityResponseMeta instantiates a new EntityResponseMeta object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityResponseMeta() *EntityResponseMeta { + this := EntityResponseMeta{} + return &this +} + +// NewEntityResponseMetaWithDefaults instantiates a new EntityResponseMeta object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityResponseMetaWithDefaults() *EntityResponseMeta { + this := EntityResponseMeta{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *EntityResponseMeta) GetCount() int64 { + if o == nil || o.Count == nil { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseMeta) GetCountOk() (*int64, bool) { + if o == nil || o.Count == nil { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *EntityResponseMeta) HasCount() bool { + return o != nil && o.Count != nil +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *EntityResponseMeta) SetCount(v int64) { + o.Count = &v +} + +// GetIncludeCount returns the IncludeCount field value if set, zero value otherwise. +func (o *EntityResponseMeta) GetIncludeCount() int64 { + if o == nil || o.IncludeCount == nil { + var ret int64 + return ret + } + return *o.IncludeCount +} + +// GetIncludeCountOk returns a tuple with the IncludeCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityResponseMeta) GetIncludeCountOk() (*int64, bool) { + if o == nil || o.IncludeCount == nil { + return nil, false + } + return o.IncludeCount, true +} + +// HasIncludeCount returns a boolean if a field has been set. +func (o *EntityResponseMeta) HasIncludeCount() bool { + return o != nil && o.IncludeCount != nil +} + +// SetIncludeCount gets a reference to the given int64 and assigns it to the IncludeCount field. +func (o *EntityResponseMeta) SetIncludeCount(v int64) { + o.IncludeCount = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityResponseMeta) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Count != nil { + toSerialize["count"] = o.Count + } + if o.IncludeCount != nil { + toSerialize["includeCount"] = o.IncludeCount + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityResponseMeta) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Count *int64 `json:"count,omitempty"` + IncludeCount *int64 `json:"includeCount,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"count", "includeCount"}) + } else { + return err + } + o.Count = all.Count + o.IncludeCount = all.IncludeCount + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_incidents.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_incidents.go new file mode 100644 index 0000000000..e407f8c115 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_incidents.go @@ -0,0 +1,102 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityToIncidents Entity to incidents relationship. +type EntityToIncidents struct { + // Relationships. + Data []RelationshipItem `json:"data,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityToIncidents instantiates a new EntityToIncidents object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityToIncidents() *EntityToIncidents { + this := EntityToIncidents{} + return &this +} + +// NewEntityToIncidentsWithDefaults instantiates a new EntityToIncidents object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityToIncidentsWithDefaults() *EntityToIncidents { + this := EntityToIncidents{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EntityToIncidents) GetData() []RelationshipItem { + if o == nil || o.Data == nil { + var ret []RelationshipItem + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityToIncidents) GetDataOk() (*[]RelationshipItem, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return &o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EntityToIncidents) HasData() bool { + return o != nil && o.Data != nil +} + +// SetData gets a reference to the given []RelationshipItem and assigns it to the Data field. +func (o *EntityToIncidents) SetData(v []RelationshipItem) { + o.Data = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityToIncidents) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityToIncidents) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data []RelationshipItem `json:"data,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + o.Data = all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_oncalls.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_oncalls.go new file mode 100644 index 0000000000..e3ca605e7d --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_oncalls.go @@ -0,0 +1,102 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityToOncalls Entity to oncalls relationship. +type EntityToOncalls struct { + // Relationships. + Data []RelationshipItem `json:"data,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityToOncalls instantiates a new EntityToOncalls object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityToOncalls() *EntityToOncalls { + this := EntityToOncalls{} + return &this +} + +// NewEntityToOncallsWithDefaults instantiates a new EntityToOncalls object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityToOncallsWithDefaults() *EntityToOncalls { + this := EntityToOncalls{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EntityToOncalls) GetData() []RelationshipItem { + if o == nil || o.Data == nil { + var ret []RelationshipItem + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityToOncalls) GetDataOk() (*[]RelationshipItem, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return &o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EntityToOncalls) HasData() bool { + return o != nil && o.Data != nil +} + +// SetData gets a reference to the given []RelationshipItem and assigns it to the Data field. +func (o *EntityToOncalls) SetData(v []RelationshipItem) { + o.Data = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityToOncalls) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityToOncalls) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data []RelationshipItem `json:"data,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + o.Data = all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_raw_schema.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_raw_schema.go new file mode 100644 index 0000000000..f146f90b0d --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_raw_schema.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityToRawSchema Entity to raw schema relationship. +type EntityToRawSchema struct { + // Relationship entry. + Data *RelationshipItem `json:"data,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityToRawSchema instantiates a new EntityToRawSchema object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityToRawSchema() *EntityToRawSchema { + this := EntityToRawSchema{} + return &this +} + +// NewEntityToRawSchemaWithDefaults instantiates a new EntityToRawSchema object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityToRawSchemaWithDefaults() *EntityToRawSchema { + this := EntityToRawSchema{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EntityToRawSchema) GetData() RelationshipItem { + if o == nil || o.Data == nil { + var ret RelationshipItem + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityToRawSchema) GetDataOk() (*RelationshipItem, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EntityToRawSchema) HasData() bool { + return o != nil && o.Data != nil +} + +// SetData gets a reference to the given RelationshipItem and assigns it to the Data field. +func (o *EntityToRawSchema) SetData(v RelationshipItem) { + o.Data = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityToRawSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityToRawSchema) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data *RelationshipItem `json:"data,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + + hasInvalidField := false + if all.Data != nil && all.Data.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Data = all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_related_entities.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_related_entities.go new file mode 100644 index 0000000000..a605e8a391 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_related_entities.go @@ -0,0 +1,102 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityToRelatedEntities Entity to related entities relationship. +type EntityToRelatedEntities struct { + // Relationships. + Data []RelationshipItem `json:"data,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityToRelatedEntities instantiates a new EntityToRelatedEntities object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityToRelatedEntities() *EntityToRelatedEntities { + this := EntityToRelatedEntities{} + return &this +} + +// NewEntityToRelatedEntitiesWithDefaults instantiates a new EntityToRelatedEntities object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityToRelatedEntitiesWithDefaults() *EntityToRelatedEntities { + this := EntityToRelatedEntities{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EntityToRelatedEntities) GetData() []RelationshipItem { + if o == nil || o.Data == nil { + var ret []RelationshipItem + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityToRelatedEntities) GetDataOk() (*[]RelationshipItem, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return &o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EntityToRelatedEntities) HasData() bool { + return o != nil && o.Data != nil +} + +// SetData gets a reference to the given []RelationshipItem and assigns it to the Data field. +func (o *EntityToRelatedEntities) SetData(v []RelationshipItem) { + o.Data = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityToRelatedEntities) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityToRelatedEntities) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data []RelationshipItem `json:"data,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + o.Data = all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_schema.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_schema.go new file mode 100644 index 0000000000..2190bfe2b2 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_to_schema.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityToSchema Entity to detail schema relationship. +type EntityToSchema struct { + // Relationship entry. + Data *RelationshipItem `json:"data,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityToSchema instantiates a new EntityToSchema object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityToSchema() *EntityToSchema { + this := EntityToSchema{} + return &this +} + +// NewEntityToSchemaWithDefaults instantiates a new EntityToSchema object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityToSchemaWithDefaults() *EntityToSchema { + this := EntityToSchema{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EntityToSchema) GetData() RelationshipItem { + if o == nil || o.Data == nil { + var ret RelationshipItem + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityToSchema) GetDataOk() (*RelationshipItem, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EntityToSchema) HasData() bool { + return o != nil && o.Data != nil +} + +// SetData gets a reference to the given RelationshipItem and assigns it to the Data field. +func (o *EntityToSchema) SetData(v RelationshipItem) { + o.Data = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityToSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityToSchema) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data *RelationshipItem `json:"data,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + + hasInvalidField := false + if all.Data != nil && all.Data.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Data = all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3.go new file mode 100644 index 0000000000..e716dc2a9b --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3.go @@ -0,0 +1,169 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3 - Entity schema v3. +type EntityV3 struct { + EntityV3Service *EntityV3Service + EntityV3Datastore *EntityV3Datastore + EntityV3Queue *EntityV3Queue + EntityV3System *EntityV3System + + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject interface{} +} + +// EntityV3ServiceAsEntityV3 is a convenience function that returns EntityV3Service wrapped in EntityV3. +func EntityV3ServiceAsEntityV3(v *EntityV3Service) EntityV3 { + return EntityV3{EntityV3Service: v} +} + +// EntityV3DatastoreAsEntityV3 is a convenience function that returns EntityV3Datastore wrapped in EntityV3. +func EntityV3DatastoreAsEntityV3(v *EntityV3Datastore) EntityV3 { + return EntityV3{EntityV3Datastore: v} +} + +// EntityV3QueueAsEntityV3 is a convenience function that returns EntityV3Queue wrapped in EntityV3. +func EntityV3QueueAsEntityV3(v *EntityV3Queue) EntityV3 { + return EntityV3{EntityV3Queue: v} +} + +// EntityV3SystemAsEntityV3 is a convenience function that returns EntityV3System wrapped in EntityV3. +func EntityV3SystemAsEntityV3(v *EntityV3System) EntityV3 { + return EntityV3{EntityV3System: v} +} + +// UnmarshalJSON turns data into one of the pointers in the struct. +func (obj *EntityV3) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into EntityV3Service + err = datadog.Unmarshal(data, &obj.EntityV3Service) + if err == nil { + if obj.EntityV3Service != nil && obj.EntityV3Service.UnparsedObject == nil { + jsonEntityV3Service, _ := datadog.Marshal(obj.EntityV3Service) + if string(jsonEntityV3Service) == "{}" { // empty struct + obj.EntityV3Service = nil + } else { + match++ + } + } else { + obj.EntityV3Service = nil + } + } else { + obj.EntityV3Service = nil + } + + // try to unmarshal data into EntityV3Datastore + err = datadog.Unmarshal(data, &obj.EntityV3Datastore) + if err == nil { + if obj.EntityV3Datastore != nil && obj.EntityV3Datastore.UnparsedObject == nil { + jsonEntityV3Datastore, _ := datadog.Marshal(obj.EntityV3Datastore) + if string(jsonEntityV3Datastore) == "{}" { // empty struct + obj.EntityV3Datastore = nil + } else { + match++ + } + } else { + obj.EntityV3Datastore = nil + } + } else { + obj.EntityV3Datastore = nil + } + + // try to unmarshal data into EntityV3Queue + err = datadog.Unmarshal(data, &obj.EntityV3Queue) + if err == nil { + if obj.EntityV3Queue != nil && obj.EntityV3Queue.UnparsedObject == nil { + jsonEntityV3Queue, _ := datadog.Marshal(obj.EntityV3Queue) + if string(jsonEntityV3Queue) == "{}" { // empty struct + obj.EntityV3Queue = nil + } else { + match++ + } + } else { + obj.EntityV3Queue = nil + } + } else { + obj.EntityV3Queue = nil + } + + // try to unmarshal data into EntityV3System + err = datadog.Unmarshal(data, &obj.EntityV3System) + if err == nil { + if obj.EntityV3System != nil && obj.EntityV3System.UnparsedObject == nil { + jsonEntityV3System, _ := datadog.Marshal(obj.EntityV3System) + if string(jsonEntityV3System) == "{}" { // empty struct + obj.EntityV3System = nil + } else { + match++ + } + } else { + obj.EntityV3System = nil + } + } else { + obj.EntityV3System = nil + } + + if match != 1 { // more than 1 match + // reset to nil + obj.EntityV3Service = nil + obj.EntityV3Datastore = nil + obj.EntityV3Queue = nil + obj.EntityV3System = nil + return datadog.Unmarshal(data, &obj.UnparsedObject) + } + return nil // exactly one match +} + +// MarshalJSON turns data from the first non-nil pointers in the struct to JSON. +func (obj EntityV3) MarshalJSON() ([]byte, error) { + if obj.EntityV3Service != nil { + return datadog.Marshal(&obj.EntityV3Service) + } + + if obj.EntityV3Datastore != nil { + return datadog.Marshal(&obj.EntityV3Datastore) + } + + if obj.EntityV3Queue != nil { + return datadog.Marshal(&obj.EntityV3Queue) + } + + if obj.EntityV3System != nil { + return datadog.Marshal(&obj.EntityV3System) + } + + if obj.UnparsedObject != nil { + return datadog.Marshal(obj.UnparsedObject) + } + return nil, nil // no data in oneOf schemas +} + +// GetActualInstance returns the actual instance. +func (obj *EntityV3) GetActualInstance() interface{} { + if obj.EntityV3Service != nil { + return obj.EntityV3Service + } + + if obj.EntityV3Datastore != nil { + return obj.EntityV3Datastore + } + + if obj.EntityV3Queue != nil { + return obj.EntityV3Queue + } + + if obj.EntityV3System != nil { + return obj.EntityV3System + } + + // all schemas are nil + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_api_version.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_api_version.go new file mode 100644 index 0000000000..94823070cf --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_api_version.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3APIVersion The schema version of entity type. The field is known as schema-version in the previous version +type EntityV3APIVersion string + +// List of EntityV3APIVersion. +const ( + ENTITYV3APIVERSION_V3 EntityV3APIVersion = "v3" +) + +var allowedEntityV3APIVersionEnumValues = []EntityV3APIVersion{ + ENTITYV3APIVERSION_V3, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *EntityV3APIVersion) GetAllowedValues() []EntityV3APIVersion { + return allowedEntityV3APIVersionEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *EntityV3APIVersion) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = EntityV3APIVersion(value) + return nil +} + +// NewEntityV3APIVersionFromValue returns a pointer to a valid EntityV3APIVersion +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewEntityV3APIVersionFromValue(v string) (*EntityV3APIVersion, error) { + ev := EntityV3APIVersion(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for EntityV3APIVersion: valid values are %v", v, allowedEntityV3APIVersionEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v EntityV3APIVersion) IsValid() bool { + for _, existing := range allowedEntityV3APIVersionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to EntityV3APIVersion value. +func (v EntityV3APIVersion) Ptr() *EntityV3APIVersion { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_code_location_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_code_location_item.go new file mode 100644 index 0000000000..b1173a7342 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_code_location_item.go @@ -0,0 +1,122 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatadogCodeLocationItem code location item. +type EntityV3DatadogCodeLocationItem struct { + // The paths (glob) to the source code of the service + Paths []string `json:"paths,omitempty"` + // The repository path of the source code of the entity + RepositoryUrl *string `json:"repositoryURL,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3DatadogCodeLocationItem instantiates a new EntityV3DatadogCodeLocationItem object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3DatadogCodeLocationItem() *EntityV3DatadogCodeLocationItem { + this := EntityV3DatadogCodeLocationItem{} + return &this +} + +// NewEntityV3DatadogCodeLocationItemWithDefaults instantiates a new EntityV3DatadogCodeLocationItem object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatadogCodeLocationItemWithDefaults() *EntityV3DatadogCodeLocationItem { + this := EntityV3DatadogCodeLocationItem{} + return &this +} + +// GetPaths returns the Paths field value if set, zero value otherwise. +func (o *EntityV3DatadogCodeLocationItem) GetPaths() []string { + if o == nil || o.Paths == nil { + var ret []string + return ret + } + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogCodeLocationItem) GetPathsOk() (*[]string, bool) { + if o == nil || o.Paths == nil { + return nil, false + } + return &o.Paths, true +} + +// HasPaths returns a boolean if a field has been set. +func (o *EntityV3DatadogCodeLocationItem) HasPaths() bool { + return o != nil && o.Paths != nil +} + +// SetPaths gets a reference to the given []string and assigns it to the Paths field. +func (o *EntityV3DatadogCodeLocationItem) SetPaths(v []string) { + o.Paths = v +} + +// GetRepositoryUrl returns the RepositoryUrl field value if set, zero value otherwise. +func (o *EntityV3DatadogCodeLocationItem) GetRepositoryUrl() string { + if o == nil || o.RepositoryUrl == nil { + var ret string + return ret + } + return *o.RepositoryUrl +} + +// GetRepositoryUrlOk returns a tuple with the RepositoryUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogCodeLocationItem) GetRepositoryUrlOk() (*string, bool) { + if o == nil || o.RepositoryUrl == nil { + return nil, false + } + return o.RepositoryUrl, true +} + +// HasRepositoryUrl returns a boolean if a field has been set. +func (o *EntityV3DatadogCodeLocationItem) HasRepositoryUrl() bool { + return o != nil && o.RepositoryUrl != nil +} + +// SetRepositoryUrl gets a reference to the given string and assigns it to the RepositoryUrl field. +func (o *EntityV3DatadogCodeLocationItem) SetRepositoryUrl(v string) { + o.RepositoryUrl = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3DatadogCodeLocationItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Paths != nil { + toSerialize["paths"] = o.Paths + } + if o.RepositoryUrl != nil { + toSerialize["repositoryURL"] = o.RepositoryUrl + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3DatadogCodeLocationItem) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Paths []string `json:"paths,omitempty"` + RepositoryUrl *string `json:"repositoryURL,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.Paths = all.Paths + o.RepositoryUrl = all.RepositoryUrl + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_event_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_event_item.go new file mode 100644 index 0000000000..1001478f26 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_event_item.go @@ -0,0 +1,122 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatadogEventItem Events association item. +type EntityV3DatadogEventItem struct { + // The name of the query + Name *string `json:"name,omitempty"` + // The query to run + Query *string `json:"query,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3DatadogEventItem instantiates a new EntityV3DatadogEventItem object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3DatadogEventItem() *EntityV3DatadogEventItem { + this := EntityV3DatadogEventItem{} + return &this +} + +// NewEntityV3DatadogEventItemWithDefaults instantiates a new EntityV3DatadogEventItem object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatadogEventItemWithDefaults() *EntityV3DatadogEventItem { + this := EntityV3DatadogEventItem{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EntityV3DatadogEventItem) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogEventItem) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EntityV3DatadogEventItem) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EntityV3DatadogEventItem) SetName(v string) { + o.Name = &v +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *EntityV3DatadogEventItem) GetQuery() string { + if o == nil || o.Query == nil { + var ret string + return ret + } + return *o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogEventItem) GetQueryOk() (*string, bool) { + if o == nil || o.Query == nil { + return nil, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *EntityV3DatadogEventItem) HasQuery() bool { + return o != nil && o.Query != nil +} + +// SetQuery gets a reference to the given string and assigns it to the Query field. +func (o *EntityV3DatadogEventItem) SetQuery(v string) { + o.Query = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3DatadogEventItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Query != nil { + toSerialize["query"] = o.Query + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3DatadogEventItem) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Name *string `json:"name,omitempty"` + Query *string `json:"query,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.Name = all.Name + o.Query = all.Query + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_integration_opsgenie.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_integration_opsgenie.go new file mode 100644 index 0000000000..d998191880 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_integration_opsgenie.go @@ -0,0 +1,121 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatadogIntegrationOpsgenie An Opsgenie integration schema +type EntityV3DatadogIntegrationOpsgenie struct { + // The region for the Opsgenie integration. + Region *string `json:"region,omitempty"` + // The service url for the Opsgenie integration. + ServiceUrl string `json:"serviceURL"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3DatadogIntegrationOpsgenie instantiates a new EntityV3DatadogIntegrationOpsgenie object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3DatadogIntegrationOpsgenie(serviceUrl string) *EntityV3DatadogIntegrationOpsgenie { + this := EntityV3DatadogIntegrationOpsgenie{} + this.ServiceUrl = serviceUrl + return &this +} + +// NewEntityV3DatadogIntegrationOpsgenieWithDefaults instantiates a new EntityV3DatadogIntegrationOpsgenie object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatadogIntegrationOpsgenieWithDefaults() *EntityV3DatadogIntegrationOpsgenie { + this := EntityV3DatadogIntegrationOpsgenie{} + return &this +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *EntityV3DatadogIntegrationOpsgenie) GetRegion() string { + if o == nil || o.Region == nil { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogIntegrationOpsgenie) GetRegionOk() (*string, bool) { + if o == nil || o.Region == nil { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *EntityV3DatadogIntegrationOpsgenie) HasRegion() bool { + return o != nil && o.Region != nil +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *EntityV3DatadogIntegrationOpsgenie) SetRegion(v string) { + o.Region = &v +} + +// GetServiceUrl returns the ServiceUrl field value. +func (o *EntityV3DatadogIntegrationOpsgenie) GetServiceUrl() string { + if o == nil { + var ret string + return ret + } + return o.ServiceUrl +} + +// GetServiceUrlOk returns a tuple with the ServiceUrl field value +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogIntegrationOpsgenie) GetServiceUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServiceUrl, true +} + +// SetServiceUrl sets field value. +func (o *EntityV3DatadogIntegrationOpsgenie) SetServiceUrl(v string) { + o.ServiceUrl = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3DatadogIntegrationOpsgenie) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Region != nil { + toSerialize["region"] = o.Region + } + toSerialize["serviceURL"] = o.ServiceUrl + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3DatadogIntegrationOpsgenie) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Region *string `json:"region,omitempty"` + ServiceUrl *string `json:"serviceURL"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.ServiceUrl == nil { + return fmt.Errorf("required field serviceURL missing") + } + o.Region = all.Region + o.ServiceUrl = *all.ServiceUrl + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_integration_pagerduty.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_integration_pagerduty.go new file mode 100644 index 0000000000..ecf91af390 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_integration_pagerduty.go @@ -0,0 +1,86 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatadogIntegrationPagerduty An PagerDuty integration schema +type EntityV3DatadogIntegrationPagerduty struct { + // The service url for the PagerDuty integration. + ServiceUrl string `json:"serviceURL"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3DatadogIntegrationPagerduty instantiates a new EntityV3DatadogIntegrationPagerduty object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3DatadogIntegrationPagerduty(serviceUrl string) *EntityV3DatadogIntegrationPagerduty { + this := EntityV3DatadogIntegrationPagerduty{} + this.ServiceUrl = serviceUrl + return &this +} + +// NewEntityV3DatadogIntegrationPagerdutyWithDefaults instantiates a new EntityV3DatadogIntegrationPagerduty object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatadogIntegrationPagerdutyWithDefaults() *EntityV3DatadogIntegrationPagerduty { + this := EntityV3DatadogIntegrationPagerduty{} + return &this +} + +// GetServiceUrl returns the ServiceUrl field value. +func (o *EntityV3DatadogIntegrationPagerduty) GetServiceUrl() string { + if o == nil { + var ret string + return ret + } + return o.ServiceUrl +} + +// GetServiceUrlOk returns a tuple with the ServiceUrl field value +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogIntegrationPagerduty) GetServiceUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServiceUrl, true +} + +// SetServiceUrl sets field value. +func (o *EntityV3DatadogIntegrationPagerduty) SetServiceUrl(v string) { + o.ServiceUrl = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3DatadogIntegrationPagerduty) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["serviceURL"] = o.ServiceUrl + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3DatadogIntegrationPagerduty) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ServiceUrl *string `json:"serviceURL"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.ServiceUrl == nil { + return fmt.Errorf("required field serviceURL missing") + } + o.ServiceUrl = *all.ServiceUrl + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_log_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_log_item.go new file mode 100644 index 0000000000..9d770ce51f --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_log_item.go @@ -0,0 +1,122 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatadogLogItem log association item. +type EntityV3DatadogLogItem struct { + // The name of the query + Name *string `json:"name,omitempty"` + // The query to run + Query *string `json:"query,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3DatadogLogItem instantiates a new EntityV3DatadogLogItem object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3DatadogLogItem() *EntityV3DatadogLogItem { + this := EntityV3DatadogLogItem{} + return &this +} + +// NewEntityV3DatadogLogItemWithDefaults instantiates a new EntityV3DatadogLogItem object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatadogLogItemWithDefaults() *EntityV3DatadogLogItem { + this := EntityV3DatadogLogItem{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EntityV3DatadogLogItem) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogLogItem) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EntityV3DatadogLogItem) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EntityV3DatadogLogItem) SetName(v string) { + o.Name = &v +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *EntityV3DatadogLogItem) GetQuery() string { + if o == nil || o.Query == nil { + var ret string + return ret + } + return *o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogLogItem) GetQueryOk() (*string, bool) { + if o == nil || o.Query == nil { + return nil, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *EntityV3DatadogLogItem) HasQuery() bool { + return o != nil && o.Query != nil +} + +// SetQuery gets a reference to the given string and assigns it to the Query field. +func (o *EntityV3DatadogLogItem) SetQuery(v string) { + o.Query = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3DatadogLogItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Query != nil { + toSerialize["query"] = o.Query + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3DatadogLogItem) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Name *string `json:"name,omitempty"` + Query *string `json:"query,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.Name = all.Name + o.Query = all.Query + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_performance.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_performance.go new file mode 100644 index 0000000000..8386c8c73a --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_performance.go @@ -0,0 +1,87 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatadogPerformance Performance stats association +type EntityV3DatadogPerformance struct { + // A list of APM entity tags that associates the APM Stats data with the entity + Tags []string `json:"tags,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3DatadogPerformance instantiates a new EntityV3DatadogPerformance object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3DatadogPerformance() *EntityV3DatadogPerformance { + this := EntityV3DatadogPerformance{} + return &this +} + +// NewEntityV3DatadogPerformanceWithDefaults instantiates a new EntityV3DatadogPerformance object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatadogPerformanceWithDefaults() *EntityV3DatadogPerformance { + this := EntityV3DatadogPerformance{} + return &this +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *EntityV3DatadogPerformance) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogPerformance) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return &o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *EntityV3DatadogPerformance) HasTags() bool { + return o != nil && o.Tags != nil +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *EntityV3DatadogPerformance) SetTags(v []string) { + o.Tags = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3DatadogPerformance) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3DatadogPerformance) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Tags []string `json:"tags,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.Tags = all.Tags + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_pipelines.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_pipelines.go new file mode 100644 index 0000000000..df3d5c6bef --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datadog_pipelines.go @@ -0,0 +1,87 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatadogPipelines CI Pipelines association +type EntityV3DatadogPipelines struct { + // A list of CI Fingerprints that associate CI Pipelines with the entity + Fingerprints []string `json:"fingerprints,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3DatadogPipelines instantiates a new EntityV3DatadogPipelines object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3DatadogPipelines() *EntityV3DatadogPipelines { + this := EntityV3DatadogPipelines{} + return &this +} + +// NewEntityV3DatadogPipelinesWithDefaults instantiates a new EntityV3DatadogPipelines object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatadogPipelinesWithDefaults() *EntityV3DatadogPipelines { + this := EntityV3DatadogPipelines{} + return &this +} + +// GetFingerprints returns the Fingerprints field value if set, zero value otherwise. +func (o *EntityV3DatadogPipelines) GetFingerprints() []string { + if o == nil || o.Fingerprints == nil { + var ret []string + return ret + } + return o.Fingerprints +} + +// GetFingerprintsOk returns a tuple with the Fingerprints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatadogPipelines) GetFingerprintsOk() (*[]string, bool) { + if o == nil || o.Fingerprints == nil { + return nil, false + } + return &o.Fingerprints, true +} + +// HasFingerprints returns a boolean if a field has been set. +func (o *EntityV3DatadogPipelines) HasFingerprints() bool { + return o != nil && o.Fingerprints != nil +} + +// SetFingerprints gets a reference to the given []string and assigns it to the Fingerprints field. +func (o *EntityV3DatadogPipelines) SetFingerprints(v []string) { + o.Fingerprints = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3DatadogPipelines) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Fingerprints != nil { + toSerialize["fingerprints"] = o.Fingerprints + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3DatadogPipelines) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Fingerprints []string `json:"fingerprints,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.Fingerprints = all.Fingerprints + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore.go new file mode 100644 index 0000000000..ddde9ad023 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore.go @@ -0,0 +1,316 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3Datastore Schema for datastore entities +type EntityV3Datastore struct { + // The schema version of entity type. The field is known as schema-version in the previous version + ApiVersion EntityV3APIVersion `json:"apiVersion"` + // Datadog product integrations for the datastore entity + Datadog *EntityV3DatastoreDatadog `json:"datadog,omitempty"` + // Custom extensions. This is the free-formed field to send client side metadata. No Datadog features are affected by this field. + Extensions map[string]interface{} `json:"extensions,omitempty"` + // A base schema for defining third party integrations + Integrations *EntityV3Integrations `json:"integrations,omitempty"` + // The definition of Entity V3 Datastore Kind object. + Kind EntityV3DatastoreKind `json:"kind"` + // The definition of Entity V3 Metadata object. + Metadata EntityV3Metadata `json:"metadata"` + // The definition of Entity V3 Datastore Spec object. + Spec *EntityV3DatastoreSpec `json:"spec,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3Datastore instantiates a new EntityV3Datastore object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3Datastore(apiVersion EntityV3APIVersion, kind EntityV3DatastoreKind, metadata EntityV3Metadata) *EntityV3Datastore { + this := EntityV3Datastore{} + this.ApiVersion = apiVersion + this.Kind = kind + this.Metadata = metadata + return &this +} + +// NewEntityV3DatastoreWithDefaults instantiates a new EntityV3Datastore object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatastoreWithDefaults() *EntityV3Datastore { + this := EntityV3Datastore{} + return &this +} + +// GetApiVersion returns the ApiVersion field value. +func (o *EntityV3Datastore) GetApiVersion() EntityV3APIVersion { + if o == nil { + var ret EntityV3APIVersion + return ret + } + return o.ApiVersion +} + +// GetApiVersionOk returns a tuple with the ApiVersion field value +// and a boolean to check if the value has been set. +func (o *EntityV3Datastore) GetApiVersionOk() (*EntityV3APIVersion, bool) { + if o == nil { + return nil, false + } + return &o.ApiVersion, true +} + +// SetApiVersion sets field value. +func (o *EntityV3Datastore) SetApiVersion(v EntityV3APIVersion) { + o.ApiVersion = v +} + +// GetDatadog returns the Datadog field value if set, zero value otherwise. +func (o *EntityV3Datastore) GetDatadog() EntityV3DatastoreDatadog { + if o == nil || o.Datadog == nil { + var ret EntityV3DatastoreDatadog + return ret + } + return *o.Datadog +} + +// GetDatadogOk returns a tuple with the Datadog field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Datastore) GetDatadogOk() (*EntityV3DatastoreDatadog, bool) { + if o == nil || o.Datadog == nil { + return nil, false + } + return o.Datadog, true +} + +// HasDatadog returns a boolean if a field has been set. +func (o *EntityV3Datastore) HasDatadog() bool { + return o != nil && o.Datadog != nil +} + +// SetDatadog gets a reference to the given EntityV3DatastoreDatadog and assigns it to the Datadog field. +func (o *EntityV3Datastore) SetDatadog(v EntityV3DatastoreDatadog) { + o.Datadog = &v +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *EntityV3Datastore) GetExtensions() map[string]interface{} { + if o == nil || o.Extensions == nil { + var ret map[string]interface{} + return ret + } + return o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Datastore) GetExtensionsOk() (*map[string]interface{}, bool) { + if o == nil || o.Extensions == nil { + return nil, false + } + return &o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *EntityV3Datastore) HasExtensions() bool { + return o != nil && o.Extensions != nil +} + +// SetExtensions gets a reference to the given map[string]interface{} and assigns it to the Extensions field. +func (o *EntityV3Datastore) SetExtensions(v map[string]interface{}) { + o.Extensions = v +} + +// GetIntegrations returns the Integrations field value if set, zero value otherwise. +func (o *EntityV3Datastore) GetIntegrations() EntityV3Integrations { + if o == nil || o.Integrations == nil { + var ret EntityV3Integrations + return ret + } + return *o.Integrations +} + +// GetIntegrationsOk returns a tuple with the Integrations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Datastore) GetIntegrationsOk() (*EntityV3Integrations, bool) { + if o == nil || o.Integrations == nil { + return nil, false + } + return o.Integrations, true +} + +// HasIntegrations returns a boolean if a field has been set. +func (o *EntityV3Datastore) HasIntegrations() bool { + return o != nil && o.Integrations != nil +} + +// SetIntegrations gets a reference to the given EntityV3Integrations and assigns it to the Integrations field. +func (o *EntityV3Datastore) SetIntegrations(v EntityV3Integrations) { + o.Integrations = &v +} + +// GetKind returns the Kind field value. +func (o *EntityV3Datastore) GetKind() EntityV3DatastoreKind { + if o == nil { + var ret EntityV3DatastoreKind + return ret + } + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *EntityV3Datastore) GetKindOk() (*EntityV3DatastoreKind, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value. +func (o *EntityV3Datastore) SetKind(v EntityV3DatastoreKind) { + o.Kind = v +} + +// GetMetadata returns the Metadata field value. +func (o *EntityV3Datastore) GetMetadata() EntityV3Metadata { + if o == nil { + var ret EntityV3Metadata + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *EntityV3Datastore) GetMetadataOk() (*EntityV3Metadata, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value. +func (o *EntityV3Datastore) SetMetadata(v EntityV3Metadata) { + o.Metadata = v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *EntityV3Datastore) GetSpec() EntityV3DatastoreSpec { + if o == nil || o.Spec == nil { + var ret EntityV3DatastoreSpec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Datastore) GetSpecOk() (*EntityV3DatastoreSpec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *EntityV3Datastore) HasSpec() bool { + return o != nil && o.Spec != nil +} + +// SetSpec gets a reference to the given EntityV3DatastoreSpec and assigns it to the Spec field. +func (o *EntityV3Datastore) SetSpec(v EntityV3DatastoreSpec) { + o.Spec = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3Datastore) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["apiVersion"] = o.ApiVersion + if o.Datadog != nil { + toSerialize["datadog"] = o.Datadog + } + if o.Extensions != nil { + toSerialize["extensions"] = o.Extensions + } + if o.Integrations != nil { + toSerialize["integrations"] = o.Integrations + } + toSerialize["kind"] = o.Kind + toSerialize["metadata"] = o.Metadata + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3Datastore) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ApiVersion *EntityV3APIVersion `json:"apiVersion"` + Datadog *EntityV3DatastoreDatadog `json:"datadog,omitempty"` + Extensions map[string]interface{} `json:"extensions,omitempty"` + Integrations *EntityV3Integrations `json:"integrations,omitempty"` + Kind *EntityV3DatastoreKind `json:"kind"` + Metadata *EntityV3Metadata `json:"metadata"` + Spec *EntityV3DatastoreSpec `json:"spec,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.ApiVersion == nil { + return fmt.Errorf("required field apiVersion missing") + } + if all.Kind == nil { + return fmt.Errorf("required field kind missing") + } + if all.Metadata == nil { + return fmt.Errorf("required field metadata missing") + } + + hasInvalidField := false + if !all.ApiVersion.IsValid() { + hasInvalidField = true + } else { + o.ApiVersion = *all.ApiVersion + } + if all.Datadog != nil && all.Datadog.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Datadog = all.Datadog + o.Extensions = all.Extensions + if all.Integrations != nil && all.Integrations.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Integrations = all.Integrations + if !all.Kind.IsValid() { + hasInvalidField = true + } else { + o.Kind = *all.Kind + } + if all.Metadata.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Metadata = *all.Metadata + if all.Spec != nil && all.Spec.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Spec = all.Spec + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_datadog.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_datadog.go new file mode 100644 index 0000000000..ddfb9ec614 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_datadog.go @@ -0,0 +1,166 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatastoreDatadog Datadog product integrations for the datastore entity +type EntityV3DatastoreDatadog struct { + // Events associations + Events []EntityV3DatadogEventItem `json:"events,omitempty"` + // Logs association + Logs []EntityV3DatadogLogItem `json:"logs,omitempty"` + // Performance stats association + PerformanceData *EntityV3DatadogPerformance `json:"performanceData,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3DatastoreDatadog instantiates a new EntityV3DatastoreDatadog object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3DatastoreDatadog() *EntityV3DatastoreDatadog { + this := EntityV3DatastoreDatadog{} + return &this +} + +// NewEntityV3DatastoreDatadogWithDefaults instantiates a new EntityV3DatastoreDatadog object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatastoreDatadogWithDefaults() *EntityV3DatastoreDatadog { + this := EntityV3DatastoreDatadog{} + return &this +} + +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *EntityV3DatastoreDatadog) GetEvents() []EntityV3DatadogEventItem { + if o == nil || o.Events == nil { + var ret []EntityV3DatadogEventItem + return ret + } + return o.Events +} + +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatastoreDatadog) GetEventsOk() (*[]EntityV3DatadogEventItem, bool) { + if o == nil || o.Events == nil { + return nil, false + } + return &o.Events, true +} + +// HasEvents returns a boolean if a field has been set. +func (o *EntityV3DatastoreDatadog) HasEvents() bool { + return o != nil && o.Events != nil +} + +// SetEvents gets a reference to the given []EntityV3DatadogEventItem and assigns it to the Events field. +func (o *EntityV3DatastoreDatadog) SetEvents(v []EntityV3DatadogEventItem) { + o.Events = v +} + +// GetLogs returns the Logs field value if set, zero value otherwise. +func (o *EntityV3DatastoreDatadog) GetLogs() []EntityV3DatadogLogItem { + if o == nil || o.Logs == nil { + var ret []EntityV3DatadogLogItem + return ret + } + return o.Logs +} + +// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatastoreDatadog) GetLogsOk() (*[]EntityV3DatadogLogItem, bool) { + if o == nil || o.Logs == nil { + return nil, false + } + return &o.Logs, true +} + +// HasLogs returns a boolean if a field has been set. +func (o *EntityV3DatastoreDatadog) HasLogs() bool { + return o != nil && o.Logs != nil +} + +// SetLogs gets a reference to the given []EntityV3DatadogLogItem and assigns it to the Logs field. +func (o *EntityV3DatastoreDatadog) SetLogs(v []EntityV3DatadogLogItem) { + o.Logs = v +} + +// GetPerformanceData returns the PerformanceData field value if set, zero value otherwise. +func (o *EntityV3DatastoreDatadog) GetPerformanceData() EntityV3DatadogPerformance { + if o == nil || o.PerformanceData == nil { + var ret EntityV3DatadogPerformance + return ret + } + return *o.PerformanceData +} + +// GetPerformanceDataOk returns a tuple with the PerformanceData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatastoreDatadog) GetPerformanceDataOk() (*EntityV3DatadogPerformance, bool) { + if o == nil || o.PerformanceData == nil { + return nil, false + } + return o.PerformanceData, true +} + +// HasPerformanceData returns a boolean if a field has been set. +func (o *EntityV3DatastoreDatadog) HasPerformanceData() bool { + return o != nil && o.PerformanceData != nil +} + +// SetPerformanceData gets a reference to the given EntityV3DatadogPerformance and assigns it to the PerformanceData field. +func (o *EntityV3DatastoreDatadog) SetPerformanceData(v EntityV3DatadogPerformance) { + o.PerformanceData = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3DatastoreDatadog) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Events != nil { + toSerialize["events"] = o.Events + } + if o.Logs != nil { + toSerialize["logs"] = o.Logs + } + if o.PerformanceData != nil { + toSerialize["performanceData"] = o.PerformanceData + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3DatastoreDatadog) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Events []EntityV3DatadogEventItem `json:"events,omitempty"` + Logs []EntityV3DatadogLogItem `json:"logs,omitempty"` + PerformanceData *EntityV3DatadogPerformance `json:"performanceData,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + hasInvalidField := false + o.Events = all.Events + o.Logs = all.Logs + if all.PerformanceData != nil && all.PerformanceData.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.PerformanceData = all.PerformanceData + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_kind.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_kind.go new file mode 100644 index 0000000000..f2a82b65a3 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_kind.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatastoreKind The definition of Entity V3 Datastore Kind object. +type EntityV3DatastoreKind string + +// List of EntityV3DatastoreKind. +const ( + ENTITYV3DATASTOREKIND_DATASTORE EntityV3DatastoreKind = "datastore" +) + +var allowedEntityV3DatastoreKindEnumValues = []EntityV3DatastoreKind{ + ENTITYV3DATASTOREKIND_DATASTORE, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *EntityV3DatastoreKind) GetAllowedValues() []EntityV3DatastoreKind { + return allowedEntityV3DatastoreKindEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *EntityV3DatastoreKind) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = EntityV3DatastoreKind(value) + return nil +} + +// NewEntityV3DatastoreKindFromValue returns a pointer to a valid EntityV3DatastoreKind +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewEntityV3DatastoreKindFromValue(v string) (*EntityV3DatastoreKind, error) { + ev := EntityV3DatastoreKind(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for EntityV3DatastoreKind: valid values are %v", v, allowedEntityV3DatastoreKindEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v EntityV3DatastoreKind) IsValid() bool { + for _, existing := range allowedEntityV3DatastoreKindEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to EntityV3DatastoreKind value. +func (v EntityV3DatastoreKind) Ptr() *EntityV3DatastoreKind { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_spec.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_spec.go new file mode 100644 index 0000000000..ef31077de5 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_datastore_spec.go @@ -0,0 +1,157 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3DatastoreSpec The definition of Entity V3 Datastore Spec object. +type EntityV3DatastoreSpec struct { + // The lifecycle state of the datastore. + Lifecycle *string `json:"lifecycle,omitempty"` + // The importance of the datastore + Tier *string `json:"tier,omitempty"` + // The type of datastore + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3DatastoreSpec instantiates a new EntityV3DatastoreSpec object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3DatastoreSpec() *EntityV3DatastoreSpec { + this := EntityV3DatastoreSpec{} + return &this +} + +// NewEntityV3DatastoreSpecWithDefaults instantiates a new EntityV3DatastoreSpec object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3DatastoreSpecWithDefaults() *EntityV3DatastoreSpec { + this := EntityV3DatastoreSpec{} + return &this +} + +// GetLifecycle returns the Lifecycle field value if set, zero value otherwise. +func (o *EntityV3DatastoreSpec) GetLifecycle() string { + if o == nil || o.Lifecycle == nil { + var ret string + return ret + } + return *o.Lifecycle +} + +// GetLifecycleOk returns a tuple with the Lifecycle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatastoreSpec) GetLifecycleOk() (*string, bool) { + if o == nil || o.Lifecycle == nil { + return nil, false + } + return o.Lifecycle, true +} + +// HasLifecycle returns a boolean if a field has been set. +func (o *EntityV3DatastoreSpec) HasLifecycle() bool { + return o != nil && o.Lifecycle != nil +} + +// SetLifecycle gets a reference to the given string and assigns it to the Lifecycle field. +func (o *EntityV3DatastoreSpec) SetLifecycle(v string) { + o.Lifecycle = &v +} + +// GetTier returns the Tier field value if set, zero value otherwise. +func (o *EntityV3DatastoreSpec) GetTier() string { + if o == nil || o.Tier == nil { + var ret string + return ret + } + return *o.Tier +} + +// GetTierOk returns a tuple with the Tier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatastoreSpec) GetTierOk() (*string, bool) { + if o == nil || o.Tier == nil { + return nil, false + } + return o.Tier, true +} + +// HasTier returns a boolean if a field has been set. +func (o *EntityV3DatastoreSpec) HasTier() bool { + return o != nil && o.Tier != nil +} + +// SetTier gets a reference to the given string and assigns it to the Tier field. +func (o *EntityV3DatastoreSpec) SetTier(v string) { + o.Tier = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityV3DatastoreSpec) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3DatastoreSpec) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityV3DatastoreSpec) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityV3DatastoreSpec) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3DatastoreSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Lifecycle != nil { + toSerialize["lifecycle"] = o.Lifecycle + } + if o.Tier != nil { + toSerialize["tier"] = o.Tier + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3DatastoreSpec) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Lifecycle *string `json:"lifecycle,omitempty"` + Tier *string `json:"tier,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.Lifecycle = all.Lifecycle + o.Tier = all.Tier + o.Type = all.Type + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_integrations.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_integrations.go new file mode 100644 index 0000000000..20b2932225 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_integrations.go @@ -0,0 +1,134 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3Integrations A base schema for defining third party integrations +type EntityV3Integrations struct { + // An Opsgenie integration schema + Opsgenie *EntityV3DatadogIntegrationOpsgenie `json:"opsgenie,omitempty"` + // An PagerDuty integration schema + Pagerduty *EntityV3DatadogIntegrationPagerduty `json:"pagerduty,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3Integrations instantiates a new EntityV3Integrations object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3Integrations() *EntityV3Integrations { + this := EntityV3Integrations{} + return &this +} + +// NewEntityV3IntegrationsWithDefaults instantiates a new EntityV3Integrations object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3IntegrationsWithDefaults() *EntityV3Integrations { + this := EntityV3Integrations{} + return &this +} + +// GetOpsgenie returns the Opsgenie field value if set, zero value otherwise. +func (o *EntityV3Integrations) GetOpsgenie() EntityV3DatadogIntegrationOpsgenie { + if o == nil || o.Opsgenie == nil { + var ret EntityV3DatadogIntegrationOpsgenie + return ret + } + return *o.Opsgenie +} + +// GetOpsgenieOk returns a tuple with the Opsgenie field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Integrations) GetOpsgenieOk() (*EntityV3DatadogIntegrationOpsgenie, bool) { + if o == nil || o.Opsgenie == nil { + return nil, false + } + return o.Opsgenie, true +} + +// HasOpsgenie returns a boolean if a field has been set. +func (o *EntityV3Integrations) HasOpsgenie() bool { + return o != nil && o.Opsgenie != nil +} + +// SetOpsgenie gets a reference to the given EntityV3DatadogIntegrationOpsgenie and assigns it to the Opsgenie field. +func (o *EntityV3Integrations) SetOpsgenie(v EntityV3DatadogIntegrationOpsgenie) { + o.Opsgenie = &v +} + +// GetPagerduty returns the Pagerduty field value if set, zero value otherwise. +func (o *EntityV3Integrations) GetPagerduty() EntityV3DatadogIntegrationPagerduty { + if o == nil || o.Pagerduty == nil { + var ret EntityV3DatadogIntegrationPagerduty + return ret + } + return *o.Pagerduty +} + +// GetPagerdutyOk returns a tuple with the Pagerduty field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Integrations) GetPagerdutyOk() (*EntityV3DatadogIntegrationPagerduty, bool) { + if o == nil || o.Pagerduty == nil { + return nil, false + } + return o.Pagerduty, true +} + +// HasPagerduty returns a boolean if a field has been set. +func (o *EntityV3Integrations) HasPagerduty() bool { + return o != nil && o.Pagerduty != nil +} + +// SetPagerduty gets a reference to the given EntityV3DatadogIntegrationPagerduty and assigns it to the Pagerduty field. +func (o *EntityV3Integrations) SetPagerduty(v EntityV3DatadogIntegrationPagerduty) { + o.Pagerduty = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3Integrations) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Opsgenie != nil { + toSerialize["opsgenie"] = o.Opsgenie + } + if o.Pagerduty != nil { + toSerialize["pagerduty"] = o.Pagerduty + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3Integrations) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Opsgenie *EntityV3DatadogIntegrationOpsgenie `json:"opsgenie,omitempty"` + Pagerduty *EntityV3DatadogIntegrationPagerduty `json:"pagerduty,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + hasInvalidField := false + if all.Opsgenie != nil && all.Opsgenie.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Opsgenie = all.Opsgenie + if all.Pagerduty != nil && all.Pagerduty.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Pagerduty = all.Pagerduty + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata.go new file mode 100644 index 0000000000..e5a340c105 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata.go @@ -0,0 +1,480 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3Metadata The definition of Entity V3 Metadata object. +type EntityV3Metadata struct { + // The additional owners of the entity, usually a team + AdditionalOwners []EntityV3MetadataAdditionalOwnersItems `json:"additionalOwners,omitempty"` + // A list of contacts for the entity + Contacts []EntityV3MetadataContactsItems `json:"contacts,omitempty"` + // Short description of the entity. The UI can leverage the description for display + Description *string `json:"description,omitempty"` + // User friendly name of the entity. The UI can leverage the display name for display + DisplayName *string `json:"displayName,omitempty"` + // A read-only globally unique identifier for the entity generated by Datadog. User supplied values are ignored. + Id *string `json:"id,omitempty"` + // The entity reference from which to inherit metadata + InheritFrom *string `json:"inheritFrom,omitempty"` + // A list of links for the entity + Links []EntityV3MetadataLinksItems `json:"links,omitempty"` + // A read-only set of Datadog managed attributes generated by Datadog. User supplied values are ignored. + Managed map[string]interface{} `json:"managed,omitempty"` + // Unique name given to an entity under the kind/namespace + Name string `json:"name"` + // Namespace is a part of unique identifier. It has a default value of 'default' + Namespace *string `json:"namespace,omitempty"` + // The owner of the entity, usually a team + Owner *EntityV3MetadataOwner `json:"owner,omitempty"` + // A set of custom tags + Tags []string `json:"tags,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3Metadata instantiates a new EntityV3Metadata object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3Metadata(name string) *EntityV3Metadata { + this := EntityV3Metadata{} + this.Name = name + return &this +} + +// NewEntityV3MetadataWithDefaults instantiates a new EntityV3Metadata object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3MetadataWithDefaults() *EntityV3Metadata { + this := EntityV3Metadata{} + return &this +} + +// GetAdditionalOwners returns the AdditionalOwners field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetAdditionalOwners() []EntityV3MetadataAdditionalOwnersItems { + if o == nil || o.AdditionalOwners == nil { + var ret []EntityV3MetadataAdditionalOwnersItems + return ret + } + return o.AdditionalOwners +} + +// GetAdditionalOwnersOk returns a tuple with the AdditionalOwners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetAdditionalOwnersOk() (*[]EntityV3MetadataAdditionalOwnersItems, bool) { + if o == nil || o.AdditionalOwners == nil { + return nil, false + } + return &o.AdditionalOwners, true +} + +// HasAdditionalOwners returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasAdditionalOwners() bool { + return o != nil && o.AdditionalOwners != nil +} + +// SetAdditionalOwners gets a reference to the given []EntityV3MetadataAdditionalOwnersItems and assigns it to the AdditionalOwners field. +func (o *EntityV3Metadata) SetAdditionalOwners(v []EntityV3MetadataAdditionalOwnersItems) { + o.AdditionalOwners = v +} + +// GetContacts returns the Contacts field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetContacts() []EntityV3MetadataContactsItems { + if o == nil || o.Contacts == nil { + var ret []EntityV3MetadataContactsItems + return ret + } + return o.Contacts +} + +// GetContactsOk returns a tuple with the Contacts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetContactsOk() (*[]EntityV3MetadataContactsItems, bool) { + if o == nil || o.Contacts == nil { + return nil, false + } + return &o.Contacts, true +} + +// HasContacts returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasContacts() bool { + return o != nil && o.Contacts != nil +} + +// SetContacts gets a reference to the given []EntityV3MetadataContactsItems and assigns it to the Contacts field. +func (o *EntityV3Metadata) SetContacts(v []EntityV3MetadataContactsItems) { + o.Contacts = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasDescription() bool { + return o != nil && o.Description != nil +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *EntityV3Metadata) SetDescription(v string) { + o.Description = &v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetDisplayName() string { + if o == nil || o.DisplayName == nil { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetDisplayNameOk() (*string, bool) { + if o == nil || o.DisplayName == nil { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasDisplayName() bool { + return o != nil && o.DisplayName != nil +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *EntityV3Metadata) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EntityV3Metadata) SetId(v string) { + o.Id = &v +} + +// GetInheritFrom returns the InheritFrom field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetInheritFrom() string { + if o == nil || o.InheritFrom == nil { + var ret string + return ret + } + return *o.InheritFrom +} + +// GetInheritFromOk returns a tuple with the InheritFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetInheritFromOk() (*string, bool) { + if o == nil || o.InheritFrom == nil { + return nil, false + } + return o.InheritFrom, true +} + +// HasInheritFrom returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasInheritFrom() bool { + return o != nil && o.InheritFrom != nil +} + +// SetInheritFrom gets a reference to the given string and assigns it to the InheritFrom field. +func (o *EntityV3Metadata) SetInheritFrom(v string) { + o.InheritFrom = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetLinks() []EntityV3MetadataLinksItems { + if o == nil || o.Links == nil { + var ret []EntityV3MetadataLinksItems + return ret + } + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetLinksOk() (*[]EntityV3MetadataLinksItems, bool) { + if o == nil || o.Links == nil { + return nil, false + } + return &o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasLinks() bool { + return o != nil && o.Links != nil +} + +// SetLinks gets a reference to the given []EntityV3MetadataLinksItems and assigns it to the Links field. +func (o *EntityV3Metadata) SetLinks(v []EntityV3MetadataLinksItems) { + o.Links = v +} + +// GetManaged returns the Managed field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetManaged() map[string]interface{} { + if o == nil || o.Managed == nil { + var ret map[string]interface{} + return ret + } + return o.Managed +} + +// GetManagedOk returns a tuple with the Managed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetManagedOk() (*map[string]interface{}, bool) { + if o == nil || o.Managed == nil { + return nil, false + } + return &o.Managed, true +} + +// HasManaged returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasManaged() bool { + return o != nil && o.Managed != nil +} + +// SetManaged gets a reference to the given map[string]interface{} and assigns it to the Managed field. +func (o *EntityV3Metadata) SetManaged(v map[string]interface{}) { + o.Managed = v +} + +// GetName returns the Name field value. +func (o *EntityV3Metadata) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *EntityV3Metadata) SetName(v string) { + o.Name = v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetNamespace() string { + if o == nil || o.Namespace == nil { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetNamespaceOk() (*string, bool) { + if o == nil || o.Namespace == nil { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasNamespace() bool { + return o != nil && o.Namespace != nil +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *EntityV3Metadata) SetNamespace(v string) { + o.Namespace = &v +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetOwner() EntityV3MetadataOwner { + if o == nil || o.Owner == nil { + var ret EntityV3MetadataOwner + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetOwnerOk() (*EntityV3MetadataOwner, bool) { + if o == nil || o.Owner == nil { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasOwner() bool { + return o != nil && o.Owner != nil +} + +// SetOwner gets a reference to the given EntityV3MetadataOwner and assigns it to the Owner field. +func (o *EntityV3Metadata) SetOwner(v EntityV3MetadataOwner) { + o.Owner = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *EntityV3Metadata) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Metadata) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return &o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *EntityV3Metadata) HasTags() bool { + return o != nil && o.Tags != nil +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *EntityV3Metadata) SetTags(v []string) { + o.Tags = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3Metadata) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.AdditionalOwners != nil { + toSerialize["additionalOwners"] = o.AdditionalOwners + } + if o.Contacts != nil { + toSerialize["contacts"] = o.Contacts + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.DisplayName != nil { + toSerialize["displayName"] = o.DisplayName + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.InheritFrom != nil { + toSerialize["inheritFrom"] = o.InheritFrom + } + if o.Links != nil { + toSerialize["links"] = o.Links + } + if o.Managed != nil { + toSerialize["managed"] = o.Managed + } + toSerialize["name"] = o.Name + if o.Namespace != nil { + toSerialize["namespace"] = o.Namespace + } + if o.Owner != nil { + toSerialize["owner"] = o.Owner + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3Metadata) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + AdditionalOwners []EntityV3MetadataAdditionalOwnersItems `json:"additionalOwners,omitempty"` + Contacts []EntityV3MetadataContactsItems `json:"contacts,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Id *string `json:"id,omitempty"` + InheritFrom *string `json:"inheritFrom,omitempty"` + Links []EntityV3MetadataLinksItems `json:"links,omitempty"` + Managed map[string]interface{} `json:"managed,omitempty"` + Name *string `json:"name"` + Namespace *string `json:"namespace,omitempty"` + Owner *EntityV3MetadataOwner `json:"owner,omitempty"` + Tags []string `json:"tags,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + + hasInvalidField := false + o.AdditionalOwners = all.AdditionalOwners + o.Contacts = all.Contacts + o.Description = all.Description + o.DisplayName = all.DisplayName + o.Id = all.Id + o.InheritFrom = all.InheritFrom + o.Links = all.Links + o.Managed = all.Managed + o.Name = *all.Name + o.Namespace = all.Namespace + if all.Owner != nil && all.Owner.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Owner = all.Owner + o.Tags = all.Tags + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_additional_owners_items.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_additional_owners_items.go new file mode 100644 index 0000000000..00887642da --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_additional_owners_items.go @@ -0,0 +1,136 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3MetadataAdditionalOwnersItems The definition of Entity V3 Metadata Additional Owners Items object. +type EntityV3MetadataAdditionalOwnersItems struct { + // Team name + Name string `json:"name"` + // Team type + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewEntityV3MetadataAdditionalOwnersItems instantiates a new EntityV3MetadataAdditionalOwnersItems object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3MetadataAdditionalOwnersItems(name string) *EntityV3MetadataAdditionalOwnersItems { + this := EntityV3MetadataAdditionalOwnersItems{} + this.Name = name + return &this +} + +// NewEntityV3MetadataAdditionalOwnersItemsWithDefaults instantiates a new EntityV3MetadataAdditionalOwnersItems object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3MetadataAdditionalOwnersItemsWithDefaults() *EntityV3MetadataAdditionalOwnersItems { + this := EntityV3MetadataAdditionalOwnersItems{} + return &this +} + +// GetName returns the Name field value. +func (o *EntityV3MetadataAdditionalOwnersItems) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataAdditionalOwnersItems) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *EntityV3MetadataAdditionalOwnersItems) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityV3MetadataAdditionalOwnersItems) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataAdditionalOwnersItems) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityV3MetadataAdditionalOwnersItems) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityV3MetadataAdditionalOwnersItems) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3MetadataAdditionalOwnersItems) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["name"] = o.Name + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3MetadataAdditionalOwnersItems) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Name *string `json:"name"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"name", "type"}) + } else { + return err + } + o.Name = *all.Name + o.Type = all.Type + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_contacts_items.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_contacts_items.go new file mode 100644 index 0000000000..f1f61087a8 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_contacts_items.go @@ -0,0 +1,153 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3MetadataContactsItems The definition of Entity V3 Metadata Contacts Items object. +type EntityV3MetadataContactsItems struct { + // Contact value + Contact string `json:"contact"` + // Contact name + Name *string `json:"name,omitempty"` + // Contact type. + Type string `json:"type"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3MetadataContactsItems instantiates a new EntityV3MetadataContactsItems object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3MetadataContactsItems(contact string, typeVar string) *EntityV3MetadataContactsItems { + this := EntityV3MetadataContactsItems{} + this.Contact = contact + this.Type = typeVar + return &this +} + +// NewEntityV3MetadataContactsItemsWithDefaults instantiates a new EntityV3MetadataContactsItems object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3MetadataContactsItemsWithDefaults() *EntityV3MetadataContactsItems { + this := EntityV3MetadataContactsItems{} + return &this +} + +// GetContact returns the Contact field value. +func (o *EntityV3MetadataContactsItems) GetContact() string { + if o == nil { + var ret string + return ret + } + return o.Contact +} + +// GetContactOk returns a tuple with the Contact field value +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataContactsItems) GetContactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Contact, true +} + +// SetContact sets field value. +func (o *EntityV3MetadataContactsItems) SetContact(v string) { + o.Contact = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EntityV3MetadataContactsItems) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataContactsItems) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EntityV3MetadataContactsItems) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EntityV3MetadataContactsItems) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value. +func (o *EntityV3MetadataContactsItems) GetType() string { + if o == nil { + var ret string + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataContactsItems) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *EntityV3MetadataContactsItems) SetType(v string) { + o.Type = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3MetadataContactsItems) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["contact"] = o.Contact + if o.Name != nil { + toSerialize["name"] = o.Name + } + toSerialize["type"] = o.Type + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3MetadataContactsItems) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Contact *string `json:"contact"` + Name *string `json:"name,omitempty"` + Type *string `json:"type"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Contact == nil { + return fmt.Errorf("required field contact missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + o.Contact = *all.Contact + o.Name = all.Name + o.Type = *all.Type + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_links_items.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_links_items.go new file mode 100644 index 0000000000..939f059167 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_links_items.go @@ -0,0 +1,187 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3MetadataLinksItems The definition of Entity V3 Metadata Links Items object. +type EntityV3MetadataLinksItems struct { + // Link name + Name string `json:"name"` + // Link provider. + Provider *string `json:"provider,omitempty"` + // Link type. + Type string `json:"type"` + // Link url + Url string `json:"url"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3MetadataLinksItems instantiates a new EntityV3MetadataLinksItems object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3MetadataLinksItems(name string, typeVar string, url string) *EntityV3MetadataLinksItems { + this := EntityV3MetadataLinksItems{} + this.Name = name + this.Type = typeVar + this.Url = url + return &this +} + +// NewEntityV3MetadataLinksItemsWithDefaults instantiates a new EntityV3MetadataLinksItems object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3MetadataLinksItemsWithDefaults() *EntityV3MetadataLinksItems { + this := EntityV3MetadataLinksItems{} + var typeVar string = "other" + this.Type = typeVar + return &this +} + +// GetName returns the Name field value. +func (o *EntityV3MetadataLinksItems) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataLinksItems) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *EntityV3MetadataLinksItems) SetName(v string) { + o.Name = v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *EntityV3MetadataLinksItems) GetProvider() string { + if o == nil || o.Provider == nil { + var ret string + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataLinksItems) GetProviderOk() (*string, bool) { + if o == nil || o.Provider == nil { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *EntityV3MetadataLinksItems) HasProvider() bool { + return o != nil && o.Provider != nil +} + +// SetProvider gets a reference to the given string and assigns it to the Provider field. +func (o *EntityV3MetadataLinksItems) SetProvider(v string) { + o.Provider = &v +} + +// GetType returns the Type field value. +func (o *EntityV3MetadataLinksItems) GetType() string { + if o == nil { + var ret string + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataLinksItems) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *EntityV3MetadataLinksItems) SetType(v string) { + o.Type = v +} + +// GetUrl returns the Url field value. +func (o *EntityV3MetadataLinksItems) GetUrl() string { + if o == nil { + var ret string + return ret + } + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataLinksItems) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value. +func (o *EntityV3MetadataLinksItems) SetUrl(v string) { + o.Url = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3MetadataLinksItems) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["name"] = o.Name + if o.Provider != nil { + toSerialize["provider"] = o.Provider + } + toSerialize["type"] = o.Type + toSerialize["url"] = o.Url + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3MetadataLinksItems) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Name *string `json:"name"` + Provider *string `json:"provider,omitempty"` + Type *string `json:"type"` + Url *string `json:"url"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + if all.Url == nil { + return fmt.Errorf("required field url missing") + } + o.Name = *all.Name + o.Provider = all.Provider + o.Type = *all.Type + o.Url = *all.Url + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_owner.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_owner.go new file mode 100644 index 0000000000..8f55218fff --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_metadata_owner.go @@ -0,0 +1,87 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3MetadataOwner The owner of the entity, usually a team +type EntityV3MetadataOwner struct { + // Team name + Name *string `json:"name,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3MetadataOwner instantiates a new EntityV3MetadataOwner object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3MetadataOwner() *EntityV3MetadataOwner { + this := EntityV3MetadataOwner{} + return &this +} + +// NewEntityV3MetadataOwnerWithDefaults instantiates a new EntityV3MetadataOwner object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3MetadataOwnerWithDefaults() *EntityV3MetadataOwner { + this := EntityV3MetadataOwner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *EntityV3MetadataOwner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3MetadataOwner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *EntityV3MetadataOwner) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *EntityV3MetadataOwner) SetName(v string) { + o.Name = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3MetadataOwner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3MetadataOwner) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Name *string `json:"name,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.Name = all.Name + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue.go new file mode 100644 index 0000000000..f8748e20bc --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue.go @@ -0,0 +1,316 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3Queue Schema for queue entities +type EntityV3Queue struct { + // The schema version of entity type. The field is known as schema-version in the previous version + ApiVersion EntityV3APIVersion `json:"apiVersion"` + // Datadog product integrations for the datastore entity + Datadog *EntityV3QueueDatadog `json:"datadog,omitempty"` + // Custom extensions. This is the free-formed field to send client side metadata. No Datadog features are affected by this field. + Extensions map[string]interface{} `json:"extensions,omitempty"` + // A base schema for defining third party integrations + Integrations *EntityV3Integrations `json:"integrations,omitempty"` + // The definition of Entity V3 Queue Kind object. + Kind EntityV3QueueKind `json:"kind"` + // The definition of Entity V3 Metadata object. + Metadata EntityV3Metadata `json:"metadata"` + // The definition of Entity V3 Queue Spec object. + Spec *EntityV3QueueSpec `json:"spec,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3Queue instantiates a new EntityV3Queue object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3Queue(apiVersion EntityV3APIVersion, kind EntityV3QueueKind, metadata EntityV3Metadata) *EntityV3Queue { + this := EntityV3Queue{} + this.ApiVersion = apiVersion + this.Kind = kind + this.Metadata = metadata + return &this +} + +// NewEntityV3QueueWithDefaults instantiates a new EntityV3Queue object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3QueueWithDefaults() *EntityV3Queue { + this := EntityV3Queue{} + return &this +} + +// GetApiVersion returns the ApiVersion field value. +func (o *EntityV3Queue) GetApiVersion() EntityV3APIVersion { + if o == nil { + var ret EntityV3APIVersion + return ret + } + return o.ApiVersion +} + +// GetApiVersionOk returns a tuple with the ApiVersion field value +// and a boolean to check if the value has been set. +func (o *EntityV3Queue) GetApiVersionOk() (*EntityV3APIVersion, bool) { + if o == nil { + return nil, false + } + return &o.ApiVersion, true +} + +// SetApiVersion sets field value. +func (o *EntityV3Queue) SetApiVersion(v EntityV3APIVersion) { + o.ApiVersion = v +} + +// GetDatadog returns the Datadog field value if set, zero value otherwise. +func (o *EntityV3Queue) GetDatadog() EntityV3QueueDatadog { + if o == nil || o.Datadog == nil { + var ret EntityV3QueueDatadog + return ret + } + return *o.Datadog +} + +// GetDatadogOk returns a tuple with the Datadog field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Queue) GetDatadogOk() (*EntityV3QueueDatadog, bool) { + if o == nil || o.Datadog == nil { + return nil, false + } + return o.Datadog, true +} + +// HasDatadog returns a boolean if a field has been set. +func (o *EntityV3Queue) HasDatadog() bool { + return o != nil && o.Datadog != nil +} + +// SetDatadog gets a reference to the given EntityV3QueueDatadog and assigns it to the Datadog field. +func (o *EntityV3Queue) SetDatadog(v EntityV3QueueDatadog) { + o.Datadog = &v +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *EntityV3Queue) GetExtensions() map[string]interface{} { + if o == nil || o.Extensions == nil { + var ret map[string]interface{} + return ret + } + return o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Queue) GetExtensionsOk() (*map[string]interface{}, bool) { + if o == nil || o.Extensions == nil { + return nil, false + } + return &o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *EntityV3Queue) HasExtensions() bool { + return o != nil && o.Extensions != nil +} + +// SetExtensions gets a reference to the given map[string]interface{} and assigns it to the Extensions field. +func (o *EntityV3Queue) SetExtensions(v map[string]interface{}) { + o.Extensions = v +} + +// GetIntegrations returns the Integrations field value if set, zero value otherwise. +func (o *EntityV3Queue) GetIntegrations() EntityV3Integrations { + if o == nil || o.Integrations == nil { + var ret EntityV3Integrations + return ret + } + return *o.Integrations +} + +// GetIntegrationsOk returns a tuple with the Integrations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Queue) GetIntegrationsOk() (*EntityV3Integrations, bool) { + if o == nil || o.Integrations == nil { + return nil, false + } + return o.Integrations, true +} + +// HasIntegrations returns a boolean if a field has been set. +func (o *EntityV3Queue) HasIntegrations() bool { + return o != nil && o.Integrations != nil +} + +// SetIntegrations gets a reference to the given EntityV3Integrations and assigns it to the Integrations field. +func (o *EntityV3Queue) SetIntegrations(v EntityV3Integrations) { + o.Integrations = &v +} + +// GetKind returns the Kind field value. +func (o *EntityV3Queue) GetKind() EntityV3QueueKind { + if o == nil { + var ret EntityV3QueueKind + return ret + } + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *EntityV3Queue) GetKindOk() (*EntityV3QueueKind, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value. +func (o *EntityV3Queue) SetKind(v EntityV3QueueKind) { + o.Kind = v +} + +// GetMetadata returns the Metadata field value. +func (o *EntityV3Queue) GetMetadata() EntityV3Metadata { + if o == nil { + var ret EntityV3Metadata + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *EntityV3Queue) GetMetadataOk() (*EntityV3Metadata, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value. +func (o *EntityV3Queue) SetMetadata(v EntityV3Metadata) { + o.Metadata = v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *EntityV3Queue) GetSpec() EntityV3QueueSpec { + if o == nil || o.Spec == nil { + var ret EntityV3QueueSpec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Queue) GetSpecOk() (*EntityV3QueueSpec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *EntityV3Queue) HasSpec() bool { + return o != nil && o.Spec != nil +} + +// SetSpec gets a reference to the given EntityV3QueueSpec and assigns it to the Spec field. +func (o *EntityV3Queue) SetSpec(v EntityV3QueueSpec) { + o.Spec = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3Queue) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["apiVersion"] = o.ApiVersion + if o.Datadog != nil { + toSerialize["datadog"] = o.Datadog + } + if o.Extensions != nil { + toSerialize["extensions"] = o.Extensions + } + if o.Integrations != nil { + toSerialize["integrations"] = o.Integrations + } + toSerialize["kind"] = o.Kind + toSerialize["metadata"] = o.Metadata + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3Queue) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ApiVersion *EntityV3APIVersion `json:"apiVersion"` + Datadog *EntityV3QueueDatadog `json:"datadog,omitempty"` + Extensions map[string]interface{} `json:"extensions,omitempty"` + Integrations *EntityV3Integrations `json:"integrations,omitempty"` + Kind *EntityV3QueueKind `json:"kind"` + Metadata *EntityV3Metadata `json:"metadata"` + Spec *EntityV3QueueSpec `json:"spec,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.ApiVersion == nil { + return fmt.Errorf("required field apiVersion missing") + } + if all.Kind == nil { + return fmt.Errorf("required field kind missing") + } + if all.Metadata == nil { + return fmt.Errorf("required field metadata missing") + } + + hasInvalidField := false + if !all.ApiVersion.IsValid() { + hasInvalidField = true + } else { + o.ApiVersion = *all.ApiVersion + } + if all.Datadog != nil && all.Datadog.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Datadog = all.Datadog + o.Extensions = all.Extensions + if all.Integrations != nil && all.Integrations.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Integrations = all.Integrations + if !all.Kind.IsValid() { + hasInvalidField = true + } else { + o.Kind = *all.Kind + } + if all.Metadata.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Metadata = *all.Metadata + if all.Spec != nil && all.Spec.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Spec = all.Spec + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_datadog.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_datadog.go new file mode 100644 index 0000000000..0d7f5ed8fb --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_datadog.go @@ -0,0 +1,166 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3QueueDatadog Datadog product integrations for the datastore entity +type EntityV3QueueDatadog struct { + // Events associations + Events []EntityV3DatadogEventItem `json:"events,omitempty"` + // Logs association + Logs []EntityV3DatadogLogItem `json:"logs,omitempty"` + // Performance stats association + PerformanceData *EntityV3DatadogPerformance `json:"performanceData,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3QueueDatadog instantiates a new EntityV3QueueDatadog object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3QueueDatadog() *EntityV3QueueDatadog { + this := EntityV3QueueDatadog{} + return &this +} + +// NewEntityV3QueueDatadogWithDefaults instantiates a new EntityV3QueueDatadog object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3QueueDatadogWithDefaults() *EntityV3QueueDatadog { + this := EntityV3QueueDatadog{} + return &this +} + +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *EntityV3QueueDatadog) GetEvents() []EntityV3DatadogEventItem { + if o == nil || o.Events == nil { + var ret []EntityV3DatadogEventItem + return ret + } + return o.Events +} + +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3QueueDatadog) GetEventsOk() (*[]EntityV3DatadogEventItem, bool) { + if o == nil || o.Events == nil { + return nil, false + } + return &o.Events, true +} + +// HasEvents returns a boolean if a field has been set. +func (o *EntityV3QueueDatadog) HasEvents() bool { + return o != nil && o.Events != nil +} + +// SetEvents gets a reference to the given []EntityV3DatadogEventItem and assigns it to the Events field. +func (o *EntityV3QueueDatadog) SetEvents(v []EntityV3DatadogEventItem) { + o.Events = v +} + +// GetLogs returns the Logs field value if set, zero value otherwise. +func (o *EntityV3QueueDatadog) GetLogs() []EntityV3DatadogLogItem { + if o == nil || o.Logs == nil { + var ret []EntityV3DatadogLogItem + return ret + } + return o.Logs +} + +// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3QueueDatadog) GetLogsOk() (*[]EntityV3DatadogLogItem, bool) { + if o == nil || o.Logs == nil { + return nil, false + } + return &o.Logs, true +} + +// HasLogs returns a boolean if a field has been set. +func (o *EntityV3QueueDatadog) HasLogs() bool { + return o != nil && o.Logs != nil +} + +// SetLogs gets a reference to the given []EntityV3DatadogLogItem and assigns it to the Logs field. +func (o *EntityV3QueueDatadog) SetLogs(v []EntityV3DatadogLogItem) { + o.Logs = v +} + +// GetPerformanceData returns the PerformanceData field value if set, zero value otherwise. +func (o *EntityV3QueueDatadog) GetPerformanceData() EntityV3DatadogPerformance { + if o == nil || o.PerformanceData == nil { + var ret EntityV3DatadogPerformance + return ret + } + return *o.PerformanceData +} + +// GetPerformanceDataOk returns a tuple with the PerformanceData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3QueueDatadog) GetPerformanceDataOk() (*EntityV3DatadogPerformance, bool) { + if o == nil || o.PerformanceData == nil { + return nil, false + } + return o.PerformanceData, true +} + +// HasPerformanceData returns a boolean if a field has been set. +func (o *EntityV3QueueDatadog) HasPerformanceData() bool { + return o != nil && o.PerformanceData != nil +} + +// SetPerformanceData gets a reference to the given EntityV3DatadogPerformance and assigns it to the PerformanceData field. +func (o *EntityV3QueueDatadog) SetPerformanceData(v EntityV3DatadogPerformance) { + o.PerformanceData = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3QueueDatadog) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Events != nil { + toSerialize["events"] = o.Events + } + if o.Logs != nil { + toSerialize["logs"] = o.Logs + } + if o.PerformanceData != nil { + toSerialize["performanceData"] = o.PerformanceData + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3QueueDatadog) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Events []EntityV3DatadogEventItem `json:"events,omitempty"` + Logs []EntityV3DatadogLogItem `json:"logs,omitempty"` + PerformanceData *EntityV3DatadogPerformance `json:"performanceData,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + hasInvalidField := false + o.Events = all.Events + o.Logs = all.Logs + if all.PerformanceData != nil && all.PerformanceData.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.PerformanceData = all.PerformanceData + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_kind.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_kind.go new file mode 100644 index 0000000000..3d2cfbc5f6 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_kind.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3QueueKind The definition of Entity V3 Queue Kind object. +type EntityV3QueueKind string + +// List of EntityV3QueueKind. +const ( + ENTITYV3QUEUEKIND_QUEUE EntityV3QueueKind = "queue" +) + +var allowedEntityV3QueueKindEnumValues = []EntityV3QueueKind{ + ENTITYV3QUEUEKIND_QUEUE, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *EntityV3QueueKind) GetAllowedValues() []EntityV3QueueKind { + return allowedEntityV3QueueKindEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *EntityV3QueueKind) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = EntityV3QueueKind(value) + return nil +} + +// NewEntityV3QueueKindFromValue returns a pointer to a valid EntityV3QueueKind +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewEntityV3QueueKindFromValue(v string) (*EntityV3QueueKind, error) { + ev := EntityV3QueueKind(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for EntityV3QueueKind: valid values are %v", v, allowedEntityV3QueueKindEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v EntityV3QueueKind) IsValid() bool { + for _, existing := range allowedEntityV3QueueKindEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to EntityV3QueueKind value. +func (v EntityV3QueueKind) Ptr() *EntityV3QueueKind { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_spec.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_spec.go new file mode 100644 index 0000000000..7b19778434 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_queue_spec.go @@ -0,0 +1,157 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3QueueSpec The definition of Entity V3 Queue Spec object. +type EntityV3QueueSpec struct { + // The lifecycle state of the queue. + Lifecycle *string `json:"lifecycle,omitempty"` + // The importance of the queue + Tier *string `json:"tier,omitempty"` + // The type of queue + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3QueueSpec instantiates a new EntityV3QueueSpec object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3QueueSpec() *EntityV3QueueSpec { + this := EntityV3QueueSpec{} + return &this +} + +// NewEntityV3QueueSpecWithDefaults instantiates a new EntityV3QueueSpec object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3QueueSpecWithDefaults() *EntityV3QueueSpec { + this := EntityV3QueueSpec{} + return &this +} + +// GetLifecycle returns the Lifecycle field value if set, zero value otherwise. +func (o *EntityV3QueueSpec) GetLifecycle() string { + if o == nil || o.Lifecycle == nil { + var ret string + return ret + } + return *o.Lifecycle +} + +// GetLifecycleOk returns a tuple with the Lifecycle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3QueueSpec) GetLifecycleOk() (*string, bool) { + if o == nil || o.Lifecycle == nil { + return nil, false + } + return o.Lifecycle, true +} + +// HasLifecycle returns a boolean if a field has been set. +func (o *EntityV3QueueSpec) HasLifecycle() bool { + return o != nil && o.Lifecycle != nil +} + +// SetLifecycle gets a reference to the given string and assigns it to the Lifecycle field. +func (o *EntityV3QueueSpec) SetLifecycle(v string) { + o.Lifecycle = &v +} + +// GetTier returns the Tier field value if set, zero value otherwise. +func (o *EntityV3QueueSpec) GetTier() string { + if o == nil || o.Tier == nil { + var ret string + return ret + } + return *o.Tier +} + +// GetTierOk returns a tuple with the Tier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3QueueSpec) GetTierOk() (*string, bool) { + if o == nil || o.Tier == nil { + return nil, false + } + return o.Tier, true +} + +// HasTier returns a boolean if a field has been set. +func (o *EntityV3QueueSpec) HasTier() bool { + return o != nil && o.Tier != nil +} + +// SetTier gets a reference to the given string and assigns it to the Tier field. +func (o *EntityV3QueueSpec) SetTier(v string) { + o.Tier = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityV3QueueSpec) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3QueueSpec) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityV3QueueSpec) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityV3QueueSpec) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3QueueSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Lifecycle != nil { + toSerialize["lifecycle"] = o.Lifecycle + } + if o.Tier != nil { + toSerialize["tier"] = o.Tier + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3QueueSpec) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Lifecycle *string `json:"lifecycle,omitempty"` + Tier *string `json:"tier,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.Lifecycle = all.Lifecycle + o.Tier = all.Tier + o.Type = all.Type + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service.go new file mode 100644 index 0000000000..b0aec5947e --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service.go @@ -0,0 +1,316 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3Service Schema for service entities +type EntityV3Service struct { + // The schema version of entity type. The field is known as schema-version in the previous version + ApiVersion EntityV3APIVersion `json:"apiVersion"` + // Datadog product integrations for the service entity + Datadog *EntityV3ServiceDatadog `json:"datadog,omitempty"` + // Custom extensions. This is the free-formed field to send client side metadata. No Datadog features are affected by this field. + Extensions map[string]interface{} `json:"extensions,omitempty"` + // A base schema for defining third party integrations + Integrations *EntityV3Integrations `json:"integrations,omitempty"` + // The definition of Entity V3 Service Kind object. + Kind EntityV3ServiceKind `json:"kind"` + // The definition of Entity V3 Metadata object. + Metadata EntityV3Metadata `json:"metadata"` + // The definition of Entity V3 Service Spec object. + Spec *EntityV3ServiceSpec `json:"spec,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3Service instantiates a new EntityV3Service object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3Service(apiVersion EntityV3APIVersion, kind EntityV3ServiceKind, metadata EntityV3Metadata) *EntityV3Service { + this := EntityV3Service{} + this.ApiVersion = apiVersion + this.Kind = kind + this.Metadata = metadata + return &this +} + +// NewEntityV3ServiceWithDefaults instantiates a new EntityV3Service object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3ServiceWithDefaults() *EntityV3Service { + this := EntityV3Service{} + return &this +} + +// GetApiVersion returns the ApiVersion field value. +func (o *EntityV3Service) GetApiVersion() EntityV3APIVersion { + if o == nil { + var ret EntityV3APIVersion + return ret + } + return o.ApiVersion +} + +// GetApiVersionOk returns a tuple with the ApiVersion field value +// and a boolean to check if the value has been set. +func (o *EntityV3Service) GetApiVersionOk() (*EntityV3APIVersion, bool) { + if o == nil { + return nil, false + } + return &o.ApiVersion, true +} + +// SetApiVersion sets field value. +func (o *EntityV3Service) SetApiVersion(v EntityV3APIVersion) { + o.ApiVersion = v +} + +// GetDatadog returns the Datadog field value if set, zero value otherwise. +func (o *EntityV3Service) GetDatadog() EntityV3ServiceDatadog { + if o == nil || o.Datadog == nil { + var ret EntityV3ServiceDatadog + return ret + } + return *o.Datadog +} + +// GetDatadogOk returns a tuple with the Datadog field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Service) GetDatadogOk() (*EntityV3ServiceDatadog, bool) { + if o == nil || o.Datadog == nil { + return nil, false + } + return o.Datadog, true +} + +// HasDatadog returns a boolean if a field has been set. +func (o *EntityV3Service) HasDatadog() bool { + return o != nil && o.Datadog != nil +} + +// SetDatadog gets a reference to the given EntityV3ServiceDatadog and assigns it to the Datadog field. +func (o *EntityV3Service) SetDatadog(v EntityV3ServiceDatadog) { + o.Datadog = &v +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *EntityV3Service) GetExtensions() map[string]interface{} { + if o == nil || o.Extensions == nil { + var ret map[string]interface{} + return ret + } + return o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Service) GetExtensionsOk() (*map[string]interface{}, bool) { + if o == nil || o.Extensions == nil { + return nil, false + } + return &o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *EntityV3Service) HasExtensions() bool { + return o != nil && o.Extensions != nil +} + +// SetExtensions gets a reference to the given map[string]interface{} and assigns it to the Extensions field. +func (o *EntityV3Service) SetExtensions(v map[string]interface{}) { + o.Extensions = v +} + +// GetIntegrations returns the Integrations field value if set, zero value otherwise. +func (o *EntityV3Service) GetIntegrations() EntityV3Integrations { + if o == nil || o.Integrations == nil { + var ret EntityV3Integrations + return ret + } + return *o.Integrations +} + +// GetIntegrationsOk returns a tuple with the Integrations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Service) GetIntegrationsOk() (*EntityV3Integrations, bool) { + if o == nil || o.Integrations == nil { + return nil, false + } + return o.Integrations, true +} + +// HasIntegrations returns a boolean if a field has been set. +func (o *EntityV3Service) HasIntegrations() bool { + return o != nil && o.Integrations != nil +} + +// SetIntegrations gets a reference to the given EntityV3Integrations and assigns it to the Integrations field. +func (o *EntityV3Service) SetIntegrations(v EntityV3Integrations) { + o.Integrations = &v +} + +// GetKind returns the Kind field value. +func (o *EntityV3Service) GetKind() EntityV3ServiceKind { + if o == nil { + var ret EntityV3ServiceKind + return ret + } + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *EntityV3Service) GetKindOk() (*EntityV3ServiceKind, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value. +func (o *EntityV3Service) SetKind(v EntityV3ServiceKind) { + o.Kind = v +} + +// GetMetadata returns the Metadata field value. +func (o *EntityV3Service) GetMetadata() EntityV3Metadata { + if o == nil { + var ret EntityV3Metadata + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *EntityV3Service) GetMetadataOk() (*EntityV3Metadata, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value. +func (o *EntityV3Service) SetMetadata(v EntityV3Metadata) { + o.Metadata = v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *EntityV3Service) GetSpec() EntityV3ServiceSpec { + if o == nil || o.Spec == nil { + var ret EntityV3ServiceSpec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3Service) GetSpecOk() (*EntityV3ServiceSpec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *EntityV3Service) HasSpec() bool { + return o != nil && o.Spec != nil +} + +// SetSpec gets a reference to the given EntityV3ServiceSpec and assigns it to the Spec field. +func (o *EntityV3Service) SetSpec(v EntityV3ServiceSpec) { + o.Spec = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3Service) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["apiVersion"] = o.ApiVersion + if o.Datadog != nil { + toSerialize["datadog"] = o.Datadog + } + if o.Extensions != nil { + toSerialize["extensions"] = o.Extensions + } + if o.Integrations != nil { + toSerialize["integrations"] = o.Integrations + } + toSerialize["kind"] = o.Kind + toSerialize["metadata"] = o.Metadata + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3Service) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ApiVersion *EntityV3APIVersion `json:"apiVersion"` + Datadog *EntityV3ServiceDatadog `json:"datadog,omitempty"` + Extensions map[string]interface{} `json:"extensions,omitempty"` + Integrations *EntityV3Integrations `json:"integrations,omitempty"` + Kind *EntityV3ServiceKind `json:"kind"` + Metadata *EntityV3Metadata `json:"metadata"` + Spec *EntityV3ServiceSpec `json:"spec,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.ApiVersion == nil { + return fmt.Errorf("required field apiVersion missing") + } + if all.Kind == nil { + return fmt.Errorf("required field kind missing") + } + if all.Metadata == nil { + return fmt.Errorf("required field metadata missing") + } + + hasInvalidField := false + if !all.ApiVersion.IsValid() { + hasInvalidField = true + } else { + o.ApiVersion = *all.ApiVersion + } + if all.Datadog != nil && all.Datadog.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Datadog = all.Datadog + o.Extensions = all.Extensions + if all.Integrations != nil && all.Integrations.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Integrations = all.Integrations + if !all.Kind.IsValid() { + hasInvalidField = true + } else { + o.Kind = *all.Kind + } + if all.Metadata.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Metadata = *all.Metadata + if all.Spec != nil && all.Spec.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Spec = all.Spec + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_datadog.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_datadog.go new file mode 100644 index 0000000000..e3a2c8c04c --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_datadog.go @@ -0,0 +1,239 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3ServiceDatadog Datadog product integrations for the service entity +type EntityV3ServiceDatadog struct { + // Schema for mapping source code locations to an entity + CodeLocations []EntityV3DatadogCodeLocationItem `json:"codeLocations,omitempty"` + // Events associations + Events []EntityV3DatadogEventItem `json:"events,omitempty"` + // Logs association + Logs []EntityV3DatadogLogItem `json:"logs,omitempty"` + // Performance stats association + PerformanceData *EntityV3DatadogPerformance `json:"performanceData,omitempty"` + // CI Pipelines association + Pipelines *EntityV3DatadogPipelines `json:"pipelines,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3ServiceDatadog instantiates a new EntityV3ServiceDatadog object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3ServiceDatadog() *EntityV3ServiceDatadog { + this := EntityV3ServiceDatadog{} + return &this +} + +// NewEntityV3ServiceDatadogWithDefaults instantiates a new EntityV3ServiceDatadog object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3ServiceDatadogWithDefaults() *EntityV3ServiceDatadog { + this := EntityV3ServiceDatadog{} + return &this +} + +// GetCodeLocations returns the CodeLocations field value if set, zero value otherwise. +func (o *EntityV3ServiceDatadog) GetCodeLocations() []EntityV3DatadogCodeLocationItem { + if o == nil || o.CodeLocations == nil { + var ret []EntityV3DatadogCodeLocationItem + return ret + } + return o.CodeLocations +} + +// GetCodeLocationsOk returns a tuple with the CodeLocations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceDatadog) GetCodeLocationsOk() (*[]EntityV3DatadogCodeLocationItem, bool) { + if o == nil || o.CodeLocations == nil { + return nil, false + } + return &o.CodeLocations, true +} + +// HasCodeLocations returns a boolean if a field has been set. +func (o *EntityV3ServiceDatadog) HasCodeLocations() bool { + return o != nil && o.CodeLocations != nil +} + +// SetCodeLocations gets a reference to the given []EntityV3DatadogCodeLocationItem and assigns it to the CodeLocations field. +func (o *EntityV3ServiceDatadog) SetCodeLocations(v []EntityV3DatadogCodeLocationItem) { + o.CodeLocations = v +} + +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *EntityV3ServiceDatadog) GetEvents() []EntityV3DatadogEventItem { + if o == nil || o.Events == nil { + var ret []EntityV3DatadogEventItem + return ret + } + return o.Events +} + +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceDatadog) GetEventsOk() (*[]EntityV3DatadogEventItem, bool) { + if o == nil || o.Events == nil { + return nil, false + } + return &o.Events, true +} + +// HasEvents returns a boolean if a field has been set. +func (o *EntityV3ServiceDatadog) HasEvents() bool { + return o != nil && o.Events != nil +} + +// SetEvents gets a reference to the given []EntityV3DatadogEventItem and assigns it to the Events field. +func (o *EntityV3ServiceDatadog) SetEvents(v []EntityV3DatadogEventItem) { + o.Events = v +} + +// GetLogs returns the Logs field value if set, zero value otherwise. +func (o *EntityV3ServiceDatadog) GetLogs() []EntityV3DatadogLogItem { + if o == nil || o.Logs == nil { + var ret []EntityV3DatadogLogItem + return ret + } + return o.Logs +} + +// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceDatadog) GetLogsOk() (*[]EntityV3DatadogLogItem, bool) { + if o == nil || o.Logs == nil { + return nil, false + } + return &o.Logs, true +} + +// HasLogs returns a boolean if a field has been set. +func (o *EntityV3ServiceDatadog) HasLogs() bool { + return o != nil && o.Logs != nil +} + +// SetLogs gets a reference to the given []EntityV3DatadogLogItem and assigns it to the Logs field. +func (o *EntityV3ServiceDatadog) SetLogs(v []EntityV3DatadogLogItem) { + o.Logs = v +} + +// GetPerformanceData returns the PerformanceData field value if set, zero value otherwise. +func (o *EntityV3ServiceDatadog) GetPerformanceData() EntityV3DatadogPerformance { + if o == nil || o.PerformanceData == nil { + var ret EntityV3DatadogPerformance + return ret + } + return *o.PerformanceData +} + +// GetPerformanceDataOk returns a tuple with the PerformanceData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceDatadog) GetPerformanceDataOk() (*EntityV3DatadogPerformance, bool) { + if o == nil || o.PerformanceData == nil { + return nil, false + } + return o.PerformanceData, true +} + +// HasPerformanceData returns a boolean if a field has been set. +func (o *EntityV3ServiceDatadog) HasPerformanceData() bool { + return o != nil && o.PerformanceData != nil +} + +// SetPerformanceData gets a reference to the given EntityV3DatadogPerformance and assigns it to the PerformanceData field. +func (o *EntityV3ServiceDatadog) SetPerformanceData(v EntityV3DatadogPerformance) { + o.PerformanceData = &v +} + +// GetPipelines returns the Pipelines field value if set, zero value otherwise. +func (o *EntityV3ServiceDatadog) GetPipelines() EntityV3DatadogPipelines { + if o == nil || o.Pipelines == nil { + var ret EntityV3DatadogPipelines + return ret + } + return *o.Pipelines +} + +// GetPipelinesOk returns a tuple with the Pipelines field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceDatadog) GetPipelinesOk() (*EntityV3DatadogPipelines, bool) { + if o == nil || o.Pipelines == nil { + return nil, false + } + return o.Pipelines, true +} + +// HasPipelines returns a boolean if a field has been set. +func (o *EntityV3ServiceDatadog) HasPipelines() bool { + return o != nil && o.Pipelines != nil +} + +// SetPipelines gets a reference to the given EntityV3DatadogPipelines and assigns it to the Pipelines field. +func (o *EntityV3ServiceDatadog) SetPipelines(v EntityV3DatadogPipelines) { + o.Pipelines = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3ServiceDatadog) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.CodeLocations != nil { + toSerialize["codeLocations"] = o.CodeLocations + } + if o.Events != nil { + toSerialize["events"] = o.Events + } + if o.Logs != nil { + toSerialize["logs"] = o.Logs + } + if o.PerformanceData != nil { + toSerialize["performanceData"] = o.PerformanceData + } + if o.Pipelines != nil { + toSerialize["pipelines"] = o.Pipelines + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3ServiceDatadog) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + CodeLocations []EntityV3DatadogCodeLocationItem `json:"codeLocations,omitempty"` + Events []EntityV3DatadogEventItem `json:"events,omitempty"` + Logs []EntityV3DatadogLogItem `json:"logs,omitempty"` + PerformanceData *EntityV3DatadogPerformance `json:"performanceData,omitempty"` + Pipelines *EntityV3DatadogPipelines `json:"pipelines,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + hasInvalidField := false + o.CodeLocations = all.CodeLocations + o.Events = all.Events + o.Logs = all.Logs + if all.PerformanceData != nil && all.PerformanceData.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.PerformanceData = all.PerformanceData + if all.Pipelines != nil && all.Pipelines.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Pipelines = all.Pipelines + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_kind.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_kind.go new file mode 100644 index 0000000000..941716aff4 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_kind.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3ServiceKind The definition of Entity V3 Service Kind object. +type EntityV3ServiceKind string + +// List of EntityV3ServiceKind. +const ( + ENTITYV3SERVICEKIND_SERVICE EntityV3ServiceKind = "service" +) + +var allowedEntityV3ServiceKindEnumValues = []EntityV3ServiceKind{ + ENTITYV3SERVICEKIND_SERVICE, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *EntityV3ServiceKind) GetAllowedValues() []EntityV3ServiceKind { + return allowedEntityV3ServiceKindEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *EntityV3ServiceKind) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = EntityV3ServiceKind(value) + return nil +} + +// NewEntityV3ServiceKindFromValue returns a pointer to a valid EntityV3ServiceKind +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewEntityV3ServiceKindFromValue(v string) (*EntityV3ServiceKind, error) { + ev := EntityV3ServiceKind(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for EntityV3ServiceKind: valid values are %v", v, allowedEntityV3ServiceKindEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v EntityV3ServiceKind) IsValid() bool { + for _, existing := range allowedEntityV3ServiceKindEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to EntityV3ServiceKind value. +func (v EntityV3ServiceKind) Ptr() *EntityV3ServiceKind { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_spec.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_spec.go new file mode 100644 index 0000000000..7ea0e7cfbd --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_service_spec.go @@ -0,0 +1,227 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3ServiceSpec The definition of Entity V3 Service Spec object. +type EntityV3ServiceSpec struct { + // A list of components the service depends on + DependsOn []string `json:"dependsOn,omitempty"` + // The service's programming language. + Languages []string `json:"languages,omitempty"` + // The lifecycle state of the component. + Lifecycle *string `json:"lifecycle,omitempty"` + // The importance of the component + Tier *string `json:"tier,omitempty"` + // The type of service + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3ServiceSpec instantiates a new EntityV3ServiceSpec object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3ServiceSpec() *EntityV3ServiceSpec { + this := EntityV3ServiceSpec{} + return &this +} + +// NewEntityV3ServiceSpecWithDefaults instantiates a new EntityV3ServiceSpec object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3ServiceSpecWithDefaults() *EntityV3ServiceSpec { + this := EntityV3ServiceSpec{} + return &this +} + +// GetDependsOn returns the DependsOn field value if set, zero value otherwise. +func (o *EntityV3ServiceSpec) GetDependsOn() []string { + if o == nil || o.DependsOn == nil { + var ret []string + return ret + } + return o.DependsOn +} + +// GetDependsOnOk returns a tuple with the DependsOn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceSpec) GetDependsOnOk() (*[]string, bool) { + if o == nil || o.DependsOn == nil { + return nil, false + } + return &o.DependsOn, true +} + +// HasDependsOn returns a boolean if a field has been set. +func (o *EntityV3ServiceSpec) HasDependsOn() bool { + return o != nil && o.DependsOn != nil +} + +// SetDependsOn gets a reference to the given []string and assigns it to the DependsOn field. +func (o *EntityV3ServiceSpec) SetDependsOn(v []string) { + o.DependsOn = v +} + +// GetLanguages returns the Languages field value if set, zero value otherwise. +func (o *EntityV3ServiceSpec) GetLanguages() []string { + if o == nil || o.Languages == nil { + var ret []string + return ret + } + return o.Languages +} + +// GetLanguagesOk returns a tuple with the Languages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceSpec) GetLanguagesOk() (*[]string, bool) { + if o == nil || o.Languages == nil { + return nil, false + } + return &o.Languages, true +} + +// HasLanguages returns a boolean if a field has been set. +func (o *EntityV3ServiceSpec) HasLanguages() bool { + return o != nil && o.Languages != nil +} + +// SetLanguages gets a reference to the given []string and assigns it to the Languages field. +func (o *EntityV3ServiceSpec) SetLanguages(v []string) { + o.Languages = v +} + +// GetLifecycle returns the Lifecycle field value if set, zero value otherwise. +func (o *EntityV3ServiceSpec) GetLifecycle() string { + if o == nil || o.Lifecycle == nil { + var ret string + return ret + } + return *o.Lifecycle +} + +// GetLifecycleOk returns a tuple with the Lifecycle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceSpec) GetLifecycleOk() (*string, bool) { + if o == nil || o.Lifecycle == nil { + return nil, false + } + return o.Lifecycle, true +} + +// HasLifecycle returns a boolean if a field has been set. +func (o *EntityV3ServiceSpec) HasLifecycle() bool { + return o != nil && o.Lifecycle != nil +} + +// SetLifecycle gets a reference to the given string and assigns it to the Lifecycle field. +func (o *EntityV3ServiceSpec) SetLifecycle(v string) { + o.Lifecycle = &v +} + +// GetTier returns the Tier field value if set, zero value otherwise. +func (o *EntityV3ServiceSpec) GetTier() string { + if o == nil || o.Tier == nil { + var ret string + return ret + } + return *o.Tier +} + +// GetTierOk returns a tuple with the Tier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceSpec) GetTierOk() (*string, bool) { + if o == nil || o.Tier == nil { + return nil, false + } + return o.Tier, true +} + +// HasTier returns a boolean if a field has been set. +func (o *EntityV3ServiceSpec) HasTier() bool { + return o != nil && o.Tier != nil +} + +// SetTier gets a reference to the given string and assigns it to the Tier field. +func (o *EntityV3ServiceSpec) SetTier(v string) { + o.Tier = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *EntityV3ServiceSpec) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3ServiceSpec) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *EntityV3ServiceSpec) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *EntityV3ServiceSpec) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3ServiceSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.DependsOn != nil { + toSerialize["dependsOn"] = o.DependsOn + } + if o.Languages != nil { + toSerialize["languages"] = o.Languages + } + if o.Lifecycle != nil { + toSerialize["lifecycle"] = o.Lifecycle + } + if o.Tier != nil { + toSerialize["tier"] = o.Tier + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3ServiceSpec) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + DependsOn []string `json:"dependsOn,omitempty"` + Languages []string `json:"languages,omitempty"` + Lifecycle *string `json:"lifecycle,omitempty"` + Tier *string `json:"tier,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.DependsOn = all.DependsOn + o.Languages = all.Languages + o.Lifecycle = all.Lifecycle + o.Tier = all.Tier + o.Type = all.Type + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system.go new file mode 100644 index 0000000000..ba18e20bc9 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system.go @@ -0,0 +1,316 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3System Schema for system entities +type EntityV3System struct { + // The schema version of entity type. The field is known as schema-version in the previous version + ApiVersion EntityV3APIVersion `json:"apiVersion"` + // Datadog product integrations for the service entity + Datadog *EntityV3SystemDatadog `json:"datadog,omitempty"` + // Custom extensions. This is the free-formed field to send client side metadata. No Datadog features are affected by this field. + Extensions map[string]interface{} `json:"extensions,omitempty"` + // A base schema for defining third party integrations + Integrations *EntityV3Integrations `json:"integrations,omitempty"` + // The definition of Entity V3 System Kind object. + Kind EntityV3SystemKind `json:"kind"` + // The definition of Entity V3 Metadata object. + Metadata EntityV3Metadata `json:"metadata"` + // The definition of Entity V3 System Spec object. + Spec *EntityV3SystemSpec `json:"spec,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3System instantiates a new EntityV3System object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3System(apiVersion EntityV3APIVersion, kind EntityV3SystemKind, metadata EntityV3Metadata) *EntityV3System { + this := EntityV3System{} + this.ApiVersion = apiVersion + this.Kind = kind + this.Metadata = metadata + return &this +} + +// NewEntityV3SystemWithDefaults instantiates a new EntityV3System object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3SystemWithDefaults() *EntityV3System { + this := EntityV3System{} + return &this +} + +// GetApiVersion returns the ApiVersion field value. +func (o *EntityV3System) GetApiVersion() EntityV3APIVersion { + if o == nil { + var ret EntityV3APIVersion + return ret + } + return o.ApiVersion +} + +// GetApiVersionOk returns a tuple with the ApiVersion field value +// and a boolean to check if the value has been set. +func (o *EntityV3System) GetApiVersionOk() (*EntityV3APIVersion, bool) { + if o == nil { + return nil, false + } + return &o.ApiVersion, true +} + +// SetApiVersion sets field value. +func (o *EntityV3System) SetApiVersion(v EntityV3APIVersion) { + o.ApiVersion = v +} + +// GetDatadog returns the Datadog field value if set, zero value otherwise. +func (o *EntityV3System) GetDatadog() EntityV3SystemDatadog { + if o == nil || o.Datadog == nil { + var ret EntityV3SystemDatadog + return ret + } + return *o.Datadog +} + +// GetDatadogOk returns a tuple with the Datadog field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3System) GetDatadogOk() (*EntityV3SystemDatadog, bool) { + if o == nil || o.Datadog == nil { + return nil, false + } + return o.Datadog, true +} + +// HasDatadog returns a boolean if a field has been set. +func (o *EntityV3System) HasDatadog() bool { + return o != nil && o.Datadog != nil +} + +// SetDatadog gets a reference to the given EntityV3SystemDatadog and assigns it to the Datadog field. +func (o *EntityV3System) SetDatadog(v EntityV3SystemDatadog) { + o.Datadog = &v +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *EntityV3System) GetExtensions() map[string]interface{} { + if o == nil || o.Extensions == nil { + var ret map[string]interface{} + return ret + } + return o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3System) GetExtensionsOk() (*map[string]interface{}, bool) { + if o == nil || o.Extensions == nil { + return nil, false + } + return &o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *EntityV3System) HasExtensions() bool { + return o != nil && o.Extensions != nil +} + +// SetExtensions gets a reference to the given map[string]interface{} and assigns it to the Extensions field. +func (o *EntityV3System) SetExtensions(v map[string]interface{}) { + o.Extensions = v +} + +// GetIntegrations returns the Integrations field value if set, zero value otherwise. +func (o *EntityV3System) GetIntegrations() EntityV3Integrations { + if o == nil || o.Integrations == nil { + var ret EntityV3Integrations + return ret + } + return *o.Integrations +} + +// GetIntegrationsOk returns a tuple with the Integrations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3System) GetIntegrationsOk() (*EntityV3Integrations, bool) { + if o == nil || o.Integrations == nil { + return nil, false + } + return o.Integrations, true +} + +// HasIntegrations returns a boolean if a field has been set. +func (o *EntityV3System) HasIntegrations() bool { + return o != nil && o.Integrations != nil +} + +// SetIntegrations gets a reference to the given EntityV3Integrations and assigns it to the Integrations field. +func (o *EntityV3System) SetIntegrations(v EntityV3Integrations) { + o.Integrations = &v +} + +// GetKind returns the Kind field value. +func (o *EntityV3System) GetKind() EntityV3SystemKind { + if o == nil { + var ret EntityV3SystemKind + return ret + } + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *EntityV3System) GetKindOk() (*EntityV3SystemKind, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value. +func (o *EntityV3System) SetKind(v EntityV3SystemKind) { + o.Kind = v +} + +// GetMetadata returns the Metadata field value. +func (o *EntityV3System) GetMetadata() EntityV3Metadata { + if o == nil { + var ret EntityV3Metadata + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *EntityV3System) GetMetadataOk() (*EntityV3Metadata, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value. +func (o *EntityV3System) SetMetadata(v EntityV3Metadata) { + o.Metadata = v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *EntityV3System) GetSpec() EntityV3SystemSpec { + if o == nil || o.Spec == nil { + var ret EntityV3SystemSpec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3System) GetSpecOk() (*EntityV3SystemSpec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *EntityV3System) HasSpec() bool { + return o != nil && o.Spec != nil +} + +// SetSpec gets a reference to the given EntityV3SystemSpec and assigns it to the Spec field. +func (o *EntityV3System) SetSpec(v EntityV3SystemSpec) { + o.Spec = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3System) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["apiVersion"] = o.ApiVersion + if o.Datadog != nil { + toSerialize["datadog"] = o.Datadog + } + if o.Extensions != nil { + toSerialize["extensions"] = o.Extensions + } + if o.Integrations != nil { + toSerialize["integrations"] = o.Integrations + } + toSerialize["kind"] = o.Kind + toSerialize["metadata"] = o.Metadata + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3System) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ApiVersion *EntityV3APIVersion `json:"apiVersion"` + Datadog *EntityV3SystemDatadog `json:"datadog,omitempty"` + Extensions map[string]interface{} `json:"extensions,omitempty"` + Integrations *EntityV3Integrations `json:"integrations,omitempty"` + Kind *EntityV3SystemKind `json:"kind"` + Metadata *EntityV3Metadata `json:"metadata"` + Spec *EntityV3SystemSpec `json:"spec,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.ApiVersion == nil { + return fmt.Errorf("required field apiVersion missing") + } + if all.Kind == nil { + return fmt.Errorf("required field kind missing") + } + if all.Metadata == nil { + return fmt.Errorf("required field metadata missing") + } + + hasInvalidField := false + if !all.ApiVersion.IsValid() { + hasInvalidField = true + } else { + o.ApiVersion = *all.ApiVersion + } + if all.Datadog != nil && all.Datadog.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Datadog = all.Datadog + o.Extensions = all.Extensions + if all.Integrations != nil && all.Integrations.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Integrations = all.Integrations + if !all.Kind.IsValid() { + hasInvalidField = true + } else { + o.Kind = *all.Kind + } + if all.Metadata.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Metadata = *all.Metadata + if all.Spec != nil && all.Spec.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Spec = all.Spec + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_datadog.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_datadog.go new file mode 100644 index 0000000000..340ba4c14f --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_datadog.go @@ -0,0 +1,204 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3SystemDatadog Datadog product integrations for the service entity +type EntityV3SystemDatadog struct { + // Events associations + Events []EntityV3DatadogEventItem `json:"events,omitempty"` + // Logs association + Logs []EntityV3DatadogLogItem `json:"logs,omitempty"` + // Performance stats association + PerformanceData *EntityV3DatadogPerformance `json:"performanceData,omitempty"` + // CI Pipelines association + Pipelines *EntityV3DatadogPipelines `json:"pipelines,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3SystemDatadog instantiates a new EntityV3SystemDatadog object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3SystemDatadog() *EntityV3SystemDatadog { + this := EntityV3SystemDatadog{} + return &this +} + +// NewEntityV3SystemDatadogWithDefaults instantiates a new EntityV3SystemDatadog object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3SystemDatadogWithDefaults() *EntityV3SystemDatadog { + this := EntityV3SystemDatadog{} + return &this +} + +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *EntityV3SystemDatadog) GetEvents() []EntityV3DatadogEventItem { + if o == nil || o.Events == nil { + var ret []EntityV3DatadogEventItem + return ret + } + return o.Events +} + +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3SystemDatadog) GetEventsOk() (*[]EntityV3DatadogEventItem, bool) { + if o == nil || o.Events == nil { + return nil, false + } + return &o.Events, true +} + +// HasEvents returns a boolean if a field has been set. +func (o *EntityV3SystemDatadog) HasEvents() bool { + return o != nil && o.Events != nil +} + +// SetEvents gets a reference to the given []EntityV3DatadogEventItem and assigns it to the Events field. +func (o *EntityV3SystemDatadog) SetEvents(v []EntityV3DatadogEventItem) { + o.Events = v +} + +// GetLogs returns the Logs field value if set, zero value otherwise. +func (o *EntityV3SystemDatadog) GetLogs() []EntityV3DatadogLogItem { + if o == nil || o.Logs == nil { + var ret []EntityV3DatadogLogItem + return ret + } + return o.Logs +} + +// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3SystemDatadog) GetLogsOk() (*[]EntityV3DatadogLogItem, bool) { + if o == nil || o.Logs == nil { + return nil, false + } + return &o.Logs, true +} + +// HasLogs returns a boolean if a field has been set. +func (o *EntityV3SystemDatadog) HasLogs() bool { + return o != nil && o.Logs != nil +} + +// SetLogs gets a reference to the given []EntityV3DatadogLogItem and assigns it to the Logs field. +func (o *EntityV3SystemDatadog) SetLogs(v []EntityV3DatadogLogItem) { + o.Logs = v +} + +// GetPerformanceData returns the PerformanceData field value if set, zero value otherwise. +func (o *EntityV3SystemDatadog) GetPerformanceData() EntityV3DatadogPerformance { + if o == nil || o.PerformanceData == nil { + var ret EntityV3DatadogPerformance + return ret + } + return *o.PerformanceData +} + +// GetPerformanceDataOk returns a tuple with the PerformanceData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3SystemDatadog) GetPerformanceDataOk() (*EntityV3DatadogPerformance, bool) { + if o == nil || o.PerformanceData == nil { + return nil, false + } + return o.PerformanceData, true +} + +// HasPerformanceData returns a boolean if a field has been set. +func (o *EntityV3SystemDatadog) HasPerformanceData() bool { + return o != nil && o.PerformanceData != nil +} + +// SetPerformanceData gets a reference to the given EntityV3DatadogPerformance and assigns it to the PerformanceData field. +func (o *EntityV3SystemDatadog) SetPerformanceData(v EntityV3DatadogPerformance) { + o.PerformanceData = &v +} + +// GetPipelines returns the Pipelines field value if set, zero value otherwise. +func (o *EntityV3SystemDatadog) GetPipelines() EntityV3DatadogPipelines { + if o == nil || o.Pipelines == nil { + var ret EntityV3DatadogPipelines + return ret + } + return *o.Pipelines +} + +// GetPipelinesOk returns a tuple with the Pipelines field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3SystemDatadog) GetPipelinesOk() (*EntityV3DatadogPipelines, bool) { + if o == nil || o.Pipelines == nil { + return nil, false + } + return o.Pipelines, true +} + +// HasPipelines returns a boolean if a field has been set. +func (o *EntityV3SystemDatadog) HasPipelines() bool { + return o != nil && o.Pipelines != nil +} + +// SetPipelines gets a reference to the given EntityV3DatadogPipelines and assigns it to the Pipelines field. +func (o *EntityV3SystemDatadog) SetPipelines(v EntityV3DatadogPipelines) { + o.Pipelines = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3SystemDatadog) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Events != nil { + toSerialize["events"] = o.Events + } + if o.Logs != nil { + toSerialize["logs"] = o.Logs + } + if o.PerformanceData != nil { + toSerialize["performanceData"] = o.PerformanceData + } + if o.Pipelines != nil { + toSerialize["pipelines"] = o.Pipelines + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3SystemDatadog) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Events []EntityV3DatadogEventItem `json:"events,omitempty"` + Logs []EntityV3DatadogLogItem `json:"logs,omitempty"` + PerformanceData *EntityV3DatadogPerformance `json:"performanceData,omitempty"` + Pipelines *EntityV3DatadogPipelines `json:"pipelines,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + hasInvalidField := false + o.Events = all.Events + o.Logs = all.Logs + if all.PerformanceData != nil && all.PerformanceData.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.PerformanceData = all.PerformanceData + if all.Pipelines != nil && all.Pipelines.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Pipelines = all.Pipelines + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_kind.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_kind.go new file mode 100644 index 0000000000..e3e4b1173d --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_kind.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3SystemKind The definition of Entity V3 System Kind object. +type EntityV3SystemKind string + +// List of EntityV3SystemKind. +const ( + ENTITYV3SYSTEMKIND_SYSTEM EntityV3SystemKind = "system" +) + +var allowedEntityV3SystemKindEnumValues = []EntityV3SystemKind{ + ENTITYV3SYSTEMKIND_SYSTEM, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *EntityV3SystemKind) GetAllowedValues() []EntityV3SystemKind { + return allowedEntityV3SystemKindEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *EntityV3SystemKind) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = EntityV3SystemKind(value) + return nil +} + +// NewEntityV3SystemKindFromValue returns a pointer to a valid EntityV3SystemKind +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewEntityV3SystemKindFromValue(v string) (*EntityV3SystemKind, error) { + ev := EntityV3SystemKind(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for EntityV3SystemKind: valid values are %v", v, allowedEntityV3SystemKindEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v EntityV3SystemKind) IsValid() bool { + for _, existing := range allowedEntityV3SystemKindEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to EntityV3SystemKind value. +func (v EntityV3SystemKind) Ptr() *EntityV3SystemKind { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_spec.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_spec.go new file mode 100644 index 0000000000..f3aed551e1 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_entity_v3_system_spec.go @@ -0,0 +1,157 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// EntityV3SystemSpec The definition of Entity V3 System Spec object. +type EntityV3SystemSpec struct { + // A list of components belongs to the system. + Components []string `json:"components,omitempty"` + // The lifecycle state of the component. + Lifecycle *string `json:"lifecycle,omitempty"` + // An entity reference to the owner of the component. + Tier *string `json:"tier,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` +} + +// NewEntityV3SystemSpec instantiates a new EntityV3SystemSpec object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewEntityV3SystemSpec() *EntityV3SystemSpec { + this := EntityV3SystemSpec{} + return &this +} + +// NewEntityV3SystemSpecWithDefaults instantiates a new EntityV3SystemSpec object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewEntityV3SystemSpecWithDefaults() *EntityV3SystemSpec { + this := EntityV3SystemSpec{} + return &this +} + +// GetComponents returns the Components field value if set, zero value otherwise. +func (o *EntityV3SystemSpec) GetComponents() []string { + if o == nil || o.Components == nil { + var ret []string + return ret + } + return o.Components +} + +// GetComponentsOk returns a tuple with the Components field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3SystemSpec) GetComponentsOk() (*[]string, bool) { + if o == nil || o.Components == nil { + return nil, false + } + return &o.Components, true +} + +// HasComponents returns a boolean if a field has been set. +func (o *EntityV3SystemSpec) HasComponents() bool { + return o != nil && o.Components != nil +} + +// SetComponents gets a reference to the given []string and assigns it to the Components field. +func (o *EntityV3SystemSpec) SetComponents(v []string) { + o.Components = v +} + +// GetLifecycle returns the Lifecycle field value if set, zero value otherwise. +func (o *EntityV3SystemSpec) GetLifecycle() string { + if o == nil || o.Lifecycle == nil { + var ret string + return ret + } + return *o.Lifecycle +} + +// GetLifecycleOk returns a tuple with the Lifecycle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3SystemSpec) GetLifecycleOk() (*string, bool) { + if o == nil || o.Lifecycle == nil { + return nil, false + } + return o.Lifecycle, true +} + +// HasLifecycle returns a boolean if a field has been set. +func (o *EntityV3SystemSpec) HasLifecycle() bool { + return o != nil && o.Lifecycle != nil +} + +// SetLifecycle gets a reference to the given string and assigns it to the Lifecycle field. +func (o *EntityV3SystemSpec) SetLifecycle(v string) { + o.Lifecycle = &v +} + +// GetTier returns the Tier field value if set, zero value otherwise. +func (o *EntityV3SystemSpec) GetTier() string { + if o == nil || o.Tier == nil { + var ret string + return ret + } + return *o.Tier +} + +// GetTierOk returns a tuple with the Tier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EntityV3SystemSpec) GetTierOk() (*string, bool) { + if o == nil || o.Tier == nil { + return nil, false + } + return o.Tier, true +} + +// HasTier returns a boolean if a field has been set. +func (o *EntityV3SystemSpec) HasTier() bool { + return o != nil && o.Tier != nil +} + +// SetTier gets a reference to the given string and assigns it to the Tier field. +func (o *EntityV3SystemSpec) SetTier(v string) { + o.Tier = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o EntityV3SystemSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Components != nil { + toSerialize["components"] = o.Components + } + if o.Lifecycle != nil { + toSerialize["lifecycle"] = o.Lifecycle + } + if o.Tier != nil { + toSerialize["tier"] = o.Tier + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *EntityV3SystemSpec) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Components []string `json:"components,omitempty"` + Lifecycle *string `json:"lifecycle,omitempty"` + Tier *string `json:"tier,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + o.Components = all.Components + o.Lifecycle = all.Lifecycle + o.Tier = all.Tier + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_fastly_account_update_request_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_fastly_account_update_request_attributes.go index ddc72b03a3..3d43356b48 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_fastly_account_update_request_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_fastly_account_update_request_attributes.go @@ -12,6 +12,8 @@ import ( type FastlyAccountUpdateRequestAttributes struct { // The API key of the Fastly account. ApiKey *string `json:"api_key,omitempty"` + // The name of the Fastly account. + Name *string `json:"name,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -62,6 +64,34 @@ func (o *FastlyAccountUpdateRequestAttributes) SetApiKey(v string) { o.ApiKey = &v } +// GetName returns the Name field value if set, zero value otherwise. +func (o *FastlyAccountUpdateRequestAttributes) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FastlyAccountUpdateRequestAttributes) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *FastlyAccountUpdateRequestAttributes) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *FastlyAccountUpdateRequestAttributes) SetName(v string) { + o.Name = &v +} + // MarshalJSON serializes the struct using spec logic. func (o FastlyAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} @@ -71,6 +101,9 @@ func (o FastlyAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error) { if o.ApiKey != nil { toSerialize["api_key"] = o.ApiKey } + if o.Name != nil { + toSerialize["name"] = o.Name + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -82,17 +115,19 @@ func (o FastlyAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error) { func (o *FastlyAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { ApiKey *string `json:"api_key,omitempty"` + Name *string `json:"name,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"api_key"}) + datadog.DeleteKeys(additionalProperties, &[]string{"api_key", "name"}) } else { return err } o.ApiKey = all.ApiKey + o.Name = all.Name if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_fastly_services_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_fastly_services_response.go index c047ea1c8d..d642617298 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_fastly_services_response.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_fastly_services_response.go @@ -11,7 +11,7 @@ import ( // FastlyServicesResponse The expected response schema when getting Fastly services. type FastlyServicesResponse struct { // The JSON:API data schema. - Data []FastlyServiceResponse `json:"data,omitempty"` + Data []FastlyServiceData `json:"data,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -35,9 +35,9 @@ func NewFastlyServicesResponseWithDefaults() *FastlyServicesResponse { } // GetData returns the Data field value if set, zero value otherwise. -func (o *FastlyServicesResponse) GetData() []FastlyServiceResponse { +func (o *FastlyServicesResponse) GetData() []FastlyServiceData { if o == nil || o.Data == nil { - var ret []FastlyServiceResponse + var ret []FastlyServiceData return ret } return o.Data @@ -45,7 +45,7 @@ func (o *FastlyServicesResponse) GetData() []FastlyServiceResponse { // GetDataOk returns a tuple with the Data field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FastlyServicesResponse) GetDataOk() (*[]FastlyServiceResponse, bool) { +func (o *FastlyServicesResponse) GetDataOk() (*[]FastlyServiceData, bool) { if o == nil || o.Data == nil { return nil, false } @@ -57,8 +57,8 @@ func (o *FastlyServicesResponse) HasData() bool { return o != nil && o.Data != nil } -// SetData gets a reference to the given []FastlyServiceResponse and assigns it to the Data field. -func (o *FastlyServicesResponse) SetData(v []FastlyServiceResponse) { +// SetData gets a reference to the given []FastlyServiceData and assigns it to the Data field. +func (o *FastlyServicesResponse) SetData(v []FastlyServiceData) { o.Data = v } @@ -81,7 +81,7 @@ func (o FastlyServicesResponse) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *FastlyServicesResponse) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Data []FastlyServiceResponse `json:"data,omitempty"` + Data []FastlyServiceData `json:"data,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_full_api_key_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_full_api_key_attributes.go index 5c14a9126d..5c77700076 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_full_api_key_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_full_api_key_attributes.go @@ -5,6 +5,8 @@ package datadogV2 import ( + "time" + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) @@ -13,13 +15,13 @@ type FullAPIKeyAttributes struct { // The category of the API key. Category *string `json:"category,omitempty"` // Creation date of the API key. - CreatedAt *string `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` // The API key. Key *string `json:"key,omitempty"` // The last four characters of the API key. Last4 *string `json:"last4,omitempty"` // Date the API key was last modified. - ModifiedAt *string `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty"` // Name of the API key. Name *string `json:"name,omitempty"` // The remote config read enabled status. @@ -75,9 +77,9 @@ func (o *FullAPIKeyAttributes) SetCategory(v string) { } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *FullAPIKeyAttributes) GetCreatedAt() string { +func (o *FullAPIKeyAttributes) GetCreatedAt() time.Time { if o == nil || o.CreatedAt == nil { - var ret string + var ret time.Time return ret } return *o.CreatedAt @@ -85,7 +87,7 @@ func (o *FullAPIKeyAttributes) GetCreatedAt() string { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FullAPIKeyAttributes) GetCreatedAtOk() (*string, bool) { +func (o *FullAPIKeyAttributes) GetCreatedAtOk() (*time.Time, bool) { if o == nil || o.CreatedAt == nil { return nil, false } @@ -97,8 +99,8 @@ func (o *FullAPIKeyAttributes) HasCreatedAt() bool { return o != nil && o.CreatedAt != nil } -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *FullAPIKeyAttributes) SetCreatedAt(v string) { +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *FullAPIKeyAttributes) SetCreatedAt(v time.Time) { o.CreatedAt = &v } @@ -159,9 +161,9 @@ func (o *FullAPIKeyAttributes) SetLast4(v string) { } // GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. -func (o *FullAPIKeyAttributes) GetModifiedAt() string { +func (o *FullAPIKeyAttributes) GetModifiedAt() time.Time { if o == nil || o.ModifiedAt == nil { - var ret string + var ret time.Time return ret } return *o.ModifiedAt @@ -169,7 +171,7 @@ func (o *FullAPIKeyAttributes) GetModifiedAt() string { // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FullAPIKeyAttributes) GetModifiedAtOk() (*string, bool) { +func (o *FullAPIKeyAttributes) GetModifiedAtOk() (*time.Time, bool) { if o == nil || o.ModifiedAt == nil { return nil, false } @@ -181,8 +183,8 @@ func (o *FullAPIKeyAttributes) HasModifiedAt() bool { return o != nil && o.ModifiedAt != nil } -// SetModifiedAt gets a reference to the given string and assigns it to the ModifiedAt field. -func (o *FullAPIKeyAttributes) SetModifiedAt(v string) { +// SetModifiedAt gets a reference to the given time.Time and assigns it to the ModifiedAt field. +func (o *FullAPIKeyAttributes) SetModifiedAt(v time.Time) { o.ModifiedAt = &v } @@ -252,7 +254,11 @@ func (o FullAPIKeyAttributes) MarshalJSON() ([]byte, error) { toSerialize["category"] = o.Category } if o.CreatedAt != nil { - toSerialize["created_at"] = o.CreatedAt + if o.CreatedAt.Nanosecond() == 0 { + toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00") + } else { + toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05.000Z07:00") + } } if o.Key != nil { toSerialize["key"] = o.Key @@ -261,7 +267,11 @@ func (o FullAPIKeyAttributes) MarshalJSON() ([]byte, error) { toSerialize["last4"] = o.Last4 } if o.ModifiedAt != nil { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.Nanosecond() == 0 { + toSerialize["modified_at"] = o.ModifiedAt.Format("2006-01-02T15:04:05Z07:00") + } else { + toSerialize["modified_at"] = o.ModifiedAt.Format("2006-01-02T15:04:05.000Z07:00") + } } if o.Name != nil { toSerialize["name"] = o.Name @@ -279,13 +289,13 @@ func (o FullAPIKeyAttributes) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *FullAPIKeyAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Category *string `json:"category,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - Key *string `json:"key,omitempty"` - Last4 *string `json:"last4,omitempty"` - ModifiedAt *string `json:"modified_at,omitempty"` - Name *string `json:"name,omitempty"` - RemoteConfigReadEnabled *bool `json:"remote_config_read_enabled,omitempty"` + Category *string `json:"category,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Key *string `json:"key,omitempty"` + Last4 *string `json:"last4,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty"` + Name *string `json:"name,omitempty"` + RemoteConfigReadEnabled *bool `json:"remote_config_read_enabled,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_attachments_response_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_attachments_response_included_item.go index 0f4e057ac3..d8d6d5247b 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_attachments_response_included_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_attachments_response_included_item.go @@ -30,7 +30,7 @@ func (obj *IncidentAttachmentsResponseIncludedItem) UnmarshalJSON(data []byte) e if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_field_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_field_attributes.go index 73c7758390..cbac5d5348 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_field_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_field_attributes.go @@ -36,7 +36,7 @@ func (obj *IncidentFieldAttributes) UnmarshalJSON(data []byte) error { if err == nil { if obj.IncidentFieldAttributesSingleValue != nil && obj.IncidentFieldAttributesSingleValue.UnparsedObject == nil { jsonIncidentFieldAttributesSingleValue, _ := datadog.Marshal(obj.IncidentFieldAttributesSingleValue) - if string(jsonIncidentFieldAttributesSingleValue) == "{}" { // empty struct + if string(jsonIncidentFieldAttributesSingleValue) == "{}" && string(data) != "{}" { // empty struct obj.IncidentFieldAttributesSingleValue = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *IncidentFieldAttributes) UnmarshalJSON(data []byte) error { if err == nil { if obj.IncidentFieldAttributesMultipleValue != nil && obj.IncidentFieldAttributesMultipleValue.UnparsedObject == nil { jsonIncidentFieldAttributesMultipleValue, _ := datadog.Marshal(obj.IncidentFieldAttributesMultipleValue) - if string(jsonIncidentFieldAttributesMultipleValue) == "{}" { // empty struct + if string(jsonIncidentFieldAttributesMultipleValue) == "{}" && string(data) != "{}" { // empty struct obj.IncidentFieldAttributesMultipleValue = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_integration_metadata_response_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_integration_metadata_response_included_item.go index 88bd107b90..d61741040e 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_integration_metadata_response_included_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_integration_metadata_response_included_item.go @@ -30,7 +30,7 @@ func (obj *IncidentIntegrationMetadataResponseIncludedItem) UnmarshalJSON(data [ if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_notification_handle.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_notification_handle.go index 3cbfbcbc11..a980401a1a 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_notification_handle.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_notification_handle.go @@ -12,7 +12,7 @@ import ( type IncidentNotificationHandle struct { // The name of the notified handle. DisplayName *string `json:"display_name,omitempty"` - // The email address used for the notification. + // The handle used for the notification. This includes an email address, Slack channel, or workflow. Handle *string `json:"handle,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_response_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_response_included_item.go index 0e0adce19a..c7d00d179d 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_response_included_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_response_included_item.go @@ -36,7 +36,7 @@ func (obj *IncidentResponseIncludedItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_service_included_items.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_service_included_items.go index 7876c280a6..7812992ea5 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_service_included_items.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_service_included_items.go @@ -30,7 +30,7 @@ func (obj *IncidentServiceIncludedItems) UnmarshalJSON(data []byte) error { if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_team_included_items.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_team_included_items.go index d466427ee5..03640d0355 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_team_included_items.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_team_included_items.go @@ -30,7 +30,7 @@ func (obj *IncidentTeamIncludedItems) UnmarshalJSON(data []byte) error { if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_todo_response_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_todo_response_included_item.go index b045eeb210..b896548a03 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_todo_response_included_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_incident_todo_response_included_item.go @@ -30,7 +30,7 @@ func (obj *IncidentTodoResponseIncludedItem) UnmarshalJSON(data []byte) error { if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_include_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_include_type.go new file mode 100644 index 0000000000..19a327e188 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_include_type.go @@ -0,0 +1,72 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// IncludeType supported include types. +type IncludeType string + +// List of IncludeType. +const ( + INCLUDETYPE_SCHEMA IncludeType = "schema" + INCLUDETYPE_RAW_SCHEMA IncludeType = "raw_schema" + INCLUDETYPE_ONCALL IncludeType = "oncall" + INCLUDETYPE_INCIDENT IncludeType = "incident" + INCLUDETYPE_RELATION IncludeType = "relation" +) + +var allowedIncludeTypeEnumValues = []IncludeType{ + INCLUDETYPE_SCHEMA, + INCLUDETYPE_RAW_SCHEMA, + INCLUDETYPE_ONCALL, + INCLUDETYPE_INCIDENT, + INCLUDETYPE_RELATION, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *IncludeType) GetAllowedValues() []IncludeType { + return allowedIncludeTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *IncludeType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = IncludeType(value) + return nil +} + +// NewIncludeTypeFromValue returns a pointer to a valid IncludeType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewIncludeTypeFromValue(v string) (*IncludeType, error) { + ev := IncludeType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for IncludeType: valid values are %v", v, allowedIncludeTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v IncludeType) IsValid() bool { + for _, existing := range allowedIncludeTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to IncludeType value. +func (v IncludeType) Ptr() *IncludeType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key.go new file mode 100644 index 0000000000..c0a2f2e1e6 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key.go @@ -0,0 +1,180 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// LeakedKey The definition of LeakedKey object. +type LeakedKey struct { + // The definition of LeakedKeyAttributes object. + Attributes LeakedKeyAttributes `json:"attributes"` + // The LeakedKey id. + Id string `json:"id"` + // The definition of LeakedKeyType object. + Type LeakedKeyType `json:"type"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewLeakedKey instantiates a new LeakedKey object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewLeakedKey(attributes LeakedKeyAttributes, id string, typeVar LeakedKeyType) *LeakedKey { + this := LeakedKey{} + this.Attributes = attributes + this.Id = id + this.Type = typeVar + return &this +} + +// NewLeakedKeyWithDefaults instantiates a new LeakedKey object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewLeakedKeyWithDefaults() *LeakedKey { + this := LeakedKey{} + var typeVar LeakedKeyType = LEAKEDKEYTYPE_LEAKED_KEYS + this.Type = typeVar + return &this +} + +// GetAttributes returns the Attributes field value. +func (o *LeakedKey) GetAttributes() LeakedKeyAttributes { + if o == nil { + var ret LeakedKeyAttributes + return ret + } + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *LeakedKey) GetAttributesOk() (*LeakedKeyAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value. +func (o *LeakedKey) SetAttributes(v LeakedKeyAttributes) { + o.Attributes = v +} + +// GetId returns the Id field value. +func (o *LeakedKey) GetId() string { + if o == nil { + var ret string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *LeakedKey) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value. +func (o *LeakedKey) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value. +func (o *LeakedKey) GetType() LeakedKeyType { + if o == nil { + var ret LeakedKeyType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *LeakedKey) GetTypeOk() (*LeakedKeyType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *LeakedKey) SetType(v LeakedKeyType) { + o.Type = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o LeakedKey) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["attributes"] = o.Attributes + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *LeakedKey) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *LeakedKeyAttributes `json:"attributes"` + Id *string `json:"id"` + Type *LeakedKeyType `json:"type"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Attributes == nil { + return fmt.Errorf("required field attributes missing") + } + if all.Id == nil { + return fmt.Errorf("required field id missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = *all.Attributes + o.Id = *all.Id + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key_attributes.go new file mode 100644 index 0000000000..d640bb983e --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key_attributes.go @@ -0,0 +1,141 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// LeakedKeyAttributes The definition of LeakedKeyAttributes object. +type LeakedKeyAttributes struct { + // The LeakedKeyAttributes date. + Date time.Time `json:"date"` + // The LeakedKeyAttributes leak_source. + LeakSource *string `json:"leak_source,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewLeakedKeyAttributes instantiates a new LeakedKeyAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewLeakedKeyAttributes(date time.Time) *LeakedKeyAttributes { + this := LeakedKeyAttributes{} + this.Date = date + return &this +} + +// NewLeakedKeyAttributesWithDefaults instantiates a new LeakedKeyAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewLeakedKeyAttributesWithDefaults() *LeakedKeyAttributes { + this := LeakedKeyAttributes{} + return &this +} + +// GetDate returns the Date field value. +func (o *LeakedKeyAttributes) GetDate() time.Time { + if o == nil { + var ret time.Time + return ret + } + return o.Date +} + +// GetDateOk returns a tuple with the Date field value +// and a boolean to check if the value has been set. +func (o *LeakedKeyAttributes) GetDateOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Date, true +} + +// SetDate sets field value. +func (o *LeakedKeyAttributes) SetDate(v time.Time) { + o.Date = v +} + +// GetLeakSource returns the LeakSource field value if set, zero value otherwise. +func (o *LeakedKeyAttributes) GetLeakSource() string { + if o == nil || o.LeakSource == nil { + var ret string + return ret + } + return *o.LeakSource +} + +// GetLeakSourceOk returns a tuple with the LeakSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LeakedKeyAttributes) GetLeakSourceOk() (*string, bool) { + if o == nil || o.LeakSource == nil { + return nil, false + } + return o.LeakSource, true +} + +// HasLeakSource returns a boolean if a field has been set. +func (o *LeakedKeyAttributes) HasLeakSource() bool { + return o != nil && o.LeakSource != nil +} + +// SetLeakSource gets a reference to the given string and assigns it to the LeakSource field. +func (o *LeakedKeyAttributes) SetLeakSource(v string) { + o.LeakSource = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o LeakedKeyAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Date.Nanosecond() == 0 { + toSerialize["date"] = o.Date.Format("2006-01-02T15:04:05Z07:00") + } else { + toSerialize["date"] = o.Date.Format("2006-01-02T15:04:05.000Z07:00") + } + if o.LeakSource != nil { + toSerialize["leak_source"] = o.LeakSource + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *LeakedKeyAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Date *time.Time `json:"date"` + LeakSource *string `json:"leak_source,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Date == nil { + return fmt.Errorf("required field date missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"date", "leak_source"}) + } else { + return err + } + o.Date = *all.Date + o.LeakSource = all.LeakSource + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key_type.go new file mode 100644 index 0000000000..d1e7e246ab --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_leaked_key_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// LeakedKeyType The definition of LeakedKeyType object. +type LeakedKeyType string + +// List of LeakedKeyType. +const ( + LEAKEDKEYTYPE_LEAKED_KEYS LeakedKeyType = "leaked_keys" +) + +var allowedLeakedKeyTypeEnumValues = []LeakedKeyType{ + LEAKEDKEYTYPE_LEAKED_KEYS, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *LeakedKeyType) GetAllowedValues() []LeakedKeyType { + return allowedLeakedKeyTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *LeakedKeyType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = LeakedKeyType(value) + return nil +} + +// NewLeakedKeyTypeFromValue returns a pointer to a valid LeakedKeyType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewLeakedKeyTypeFromValue(v string) (*LeakedKeyType, error) { + ev := LeakedKeyType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for LeakedKeyType: valid values are %v", v, allowedLeakedKeyTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v LeakedKeyType) IsValid() bool { + for _, existing := range allowedLeakedKeyTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to LeakedKeyType value. +func (v LeakedKeyType) Ptr() *LeakedKeyType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response.go new file mode 100644 index 0000000000..61df0b02ee --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response.go @@ -0,0 +1,219 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// ListEntityCatalogResponse List entity response. +type ListEntityCatalogResponse struct { + // List of entity data. + Data []EntityData `json:"data,omitempty"` + // List entity response included. + Included []ListEntityCatalogResponseIncludedItem `json:"included,omitempty"` + // List entity response links. + Links *ListEntityCatalogResponseLinks `json:"links,omitempty"` + // Entity metadata. + Meta *EntityResponseMeta `json:"meta,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewListEntityCatalogResponse instantiates a new ListEntityCatalogResponse object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewListEntityCatalogResponse() *ListEntityCatalogResponse { + this := ListEntityCatalogResponse{} + return &this +} + +// NewListEntityCatalogResponseWithDefaults instantiates a new ListEntityCatalogResponse object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewListEntityCatalogResponseWithDefaults() *ListEntityCatalogResponse { + this := ListEntityCatalogResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListEntityCatalogResponse) GetData() []EntityData { + if o == nil || o.Data == nil { + var ret []EntityData + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListEntityCatalogResponse) GetDataOk() (*[]EntityData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return &o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ListEntityCatalogResponse) HasData() bool { + return o != nil && o.Data != nil +} + +// SetData gets a reference to the given []EntityData and assigns it to the Data field. +func (o *ListEntityCatalogResponse) SetData(v []EntityData) { + o.Data = v +} + +// GetIncluded returns the Included field value if set, zero value otherwise. +func (o *ListEntityCatalogResponse) GetIncluded() []ListEntityCatalogResponseIncludedItem { + if o == nil || o.Included == nil { + var ret []ListEntityCatalogResponseIncludedItem + return ret + } + return o.Included +} + +// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListEntityCatalogResponse) GetIncludedOk() (*[]ListEntityCatalogResponseIncludedItem, bool) { + if o == nil || o.Included == nil { + return nil, false + } + return &o.Included, true +} + +// HasIncluded returns a boolean if a field has been set. +func (o *ListEntityCatalogResponse) HasIncluded() bool { + return o != nil && o.Included != nil +} + +// SetIncluded gets a reference to the given []ListEntityCatalogResponseIncludedItem and assigns it to the Included field. +func (o *ListEntityCatalogResponse) SetIncluded(v []ListEntityCatalogResponseIncludedItem) { + o.Included = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *ListEntityCatalogResponse) GetLinks() ListEntityCatalogResponseLinks { + if o == nil || o.Links == nil { + var ret ListEntityCatalogResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListEntityCatalogResponse) GetLinksOk() (*ListEntityCatalogResponseLinks, bool) { + if o == nil || o.Links == nil { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *ListEntityCatalogResponse) HasLinks() bool { + return o != nil && o.Links != nil +} + +// SetLinks gets a reference to the given ListEntityCatalogResponseLinks and assigns it to the Links field. +func (o *ListEntityCatalogResponse) SetLinks(v ListEntityCatalogResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ListEntityCatalogResponse) GetMeta() EntityResponseMeta { + if o == nil || o.Meta == nil { + var ret EntityResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListEntityCatalogResponse) GetMetaOk() (*EntityResponseMeta, bool) { + if o == nil || o.Meta == nil { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *ListEntityCatalogResponse) HasMeta() bool { + return o != nil && o.Meta != nil +} + +// SetMeta gets a reference to the given EntityResponseMeta and assigns it to the Meta field. +func (o *ListEntityCatalogResponse) SetMeta(v EntityResponseMeta) { + o.Meta = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o ListEntityCatalogResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.Included != nil { + toSerialize["included"] = o.Included + } + if o.Links != nil { + toSerialize["links"] = o.Links + } + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *ListEntityCatalogResponse) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data []EntityData `json:"data,omitempty"` + Included []ListEntityCatalogResponseIncludedItem `json:"included,omitempty"` + Links *ListEntityCatalogResponseLinks `json:"links,omitempty"` + Meta *EntityResponseMeta `json:"meta,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data", "included", "links", "meta"}) + } else { + return err + } + + hasInvalidField := false + o.Data = all.Data + o.Included = all.Included + if all.Links != nil && all.Links.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Links = all.Links + if all.Meta != nil && all.Meta.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Meta = all.Meta + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response_included_item.go new file mode 100644 index 0000000000..6bbd8b6b3c --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response_included_item.go @@ -0,0 +1,201 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// ListEntityCatalogResponseIncludedItem - List entity response included item. +type ListEntityCatalogResponseIncludedItem struct { + EntityResponseIncludedSchema *EntityResponseIncludedSchema + EntityResponseIncludedRawSchema *EntityResponseIncludedRawSchema + EntityResponseIncludedRelatedEntity *EntityResponseIncludedRelatedEntity + EntityResponseIncludedOncall *EntityResponseIncludedOncall + EntityResponseIncludedIncident *EntityResponseIncludedIncident + + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject interface{} +} + +// EntityResponseIncludedSchemaAsListEntityCatalogResponseIncludedItem is a convenience function that returns EntityResponseIncludedSchema wrapped in ListEntityCatalogResponseIncludedItem. +func EntityResponseIncludedSchemaAsListEntityCatalogResponseIncludedItem(v *EntityResponseIncludedSchema) ListEntityCatalogResponseIncludedItem { + return ListEntityCatalogResponseIncludedItem{EntityResponseIncludedSchema: v} +} + +// EntityResponseIncludedRawSchemaAsListEntityCatalogResponseIncludedItem is a convenience function that returns EntityResponseIncludedRawSchema wrapped in ListEntityCatalogResponseIncludedItem. +func EntityResponseIncludedRawSchemaAsListEntityCatalogResponseIncludedItem(v *EntityResponseIncludedRawSchema) ListEntityCatalogResponseIncludedItem { + return ListEntityCatalogResponseIncludedItem{EntityResponseIncludedRawSchema: v} +} + +// EntityResponseIncludedRelatedEntityAsListEntityCatalogResponseIncludedItem is a convenience function that returns EntityResponseIncludedRelatedEntity wrapped in ListEntityCatalogResponseIncludedItem. +func EntityResponseIncludedRelatedEntityAsListEntityCatalogResponseIncludedItem(v *EntityResponseIncludedRelatedEntity) ListEntityCatalogResponseIncludedItem { + return ListEntityCatalogResponseIncludedItem{EntityResponseIncludedRelatedEntity: v} +} + +// EntityResponseIncludedOncallAsListEntityCatalogResponseIncludedItem is a convenience function that returns EntityResponseIncludedOncall wrapped in ListEntityCatalogResponseIncludedItem. +func EntityResponseIncludedOncallAsListEntityCatalogResponseIncludedItem(v *EntityResponseIncludedOncall) ListEntityCatalogResponseIncludedItem { + return ListEntityCatalogResponseIncludedItem{EntityResponseIncludedOncall: v} +} + +// EntityResponseIncludedIncidentAsListEntityCatalogResponseIncludedItem is a convenience function that returns EntityResponseIncludedIncident wrapped in ListEntityCatalogResponseIncludedItem. +func EntityResponseIncludedIncidentAsListEntityCatalogResponseIncludedItem(v *EntityResponseIncludedIncident) ListEntityCatalogResponseIncludedItem { + return ListEntityCatalogResponseIncludedItem{EntityResponseIncludedIncident: v} +} + +// UnmarshalJSON turns data into one of the pointers in the struct. +func (obj *ListEntityCatalogResponseIncludedItem) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into EntityResponseIncludedSchema + err = datadog.Unmarshal(data, &obj.EntityResponseIncludedSchema) + if err == nil { + if obj.EntityResponseIncludedSchema != nil && obj.EntityResponseIncludedSchema.UnparsedObject == nil { + jsonEntityResponseIncludedSchema, _ := datadog.Marshal(obj.EntityResponseIncludedSchema) + if string(jsonEntityResponseIncludedSchema) == "{}" && string(data) != "{}" { // empty struct + obj.EntityResponseIncludedSchema = nil + } else { + match++ + } + } else { + obj.EntityResponseIncludedSchema = nil + } + } else { + obj.EntityResponseIncludedSchema = nil + } + + // try to unmarshal data into EntityResponseIncludedRawSchema + err = datadog.Unmarshal(data, &obj.EntityResponseIncludedRawSchema) + if err == nil { + if obj.EntityResponseIncludedRawSchema != nil && obj.EntityResponseIncludedRawSchema.UnparsedObject == nil { + jsonEntityResponseIncludedRawSchema, _ := datadog.Marshal(obj.EntityResponseIncludedRawSchema) + if string(jsonEntityResponseIncludedRawSchema) == "{}" && string(data) != "{}" { // empty struct + obj.EntityResponseIncludedRawSchema = nil + } else { + match++ + } + } else { + obj.EntityResponseIncludedRawSchema = nil + } + } else { + obj.EntityResponseIncludedRawSchema = nil + } + + // try to unmarshal data into EntityResponseIncludedRelatedEntity + err = datadog.Unmarshal(data, &obj.EntityResponseIncludedRelatedEntity) + if err == nil { + if obj.EntityResponseIncludedRelatedEntity != nil && obj.EntityResponseIncludedRelatedEntity.UnparsedObject == nil { + jsonEntityResponseIncludedRelatedEntity, _ := datadog.Marshal(obj.EntityResponseIncludedRelatedEntity) + if string(jsonEntityResponseIncludedRelatedEntity) == "{}" && string(data) != "{}" { // empty struct + obj.EntityResponseIncludedRelatedEntity = nil + } else { + match++ + } + } else { + obj.EntityResponseIncludedRelatedEntity = nil + } + } else { + obj.EntityResponseIncludedRelatedEntity = nil + } + + // try to unmarshal data into EntityResponseIncludedOncall + err = datadog.Unmarshal(data, &obj.EntityResponseIncludedOncall) + if err == nil { + if obj.EntityResponseIncludedOncall != nil && obj.EntityResponseIncludedOncall.UnparsedObject == nil { + jsonEntityResponseIncludedOncall, _ := datadog.Marshal(obj.EntityResponseIncludedOncall) + if string(jsonEntityResponseIncludedOncall) == "{}" && string(data) != "{}" { // empty struct + obj.EntityResponseIncludedOncall = nil + } else { + match++ + } + } else { + obj.EntityResponseIncludedOncall = nil + } + } else { + obj.EntityResponseIncludedOncall = nil + } + + // try to unmarshal data into EntityResponseIncludedIncident + err = datadog.Unmarshal(data, &obj.EntityResponseIncludedIncident) + if err == nil { + if obj.EntityResponseIncludedIncident != nil && obj.EntityResponseIncludedIncident.UnparsedObject == nil { + jsonEntityResponseIncludedIncident, _ := datadog.Marshal(obj.EntityResponseIncludedIncident) + if string(jsonEntityResponseIncludedIncident) == "{}" && string(data) != "{}" { // empty struct + obj.EntityResponseIncludedIncident = nil + } else { + match++ + } + } else { + obj.EntityResponseIncludedIncident = nil + } + } else { + obj.EntityResponseIncludedIncident = nil + } + + if match != 1 { // more than 1 match + // reset to nil + obj.EntityResponseIncludedSchema = nil + obj.EntityResponseIncludedRawSchema = nil + obj.EntityResponseIncludedRelatedEntity = nil + obj.EntityResponseIncludedOncall = nil + obj.EntityResponseIncludedIncident = nil + return datadog.Unmarshal(data, &obj.UnparsedObject) + } + return nil // exactly one match +} + +// MarshalJSON turns data from the first non-nil pointers in the struct to JSON. +func (obj ListEntityCatalogResponseIncludedItem) MarshalJSON() ([]byte, error) { + if obj.EntityResponseIncludedSchema != nil { + return datadog.Marshal(&obj.EntityResponseIncludedSchema) + } + + if obj.EntityResponseIncludedRawSchema != nil { + return datadog.Marshal(&obj.EntityResponseIncludedRawSchema) + } + + if obj.EntityResponseIncludedRelatedEntity != nil { + return datadog.Marshal(&obj.EntityResponseIncludedRelatedEntity) + } + + if obj.EntityResponseIncludedOncall != nil { + return datadog.Marshal(&obj.EntityResponseIncludedOncall) + } + + if obj.EntityResponseIncludedIncident != nil { + return datadog.Marshal(&obj.EntityResponseIncludedIncident) + } + + if obj.UnparsedObject != nil { + return datadog.Marshal(obj.UnparsedObject) + } + return nil, nil // no data in oneOf schemas +} + +// GetActualInstance returns the actual instance. +func (obj *ListEntityCatalogResponseIncludedItem) GetActualInstance() interface{} { + if obj.EntityResponseIncludedSchema != nil { + return obj.EntityResponseIncludedSchema + } + + if obj.EntityResponseIncludedRawSchema != nil { + return obj.EntityResponseIncludedRawSchema + } + + if obj.EntityResponseIncludedRelatedEntity != nil { + return obj.EntityResponseIncludedRelatedEntity + } + + if obj.EntityResponseIncludedOncall != nil { + return obj.EntityResponseIncludedOncall + } + + if obj.EntityResponseIncludedIncident != nil { + return obj.EntityResponseIncludedIncident + } + + // all schemas are nil + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response_links.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response_links.go new file mode 100644 index 0000000000..f08b8983d6 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_list_entity_catalog_response_links.go @@ -0,0 +1,172 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// ListEntityCatalogResponseLinks List entity response links. +type ListEntityCatalogResponseLinks struct { + // next link. + Next *string `json:"next,omitempty"` + // previous link. + Previous *string `json:"previous,omitempty"` + // current link. + Self *string `json:"self,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewListEntityCatalogResponseLinks instantiates a new ListEntityCatalogResponseLinks object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewListEntityCatalogResponseLinks() *ListEntityCatalogResponseLinks { + this := ListEntityCatalogResponseLinks{} + return &this +} + +// NewListEntityCatalogResponseLinksWithDefaults instantiates a new ListEntityCatalogResponseLinks object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewListEntityCatalogResponseLinksWithDefaults() *ListEntityCatalogResponseLinks { + this := ListEntityCatalogResponseLinks{} + return &this +} + +// GetNext returns the Next field value if set, zero value otherwise. +func (o *ListEntityCatalogResponseLinks) GetNext() string { + if o == nil || o.Next == nil { + var ret string + return ret + } + return *o.Next +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListEntityCatalogResponseLinks) GetNextOk() (*string, bool) { + if o == nil || o.Next == nil { + return nil, false + } + return o.Next, true +} + +// HasNext returns a boolean if a field has been set. +func (o *ListEntityCatalogResponseLinks) HasNext() bool { + return o != nil && o.Next != nil +} + +// SetNext gets a reference to the given string and assigns it to the Next field. +func (o *ListEntityCatalogResponseLinks) SetNext(v string) { + o.Next = &v +} + +// GetPrevious returns the Previous field value if set, zero value otherwise. +func (o *ListEntityCatalogResponseLinks) GetPrevious() string { + if o == nil || o.Previous == nil { + var ret string + return ret + } + return *o.Previous +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListEntityCatalogResponseLinks) GetPreviousOk() (*string, bool) { + if o == nil || o.Previous == nil { + return nil, false + } + return o.Previous, true +} + +// HasPrevious returns a boolean if a field has been set. +func (o *ListEntityCatalogResponseLinks) HasPrevious() bool { + return o != nil && o.Previous != nil +} + +// SetPrevious gets a reference to the given string and assigns it to the Previous field. +func (o *ListEntityCatalogResponseLinks) SetPrevious(v string) { + o.Previous = &v +} + +// GetSelf returns the Self field value if set, zero value otherwise. +func (o *ListEntityCatalogResponseLinks) GetSelf() string { + if o == nil || o.Self == nil { + var ret string + return ret + } + return *o.Self +} + +// GetSelfOk returns a tuple with the Self field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListEntityCatalogResponseLinks) GetSelfOk() (*string, bool) { + if o == nil || o.Self == nil { + return nil, false + } + return o.Self, true +} + +// HasSelf returns a boolean if a field has been set. +func (o *ListEntityCatalogResponseLinks) HasSelf() bool { + return o != nil && o.Self != nil +} + +// SetSelf gets a reference to the given string and assigns it to the Self field. +func (o *ListEntityCatalogResponseLinks) SetSelf(v string) { + o.Self = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o ListEntityCatalogResponseLinks) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Next != nil { + toSerialize["next"] = o.Next + } + if o.Previous != nil { + toSerialize["previous"] = o.Previous + } + if o.Self != nil { + toSerialize["self"] = o.Self + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *ListEntityCatalogResponseLinks) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Next *string `json:"next,omitempty"` + Previous *string `json:"previous,omitempty"` + Self *string `json:"self,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"next", "previous", "self"}) + } else { + return err + } + o.Next = all.Next + o.Previous = all.Previous + o.Self = all.Self + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_logs_aggregate_bucket_value.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_logs_aggregate_bucket_value.go index a444ddf0f8..f259599c12 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_logs_aggregate_bucket_value.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_logs_aggregate_bucket_value.go @@ -76,7 +76,7 @@ func (obj *LogsAggregateBucketValue) UnmarshalJSON(data []byte) error { if err == nil { if obj.LogsAggregateBucketValueTimeseries != nil { jsonLogsAggregateBucketValueTimeseries, _ := datadog.Marshal(obj.LogsAggregateBucketValueTimeseries) - if string(jsonLogsAggregateBucketValueTimeseries) == "{}" { // empty struct + if string(jsonLogsAggregateBucketValueTimeseries) == "{}" && string(data) != "{}" { // empty struct obj.LogsAggregateBucketValueTimeseries = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_asset_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_asset_attributes.go index 0175767c90..da51e7e748 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_asset_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_asset_attributes.go @@ -8,10 +8,12 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) -// MetricAssetAttributes Assets where only included attribute is its title +// MetricAssetAttributes Assets related to the object, including title and url. type MetricAssetAttributes struct { // Title of the asset. Title *string `json:"title,omitempty"` + // URL path of the asset. + Url *string `json:"url,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -62,6 +64,34 @@ func (o *MetricAssetAttributes) SetTitle(v string) { o.Title = &v } +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *MetricAssetAttributes) GetUrl() string { + if o == nil || o.Url == nil { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetricAssetAttributes) GetUrlOk() (*string, bool) { + if o == nil || o.Url == nil { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *MetricAssetAttributes) HasUrl() bool { + return o != nil && o.Url != nil +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *MetricAssetAttributes) SetUrl(v string) { + o.Url = &v +} + // MarshalJSON serializes the struct using spec logic. func (o MetricAssetAttributes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} @@ -71,6 +101,9 @@ func (o MetricAssetAttributes) MarshalJSON() ([]byte, error) { if o.Title != nil { toSerialize["title"] = o.Title } + if o.Url != nil { + toSerialize["url"] = o.Url + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -82,17 +115,19 @@ func (o MetricAssetAttributes) MarshalJSON() ([]byte, error) { func (o *MetricAssetAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { Title *string `json:"title,omitempty"` + Url *string `json:"url,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"title"}) + datadog.DeleteKeys(additionalProperties, &[]string{"title", "url"}) } else { return err } o.Title = all.Title + o.Url = all.Url if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_dashboard_asset.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_dashboard_asset.go index cdbaca7f36..83e67e48f0 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_dashboard_asset.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_dashboard_asset.go @@ -12,7 +12,7 @@ import ( // MetricDashboardAsset A dashboard object with title and popularity. type MetricDashboardAsset struct { - // Attributes related to the dashboard, including title and popularity. + // Attributes related to the dashboard, including title, popularity, and url. Attributes *MetricDashboardAttributes `json:"attributes,omitempty"` // The related dashboard's ID. Id string `json:"id"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_dashboard_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_dashboard_attributes.go index 4e8396db54..5b82971988 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_dashboard_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_dashboard_attributes.go @@ -8,12 +8,14 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) -// MetricDashboardAttributes Attributes related to the dashboard, including title and popularity. +// MetricDashboardAttributes Attributes related to the dashboard, including title, popularity, and url. type MetricDashboardAttributes struct { // Value from 0 to 5 that ranks popularity of the dashboard. Popularity *float64 `json:"popularity,omitempty"` // Title of the asset. Title *string `json:"title,omitempty"` + // URL path of the asset. + Url *string `json:"url,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -92,6 +94,34 @@ func (o *MetricDashboardAttributes) SetTitle(v string) { o.Title = &v } +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *MetricDashboardAttributes) GetUrl() string { + if o == nil || o.Url == nil { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetricDashboardAttributes) GetUrlOk() (*string, bool) { + if o == nil || o.Url == nil { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *MetricDashboardAttributes) HasUrl() bool { + return o != nil && o.Url != nil +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *MetricDashboardAttributes) SetUrl(v string) { + o.Url = &v +} + // MarshalJSON serializes the struct using spec logic. func (o MetricDashboardAttributes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} @@ -104,6 +134,9 @@ func (o MetricDashboardAttributes) MarshalJSON() ([]byte, error) { if o.Title != nil { toSerialize["title"] = o.Title } + if o.Url != nil { + toSerialize["url"] = o.Url + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -116,18 +149,20 @@ func (o *MetricDashboardAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { Popularity *float64 `json:"popularity,omitempty"` Title *string `json:"title,omitempty"` + Url *string `json:"url,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"popularity", "title"}) + datadog.DeleteKeys(additionalProperties, &[]string{"popularity", "title", "url"}) } else { return err } o.Popularity = all.Popularity o.Title = all.Title + o.Url = all.Url if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_monitor_asset.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_monitor_asset.go index 2fbe39e602..62cea8aab9 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_monitor_asset.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_monitor_asset.go @@ -12,7 +12,7 @@ import ( // MetricMonitorAsset A monitor object with title. type MetricMonitorAsset struct { - // Assets where only included attribute is its title + // Assets related to the object, including title and url. Attributes *MetricAssetAttributes `json:"attributes,omitempty"` // The related monitor's ID. Id string `json:"id"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_notebook_asset.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_notebook_asset.go index cdbd710980..0a4bcdffc9 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_notebook_asset.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_notebook_asset.go @@ -12,7 +12,7 @@ import ( // MetricNotebookAsset A notebook object with title. type MetricNotebookAsset struct { - // Assets where only included attribute is its title + // Assets related to the object, including title and url. Attributes *MetricAssetAttributes `json:"attributes,omitempty"` // The related notebook's ID. Id string `json:"id"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_slo_asset.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_slo_asset.go index 6457521ddb..12c8356d1e 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_slo_asset.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_slo_asset.go @@ -12,7 +12,7 @@ import ( // MetricSLOAsset A SLO object with title. type MetricSLOAsset struct { - // Assets where only included attribute is its title + // Assets related to the object, including title and url. Attributes *MetricAssetAttributes `json:"attributes,omitempty"` // The SLO ID. Id string `json:"id"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_attributes.go index 480f6fa5f8..f9557110a7 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_attributes.go @@ -27,7 +27,7 @@ type MetricTagConfigurationAttributes struct { // - time: sum, space: avg // - time: sum, space: sum // - // Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`. + // Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`. Aggregations []MetricCustomAggregation `json:"aggregations,omitempty"` // Timestamp when the tag configuration was created. CreatedAt *time.Time `json:"created_at,omitempty"` diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_create_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_create_attributes.go index 3ddc2299d4..e939363fd4 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_create_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_create_attributes.go @@ -27,7 +27,7 @@ type MetricTagConfigurationCreateAttributes struct { // - time: sum, space: avg // - time: sum, space: sum // - // Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`. + // Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`. Aggregations []MetricCustomAggregation `json:"aggregations,omitempty"` // When set to true, the configuration will exclude the configured tags and include any other submitted tags. // When set to false, the configuration will include the configured tags and exclude any other submitted tags. diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_metric_type_category.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_metric_type_category.go new file mode 100644 index 0000000000..7991ebf1e7 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_metric_type_category.go @@ -0,0 +1,66 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MetricTagConfigurationMetricTypeCategory The metric's type category. +type MetricTagConfigurationMetricTypeCategory string + +// List of MetricTagConfigurationMetricTypeCategory. +const ( + METRICTAGCONFIGURATIONMETRICTYPECATEGORY_NON_DISTRIBUTION MetricTagConfigurationMetricTypeCategory = "non_distribution" + METRICTAGCONFIGURATIONMETRICTYPECATEGORY_DISTRIBUTION MetricTagConfigurationMetricTypeCategory = "distribution" +) + +var allowedMetricTagConfigurationMetricTypeCategoryEnumValues = []MetricTagConfigurationMetricTypeCategory{ + METRICTAGCONFIGURATIONMETRICTYPECATEGORY_NON_DISTRIBUTION, + METRICTAGCONFIGURATIONMETRICTYPECATEGORY_DISTRIBUTION, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *MetricTagConfigurationMetricTypeCategory) GetAllowedValues() []MetricTagConfigurationMetricTypeCategory { + return allowedMetricTagConfigurationMetricTypeCategoryEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *MetricTagConfigurationMetricTypeCategory) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = MetricTagConfigurationMetricTypeCategory(value) + return nil +} + +// NewMetricTagConfigurationMetricTypeCategoryFromValue returns a pointer to a valid MetricTagConfigurationMetricTypeCategory +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewMetricTagConfigurationMetricTypeCategoryFromValue(v string) (*MetricTagConfigurationMetricTypeCategory, error) { + ev := MetricTagConfigurationMetricTypeCategory(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for MetricTagConfigurationMetricTypeCategory: valid values are %v", v, allowedMetricTagConfigurationMetricTypeCategoryEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v MetricTagConfigurationMetricTypeCategory) IsValid() bool { + for _, existing := range allowedMetricTagConfigurationMetricTypeCategoryEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to MetricTagConfigurationMetricTypeCategory value. +func (v MetricTagConfigurationMetricTypeCategory) Ptr() *MetricTagConfigurationMetricTypeCategory { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_update_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_update_attributes.go index 31d7f6d145..f2478b7906 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_update_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_tag_configuration_update_attributes.go @@ -25,7 +25,7 @@ type MetricTagConfigurationUpdateAttributes struct { // - time: sum, space: avg // - time: sum, space: sum // - // Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`. + // Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`. Aggregations []MetricCustomAggregation `json:"aggregations,omitempty"` // When set to true, the configuration will exclude the configured tags and include any other submitted tags. // When set to false, the configuration will include the configured tags and exclude any other submitted tags. diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_volumes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_volumes.go index 6ae23da387..5ffeedca6b 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_volumes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metric_volumes.go @@ -36,7 +36,7 @@ func (obj *MetricVolumes) UnmarshalJSON(data []byte) error { if err == nil { if obj.MetricDistinctVolume != nil && obj.MetricDistinctVolume.UnparsedObject == nil { jsonMetricDistinctVolume, _ := datadog.Marshal(obj.MetricDistinctVolume) - if string(jsonMetricDistinctVolume) == "{}" { // empty struct + if string(jsonMetricDistinctVolume) == "{}" && string(data) != "{}" { // empty struct obj.MetricDistinctVolume = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *MetricVolumes) UnmarshalJSON(data []byte) error { if err == nil { if obj.MetricIngestedIndexedVolume != nil && obj.MetricIngestedIndexedVolume.UnparsedObject == nil { jsonMetricIngestedIndexedVolume, _ := datadog.Marshal(obj.MetricIngestedIndexedVolume) - if string(jsonMetricIngestedIndexedVolume) == "{}" { // empty struct + if string(jsonMetricIngestedIndexedVolume) == "{}" && string(data) != "{}" { // empty struct obj.MetricIngestedIndexedVolume = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metrics_and_metric_tag_configurations.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metrics_and_metric_tag_configurations.go index 1d580b584a..263a598ac3 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metrics_and_metric_tag_configurations.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_metrics_and_metric_tag_configurations.go @@ -36,7 +36,7 @@ func (obj *MetricsAndMetricTagConfigurations) UnmarshalJSON(data []byte) error { if err == nil { if obj.Metric != nil && obj.Metric.UnparsedObject == nil { jsonMetric, _ := datadog.Marshal(obj.Metric) - if string(jsonMetric) == "{}" { // empty struct + if string(jsonMetric) == "{}" && string(data) != "{}" { // empty struct obj.Metric = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *MetricsAndMetricTagConfigurations) UnmarshalJSON(data []byte) error { if err == nil { if obj.MetricTagConfiguration != nil && obj.MetricTagConfiguration.UnparsedObject == nil { jsonMetricTagConfiguration, _ := datadog.Marshal(obj.MetricTagConfiguration) - if string(jsonMetricTagConfiguration) == "{}" { // empty struct + if string(jsonMetricTagConfiguration) == "{}" && string(data) != "{}" { // empty struct obj.MetricTagConfiguration = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_attributes.go new file mode 100644 index 0000000000..daadeeac25 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_attributes.go @@ -0,0 +1,207 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandleAttributes Handle attributes. +type MicrosoftTeamsApiHandleAttributes struct { + // Channel id. + ChannelId *string `json:"channel_id,omitempty"` + // Handle name. + Name *string `json:"name,omitempty"` + // Team id. + TeamId *string `json:"team_id,omitempty"` + // Tenant id. + TenantId *string `json:"tenant_id,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsApiHandleAttributes instantiates a new MicrosoftTeamsApiHandleAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsApiHandleAttributes() *MicrosoftTeamsApiHandleAttributes { + this := MicrosoftTeamsApiHandleAttributes{} + return &this +} + +// NewMicrosoftTeamsApiHandleAttributesWithDefaults instantiates a new MicrosoftTeamsApiHandleAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsApiHandleAttributesWithDefaults() *MicrosoftTeamsApiHandleAttributes { + this := MicrosoftTeamsApiHandleAttributes{} + return &this +} + +// GetChannelId returns the ChannelId field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleAttributes) GetChannelId() string { + if o == nil || o.ChannelId == nil { + var ret string + return ret + } + return *o.ChannelId +} + +// GetChannelIdOk returns a tuple with the ChannelId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleAttributes) GetChannelIdOk() (*string, bool) { + if o == nil || o.ChannelId == nil { + return nil, false + } + return o.ChannelId, true +} + +// HasChannelId returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleAttributes) HasChannelId() bool { + return o != nil && o.ChannelId != nil +} + +// SetChannelId gets a reference to the given string and assigns it to the ChannelId field. +func (o *MicrosoftTeamsApiHandleAttributes) SetChannelId(v string) { + o.ChannelId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleAttributes) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleAttributes) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleAttributes) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *MicrosoftTeamsApiHandleAttributes) SetName(v string) { + o.Name = &v +} + +// GetTeamId returns the TeamId field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleAttributes) GetTeamId() string { + if o == nil || o.TeamId == nil { + var ret string + return ret + } + return *o.TeamId +} + +// GetTeamIdOk returns a tuple with the TeamId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleAttributes) GetTeamIdOk() (*string, bool) { + if o == nil || o.TeamId == nil { + return nil, false + } + return o.TeamId, true +} + +// HasTeamId returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleAttributes) HasTeamId() bool { + return o != nil && o.TeamId != nil +} + +// SetTeamId gets a reference to the given string and assigns it to the TeamId field. +func (o *MicrosoftTeamsApiHandleAttributes) SetTeamId(v string) { + o.TeamId = &v +} + +// GetTenantId returns the TenantId field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleAttributes) GetTenantId() string { + if o == nil || o.TenantId == nil { + var ret string + return ret + } + return *o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleAttributes) GetTenantIdOk() (*string, bool) { + if o == nil || o.TenantId == nil { + return nil, false + } + return o.TenantId, true +} + +// HasTenantId returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleAttributes) HasTenantId() bool { + return o != nil && o.TenantId != nil +} + +// SetTenantId gets a reference to the given string and assigns it to the TenantId field. +func (o *MicrosoftTeamsApiHandleAttributes) SetTenantId(v string) { + o.TenantId = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsApiHandleAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.ChannelId != nil { + toSerialize["channel_id"] = o.ChannelId + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.TeamId != nil { + toSerialize["team_id"] = o.TeamId + } + if o.TenantId != nil { + toSerialize["tenant_id"] = o.TenantId + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsApiHandleAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ChannelId *string `json:"channel_id,omitempty"` + Name *string `json:"name,omitempty"` + TeamId *string `json:"team_id,omitempty"` + TenantId *string `json:"tenant_id,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"channel_id", "name", "team_id", "tenant_id"}) + } else { + return err + } + o.ChannelId = all.ChannelId + o.Name = all.Name + o.TeamId = all.TeamId + o.TenantId = all.TenantId + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response.go new file mode 100644 index 0000000000..9a6075aef9 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandleInfoResponse Response of a handle. +type MicrosoftTeamsApiHandleInfoResponse struct { + // Handle data from a response. + Data *MicrosoftTeamsApiHandleInfoResponseData `json:"data,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsApiHandleInfoResponse instantiates a new MicrosoftTeamsApiHandleInfoResponse object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsApiHandleInfoResponse() *MicrosoftTeamsApiHandleInfoResponse { + this := MicrosoftTeamsApiHandleInfoResponse{} + return &this +} + +// NewMicrosoftTeamsApiHandleInfoResponseWithDefaults instantiates a new MicrosoftTeamsApiHandleInfoResponse object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsApiHandleInfoResponseWithDefaults() *MicrosoftTeamsApiHandleInfoResponse { + this := MicrosoftTeamsApiHandleInfoResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponse) GetData() MicrosoftTeamsApiHandleInfoResponseData { + if o == nil || o.Data == nil { + var ret MicrosoftTeamsApiHandleInfoResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponse) GetDataOk() (*MicrosoftTeamsApiHandleInfoResponseData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponse) HasData() bool { + return o != nil && o.Data != nil +} + +// SetData gets a reference to the given MicrosoftTeamsApiHandleInfoResponseData and assigns it to the Data field. +func (o *MicrosoftTeamsApiHandleInfoResponse) SetData(v MicrosoftTeamsApiHandleInfoResponseData) { + o.Data = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsApiHandleInfoResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsApiHandleInfoResponse) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data *MicrosoftTeamsApiHandleInfoResponseData `json:"data,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + + hasInvalidField := false + if all.Data != nil && all.Data.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Data = all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response_attributes.go new file mode 100644 index 0000000000..925771e07a --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response_attributes.go @@ -0,0 +1,312 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandleInfoResponseAttributes Handle attributes. +type MicrosoftTeamsApiHandleInfoResponseAttributes struct { + // Channel id. + ChannelId *string `json:"channel_id,omitempty"` + // Channel name. + ChannelName *string `json:"channel_name,omitempty"` + // Handle name. + Name *string `json:"name,omitempty"` + // Team id. + TeamId *string `json:"team_id,omitempty"` + // Team name. + TeamName *string `json:"team_name,omitempty"` + // Tenant id. + TenantId *string `json:"tenant_id,omitempty"` + // Tenant name. + TenantName *string `json:"tenant_name,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsApiHandleInfoResponseAttributes instantiates a new MicrosoftTeamsApiHandleInfoResponseAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsApiHandleInfoResponseAttributes() *MicrosoftTeamsApiHandleInfoResponseAttributes { + this := MicrosoftTeamsApiHandleInfoResponseAttributes{} + return &this +} + +// NewMicrosoftTeamsApiHandleInfoResponseAttributesWithDefaults instantiates a new MicrosoftTeamsApiHandleInfoResponseAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsApiHandleInfoResponseAttributesWithDefaults() *MicrosoftTeamsApiHandleInfoResponseAttributes { + this := MicrosoftTeamsApiHandleInfoResponseAttributes{} + return &this +} + +// GetChannelId returns the ChannelId field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetChannelId() string { + if o == nil || o.ChannelId == nil { + var ret string + return ret + } + return *o.ChannelId +} + +// GetChannelIdOk returns a tuple with the ChannelId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetChannelIdOk() (*string, bool) { + if o == nil || o.ChannelId == nil { + return nil, false + } + return o.ChannelId, true +} + +// HasChannelId returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) HasChannelId() bool { + return o != nil && o.ChannelId != nil +} + +// SetChannelId gets a reference to the given string and assigns it to the ChannelId field. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) SetChannelId(v string) { + o.ChannelId = &v +} + +// GetChannelName returns the ChannelName field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetChannelName() string { + if o == nil || o.ChannelName == nil { + var ret string + return ret + } + return *o.ChannelName +} + +// GetChannelNameOk returns a tuple with the ChannelName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetChannelNameOk() (*string, bool) { + if o == nil || o.ChannelName == nil { + return nil, false + } + return o.ChannelName, true +} + +// HasChannelName returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) HasChannelName() bool { + return o != nil && o.ChannelName != nil +} + +// SetChannelName gets a reference to the given string and assigns it to the ChannelName field. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) SetChannelName(v string) { + o.ChannelName = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) SetName(v string) { + o.Name = &v +} + +// GetTeamId returns the TeamId field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetTeamId() string { + if o == nil || o.TeamId == nil { + var ret string + return ret + } + return *o.TeamId +} + +// GetTeamIdOk returns a tuple with the TeamId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetTeamIdOk() (*string, bool) { + if o == nil || o.TeamId == nil { + return nil, false + } + return o.TeamId, true +} + +// HasTeamId returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) HasTeamId() bool { + return o != nil && o.TeamId != nil +} + +// SetTeamId gets a reference to the given string and assigns it to the TeamId field. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) SetTeamId(v string) { + o.TeamId = &v +} + +// GetTeamName returns the TeamName field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetTeamName() string { + if o == nil || o.TeamName == nil { + var ret string + return ret + } + return *o.TeamName +} + +// GetTeamNameOk returns a tuple with the TeamName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetTeamNameOk() (*string, bool) { + if o == nil || o.TeamName == nil { + return nil, false + } + return o.TeamName, true +} + +// HasTeamName returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) HasTeamName() bool { + return o != nil && o.TeamName != nil +} + +// SetTeamName gets a reference to the given string and assigns it to the TeamName field. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) SetTeamName(v string) { + o.TeamName = &v +} + +// GetTenantId returns the TenantId field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetTenantId() string { + if o == nil || o.TenantId == nil { + var ret string + return ret + } + return *o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetTenantIdOk() (*string, bool) { + if o == nil || o.TenantId == nil { + return nil, false + } + return o.TenantId, true +} + +// HasTenantId returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) HasTenantId() bool { + return o != nil && o.TenantId != nil +} + +// SetTenantId gets a reference to the given string and assigns it to the TenantId field. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) SetTenantId(v string) { + o.TenantId = &v +} + +// GetTenantName returns the TenantName field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetTenantName() string { + if o == nil || o.TenantName == nil { + var ret string + return ret + } + return *o.TenantName +} + +// GetTenantNameOk returns a tuple with the TenantName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) GetTenantNameOk() (*string, bool) { + if o == nil || o.TenantName == nil { + return nil, false + } + return o.TenantName, true +} + +// HasTenantName returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) HasTenantName() bool { + return o != nil && o.TenantName != nil +} + +// SetTenantName gets a reference to the given string and assigns it to the TenantName field. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) SetTenantName(v string) { + o.TenantName = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsApiHandleInfoResponseAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.ChannelId != nil { + toSerialize["channel_id"] = o.ChannelId + } + if o.ChannelName != nil { + toSerialize["channel_name"] = o.ChannelName + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.TeamId != nil { + toSerialize["team_id"] = o.TeamId + } + if o.TeamName != nil { + toSerialize["team_name"] = o.TeamName + } + if o.TenantId != nil { + toSerialize["tenant_id"] = o.TenantId + } + if o.TenantName != nil { + toSerialize["tenant_name"] = o.TenantName + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsApiHandleInfoResponseAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ChannelId *string `json:"channel_id,omitempty"` + ChannelName *string `json:"channel_name,omitempty"` + Name *string `json:"name,omitempty"` + TeamId *string `json:"team_id,omitempty"` + TeamName *string `json:"team_name,omitempty"` + TenantId *string `json:"tenant_id,omitempty"` + TenantName *string `json:"tenant_name,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"channel_id", "channel_name", "name", "team_id", "team_name", "tenant_id", "tenant_name"}) + } else { + return err + } + o.ChannelId = all.ChannelId + o.ChannelName = all.ChannelName + o.Name = all.Name + o.TeamId = all.TeamId + o.TeamName = all.TeamName + o.TenantId = all.TenantId + o.TenantName = all.TenantName + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response_data.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response_data.go new file mode 100644 index 0000000000..40e033f3b9 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_response_data.go @@ -0,0 +1,189 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandleInfoResponseData Handle data from a response. +type MicrosoftTeamsApiHandleInfoResponseData struct { + // Handle attributes. + Attributes *MicrosoftTeamsApiHandleInfoResponseAttributes `json:"attributes,omitempty"` + // The ID of the handle. + Id *string `json:"id,omitempty"` + // Handle resource type. + Type *MicrosoftTeamsApiHandleInfoType `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsApiHandleInfoResponseData instantiates a new MicrosoftTeamsApiHandleInfoResponseData object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsApiHandleInfoResponseData() *MicrosoftTeamsApiHandleInfoResponseData { + this := MicrosoftTeamsApiHandleInfoResponseData{} + var typeVar MicrosoftTeamsApiHandleInfoType = MICROSOFTTEAMSAPIHANDLEINFOTYPE_MS_TEAMS_HANDLE_INFO + this.Type = &typeVar + return &this +} + +// NewMicrosoftTeamsApiHandleInfoResponseDataWithDefaults instantiates a new MicrosoftTeamsApiHandleInfoResponseData object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsApiHandleInfoResponseDataWithDefaults() *MicrosoftTeamsApiHandleInfoResponseData { + this := MicrosoftTeamsApiHandleInfoResponseData{} + var typeVar MicrosoftTeamsApiHandleInfoType = MICROSOFTTEAMSAPIHANDLEINFOTYPE_MS_TEAMS_HANDLE_INFO + this.Type = &typeVar + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseData) GetAttributes() MicrosoftTeamsApiHandleInfoResponseAttributes { + if o == nil || o.Attributes == nil { + var ret MicrosoftTeamsApiHandleInfoResponseAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseData) GetAttributesOk() (*MicrosoftTeamsApiHandleInfoResponseAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseData) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given MicrosoftTeamsApiHandleInfoResponseAttributes and assigns it to the Attributes field. +func (o *MicrosoftTeamsApiHandleInfoResponseData) SetAttributes(v MicrosoftTeamsApiHandleInfoResponseAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseData) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseData) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseData) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *MicrosoftTeamsApiHandleInfoResponseData) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleInfoResponseData) GetType() MicrosoftTeamsApiHandleInfoType { + if o == nil || o.Type == nil { + var ret MicrosoftTeamsApiHandleInfoType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseData) GetTypeOk() (*MicrosoftTeamsApiHandleInfoType, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleInfoResponseData) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given MicrosoftTeamsApiHandleInfoType and assigns it to the Type field. +func (o *MicrosoftTeamsApiHandleInfoResponseData) SetType(v MicrosoftTeamsApiHandleInfoType) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsApiHandleInfoResponseData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsApiHandleInfoResponseData) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *MicrosoftTeamsApiHandleInfoResponseAttributes `json:"attributes,omitempty"` + Id *string `json:"id,omitempty"` + Type *MicrosoftTeamsApiHandleInfoType `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Id = all.Id + if all.Type != nil && !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_type.go new file mode 100644 index 0000000000..3e112052f9 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_info_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandleInfoType Handle resource type. +type MicrosoftTeamsApiHandleInfoType string + +// List of MicrosoftTeamsApiHandleInfoType. +const ( + MICROSOFTTEAMSAPIHANDLEINFOTYPE_MS_TEAMS_HANDLE_INFO MicrosoftTeamsApiHandleInfoType = "ms-teams-handle-info" +) + +var allowedMicrosoftTeamsApiHandleInfoTypeEnumValues = []MicrosoftTeamsApiHandleInfoType{ + MICROSOFTTEAMSAPIHANDLEINFOTYPE_MS_TEAMS_HANDLE_INFO, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *MicrosoftTeamsApiHandleInfoType) GetAllowedValues() []MicrosoftTeamsApiHandleInfoType { + return allowedMicrosoftTeamsApiHandleInfoTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *MicrosoftTeamsApiHandleInfoType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = MicrosoftTeamsApiHandleInfoType(value) + return nil +} + +// NewMicrosoftTeamsApiHandleInfoTypeFromValue returns a pointer to a valid MicrosoftTeamsApiHandleInfoType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewMicrosoftTeamsApiHandleInfoTypeFromValue(v string) (*MicrosoftTeamsApiHandleInfoType, error) { + ev := MicrosoftTeamsApiHandleInfoType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for MicrosoftTeamsApiHandleInfoType: valid values are %v", v, allowedMicrosoftTeamsApiHandleInfoTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v MicrosoftTeamsApiHandleInfoType) IsValid() bool { + for _, existing := range allowedMicrosoftTeamsApiHandleInfoTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to MicrosoftTeamsApiHandleInfoType value. +func (v MicrosoftTeamsApiHandleInfoType) Ptr() *MicrosoftTeamsApiHandleInfoType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_request_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_request_attributes.go new file mode 100644 index 0000000000..8b6d6fec79 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_request_attributes.go @@ -0,0 +1,197 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandleRequestAttributes Handle attributes. +type MicrosoftTeamsApiHandleRequestAttributes struct { + // Channel id. + ChannelId string `json:"channel_id"` + // Handle name. + Name string `json:"name"` + // Team id. + TeamId string `json:"team_id"` + // Tenant id. + TenantId string `json:"tenant_id"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsApiHandleRequestAttributes instantiates a new MicrosoftTeamsApiHandleRequestAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsApiHandleRequestAttributes(channelId string, name string, teamId string, tenantId string) *MicrosoftTeamsApiHandleRequestAttributes { + this := MicrosoftTeamsApiHandleRequestAttributes{} + this.ChannelId = channelId + this.Name = name + this.TeamId = teamId + this.TenantId = tenantId + return &this +} + +// NewMicrosoftTeamsApiHandleRequestAttributesWithDefaults instantiates a new MicrosoftTeamsApiHandleRequestAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsApiHandleRequestAttributesWithDefaults() *MicrosoftTeamsApiHandleRequestAttributes { + this := MicrosoftTeamsApiHandleRequestAttributes{} + return &this +} + +// GetChannelId returns the ChannelId field value. +func (o *MicrosoftTeamsApiHandleRequestAttributes) GetChannelId() string { + if o == nil { + var ret string + return ret + } + return o.ChannelId +} + +// GetChannelIdOk returns a tuple with the ChannelId field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleRequestAttributes) GetChannelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChannelId, true +} + +// SetChannelId sets field value. +func (o *MicrosoftTeamsApiHandleRequestAttributes) SetChannelId(v string) { + o.ChannelId = v +} + +// GetName returns the Name field value. +func (o *MicrosoftTeamsApiHandleRequestAttributes) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleRequestAttributes) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *MicrosoftTeamsApiHandleRequestAttributes) SetName(v string) { + o.Name = v +} + +// GetTeamId returns the TeamId field value. +func (o *MicrosoftTeamsApiHandleRequestAttributes) GetTeamId() string { + if o == nil { + var ret string + return ret + } + return o.TeamId +} + +// GetTeamIdOk returns a tuple with the TeamId field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleRequestAttributes) GetTeamIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TeamId, true +} + +// SetTeamId sets field value. +func (o *MicrosoftTeamsApiHandleRequestAttributes) SetTeamId(v string) { + o.TeamId = v +} + +// GetTenantId returns the TenantId field value. +func (o *MicrosoftTeamsApiHandleRequestAttributes) GetTenantId() string { + if o == nil { + var ret string + return ret + } + return o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleRequestAttributes) GetTenantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TenantId, true +} + +// SetTenantId sets field value. +func (o *MicrosoftTeamsApiHandleRequestAttributes) SetTenantId(v string) { + o.TenantId = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsApiHandleRequestAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["channel_id"] = o.ChannelId + toSerialize["name"] = o.Name + toSerialize["team_id"] = o.TeamId + toSerialize["tenant_id"] = o.TenantId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsApiHandleRequestAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ChannelId *string `json:"channel_id"` + Name *string `json:"name"` + TeamId *string `json:"team_id"` + TenantId *string `json:"tenant_id"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.ChannelId == nil { + return fmt.Errorf("required field channel_id missing") + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + if all.TeamId == nil { + return fmt.Errorf("required field team_id missing") + } + if all.TenantId == nil { + return fmt.Errorf("required field tenant_id missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"channel_id", "name", "team_id", "tenant_id"}) + } else { + return err + } + o.ChannelId = *all.ChannelId + o.Name = *all.Name + o.TeamId = *all.TeamId + o.TenantId = *all.TenantId + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_request_data.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_request_data.go new file mode 100644 index 0000000000..c9a592991d --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_request_data.go @@ -0,0 +1,148 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandleRequestData Handle data from a response. +type MicrosoftTeamsApiHandleRequestData struct { + // Handle attributes. + Attributes MicrosoftTeamsApiHandleRequestAttributes `json:"attributes"` + // Specifies the handle resource type. + Type MicrosoftTeamsApiHandleType `json:"type"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsApiHandleRequestData instantiates a new MicrosoftTeamsApiHandleRequestData object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsApiHandleRequestData(attributes MicrosoftTeamsApiHandleRequestAttributes, typeVar MicrosoftTeamsApiHandleType) *MicrosoftTeamsApiHandleRequestData { + this := MicrosoftTeamsApiHandleRequestData{} + this.Attributes = attributes + this.Type = typeVar + return &this +} + +// NewMicrosoftTeamsApiHandleRequestDataWithDefaults instantiates a new MicrosoftTeamsApiHandleRequestData object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsApiHandleRequestDataWithDefaults() *MicrosoftTeamsApiHandleRequestData { + this := MicrosoftTeamsApiHandleRequestData{} + var typeVar MicrosoftTeamsApiHandleType = MICROSOFTTEAMSAPIHANDLETYPE_HANDLE + this.Type = typeVar + return &this +} + +// GetAttributes returns the Attributes field value. +func (o *MicrosoftTeamsApiHandleRequestData) GetAttributes() MicrosoftTeamsApiHandleRequestAttributes { + if o == nil { + var ret MicrosoftTeamsApiHandleRequestAttributes + return ret + } + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleRequestData) GetAttributesOk() (*MicrosoftTeamsApiHandleRequestAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value. +func (o *MicrosoftTeamsApiHandleRequestData) SetAttributes(v MicrosoftTeamsApiHandleRequestAttributes) { + o.Attributes = v +} + +// GetType returns the Type field value. +func (o *MicrosoftTeamsApiHandleRequestData) GetType() MicrosoftTeamsApiHandleType { + if o == nil { + var ret MicrosoftTeamsApiHandleType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleRequestData) GetTypeOk() (*MicrosoftTeamsApiHandleType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *MicrosoftTeamsApiHandleRequestData) SetType(v MicrosoftTeamsApiHandleType) { + o.Type = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsApiHandleRequestData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["attributes"] = o.Attributes + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsApiHandleRequestData) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *MicrosoftTeamsApiHandleRequestAttributes `json:"attributes"` + Type *MicrosoftTeamsApiHandleType `json:"type"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Attributes == nil { + return fmt.Errorf("required field attributes missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = *all.Attributes + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_response_data.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_response_data.go new file mode 100644 index 0000000000..9a5d6b1954 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_response_data.go @@ -0,0 +1,189 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandleResponseData Handle data from a response. +type MicrosoftTeamsApiHandleResponseData struct { + // Handle attributes. + Attributes *MicrosoftTeamsApiHandleAttributes `json:"attributes,omitempty"` + // The ID of the handle. + Id *string `json:"id,omitempty"` + // Specifies the handle resource type. + Type *MicrosoftTeamsApiHandleType `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsApiHandleResponseData instantiates a new MicrosoftTeamsApiHandleResponseData object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsApiHandleResponseData() *MicrosoftTeamsApiHandleResponseData { + this := MicrosoftTeamsApiHandleResponseData{} + var typeVar MicrosoftTeamsApiHandleType = MICROSOFTTEAMSAPIHANDLETYPE_HANDLE + this.Type = &typeVar + return &this +} + +// NewMicrosoftTeamsApiHandleResponseDataWithDefaults instantiates a new MicrosoftTeamsApiHandleResponseData object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsApiHandleResponseDataWithDefaults() *MicrosoftTeamsApiHandleResponseData { + this := MicrosoftTeamsApiHandleResponseData{} + var typeVar MicrosoftTeamsApiHandleType = MICROSOFTTEAMSAPIHANDLETYPE_HANDLE + this.Type = &typeVar + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleResponseData) GetAttributes() MicrosoftTeamsApiHandleAttributes { + if o == nil || o.Attributes == nil { + var ret MicrosoftTeamsApiHandleAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleResponseData) GetAttributesOk() (*MicrosoftTeamsApiHandleAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleResponseData) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given MicrosoftTeamsApiHandleAttributes and assigns it to the Attributes field. +func (o *MicrosoftTeamsApiHandleResponseData) SetAttributes(v MicrosoftTeamsApiHandleAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleResponseData) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleResponseData) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleResponseData) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *MicrosoftTeamsApiHandleResponseData) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MicrosoftTeamsApiHandleResponseData) GetType() MicrosoftTeamsApiHandleType { + if o == nil || o.Type == nil { + var ret MicrosoftTeamsApiHandleType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandleResponseData) GetTypeOk() (*MicrosoftTeamsApiHandleType, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MicrosoftTeamsApiHandleResponseData) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given MicrosoftTeamsApiHandleType and assigns it to the Type field. +func (o *MicrosoftTeamsApiHandleResponseData) SetType(v MicrosoftTeamsApiHandleType) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsApiHandleResponseData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsApiHandleResponseData) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *MicrosoftTeamsApiHandleAttributes `json:"attributes,omitempty"` + Id *string `json:"id,omitempty"` + Type *MicrosoftTeamsApiHandleType `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Id = all.Id + if all.Type != nil && !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_type.go new file mode 100644 index 0000000000..12fb4ea357 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handle_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandleType Specifies the handle resource type. +type MicrosoftTeamsApiHandleType string + +// List of MicrosoftTeamsApiHandleType. +const ( + MICROSOFTTEAMSAPIHANDLETYPE_HANDLE MicrosoftTeamsApiHandleType = "handle" +) + +var allowedMicrosoftTeamsApiHandleTypeEnumValues = []MicrosoftTeamsApiHandleType{ + MICROSOFTTEAMSAPIHANDLETYPE_HANDLE, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *MicrosoftTeamsApiHandleType) GetAllowedValues() []MicrosoftTeamsApiHandleType { + return allowedMicrosoftTeamsApiHandleTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *MicrosoftTeamsApiHandleType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = MicrosoftTeamsApiHandleType(value) + return nil +} + +// NewMicrosoftTeamsApiHandleTypeFromValue returns a pointer to a valid MicrosoftTeamsApiHandleType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewMicrosoftTeamsApiHandleTypeFromValue(v string) (*MicrosoftTeamsApiHandleType, error) { + ev := MicrosoftTeamsApiHandleType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for MicrosoftTeamsApiHandleType: valid values are %v", v, allowedMicrosoftTeamsApiHandleTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v MicrosoftTeamsApiHandleType) IsValid() bool { + for _, existing := range allowedMicrosoftTeamsApiHandleTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to MicrosoftTeamsApiHandleType value. +func (v MicrosoftTeamsApiHandleType) Ptr() *MicrosoftTeamsApiHandleType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handles_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handles_response.go new file mode 100644 index 0000000000..df5a0d9ee5 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_api_handles_response.go @@ -0,0 +1,101 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsApiHandlesResponse Response with a list of handles. +type MicrosoftTeamsApiHandlesResponse struct { + // An array of handles. + Data []MicrosoftTeamsApiHandleInfoResponseData `json:"data"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsApiHandlesResponse instantiates a new MicrosoftTeamsApiHandlesResponse object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsApiHandlesResponse(data []MicrosoftTeamsApiHandleInfoResponseData) *MicrosoftTeamsApiHandlesResponse { + this := MicrosoftTeamsApiHandlesResponse{} + this.Data = data + return &this +} + +// NewMicrosoftTeamsApiHandlesResponseWithDefaults instantiates a new MicrosoftTeamsApiHandlesResponse object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsApiHandlesResponseWithDefaults() *MicrosoftTeamsApiHandlesResponse { + this := MicrosoftTeamsApiHandlesResponse{} + return &this +} + +// GetData returns the Data field value. +func (o *MicrosoftTeamsApiHandlesResponse) GetData() []MicrosoftTeamsApiHandleInfoResponseData { + if o == nil { + var ret []MicrosoftTeamsApiHandleInfoResponseData + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsApiHandlesResponse) GetDataOk() (*[]MicrosoftTeamsApiHandleInfoResponseData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value. +func (o *MicrosoftTeamsApiHandlesResponse) SetData(v []MicrosoftTeamsApiHandleInfoResponseData) { + o.Data = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsApiHandlesResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["data"] = o.Data + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsApiHandlesResponse) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data *[]MicrosoftTeamsApiHandleInfoResponseData `json:"data"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Data == nil { + return fmt.Errorf("required field data missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + o.Data = *all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_response_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_response_attributes.go new file mode 100644 index 0000000000..54ff51ab03 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_response_attributes.go @@ -0,0 +1,172 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsChannelInfoResponseAttributes Channel attributes. +type MicrosoftTeamsChannelInfoResponseAttributes struct { + // Indicates if this is the primary channel. + IsPrimary *bool `json:"is_primary,omitempty"` + // Team id. + TeamId *string `json:"team_id,omitempty"` + // Tenant id. + TenantId *string `json:"tenant_id,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsChannelInfoResponseAttributes instantiates a new MicrosoftTeamsChannelInfoResponseAttributes object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsChannelInfoResponseAttributes() *MicrosoftTeamsChannelInfoResponseAttributes { + this := MicrosoftTeamsChannelInfoResponseAttributes{} + return &this +} + +// NewMicrosoftTeamsChannelInfoResponseAttributesWithDefaults instantiates a new MicrosoftTeamsChannelInfoResponseAttributes object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsChannelInfoResponseAttributesWithDefaults() *MicrosoftTeamsChannelInfoResponseAttributes { + this := MicrosoftTeamsChannelInfoResponseAttributes{} + return &this +} + +// GetIsPrimary returns the IsPrimary field value if set, zero value otherwise. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) GetIsPrimary() bool { + if o == nil || o.IsPrimary == nil { + var ret bool + return ret + } + return *o.IsPrimary +} + +// GetIsPrimaryOk returns a tuple with the IsPrimary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) GetIsPrimaryOk() (*bool, bool) { + if o == nil || o.IsPrimary == nil { + return nil, false + } + return o.IsPrimary, true +} + +// HasIsPrimary returns a boolean if a field has been set. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) HasIsPrimary() bool { + return o != nil && o.IsPrimary != nil +} + +// SetIsPrimary gets a reference to the given bool and assigns it to the IsPrimary field. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) SetIsPrimary(v bool) { + o.IsPrimary = &v +} + +// GetTeamId returns the TeamId field value if set, zero value otherwise. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) GetTeamId() string { + if o == nil || o.TeamId == nil { + var ret string + return ret + } + return *o.TeamId +} + +// GetTeamIdOk returns a tuple with the TeamId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) GetTeamIdOk() (*string, bool) { + if o == nil || o.TeamId == nil { + return nil, false + } + return o.TeamId, true +} + +// HasTeamId returns a boolean if a field has been set. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) HasTeamId() bool { + return o != nil && o.TeamId != nil +} + +// SetTeamId gets a reference to the given string and assigns it to the TeamId field. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) SetTeamId(v string) { + o.TeamId = &v +} + +// GetTenantId returns the TenantId field value if set, zero value otherwise. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) GetTenantId() string { + if o == nil || o.TenantId == nil { + var ret string + return ret + } + return *o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) GetTenantIdOk() (*string, bool) { + if o == nil || o.TenantId == nil { + return nil, false + } + return o.TenantId, true +} + +// HasTenantId returns a boolean if a field has been set. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) HasTenantId() bool { + return o != nil && o.TenantId != nil +} + +// SetTenantId gets a reference to the given string and assigns it to the TenantId field. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) SetTenantId(v string) { + o.TenantId = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsChannelInfoResponseAttributes) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.IsPrimary != nil { + toSerialize["is_primary"] = o.IsPrimary + } + if o.TeamId != nil { + toSerialize["team_id"] = o.TeamId + } + if o.TenantId != nil { + toSerialize["tenant_id"] = o.TenantId + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsChannelInfoResponseAttributes) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + IsPrimary *bool `json:"is_primary,omitempty"` + TeamId *string `json:"team_id,omitempty"` + TenantId *string `json:"tenant_id,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"is_primary", "team_id", "tenant_id"}) + } else { + return err + } + o.IsPrimary = all.IsPrimary + o.TeamId = all.TeamId + o.TenantId = all.TenantId + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_response_data.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_response_data.go new file mode 100644 index 0000000000..4ec6122beb --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_response_data.go @@ -0,0 +1,189 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsChannelInfoResponseData Channel data from a response. +type MicrosoftTeamsChannelInfoResponseData struct { + // Channel attributes. + Attributes *MicrosoftTeamsChannelInfoResponseAttributes `json:"attributes,omitempty"` + // The ID of the channel. + Id *string `json:"id,omitempty"` + // Channel info resource type. + Type *MicrosoftTeamsChannelInfoType `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsChannelInfoResponseData instantiates a new MicrosoftTeamsChannelInfoResponseData object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsChannelInfoResponseData() *MicrosoftTeamsChannelInfoResponseData { + this := MicrosoftTeamsChannelInfoResponseData{} + var typeVar MicrosoftTeamsChannelInfoType = MICROSOFTTEAMSCHANNELINFOTYPE_MS_TEAMS_CHANNEL_INFO + this.Type = &typeVar + return &this +} + +// NewMicrosoftTeamsChannelInfoResponseDataWithDefaults instantiates a new MicrosoftTeamsChannelInfoResponseData object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsChannelInfoResponseDataWithDefaults() *MicrosoftTeamsChannelInfoResponseData { + this := MicrosoftTeamsChannelInfoResponseData{} + var typeVar MicrosoftTeamsChannelInfoType = MICROSOFTTEAMSCHANNELINFOTYPE_MS_TEAMS_CHANNEL_INFO + this.Type = &typeVar + return &this +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *MicrosoftTeamsChannelInfoResponseData) GetAttributes() MicrosoftTeamsChannelInfoResponseAttributes { + if o == nil || o.Attributes == nil { + var ret MicrosoftTeamsChannelInfoResponseAttributes + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsChannelInfoResponseData) GetAttributesOk() (*MicrosoftTeamsChannelInfoResponseAttributes, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *MicrosoftTeamsChannelInfoResponseData) HasAttributes() bool { + return o != nil && o.Attributes != nil +} + +// SetAttributes gets a reference to the given MicrosoftTeamsChannelInfoResponseAttributes and assigns it to the Attributes field. +func (o *MicrosoftTeamsChannelInfoResponseData) SetAttributes(v MicrosoftTeamsChannelInfoResponseAttributes) { + o.Attributes = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *MicrosoftTeamsChannelInfoResponseData) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsChannelInfoResponseData) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *MicrosoftTeamsChannelInfoResponseData) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *MicrosoftTeamsChannelInfoResponseData) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MicrosoftTeamsChannelInfoResponseData) GetType() MicrosoftTeamsChannelInfoType { + if o == nil || o.Type == nil { + var ret MicrosoftTeamsChannelInfoType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsChannelInfoResponseData) GetTypeOk() (*MicrosoftTeamsChannelInfoType, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *MicrosoftTeamsChannelInfoResponseData) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given MicrosoftTeamsChannelInfoType and assigns it to the Type field. +func (o *MicrosoftTeamsChannelInfoResponseData) SetType(v MicrosoftTeamsChannelInfoType) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsChannelInfoResponseData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsChannelInfoResponseData) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *MicrosoftTeamsChannelInfoResponseAttributes `json:"attributes,omitempty"` + Id *string `json:"id,omitempty"` + Type *MicrosoftTeamsChannelInfoType `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = all.Attributes + o.Id = all.Id + if all.Type != nil && !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_type.go new file mode 100644 index 0000000000..eb224f4c05 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_channel_info_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsChannelInfoType Channel info resource type. +type MicrosoftTeamsChannelInfoType string + +// List of MicrosoftTeamsChannelInfoType. +const ( + MICROSOFTTEAMSCHANNELINFOTYPE_MS_TEAMS_CHANNEL_INFO MicrosoftTeamsChannelInfoType = "ms-teams-channel-info" +) + +var allowedMicrosoftTeamsChannelInfoTypeEnumValues = []MicrosoftTeamsChannelInfoType{ + MICROSOFTTEAMSCHANNELINFOTYPE_MS_TEAMS_CHANNEL_INFO, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *MicrosoftTeamsChannelInfoType) GetAllowedValues() []MicrosoftTeamsChannelInfoType { + return allowedMicrosoftTeamsChannelInfoTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *MicrosoftTeamsChannelInfoType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = MicrosoftTeamsChannelInfoType(value) + return nil +} + +// NewMicrosoftTeamsChannelInfoTypeFromValue returns a pointer to a valid MicrosoftTeamsChannelInfoType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewMicrosoftTeamsChannelInfoTypeFromValue(v string) (*MicrosoftTeamsChannelInfoType, error) { + ev := MicrosoftTeamsChannelInfoType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for MicrosoftTeamsChannelInfoType: valid values are %v", v, allowedMicrosoftTeamsChannelInfoTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v MicrosoftTeamsChannelInfoType) IsValid() bool { + for _, existing := range allowedMicrosoftTeamsChannelInfoTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to MicrosoftTeamsChannelInfoType value. +func (v MicrosoftTeamsChannelInfoType) Ptr() *MicrosoftTeamsChannelInfoType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_create_api_handle_request.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_create_api_handle_request.go new file mode 100644 index 0000000000..a712894223 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_create_api_handle_request.go @@ -0,0 +1,110 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsCreateApiHandleRequest Create handle request. +type MicrosoftTeamsCreateApiHandleRequest struct { + // Handle data from a response. + Data MicrosoftTeamsApiHandleRequestData `json:"data"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsCreateApiHandleRequest instantiates a new MicrosoftTeamsCreateApiHandleRequest object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsCreateApiHandleRequest(data MicrosoftTeamsApiHandleRequestData) *MicrosoftTeamsCreateApiHandleRequest { + this := MicrosoftTeamsCreateApiHandleRequest{} + this.Data = data + return &this +} + +// NewMicrosoftTeamsCreateApiHandleRequestWithDefaults instantiates a new MicrosoftTeamsCreateApiHandleRequest object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsCreateApiHandleRequestWithDefaults() *MicrosoftTeamsCreateApiHandleRequest { + this := MicrosoftTeamsCreateApiHandleRequest{} + return &this +} + +// GetData returns the Data field value. +func (o *MicrosoftTeamsCreateApiHandleRequest) GetData() MicrosoftTeamsApiHandleRequestData { + if o == nil { + var ret MicrosoftTeamsApiHandleRequestData + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsCreateApiHandleRequest) GetDataOk() (*MicrosoftTeamsApiHandleRequestData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value. +func (o *MicrosoftTeamsCreateApiHandleRequest) SetData(v MicrosoftTeamsApiHandleRequestData) { + o.Data = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsCreateApiHandleRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["data"] = o.Data + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsCreateApiHandleRequest) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data *MicrosoftTeamsApiHandleRequestData `json:"data"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Data == nil { + return fmt.Errorf("required field data missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + + hasInvalidField := false + if all.Data.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Data = *all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_create_api_handle_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_create_api_handle_response.go new file mode 100644 index 0000000000..e7a79477b6 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_create_api_handle_response.go @@ -0,0 +1,110 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsCreateApiHandleResponse Response of a handle. +type MicrosoftTeamsCreateApiHandleResponse struct { + // Handle data from a response. + Data MicrosoftTeamsApiHandleResponseData `json:"data"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsCreateApiHandleResponse instantiates a new MicrosoftTeamsCreateApiHandleResponse object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsCreateApiHandleResponse(data MicrosoftTeamsApiHandleResponseData) *MicrosoftTeamsCreateApiHandleResponse { + this := MicrosoftTeamsCreateApiHandleResponse{} + this.Data = data + return &this +} + +// NewMicrosoftTeamsCreateApiHandleResponseWithDefaults instantiates a new MicrosoftTeamsCreateApiHandleResponse object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsCreateApiHandleResponseWithDefaults() *MicrosoftTeamsCreateApiHandleResponse { + this := MicrosoftTeamsCreateApiHandleResponse{} + return &this +} + +// GetData returns the Data field value. +func (o *MicrosoftTeamsCreateApiHandleResponse) GetData() MicrosoftTeamsApiHandleResponseData { + if o == nil { + var ret MicrosoftTeamsApiHandleResponseData + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsCreateApiHandleResponse) GetDataOk() (*MicrosoftTeamsApiHandleResponseData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value. +func (o *MicrosoftTeamsCreateApiHandleResponse) SetData(v MicrosoftTeamsApiHandleResponseData) { + o.Data = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsCreateApiHandleResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["data"] = o.Data + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsCreateApiHandleResponse) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data *MicrosoftTeamsApiHandleResponseData `json:"data"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Data == nil { + return fmt.Errorf("required field data missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + + hasInvalidField := false + if all.Data.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Data = *all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_get_channel_by_name_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_get_channel_by_name_response.go new file mode 100644 index 0000000000..943d8f7a52 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_get_channel_by_name_response.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsGetChannelByNameResponse Response with channel, team, and tenant ID information. +type MicrosoftTeamsGetChannelByNameResponse struct { + // Channel data from a response. + Data *MicrosoftTeamsChannelInfoResponseData `json:"data,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsGetChannelByNameResponse instantiates a new MicrosoftTeamsGetChannelByNameResponse object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsGetChannelByNameResponse() *MicrosoftTeamsGetChannelByNameResponse { + this := MicrosoftTeamsGetChannelByNameResponse{} + return &this +} + +// NewMicrosoftTeamsGetChannelByNameResponseWithDefaults instantiates a new MicrosoftTeamsGetChannelByNameResponse object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsGetChannelByNameResponseWithDefaults() *MicrosoftTeamsGetChannelByNameResponse { + this := MicrosoftTeamsGetChannelByNameResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *MicrosoftTeamsGetChannelByNameResponse) GetData() MicrosoftTeamsChannelInfoResponseData { + if o == nil || o.Data == nil { + var ret MicrosoftTeamsChannelInfoResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsGetChannelByNameResponse) GetDataOk() (*MicrosoftTeamsChannelInfoResponseData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *MicrosoftTeamsGetChannelByNameResponse) HasData() bool { + return o != nil && o.Data != nil +} + +// SetData gets a reference to the given MicrosoftTeamsChannelInfoResponseData and assigns it to the Data field. +func (o *MicrosoftTeamsGetChannelByNameResponse) SetData(v MicrosoftTeamsChannelInfoResponseData) { + o.Data = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsGetChannelByNameResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsGetChannelByNameResponse) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data *MicrosoftTeamsChannelInfoResponseData `json:"data,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + + hasInvalidField := false + if all.Data != nil && all.Data.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Data = all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_update_api_handle_request.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_update_api_handle_request.go new file mode 100644 index 0000000000..8c7b4b79dc --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_update_api_handle_request.go @@ -0,0 +1,110 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsUpdateApiHandleRequest Update handle request. +type MicrosoftTeamsUpdateApiHandleRequest struct { + // Handle data from a response. + Data MicrosoftTeamsUpdateApiHandleRequestData `json:"data"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsUpdateApiHandleRequest instantiates a new MicrosoftTeamsUpdateApiHandleRequest object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsUpdateApiHandleRequest(data MicrosoftTeamsUpdateApiHandleRequestData) *MicrosoftTeamsUpdateApiHandleRequest { + this := MicrosoftTeamsUpdateApiHandleRequest{} + this.Data = data + return &this +} + +// NewMicrosoftTeamsUpdateApiHandleRequestWithDefaults instantiates a new MicrosoftTeamsUpdateApiHandleRequest object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsUpdateApiHandleRequestWithDefaults() *MicrosoftTeamsUpdateApiHandleRequest { + this := MicrosoftTeamsUpdateApiHandleRequest{} + return &this +} + +// GetData returns the Data field value. +func (o *MicrosoftTeamsUpdateApiHandleRequest) GetData() MicrosoftTeamsUpdateApiHandleRequestData { + if o == nil { + var ret MicrosoftTeamsUpdateApiHandleRequestData + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsUpdateApiHandleRequest) GetDataOk() (*MicrosoftTeamsUpdateApiHandleRequestData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value. +func (o *MicrosoftTeamsUpdateApiHandleRequest) SetData(v MicrosoftTeamsUpdateApiHandleRequestData) { + o.Data = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsUpdateApiHandleRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["data"] = o.Data + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsUpdateApiHandleRequest) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data *MicrosoftTeamsUpdateApiHandleRequestData `json:"data"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Data == nil { + return fmt.Errorf("required field data missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data"}) + } else { + return err + } + + hasInvalidField := false + if all.Data.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Data = *all.Data + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_update_api_handle_request_data.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_update_api_handle_request_data.go new file mode 100644 index 0000000000..8e808f1c82 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_microsoft_teams_update_api_handle_request_data.go @@ -0,0 +1,148 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// MicrosoftTeamsUpdateApiHandleRequestData Handle data from a response. +type MicrosoftTeamsUpdateApiHandleRequestData struct { + // Handle attributes. + Attributes MicrosoftTeamsApiHandleAttributes `json:"attributes"` + // Specifies the handle resource type. + Type MicrosoftTeamsApiHandleType `json:"type"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewMicrosoftTeamsUpdateApiHandleRequestData instantiates a new MicrosoftTeamsUpdateApiHandleRequestData object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewMicrosoftTeamsUpdateApiHandleRequestData(attributes MicrosoftTeamsApiHandleAttributes, typeVar MicrosoftTeamsApiHandleType) *MicrosoftTeamsUpdateApiHandleRequestData { + this := MicrosoftTeamsUpdateApiHandleRequestData{} + this.Attributes = attributes + this.Type = typeVar + return &this +} + +// NewMicrosoftTeamsUpdateApiHandleRequestDataWithDefaults instantiates a new MicrosoftTeamsUpdateApiHandleRequestData object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewMicrosoftTeamsUpdateApiHandleRequestDataWithDefaults() *MicrosoftTeamsUpdateApiHandleRequestData { + this := MicrosoftTeamsUpdateApiHandleRequestData{} + var typeVar MicrosoftTeamsApiHandleType = MICROSOFTTEAMSAPIHANDLETYPE_HANDLE + this.Type = typeVar + return &this +} + +// GetAttributes returns the Attributes field value. +func (o *MicrosoftTeamsUpdateApiHandleRequestData) GetAttributes() MicrosoftTeamsApiHandleAttributes { + if o == nil { + var ret MicrosoftTeamsApiHandleAttributes + return ret + } + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsUpdateApiHandleRequestData) GetAttributesOk() (*MicrosoftTeamsApiHandleAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value. +func (o *MicrosoftTeamsUpdateApiHandleRequestData) SetAttributes(v MicrosoftTeamsApiHandleAttributes) { + o.Attributes = v +} + +// GetType returns the Type field value. +func (o *MicrosoftTeamsUpdateApiHandleRequestData) GetType() MicrosoftTeamsApiHandleType { + if o == nil { + var ret MicrosoftTeamsApiHandleType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *MicrosoftTeamsUpdateApiHandleRequestData) GetTypeOk() (*MicrosoftTeamsApiHandleType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *MicrosoftTeamsUpdateApiHandleRequestData) SetType(v MicrosoftTeamsApiHandleType) { + o.Type = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o MicrosoftTeamsUpdateApiHandleRequestData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["attributes"] = o.Attributes + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *MicrosoftTeamsUpdateApiHandleRequestData) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Attributes *MicrosoftTeamsApiHandleAttributes `json:"attributes"` + Type *MicrosoftTeamsApiHandleType `json:"type"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Attributes == nil { + return fmt.Errorf("required field attributes missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Attributes = *all.Attributes + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_monitor_config_policy_policy.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_monitor_config_policy_policy.go index 781318d979..9a0b74e717 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_monitor_config_policy_policy.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_monitor_config_policy_policy.go @@ -30,7 +30,7 @@ func (obj *MonitorConfigPolicyPolicy) UnmarshalJSON(data []byte) error { if err == nil { if obj.MonitorConfigPolicyTagPolicy != nil && obj.MonitorConfigPolicyTagPolicy.UnparsedObject == nil { jsonMonitorConfigPolicyTagPolicy, _ := datadog.Marshal(obj.MonitorConfigPolicyTagPolicy) - if string(jsonMonitorConfigPolicyTagPolicy) == "{}" { // empty struct + if string(jsonMonitorConfigPolicyTagPolicy) == "{}" && string(data) != "{}" { // empty struct obj.MonitorConfigPolicyTagPolicy = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_powerpack_template_variable.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_powerpack_template_variable.go index 595126ca8c..311ba01960 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_powerpack_template_variable.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_powerpack_template_variable.go @@ -12,10 +12,14 @@ import ( // PowerpackTemplateVariable Powerpack template variables. type PowerpackTemplateVariable struct { + // The list of values that the template variable drop-down is limited to. + AvailableValues datadog.NullableList[string] `json:"available_values,omitempty"` // One or many template variable default values within the saved view, which are unioned together using `OR` if more than one is specified. Defaults []string `json:"defaults,omitempty"` // The name of the variable. Name string `json:"name"` + // The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down. + Prefix datadog.NullableString `json:"prefix,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -39,6 +43,45 @@ func NewPowerpackTemplateVariableWithDefaults() *PowerpackTemplateVariable { return &this } +// GetAvailableValues returns the AvailableValues field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PowerpackTemplateVariable) GetAvailableValues() []string { + if o == nil || o.AvailableValues.Get() == nil { + var ret []string + return ret + } + return *o.AvailableValues.Get() +} + +// GetAvailableValuesOk returns a tuple with the AvailableValues field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. +func (o *PowerpackTemplateVariable) GetAvailableValuesOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.AvailableValues.Get(), o.AvailableValues.IsSet() +} + +// HasAvailableValues returns a boolean if a field has been set. +func (o *PowerpackTemplateVariable) HasAvailableValues() bool { + return o != nil && o.AvailableValues.IsSet() +} + +// SetAvailableValues gets a reference to the given datadog.NullableList[string] and assigns it to the AvailableValues field. +func (o *PowerpackTemplateVariable) SetAvailableValues(v []string) { + o.AvailableValues.Set(&v) +} + +// SetAvailableValuesNil sets the value for AvailableValues to be an explicit nil. +func (o *PowerpackTemplateVariable) SetAvailableValuesNil() { + o.AvailableValues.Set(nil) +} + +// UnsetAvailableValues ensures that no value is present for AvailableValues, not even an explicit nil. +func (o *PowerpackTemplateVariable) UnsetAvailableValues() { + o.AvailableValues.Unset() +} + // GetDefaults returns the Defaults field value if set, zero value otherwise. func (o *PowerpackTemplateVariable) GetDefaults() []string { if o == nil || o.Defaults == nil { @@ -90,16 +133,61 @@ func (o *PowerpackTemplateVariable) SetName(v string) { o.Name = v } +// GetPrefix returns the Prefix field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PowerpackTemplateVariable) GetPrefix() string { + if o == nil || o.Prefix.Get() == nil { + var ret string + return ret + } + return *o.Prefix.Get() +} + +// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. +func (o *PowerpackTemplateVariable) GetPrefixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Prefix.Get(), o.Prefix.IsSet() +} + +// HasPrefix returns a boolean if a field has been set. +func (o *PowerpackTemplateVariable) HasPrefix() bool { + return o != nil && o.Prefix.IsSet() +} + +// SetPrefix gets a reference to the given datadog.NullableString and assigns it to the Prefix field. +func (o *PowerpackTemplateVariable) SetPrefix(v string) { + o.Prefix.Set(&v) +} + +// SetPrefixNil sets the value for Prefix to be an explicit nil. +func (o *PowerpackTemplateVariable) SetPrefixNil() { + o.Prefix.Set(nil) +} + +// UnsetPrefix ensures that no value is present for Prefix, not even an explicit nil. +func (o *PowerpackTemplateVariable) UnsetPrefix() { + o.Prefix.Unset() +} + // MarshalJSON serializes the struct using spec logic. func (o PowerpackTemplateVariable) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + if o.AvailableValues.IsSet() { + toSerialize["available_values"] = o.AvailableValues.Get() + } if o.Defaults != nil { toSerialize["defaults"] = o.Defaults } toSerialize["name"] = o.Name + if o.Prefix.IsSet() { + toSerialize["prefix"] = o.Prefix.Get() + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -110,8 +198,10 @@ func (o PowerpackTemplateVariable) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *PowerpackTemplateVariable) UnmarshalJSON(bytes []byte) (err error) { all := struct { - Defaults []string `json:"defaults,omitempty"` - Name *string `json:"name"` + AvailableValues datadog.NullableList[string] `json:"available_values,omitempty"` + Defaults []string `json:"defaults,omitempty"` + Name *string `json:"name"` + Prefix datadog.NullableString `json:"prefix,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) @@ -121,12 +211,14 @@ func (o *PowerpackTemplateVariable) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"defaults", "name"}) + datadog.DeleteKeys(additionalProperties, &[]string{"available_values", "defaults", "name", "prefix"}) } else { return err } + o.AvailableValues = all.AvailableValues o.Defaults = all.Defaults o.Name = *all.Name + o.Prefix = all.Prefix if len(additionalProperties) > 0 { o.AdditionalProperties = additionalProperties diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_relation_type.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_relation_type.go new file mode 100644 index 0000000000..fabd17b03b --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_relation_type.go @@ -0,0 +1,82 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// RelationType supported relation types +type RelationType string + +// List of RelationType. +const ( + RELATIONTYPE_RELATIONTYPEOWNS RelationType = "RelationTypeOwns" + RELATIONTYPE_RELATIONTYPEOWNEDBY RelationType = "RelationTypeOwnedBy" + RELATIONTYPE_RELATIONTYPEDEPENDSON RelationType = "RelationTypeDependsOn" + RELATIONTYPE_RELATIONTYPEDEPENDENCYOF RelationType = "RelationTypeDependencyOf" + RELATIONTYPE_RELATIONTYPEPARTSOF RelationType = "RelationTypePartsOf" + RELATIONTYPE_RELATIONTYPEHASPART RelationType = "RelationTypeHasPart" + RELATIONTYPE_RELATIONTYPEOTHEROWNS RelationType = "RelationTypeOtherOwns" + RELATIONTYPE_RELATIONTYPEOTHEROWNEDBY RelationType = "RelationTypeOtherOwnedBy" + RELATIONTYPE_RELATIONTYPEIMPLEMENTEDBY RelationType = "RelationTypeImplementedBy" + RELATIONTYPE_RELATIONTYPEIMPLEMENTS RelationType = "RelationTypeImplements" +) + +var allowedRelationTypeEnumValues = []RelationType{ + RELATIONTYPE_RELATIONTYPEOWNS, + RELATIONTYPE_RELATIONTYPEOWNEDBY, + RELATIONTYPE_RELATIONTYPEDEPENDSON, + RELATIONTYPE_RELATIONTYPEDEPENDENCYOF, + RELATIONTYPE_RELATIONTYPEPARTSOF, + RELATIONTYPE_RELATIONTYPEHASPART, + RELATIONTYPE_RELATIONTYPEOTHEROWNS, + RELATIONTYPE_RELATIONTYPEOTHEROWNEDBY, + RELATIONTYPE_RELATIONTYPEIMPLEMENTEDBY, + RELATIONTYPE_RELATIONTYPEIMPLEMENTS, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *RelationType) GetAllowedValues() []RelationType { + return allowedRelationTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *RelationType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = RelationType(value) + return nil +} + +// NewRelationTypeFromValue returns a pointer to a valid RelationType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewRelationTypeFromValue(v string) (*RelationType, error) { + ev := RelationType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for RelationType: valid values are %v", v, allowedRelationTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v RelationType) IsValid() bool { + for _, existing := range allowedRelationTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to RelationType value. +func (v RelationType) Ptr() *RelationType { + return &v +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_relationship_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_relationship_item.go new file mode 100644 index 0000000000..2880de8361 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_relationship_item.go @@ -0,0 +1,137 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// RelationshipItem Relationship entry. +type RelationshipItem struct { + // Associated data id. + Id *string `json:"id,omitempty"` + // Relationship type. + Type *string `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewRelationshipItem instantiates a new RelationshipItem object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewRelationshipItem() *RelationshipItem { + this := RelationshipItem{} + return &this +} + +// NewRelationshipItemWithDefaults instantiates a new RelationshipItem object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewRelationshipItemWithDefaults() *RelationshipItem { + this := RelationshipItem{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RelationshipItem) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelationshipItem) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RelationshipItem) HasId() bool { + return o != nil && o.Id != nil +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RelationshipItem) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RelationshipItem) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelationshipItem) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RelationshipItem) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RelationshipItem) SetType(v string) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o RelationshipItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *RelationshipItem) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Id *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"id", "type"}) + } else { + return err + } + o.Id = all.Id + o.Type = all.Type + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_rum_aggregate_bucket_value.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_rum_aggregate_bucket_value.go index 484cfc520c..0cfea0fd43 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_rum_aggregate_bucket_value.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_rum_aggregate_bucket_value.go @@ -76,7 +76,7 @@ func (obj *RUMAggregateBucketValue) UnmarshalJSON(data []byte) error { if err == nil { if obj.RUMAggregateBucketValueTimeseries != nil { jsonRUMAggregateBucketValueTimeseries, _ := datadog.Marshal(obj.RUMAggregateBucketValueTimeseries) - if string(jsonRUMAggregateBucketValueTimeseries) == "{}" { // empty struct + if string(jsonRUMAggregateBucketValueTimeseries) == "{}" && string(data) != "{}" { // empty struct obj.RUMAggregateBucketValueTimeseries = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_scalar_column.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_scalar_column.go index cfa8d6adbe..6ae169a7e6 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_scalar_column.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_scalar_column.go @@ -36,7 +36,7 @@ func (obj *ScalarColumn) UnmarshalJSON(data []byte) error { if err == nil { if obj.GroupScalarColumn != nil && obj.GroupScalarColumn.UnparsedObject == nil { jsonGroupScalarColumn, _ := datadog.Marshal(obj.GroupScalarColumn) - if string(jsonGroupScalarColumn) == "{}" { // empty struct + if string(jsonGroupScalarColumn) == "{}" && string(data) != "{}" { // empty struct obj.GroupScalarColumn = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *ScalarColumn) UnmarshalJSON(data []byte) error { if err == nil { if obj.DataScalarColumn != nil && obj.DataScalarColumn.UnparsedObject == nil { jsonDataScalarColumn, _ := datadog.Marshal(obj.DataScalarColumn) - if string(jsonDataScalarColumn) == "{}" { // empty struct + if string(jsonDataScalarColumn) == "{}" && string(data) != "{}" { // empty struct obj.DataScalarColumn = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_reference_table.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_reference_table.go new file mode 100644 index 0000000000..54474c81c6 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_reference_table.go @@ -0,0 +1,242 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SecurityMonitoringReferenceTable Reference table for the rule. +type SecurityMonitoringReferenceTable struct { + // Whether to include or exclude the matched values. + CheckPresence *bool `json:"checkPresence,omitempty"` + // The name of the column in the reference table. + ColumnName *string `json:"columnName,omitempty"` + // The field in the log to match against the reference table. + LogFieldPath *string `json:"logFieldPath,omitempty"` + // The name of the rule query to apply the reference table to. + RuleQueryName *string `json:"ruleQueryName,omitempty"` + // The name of the reference table. + TableName *string `json:"tableName,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSecurityMonitoringReferenceTable instantiates a new SecurityMonitoringReferenceTable object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSecurityMonitoringReferenceTable() *SecurityMonitoringReferenceTable { + this := SecurityMonitoringReferenceTable{} + return &this +} + +// NewSecurityMonitoringReferenceTableWithDefaults instantiates a new SecurityMonitoringReferenceTable object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSecurityMonitoringReferenceTableWithDefaults() *SecurityMonitoringReferenceTable { + this := SecurityMonitoringReferenceTable{} + return &this +} + +// GetCheckPresence returns the CheckPresence field value if set, zero value otherwise. +func (o *SecurityMonitoringReferenceTable) GetCheckPresence() bool { + if o == nil || o.CheckPresence == nil { + var ret bool + return ret + } + return *o.CheckPresence +} + +// GetCheckPresenceOk returns a tuple with the CheckPresence field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringReferenceTable) GetCheckPresenceOk() (*bool, bool) { + if o == nil || o.CheckPresence == nil { + return nil, false + } + return o.CheckPresence, true +} + +// HasCheckPresence returns a boolean if a field has been set. +func (o *SecurityMonitoringReferenceTable) HasCheckPresence() bool { + return o != nil && o.CheckPresence != nil +} + +// SetCheckPresence gets a reference to the given bool and assigns it to the CheckPresence field. +func (o *SecurityMonitoringReferenceTable) SetCheckPresence(v bool) { + o.CheckPresence = &v +} + +// GetColumnName returns the ColumnName field value if set, zero value otherwise. +func (o *SecurityMonitoringReferenceTable) GetColumnName() string { + if o == nil || o.ColumnName == nil { + var ret string + return ret + } + return *o.ColumnName +} + +// GetColumnNameOk returns a tuple with the ColumnName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringReferenceTable) GetColumnNameOk() (*string, bool) { + if o == nil || o.ColumnName == nil { + return nil, false + } + return o.ColumnName, true +} + +// HasColumnName returns a boolean if a field has been set. +func (o *SecurityMonitoringReferenceTable) HasColumnName() bool { + return o != nil && o.ColumnName != nil +} + +// SetColumnName gets a reference to the given string and assigns it to the ColumnName field. +func (o *SecurityMonitoringReferenceTable) SetColumnName(v string) { + o.ColumnName = &v +} + +// GetLogFieldPath returns the LogFieldPath field value if set, zero value otherwise. +func (o *SecurityMonitoringReferenceTable) GetLogFieldPath() string { + if o == nil || o.LogFieldPath == nil { + var ret string + return ret + } + return *o.LogFieldPath +} + +// GetLogFieldPathOk returns a tuple with the LogFieldPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringReferenceTable) GetLogFieldPathOk() (*string, bool) { + if o == nil || o.LogFieldPath == nil { + return nil, false + } + return o.LogFieldPath, true +} + +// HasLogFieldPath returns a boolean if a field has been set. +func (o *SecurityMonitoringReferenceTable) HasLogFieldPath() bool { + return o != nil && o.LogFieldPath != nil +} + +// SetLogFieldPath gets a reference to the given string and assigns it to the LogFieldPath field. +func (o *SecurityMonitoringReferenceTable) SetLogFieldPath(v string) { + o.LogFieldPath = &v +} + +// GetRuleQueryName returns the RuleQueryName field value if set, zero value otherwise. +func (o *SecurityMonitoringReferenceTable) GetRuleQueryName() string { + if o == nil || o.RuleQueryName == nil { + var ret string + return ret + } + return *o.RuleQueryName +} + +// GetRuleQueryNameOk returns a tuple with the RuleQueryName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringReferenceTable) GetRuleQueryNameOk() (*string, bool) { + if o == nil || o.RuleQueryName == nil { + return nil, false + } + return o.RuleQueryName, true +} + +// HasRuleQueryName returns a boolean if a field has been set. +func (o *SecurityMonitoringReferenceTable) HasRuleQueryName() bool { + return o != nil && o.RuleQueryName != nil +} + +// SetRuleQueryName gets a reference to the given string and assigns it to the RuleQueryName field. +func (o *SecurityMonitoringReferenceTable) SetRuleQueryName(v string) { + o.RuleQueryName = &v +} + +// GetTableName returns the TableName field value if set, zero value otherwise. +func (o *SecurityMonitoringReferenceTable) GetTableName() string { + if o == nil || o.TableName == nil { + var ret string + return ret + } + return *o.TableName +} + +// GetTableNameOk returns a tuple with the TableName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringReferenceTable) GetTableNameOk() (*string, bool) { + if o == nil || o.TableName == nil { + return nil, false + } + return o.TableName, true +} + +// HasTableName returns a boolean if a field has been set. +func (o *SecurityMonitoringReferenceTable) HasTableName() bool { + return o != nil && o.TableName != nil +} + +// SetTableName gets a reference to the given string and assigns it to the TableName field. +func (o *SecurityMonitoringReferenceTable) SetTableName(v string) { + o.TableName = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SecurityMonitoringReferenceTable) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.CheckPresence != nil { + toSerialize["checkPresence"] = o.CheckPresence + } + if o.ColumnName != nil { + toSerialize["columnName"] = o.ColumnName + } + if o.LogFieldPath != nil { + toSerialize["logFieldPath"] = o.LogFieldPath + } + if o.RuleQueryName != nil { + toSerialize["ruleQueryName"] = o.RuleQueryName + } + if o.TableName != nil { + toSerialize["tableName"] = o.TableName + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SecurityMonitoringReferenceTable) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + CheckPresence *bool `json:"checkPresence,omitempty"` + ColumnName *string `json:"columnName,omitempty"` + LogFieldPath *string `json:"logFieldPath,omitempty"` + RuleQueryName *string `json:"ruleQueryName,omitempty"` + TableName *string `json:"tableName,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"checkPresence", "columnName", "logFieldPath", "ruleQueryName", "tableName"}) + } else { + return err + } + o.CheckPresence = all.CheckPresence + o.ColumnName = all.ColumnName + o.LogFieldPath = all.LogFieldPath + o.RuleQueryName = all.RuleQueryName + o.TableName = all.TableName + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_query.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_query.go index 73cddf6d6e..e95571f0f7 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_query.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_query.go @@ -36,7 +36,7 @@ func (obj *SecurityMonitoringRuleQuery) UnmarshalJSON(data []byte) error { if err == nil { if obj.SecurityMonitoringStandardRuleQuery != nil && obj.SecurityMonitoringStandardRuleQuery.UnparsedObject == nil { jsonSecurityMonitoringStandardRuleQuery, _ := datadog.Marshal(obj.SecurityMonitoringStandardRuleQuery) - if string(jsonSecurityMonitoringStandardRuleQuery) == "{}" { // empty struct + if string(jsonSecurityMonitoringStandardRuleQuery) == "{}" && string(data) != "{}" { // empty struct obj.SecurityMonitoringStandardRuleQuery = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_response.go index 27a9fdffcb..bc364e67bf 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_response.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_response.go @@ -36,7 +36,7 @@ func (obj *SecurityMonitoringRuleResponse) UnmarshalJSON(data []byte) error { if err == nil { if obj.SecurityMonitoringStandardRuleResponse != nil && obj.SecurityMonitoringStandardRuleResponse.UnparsedObject == nil { jsonSecurityMonitoringStandardRuleResponse, _ := datadog.Marshal(obj.SecurityMonitoringStandardRuleResponse) - if string(jsonSecurityMonitoringStandardRuleResponse) == "{}" { // empty struct + if string(jsonSecurityMonitoringStandardRuleResponse) == "{}" && string(data) != "{}" { // empty struct obj.SecurityMonitoringStandardRuleResponse = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *SecurityMonitoringRuleResponse) UnmarshalJSON(data []byte) error { if err == nil { if obj.SecurityMonitoringSignalRuleResponse != nil && obj.SecurityMonitoringSignalRuleResponse.UnparsedObject == nil { jsonSecurityMonitoringSignalRuleResponse, _ := datadog.Marshal(obj.SecurityMonitoringSignalRuleResponse) - if string(jsonSecurityMonitoringSignalRuleResponse) == "{}" { // empty struct + if string(jsonSecurityMonitoringSignalRuleResponse) == "{}" && string(data) != "{}" { // empty struct obj.SecurityMonitoringSignalRuleResponse = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_update_payload.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_update_payload.go index cb912eae9c..e8f2a4de0a 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_update_payload.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_rule_update_payload.go @@ -28,6 +28,8 @@ type SecurityMonitoringRuleUpdatePayload struct { Options *SecurityMonitoringRuleOptions `json:"options,omitempty"` // Queries for selecting logs which are part of the rule. Queries []SecurityMonitoringRuleQuery `json:"queries,omitempty"` + // Reference tables for the rule. + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` // Tags for generated signals. Tags []string `json:"tags,omitempty"` // Cases for generating signals from third-party rules. Only available for third-party rules. @@ -308,6 +310,34 @@ func (o *SecurityMonitoringRuleUpdatePayload) SetQueries(v []SecurityMonitoringR o.Queries = v } +// GetReferenceTables returns the ReferenceTables field value if set, zero value otherwise. +func (o *SecurityMonitoringRuleUpdatePayload) GetReferenceTables() []SecurityMonitoringReferenceTable { + if o == nil || o.ReferenceTables == nil { + var ret []SecurityMonitoringReferenceTable + return ret + } + return o.ReferenceTables +} + +// GetReferenceTablesOk returns a tuple with the ReferenceTables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringRuleUpdatePayload) GetReferenceTablesOk() (*[]SecurityMonitoringReferenceTable, bool) { + if o == nil || o.ReferenceTables == nil { + return nil, false + } + return &o.ReferenceTables, true +} + +// HasReferenceTables returns a boolean if a field has been set. +func (o *SecurityMonitoringRuleUpdatePayload) HasReferenceTables() bool { + return o != nil && o.ReferenceTables != nil +} + +// SetReferenceTables gets a reference to the given []SecurityMonitoringReferenceTable and assigns it to the ReferenceTables field. +func (o *SecurityMonitoringRuleUpdatePayload) SetReferenceTables(v []SecurityMonitoringReferenceTable) { + o.ReferenceTables = v +} + // GetTags returns the Tags field value if set, zero value otherwise. func (o *SecurityMonitoringRuleUpdatePayload) GetTags() []string { if o == nil || o.Tags == nil { @@ -425,6 +455,9 @@ func (o SecurityMonitoringRuleUpdatePayload) MarshalJSON() ([]byte, error) { if o.Queries != nil { toSerialize["queries"] = o.Queries } + if o.ReferenceTables != nil { + toSerialize["referenceTables"] = o.ReferenceTables + } if o.Tags != nil { toSerialize["tags"] = o.Tags } @@ -453,6 +486,7 @@ func (o *SecurityMonitoringRuleUpdatePayload) UnmarshalJSON(bytes []byte) (err e Name *string `json:"name,omitempty"` Options *SecurityMonitoringRuleOptions `json:"options,omitempty"` Queries []SecurityMonitoringRuleQuery `json:"queries,omitempty"` + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` Tags []string `json:"tags,omitempty"` ThirdPartyCases []SecurityMonitoringThirdPartyRuleCase `json:"thirdPartyCases,omitempty"` Version *int32 `json:"version,omitempty"` @@ -462,7 +496,7 @@ func (o *SecurityMonitoringRuleUpdatePayload) UnmarshalJSON(bytes []byte) (err e } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"cases", "complianceSignalOptions", "filters", "hasExtendedTitle", "isEnabled", "message", "name", "options", "queries", "tags", "thirdPartyCases", "version"}) + datadog.DeleteKeys(additionalProperties, &[]string{"cases", "complianceSignalOptions", "filters", "hasExtendedTitle", "isEnabled", "message", "name", "options", "queries", "referenceTables", "tags", "thirdPartyCases", "version"}) } else { return err } @@ -483,6 +517,7 @@ func (o *SecurityMonitoringRuleUpdatePayload) UnmarshalJSON(bytes []byte) (err e } o.Options = all.Options o.Queries = all.Queries + o.ReferenceTables = all.ReferenceTables o.Tags = all.Tags o.ThirdPartyCases = all.ThirdPartyCases o.Version = all.Version diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_create_payload.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_create_payload.go index 19a9c1488b..5a47b80da8 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_create_payload.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_create_payload.go @@ -28,6 +28,8 @@ type SecurityMonitoringStandardRuleCreatePayload struct { Options SecurityMonitoringRuleOptions `json:"options"` // Queries for selecting logs which are part of the rule. Queries []SecurityMonitoringStandardRuleQuery `json:"queries"` + // Reference tables for the rule. + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` // Tags for generated signals. Tags []string `json:"tags,omitempty"` // Cases for generating signals from third-party rules. Only available for third-party rules. @@ -256,6 +258,34 @@ func (o *SecurityMonitoringStandardRuleCreatePayload) SetQueries(v []SecurityMon o.Queries = v } +// GetReferenceTables returns the ReferenceTables field value if set, zero value otherwise. +func (o *SecurityMonitoringStandardRuleCreatePayload) GetReferenceTables() []SecurityMonitoringReferenceTable { + if o == nil || o.ReferenceTables == nil { + var ret []SecurityMonitoringReferenceTable + return ret + } + return o.ReferenceTables +} + +// GetReferenceTablesOk returns a tuple with the ReferenceTables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringStandardRuleCreatePayload) GetReferenceTablesOk() (*[]SecurityMonitoringReferenceTable, bool) { + if o == nil || o.ReferenceTables == nil { + return nil, false + } + return &o.ReferenceTables, true +} + +// HasReferenceTables returns a boolean if a field has been set. +func (o *SecurityMonitoringStandardRuleCreatePayload) HasReferenceTables() bool { + return o != nil && o.ReferenceTables != nil +} + +// SetReferenceTables gets a reference to the given []SecurityMonitoringReferenceTable and assigns it to the ReferenceTables field. +func (o *SecurityMonitoringStandardRuleCreatePayload) SetReferenceTables(v []SecurityMonitoringReferenceTable) { + o.ReferenceTables = v +} + // GetTags returns the Tags field value if set, zero value otherwise. func (o *SecurityMonitoringStandardRuleCreatePayload) GetTags() []string { if o == nil || o.Tags == nil { @@ -358,6 +388,9 @@ func (o SecurityMonitoringStandardRuleCreatePayload) MarshalJSON() ([]byte, erro toSerialize["name"] = o.Name toSerialize["options"] = o.Options toSerialize["queries"] = o.Queries + if o.ReferenceTables != nil { + toSerialize["referenceTables"] = o.ReferenceTables + } if o.Tags != nil { toSerialize["tags"] = o.Tags } @@ -385,6 +418,7 @@ func (o *SecurityMonitoringStandardRuleCreatePayload) UnmarshalJSON(bytes []byte Name *string `json:"name"` Options *SecurityMonitoringRuleOptions `json:"options"` Queries *[]SecurityMonitoringStandardRuleQuery `json:"queries"` + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` Tags []string `json:"tags,omitempty"` ThirdPartyCases []SecurityMonitoringThirdPartyRuleCaseCreate `json:"thirdPartyCases,omitempty"` Type *SecurityMonitoringRuleTypeCreate `json:"type,omitempty"` @@ -412,7 +446,7 @@ func (o *SecurityMonitoringStandardRuleCreatePayload) UnmarshalJSON(bytes []byte } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"cases", "filters", "hasExtendedTitle", "isEnabled", "message", "name", "options", "queries", "tags", "thirdPartyCases", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"cases", "filters", "hasExtendedTitle", "isEnabled", "message", "name", "options", "queries", "referenceTables", "tags", "thirdPartyCases", "type"}) } else { return err } @@ -429,6 +463,7 @@ func (o *SecurityMonitoringStandardRuleCreatePayload) UnmarshalJSON(bytes []byte } o.Options = *all.Options o.Queries = *all.Queries + o.ReferenceTables = all.ReferenceTables o.Tags = all.Tags o.ThirdPartyCases = all.ThirdPartyCases if all.Type != nil && !all.Type.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_payload.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_payload.go index 0161120322..3e0411772a 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_payload.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_payload.go @@ -28,6 +28,8 @@ type SecurityMonitoringStandardRulePayload struct { Options SecurityMonitoringRuleOptions `json:"options"` // Queries for selecting logs which are part of the rule. Queries []SecurityMonitoringStandardRuleQuery `json:"queries"` + // Reference tables for the rule. + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` // Tags for generated signals. Tags []string `json:"tags,omitempty"` // Cases for generating signals from third-party rules. Only available for third-party rules. @@ -256,6 +258,34 @@ func (o *SecurityMonitoringStandardRulePayload) SetQueries(v []SecurityMonitorin o.Queries = v } +// GetReferenceTables returns the ReferenceTables field value if set, zero value otherwise. +func (o *SecurityMonitoringStandardRulePayload) GetReferenceTables() []SecurityMonitoringReferenceTable { + if o == nil || o.ReferenceTables == nil { + var ret []SecurityMonitoringReferenceTable + return ret + } + return o.ReferenceTables +} + +// GetReferenceTablesOk returns a tuple with the ReferenceTables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringStandardRulePayload) GetReferenceTablesOk() (*[]SecurityMonitoringReferenceTable, bool) { + if o == nil || o.ReferenceTables == nil { + return nil, false + } + return &o.ReferenceTables, true +} + +// HasReferenceTables returns a boolean if a field has been set. +func (o *SecurityMonitoringStandardRulePayload) HasReferenceTables() bool { + return o != nil && o.ReferenceTables != nil +} + +// SetReferenceTables gets a reference to the given []SecurityMonitoringReferenceTable and assigns it to the ReferenceTables field. +func (o *SecurityMonitoringStandardRulePayload) SetReferenceTables(v []SecurityMonitoringReferenceTable) { + o.ReferenceTables = v +} + // GetTags returns the Tags field value if set, zero value otherwise. func (o *SecurityMonitoringStandardRulePayload) GetTags() []string { if o == nil || o.Tags == nil { @@ -358,6 +388,9 @@ func (o SecurityMonitoringStandardRulePayload) MarshalJSON() ([]byte, error) { toSerialize["name"] = o.Name toSerialize["options"] = o.Options toSerialize["queries"] = o.Queries + if o.ReferenceTables != nil { + toSerialize["referenceTables"] = o.ReferenceTables + } if o.Tags != nil { toSerialize["tags"] = o.Tags } @@ -385,6 +418,7 @@ func (o *SecurityMonitoringStandardRulePayload) UnmarshalJSON(bytes []byte) (err Name *string `json:"name"` Options *SecurityMonitoringRuleOptions `json:"options"` Queries *[]SecurityMonitoringStandardRuleQuery `json:"queries"` + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` Tags []string `json:"tags,omitempty"` ThirdPartyCases []SecurityMonitoringThirdPartyRuleCaseCreate `json:"thirdPartyCases,omitempty"` Type *SecurityMonitoringRuleTypeCreate `json:"type,omitempty"` @@ -412,7 +446,7 @@ func (o *SecurityMonitoringStandardRulePayload) UnmarshalJSON(bytes []byte) (err } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"cases", "filters", "hasExtendedTitle", "isEnabled", "message", "name", "options", "queries", "tags", "thirdPartyCases", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"cases", "filters", "hasExtendedTitle", "isEnabled", "message", "name", "options", "queries", "referenceTables", "tags", "thirdPartyCases", "type"}) } else { return err } @@ -429,6 +463,7 @@ func (o *SecurityMonitoringStandardRulePayload) UnmarshalJSON(bytes []byte) (err } o.Options = *all.Options o.Queries = *all.Queries + o.ReferenceTables = all.ReferenceTables o.Tags = all.Tags o.ThirdPartyCases = all.ThirdPartyCases if all.Type != nil && !all.Type.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_response.go index 801256e956..930f0d09b2 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_response.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_response.go @@ -42,6 +42,8 @@ type SecurityMonitoringStandardRuleResponse struct { Options *SecurityMonitoringRuleOptions `json:"options,omitempty"` // Queries for selecting logs which are part of the rule. Queries []SecurityMonitoringStandardRuleQuery `json:"queries,omitempty"` + // Reference tables for the rule. + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` // Tags for generated signals. Tags []string `json:"tags,omitempty"` // Cases for generating signals from third-party rules. Only available for third-party rules. @@ -522,6 +524,34 @@ func (o *SecurityMonitoringStandardRuleResponse) SetQueries(v []SecurityMonitori o.Queries = v } +// GetReferenceTables returns the ReferenceTables field value if set, zero value otherwise. +func (o *SecurityMonitoringStandardRuleResponse) GetReferenceTables() []SecurityMonitoringReferenceTable { + if o == nil || o.ReferenceTables == nil { + var ret []SecurityMonitoringReferenceTable + return ret + } + return o.ReferenceTables +} + +// GetReferenceTablesOk returns a tuple with the ReferenceTables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringStandardRuleResponse) GetReferenceTablesOk() (*[]SecurityMonitoringReferenceTable, bool) { + if o == nil || o.ReferenceTables == nil { + return nil, false + } + return &o.ReferenceTables, true +} + +// HasReferenceTables returns a boolean if a field has been set. +func (o *SecurityMonitoringStandardRuleResponse) HasReferenceTables() bool { + return o != nil && o.ReferenceTables != nil +} + +// SetReferenceTables gets a reference to the given []SecurityMonitoringReferenceTable and assigns it to the ReferenceTables field. +func (o *SecurityMonitoringStandardRuleResponse) SetReferenceTables(v []SecurityMonitoringReferenceTable) { + o.ReferenceTables = v +} + // GetTags returns the Tags field value if set, zero value otherwise. func (o *SecurityMonitoringStandardRuleResponse) GetTags() []string { if o == nil || o.Tags == nil { @@ -716,6 +746,9 @@ func (o SecurityMonitoringStandardRuleResponse) MarshalJSON() ([]byte, error) { if o.Queries != nil { toSerialize["queries"] = o.Queries } + if o.ReferenceTables != nil { + toSerialize["referenceTables"] = o.ReferenceTables + } if o.Tags != nil { toSerialize["tags"] = o.Tags } @@ -757,6 +790,7 @@ func (o *SecurityMonitoringStandardRuleResponse) UnmarshalJSON(bytes []byte) (er Name *string `json:"name,omitempty"` Options *SecurityMonitoringRuleOptions `json:"options,omitempty"` Queries []SecurityMonitoringStandardRuleQuery `json:"queries,omitempty"` + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` Tags []string `json:"tags,omitempty"` ThirdPartyCases []SecurityMonitoringThirdPartyRuleCase `json:"thirdPartyCases,omitempty"` Type *SecurityMonitoringRuleTypeRead `json:"type,omitempty"` @@ -768,7 +802,7 @@ func (o *SecurityMonitoringStandardRuleResponse) UnmarshalJSON(bytes []byte) (er } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"cases", "complianceSignalOptions", "createdAt", "creationAuthorId", "defaultTags", "deprecationDate", "filters", "hasExtendedTitle", "id", "isDefault", "isDeleted", "isEnabled", "message", "name", "options", "queries", "tags", "thirdPartyCases", "type", "updateAuthorId", "version"}) + datadog.DeleteKeys(additionalProperties, &[]string{"cases", "complianceSignalOptions", "createdAt", "creationAuthorId", "defaultTags", "deprecationDate", "filters", "hasExtendedTitle", "id", "isDefault", "isDeleted", "isEnabled", "message", "name", "options", "queries", "referenceTables", "tags", "thirdPartyCases", "type", "updateAuthorId", "version"}) } else { return err } @@ -796,6 +830,7 @@ func (o *SecurityMonitoringStandardRuleResponse) UnmarshalJSON(bytes []byte) (er } o.Options = all.Options o.Queries = all.Queries + o.ReferenceTables = all.ReferenceTables o.Tags = all.Tags o.ThirdPartyCases = all.ThirdPartyCases if all.Type != nil && !all.Type.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_test_payload.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_test_payload.go index ea153a2fe1..a6b7744f1b 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_test_payload.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_standard_rule_test_payload.go @@ -28,6 +28,8 @@ type SecurityMonitoringStandardRuleTestPayload struct { Options SecurityMonitoringRuleOptions `json:"options"` // Queries for selecting logs which are part of the rule. Queries []SecurityMonitoringStandardRuleQuery `json:"queries"` + // Reference tables for the rule. + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` // Tags for generated signals. Tags []string `json:"tags,omitempty"` // Cases for generating signals from third-party rules. Only available for third-party rules. @@ -256,6 +258,34 @@ func (o *SecurityMonitoringStandardRuleTestPayload) SetQueries(v []SecurityMonit o.Queries = v } +// GetReferenceTables returns the ReferenceTables field value if set, zero value otherwise. +func (o *SecurityMonitoringStandardRuleTestPayload) GetReferenceTables() []SecurityMonitoringReferenceTable { + if o == nil || o.ReferenceTables == nil { + var ret []SecurityMonitoringReferenceTable + return ret + } + return o.ReferenceTables +} + +// GetReferenceTablesOk returns a tuple with the ReferenceTables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringStandardRuleTestPayload) GetReferenceTablesOk() (*[]SecurityMonitoringReferenceTable, bool) { + if o == nil || o.ReferenceTables == nil { + return nil, false + } + return &o.ReferenceTables, true +} + +// HasReferenceTables returns a boolean if a field has been set. +func (o *SecurityMonitoringStandardRuleTestPayload) HasReferenceTables() bool { + return o != nil && o.ReferenceTables != nil +} + +// SetReferenceTables gets a reference to the given []SecurityMonitoringReferenceTable and assigns it to the ReferenceTables field. +func (o *SecurityMonitoringStandardRuleTestPayload) SetReferenceTables(v []SecurityMonitoringReferenceTable) { + o.ReferenceTables = v +} + // GetTags returns the Tags field value if set, zero value otherwise. func (o *SecurityMonitoringStandardRuleTestPayload) GetTags() []string { if o == nil || o.Tags == nil { @@ -358,6 +388,9 @@ func (o SecurityMonitoringStandardRuleTestPayload) MarshalJSON() ([]byte, error) toSerialize["name"] = o.Name toSerialize["options"] = o.Options toSerialize["queries"] = o.Queries + if o.ReferenceTables != nil { + toSerialize["referenceTables"] = o.ReferenceTables + } if o.Tags != nil { toSerialize["tags"] = o.Tags } @@ -385,6 +418,7 @@ func (o *SecurityMonitoringStandardRuleTestPayload) UnmarshalJSON(bytes []byte) Name *string `json:"name"` Options *SecurityMonitoringRuleOptions `json:"options"` Queries *[]SecurityMonitoringStandardRuleQuery `json:"queries"` + ReferenceTables []SecurityMonitoringReferenceTable `json:"referenceTables,omitempty"` Tags []string `json:"tags,omitempty"` ThirdPartyCases []SecurityMonitoringThirdPartyRuleCaseCreate `json:"thirdPartyCases,omitempty"` Type *SecurityMonitoringRuleTypeTest `json:"type,omitempty"` @@ -412,7 +446,7 @@ func (o *SecurityMonitoringStandardRuleTestPayload) UnmarshalJSON(bytes []byte) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"cases", "filters", "hasExtendedTitle", "isEnabled", "message", "name", "options", "queries", "tags", "thirdPartyCases", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"cases", "filters", "hasExtendedTitle", "isEnabled", "message", "name", "options", "queries", "referenceTables", "tags", "thirdPartyCases", "type"}) } else { return err } @@ -429,6 +463,7 @@ func (o *SecurityMonitoringStandardRuleTestPayload) UnmarshalJSON(bytes []byte) } o.Options = *all.Options o.Queries = *all.Queries + o.ReferenceTables = all.ReferenceTables o.Tags = all.Tags o.ThirdPartyCases = all.ThirdPartyCases if all.Type != nil && !all.Type.IsValid() { diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_suppression_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_suppression_attributes.go index 07f9b44d68..fac4b5b410 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_suppression_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_security_monitoring_suppression_attributes.go @@ -18,6 +18,8 @@ type SecurityMonitoringSuppressionAttributes struct { DataExclusionQuery *string `json:"data_exclusion_query,omitempty"` // A description for the suppression rule. Description *string `json:"description,omitempty"` + // Whether the suppression rule is editable. + Editable *bool `json:"editable,omitempty"` // Whether the suppression rule is enabled. Enabled *bool `json:"enabled,omitempty"` // A Unix millisecond timestamp giving an expiration date for the suppression rule. After this date, it won't suppress signals anymore. @@ -168,6 +170,34 @@ func (o *SecurityMonitoringSuppressionAttributes) SetDescription(v string) { o.Description = &v } +// GetEditable returns the Editable field value if set, zero value otherwise. +func (o *SecurityMonitoringSuppressionAttributes) GetEditable() bool { + if o == nil || o.Editable == nil { + var ret bool + return ret + } + return *o.Editable +} + +// GetEditableOk returns a tuple with the Editable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityMonitoringSuppressionAttributes) GetEditableOk() (*bool, bool) { + if o == nil || o.Editable == nil { + return nil, false + } + return o.Editable, true +} + +// HasEditable returns a boolean if a field has been set. +func (o *SecurityMonitoringSuppressionAttributes) HasEditable() bool { + return o != nil && o.Editable != nil +} + +// SetEditable gets a reference to the given bool and assigns it to the Editable field. +func (o *SecurityMonitoringSuppressionAttributes) SetEditable(v bool) { + o.Editable = &v +} + // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *SecurityMonitoringSuppressionAttributes) GetEnabled() bool { if o == nil || o.Enabled == nil { @@ -410,6 +440,9 @@ func (o SecurityMonitoringSuppressionAttributes) MarshalJSON() ([]byte, error) { if o.Description != nil { toSerialize["description"] = o.Description } + if o.Editable != nil { + toSerialize["editable"] = o.Editable + } if o.Enabled != nil { toSerialize["enabled"] = o.Enabled } @@ -448,6 +481,7 @@ func (o *SecurityMonitoringSuppressionAttributes) UnmarshalJSON(bytes []byte) (e Creator *SecurityMonitoringUser `json:"creator,omitempty"` DataExclusionQuery *string `json:"data_exclusion_query,omitempty"` Description *string `json:"description,omitempty"` + Editable *bool `json:"editable,omitempty"` Enabled *bool `json:"enabled,omitempty"` ExpirationDate *int64 `json:"expiration_date,omitempty"` Name *string `json:"name,omitempty"` @@ -462,7 +496,7 @@ func (o *SecurityMonitoringSuppressionAttributes) UnmarshalJSON(bytes []byte) (e } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"creation_date", "creator", "data_exclusion_query", "description", "enabled", "expiration_date", "name", "rule_query", "suppression_query", "update_date", "updater", "version"}) + datadog.DeleteKeys(additionalProperties, &[]string{"creation_date", "creator", "data_exclusion_query", "description", "editable", "enabled", "expiration_date", "name", "rule_query", "suppression_query", "update_date", "updater", "version"}) } else { return err } @@ -475,6 +509,7 @@ func (o *SecurityMonitoringSuppressionAttributes) UnmarshalJSON(bytes []byte) (e o.Creator = all.Creator o.DataExclusionQuery = all.DataExclusionQuery o.Description = all.Description + o.Editable = all.Editable o.Enabled = all.Enabled o.ExpirationDate = all.ExpirationDate o.Name = all.Name diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_sensitive_data_scanner_get_config_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_sensitive_data_scanner_get_config_included_item.go index 9a5d3400d2..9a2be2812d 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_sensitive_data_scanner_get_config_included_item.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_sensitive_data_scanner_get_config_included_item.go @@ -36,7 +36,7 @@ func (obj *SensitiveDataScannerGetConfigIncludedItem) UnmarshalJSON(data []byte) if err == nil { if obj.SensitiveDataScannerRuleIncludedItem != nil && obj.SensitiveDataScannerRuleIncludedItem.UnparsedObject == nil { jsonSensitiveDataScannerRuleIncludedItem, _ := datadog.Marshal(obj.SensitiveDataScannerRuleIncludedItem) - if string(jsonSensitiveDataScannerRuleIncludedItem) == "{}" { // empty struct + if string(jsonSensitiveDataScannerRuleIncludedItem) == "{}" && string(data) != "{}" { // empty struct obj.SensitiveDataScannerRuleIncludedItem = nil } else { match++ @@ -53,7 +53,7 @@ func (obj *SensitiveDataScannerGetConfigIncludedItem) UnmarshalJSON(data []byte) if err == nil { if obj.SensitiveDataScannerGroupIncludedItem != nil && obj.SensitiveDataScannerGroupIncludedItem.UnparsedObject == nil { jsonSensitiveDataScannerGroupIncludedItem, _ := datadog.Marshal(obj.SensitiveDataScannerGroupIncludedItem) - if string(jsonSensitiveDataScannerGroupIncludedItem) == "{}" { // empty struct + if string(jsonSensitiveDataScannerGroupIncludedItem) == "{}" && string(data) != "{}" { // empty struct obj.SensitiveDataScannerGroupIncludedItem = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_spans_aggregate_bucket_value.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_spans_aggregate_bucket_value.go index a5376432ab..e9d83d3afb 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_spans_aggregate_bucket_value.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_spans_aggregate_bucket_value.go @@ -76,7 +76,7 @@ func (obj *SpansAggregateBucketValue) UnmarshalJSON(data []byte) error { if err == nil { if obj.SpansAggregateBucketValueTimeseries != nil { jsonSpansAggregateBucketValueTimeseries, _ := datadog.Marshal(obj.SpansAggregateBucketValueTimeseries) - if string(jsonSpansAggregateBucketValueTimeseries) == "{}" { // empty struct + if string(jsonSpansAggregateBucketValueTimeseries) == "{}" && string(data) != "{}" { // empty struct obj.SpansAggregateBucketValueTimeseries = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_team_included.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_team_included.go index 70890f80d9..edc07e260f 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_team_included.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_team_included.go @@ -42,7 +42,7 @@ func (obj *TeamIncluded) UnmarshalJSON(data []byte) error { if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_team_update_attributes.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_team_update_attributes.go index 713f428397..3aa0c08a1b 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_team_update_attributes.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_team_update_attributes.go @@ -16,8 +16,6 @@ type TeamUpdateAttributes struct { Avatar datadog.NullableString `json:"avatar,omitempty"` // Banner selection for the team Banner datadog.NullableInt64 `json:"banner,omitempty"` - // An identifier for the color representing the team - Color *int32 `json:"color,omitempty"` // Free-form markdown description/content for the team's homepage Description *string `json:"description,omitempty"` // The team's identifier @@ -130,34 +128,6 @@ func (o *TeamUpdateAttributes) UnsetBanner() { o.Banner.Unset() } -// GetColor returns the Color field value if set, zero value otherwise. -func (o *TeamUpdateAttributes) GetColor() int32 { - if o == nil || o.Color == nil { - var ret int32 - return ret - } - return *o.Color -} - -// GetColorOk returns a tuple with the Color field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TeamUpdateAttributes) GetColorOk() (*int32, bool) { - if o == nil || o.Color == nil { - return nil, false - } - return o.Color, true -} - -// HasColor returns a boolean if a field has been set. -func (o *TeamUpdateAttributes) HasColor() bool { - return o != nil && o.Color != nil -} - -// SetColor gets a reference to the given int32 and assigns it to the Color field. -func (o *TeamUpdateAttributes) SetColor(v int32) { - o.Color = &v -} - // GetDescription returns the Description field value if set, zero value otherwise. func (o *TeamUpdateAttributes) GetDescription() string { if o == nil || o.Description == nil { @@ -300,9 +270,6 @@ func (o TeamUpdateAttributes) MarshalJSON() ([]byte, error) { if o.Banner.IsSet() { toSerialize["banner"] = o.Banner.Get() } - if o.Color != nil { - toSerialize["color"] = o.Color - } if o.Description != nil { toSerialize["description"] = o.Description } @@ -326,7 +293,6 @@ func (o *TeamUpdateAttributes) UnmarshalJSON(bytes []byte) (err error) { all := struct { Avatar datadog.NullableString `json:"avatar,omitempty"` Banner datadog.NullableInt64 `json:"banner,omitempty"` - Color *int32 `json:"color,omitempty"` Description *string `json:"description,omitempty"` Handle *string `json:"handle"` HiddenModules []string `json:"hidden_modules,omitempty"` @@ -344,13 +310,12 @@ func (o *TeamUpdateAttributes) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"avatar", "banner", "color", "description", "handle", "hidden_modules", "name", "visible_modules"}) + datadog.DeleteKeys(additionalProperties, &[]string{"avatar", "banner", "description", "handle", "hidden_modules", "name", "visible_modules"}) } else { return err } o.Avatar = all.Avatar o.Banner = all.Banner - o.Color = all.Color o.Description = all.Description o.Handle = *all.Handle o.HiddenModules = all.HiddenModules diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_request.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_request.go new file mode 100644 index 0000000000..222394bfa7 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_request.go @@ -0,0 +1,105 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// UpsertCatalogEntityRequest - Create / Update entity request. +type UpsertCatalogEntityRequest struct { + EntityV3 *EntityV3 + EntityRaw *string + + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject interface{} +} + +// EntityV3AsUpsertCatalogEntityRequest is a convenience function that returns EntityV3 wrapped in UpsertCatalogEntityRequest. +func EntityV3AsUpsertCatalogEntityRequest(v *EntityV3) UpsertCatalogEntityRequest { + return UpsertCatalogEntityRequest{EntityV3: v} +} + +// EntityRawAsUpsertCatalogEntityRequest is a convenience function that returns string wrapped in UpsertCatalogEntityRequest. +func EntityRawAsUpsertCatalogEntityRequest(v *string) UpsertCatalogEntityRequest { + return UpsertCatalogEntityRequest{EntityRaw: v} +} + +// UnmarshalJSON turns data into one of the pointers in the struct. +func (obj *UpsertCatalogEntityRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into EntityV3 + err = datadog.Unmarshal(data, &obj.EntityV3) + if err == nil { + if obj.EntityV3 != nil && obj.EntityV3.UnparsedObject == nil { + jsonEntityV3, _ := datadog.Marshal(obj.EntityV3) + if string(jsonEntityV3) == "{}" && string(data) != "{}" { // empty struct + obj.EntityV3 = nil + } else { + match++ + } + } else { + obj.EntityV3 = nil + } + } else { + obj.EntityV3 = nil + } + + // try to unmarshal data into EntityRaw + err = datadog.Unmarshal(data, &obj.EntityRaw) + if err == nil { + if obj.EntityRaw != nil { + jsonEntityRaw, _ := datadog.Marshal(obj.EntityRaw) + if string(jsonEntityRaw) == "{}" { // empty struct + obj.EntityRaw = nil + } else { + match++ + } + } else { + obj.EntityRaw = nil + } + } else { + obj.EntityRaw = nil + } + + if match != 1 { // more than 1 match + // reset to nil + obj.EntityV3 = nil + obj.EntityRaw = nil + return datadog.Unmarshal(data, &obj.UnparsedObject) + } + return nil // exactly one match +} + +// MarshalJSON turns data from the first non-nil pointers in the struct to JSON. +func (obj UpsertCatalogEntityRequest) MarshalJSON() ([]byte, error) { + if obj.EntityV3 != nil { + return datadog.Marshal(&obj.EntityV3) + } + + if obj.EntityRaw != nil { + return datadog.Marshal(&obj.EntityRaw) + } + + if obj.UnparsedObject != nil { + return datadog.Marshal(obj.UnparsedObject) + } + return nil, nil // no data in oneOf schemas +} + +// GetActualInstance returns the actual instance. +func (obj *UpsertCatalogEntityRequest) GetActualInstance() interface{} { + if obj.EntityV3 != nil { + return obj.EntityV3 + } + + if obj.EntityRaw != nil { + return obj.EntityRaw + } + + // all schemas are nil + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_response.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_response.go new file mode 100644 index 0000000000..b77d298bac --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_response.go @@ -0,0 +1,181 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// UpsertCatalogEntityResponse Upsert entity response. +type UpsertCatalogEntityResponse struct { + // List of entity data. + Data []EntityData `json:"data,omitempty"` + // Upsert entity response included. + Included []UpsertCatalogEntityResponseIncludedItem `json:"included,omitempty"` + // Entity metadata. + Meta *EntityResponseMeta `json:"meta,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewUpsertCatalogEntityResponse instantiates a new UpsertCatalogEntityResponse object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewUpsertCatalogEntityResponse() *UpsertCatalogEntityResponse { + this := UpsertCatalogEntityResponse{} + return &this +} + +// NewUpsertCatalogEntityResponseWithDefaults instantiates a new UpsertCatalogEntityResponse object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewUpsertCatalogEntityResponseWithDefaults() *UpsertCatalogEntityResponse { + this := UpsertCatalogEntityResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *UpsertCatalogEntityResponse) GetData() []EntityData { + if o == nil || o.Data == nil { + var ret []EntityData + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpsertCatalogEntityResponse) GetDataOk() (*[]EntityData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return &o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *UpsertCatalogEntityResponse) HasData() bool { + return o != nil && o.Data != nil +} + +// SetData gets a reference to the given []EntityData and assigns it to the Data field. +func (o *UpsertCatalogEntityResponse) SetData(v []EntityData) { + o.Data = v +} + +// GetIncluded returns the Included field value if set, zero value otherwise. +func (o *UpsertCatalogEntityResponse) GetIncluded() []UpsertCatalogEntityResponseIncludedItem { + if o == nil || o.Included == nil { + var ret []UpsertCatalogEntityResponseIncludedItem + return ret + } + return o.Included +} + +// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpsertCatalogEntityResponse) GetIncludedOk() (*[]UpsertCatalogEntityResponseIncludedItem, bool) { + if o == nil || o.Included == nil { + return nil, false + } + return &o.Included, true +} + +// HasIncluded returns a boolean if a field has been set. +func (o *UpsertCatalogEntityResponse) HasIncluded() bool { + return o != nil && o.Included != nil +} + +// SetIncluded gets a reference to the given []UpsertCatalogEntityResponseIncludedItem and assigns it to the Included field. +func (o *UpsertCatalogEntityResponse) SetIncluded(v []UpsertCatalogEntityResponseIncludedItem) { + o.Included = v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *UpsertCatalogEntityResponse) GetMeta() EntityResponseMeta { + if o == nil || o.Meta == nil { + var ret EntityResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpsertCatalogEntityResponse) GetMetaOk() (*EntityResponseMeta, bool) { + if o == nil || o.Meta == nil { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *UpsertCatalogEntityResponse) HasMeta() bool { + return o != nil && o.Meta != nil +} + +// SetMeta gets a reference to the given EntityResponseMeta and assigns it to the Meta field. +func (o *UpsertCatalogEntityResponse) SetMeta(v EntityResponseMeta) { + o.Meta = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o UpsertCatalogEntityResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.Included != nil { + toSerialize["included"] = o.Included + } + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *UpsertCatalogEntityResponse) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Data []EntityData `json:"data,omitempty"` + Included []UpsertCatalogEntityResponseIncludedItem `json:"included,omitempty"` + Meta *EntityResponseMeta `json:"meta,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"data", "included", "meta"}) + } else { + return err + } + + hasInvalidField := false + o.Data = all.Data + o.Included = all.Included + if all.Meta != nil && all.Meta.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Meta = all.Meta + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_response_included_item.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_response_included_item.go new file mode 100644 index 0000000000..9dd3dc1049 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_upsert_catalog_entity_response_included_item.go @@ -0,0 +1,73 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// UpsertCatalogEntityResponseIncludedItem - Upsert entity response included item. +type UpsertCatalogEntityResponseIncludedItem struct { + EntityResponseIncludedSchema *EntityResponseIncludedSchema + + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject interface{} +} + +// EntityResponseIncludedSchemaAsUpsertCatalogEntityResponseIncludedItem is a convenience function that returns EntityResponseIncludedSchema wrapped in UpsertCatalogEntityResponseIncludedItem. +func EntityResponseIncludedSchemaAsUpsertCatalogEntityResponseIncludedItem(v *EntityResponseIncludedSchema) UpsertCatalogEntityResponseIncludedItem { + return UpsertCatalogEntityResponseIncludedItem{EntityResponseIncludedSchema: v} +} + +// UnmarshalJSON turns data into one of the pointers in the struct. +func (obj *UpsertCatalogEntityResponseIncludedItem) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into EntityResponseIncludedSchema + err = datadog.Unmarshal(data, &obj.EntityResponseIncludedSchema) + if err == nil { + if obj.EntityResponseIncludedSchema != nil && obj.EntityResponseIncludedSchema.UnparsedObject == nil { + jsonEntityResponseIncludedSchema, _ := datadog.Marshal(obj.EntityResponseIncludedSchema) + if string(jsonEntityResponseIncludedSchema) == "{}" && string(data) != "{}" { // empty struct + obj.EntityResponseIncludedSchema = nil + } else { + match++ + } + } else { + obj.EntityResponseIncludedSchema = nil + } + } else { + obj.EntityResponseIncludedSchema = nil + } + + if match != 1 { // more than 1 match + // reset to nil + obj.EntityResponseIncludedSchema = nil + return datadog.Unmarshal(data, &obj.UnparsedObject) + } + return nil // exactly one match +} + +// MarshalJSON turns data from the first non-nil pointers in the struct to JSON. +func (obj UpsertCatalogEntityResponseIncludedItem) MarshalJSON() ([]byte, error) { + if obj.EntityResponseIncludedSchema != nil { + return datadog.Marshal(&obj.EntityResponseIncludedSchema) + } + + if obj.UnparsedObject != nil { + return datadog.Marshal(obj.UnparsedObject) + } + return nil, nil // no data in oneOf schemas +} + +// GetActualInstance returns the actual instance. +func (obj *UpsertCatalogEntityResponseIncludedItem) GetActualInstance() interface{} { + if obj.EntityResponseIncludedSchema != nil { + return obj.EntityResponseIncludedSchema + } + + // all schemas are nil + return nil +} diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_user_team_included.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_user_team_included.go index f66c29ae3c..393a20c398 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_user_team_included.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/api/datadogV2/model_user_team_included.go @@ -36,7 +36,7 @@ func (obj *UserTeamIncluded) UnmarshalJSON(data []byte) error { if err == nil { if obj.User != nil && obj.User.UnparsedObject == nil { jsonUser, _ := datadog.Marshal(obj.User) - if string(jsonUser) == "{}" { // empty struct + if string(jsonUser) == "{}" && string(data) != "{}" { // empty struct obj.User = nil } else { match++ diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/doc.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/doc.go index 96c0e9181a..1a2de5a790 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/doc.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/doc.go @@ -4,7 +4,7 @@ // // Requirements // -// • Go 1.19+ +// • Go 1.22+ // // Layout // diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/repository.datadog.yaml b/vendor/github.com/DataDog/datadog-api-client-go/v2/repository.datadog.yaml new file mode 100644 index 0000000000..a8cc87cfd1 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/repository.datadog.yaml @@ -0,0 +1,6 @@ +--- +schema-version: v1 +kind: stale-branches +max_age: 2920h # 4 months +excludes: + - gh-pages diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/run-tests.sh b/vendor/github.com/DataDog/datadog-api-client-go/v2/run-tests.sh index 229bf51771..d44f8c4472 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/run-tests.sh +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/run-tests.sh @@ -24,11 +24,11 @@ fi # unfortunately there's no better way to fix this than change directory # this might get solved in Go 1.14: https://github.com/golang/go/issues/30515 cd "$(mktemp -d)" -GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@v0.4.3 +GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@v0.5.0 GO111MODULE=on go install gotest.tools/gotestsum@latest cd - -staticcheck ./api/... +staticcheck -checks -SA1009 ./api/... go mod tidy go clean -testcache diff --git a/vendor/github.com/DataDog/datadog-api-client-go/v2/version.go b/vendor/github.com/DataDog/datadog-api-client-go/v2/version.go index 66b8f9120d..ce9aa96dba 100644 --- a/vendor/github.com/DataDog/datadog-api-client-go/v2/version.go +++ b/vendor/github.com/DataDog/datadog-api-client-go/v2/version.go @@ -1,4 +1,4 @@ package client // Version used in User-Agent header. -const Version = "2.29.0" +const Version = "2.31.0" diff --git a/vendor/github.com/DataDog/go-sqllexer/obfuscate_and_normalize.go b/vendor/github.com/DataDog/go-sqllexer/obfuscate_and_normalize.go index bf60c020ee..942211fb78 100644 --- a/vendor/github.com/DataDog/go-sqllexer/obfuscate_and_normalize.go +++ b/vendor/github.com/DataDog/go-sqllexer/obfuscate_and_normalize.go @@ -29,7 +29,7 @@ func ObfuscateAndNormalize(input string, obfuscator *Obfuscator, normalizer *Nor if token.Type == EOF { break } - token.Value = obfuscator.ObfuscateTokenValue(token, lexerOpts...) + token.Value = obfuscator.ObfuscateTokenValue(token, lastToken, lexerOpts...) normalizer.collectMetadata(&token, &lastToken, statementMetadata, ctes) normalizer.normalizeSQL(&token, &lastToken, &normalizedSQLBuilder, &groupablePlaceholder, lexerOpts...) } diff --git a/vendor/github.com/DataDog/go-sqllexer/obfuscator.go b/vendor/github.com/DataDog/go-sqllexer/obfuscator.go index ae2d464d60..79a671933b 100644 --- a/vendor/github.com/DataDog/go-sqllexer/obfuscator.go +++ b/vendor/github.com/DataDog/go-sqllexer/obfuscator.go @@ -10,6 +10,7 @@ type obfuscatorConfig struct { ReplacePositionalParameter bool `json:"replace_positional_parameter"` ReplaceBoolean bool `json:"replace_boolean"` ReplaceNull bool `json:"replace_null"` + KeepJsonPath bool `json:"keep_json_path"` // by default, we replace json path with placeholder } type obfuscatorOption func(*obfuscatorConfig) @@ -44,6 +45,12 @@ func WithDollarQuotedFunc(dollarQuotedFunc bool) obfuscatorOption { } } +func WithKeepJsonPath(keepJsonPath bool) obfuscatorOption { + return func(c *obfuscatorConfig) { + c.KeepJsonPath = keepJsonPath + } +} + type Obfuscator struct { config *obfuscatorConfig } @@ -74,20 +81,29 @@ func (o *Obfuscator) Obfuscate(input string, lexerOpts ...lexerOption) string { input, lexerOpts..., ) + + var lastToken Token // The last token that is not whitespace or comment + for { token := lexer.Scan() if token.Type == EOF { break } - obfuscatedSQL.WriteString(o.ObfuscateTokenValue(token, lexerOpts...)) + obfuscatedSQL.WriteString(o.ObfuscateTokenValue(token, lastToken, lexerOpts...)) + if token.Type != WS { + lastToken = token + } } return strings.TrimSpace(obfuscatedSQL.String()) } -func (o *Obfuscator) ObfuscateTokenValue(token Token, lexerOpts ...lexerOption) string { +func (o *Obfuscator) ObfuscateTokenValue(token Token, lastToken Token, lexerOpts ...lexerOption) string { switch token.Type { case NUMBER: + if o.config.KeepJsonPath && isJsonOperator(&lastToken) { + return token.Value + } return NumberPlaceholder case DOLLAR_QUOTED_FUNCTION: if o.config.DollarQuotedFunc { @@ -102,6 +118,9 @@ func (o *Obfuscator) ObfuscateTokenValue(token Token, lexerOpts ...lexerOption) return StringPlaceholder } case STRING, INCOMPLETE_STRING, DOLLAR_QUOTED_STRING: + if o.config.KeepJsonPath && isJsonOperator(&lastToken) { + return token.Value + } return StringPlaceholder case POSITIONAL_PARAMETER: if o.config.ReplacePositionalParameter { diff --git a/vendor/github.com/DataDog/go-sqllexer/sqllexer.go b/vendor/github.com/DataDog/go-sqllexer/sqllexer.go index f092622b5f..edf25935a4 100644 --- a/vendor/github.com/DataDog/go-sqllexer/sqllexer.go +++ b/vendor/github.com/DataDog/go-sqllexer/sqllexer.go @@ -474,6 +474,10 @@ func (s *Lexer) scanSystemVariable() Token { } ch = s.next() } + if s.cursor-s.start == 2 { + // if the system variable is just @@, then it's a jsonpath operator + return Token{OPERATOR, s.src[s.start:s.cursor]} + } return Token{SYSTEM_VARIABLE, s.src[s.start:s.cursor]} } diff --git a/vendor/github.com/DataDog/go-sqllexer/sqllexer_utils.go b/vendor/github.com/DataDog/go-sqllexer/sqllexer_utils.go index 5046525682..323b2ef5a0 100644 --- a/vendor/github.com/DataDog/go-sqllexer/sqllexer_utils.go +++ b/vendor/github.com/DataDog/go-sqllexer/sqllexer_utils.go @@ -151,6 +151,20 @@ var keywords = map[string]bool{ "ONLY": true, } +var jsonOperators = map[string]bool{ + "->": true, + "->>": true, + "#>": true, + "#>>": true, + "@?": true, + "@@": true, + "?|": true, + "?&": true, + "@>": true, + "<@": true, + "#-": true, +} + func isWhitespace(ch rune) bool { return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' } @@ -240,6 +254,14 @@ func isNull(ident string) bool { return strings.ToUpper(ident) == "NULL" } +func isJsonOperator(token *Token) bool { + if token.Type != OPERATOR { + return false + } + _, ok := jsonOperators[token.Value] + return ok +} + func replaceDigits(input string, placeholder string) string { var builder strings.Builder diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics/metrics_remapping.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics/metrics_remapping.go index f7d88abe9a..2711301227 100644 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics/metrics_remapping.go +++ b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics/metrics_remapping.go @@ -239,17 +239,8 @@ func renameHostMetrics(m pmetric.Metric) { } } -var agentHTTPMetrics = map[string]struct{}{ - "http_server_duration": {}, - "http_server_request_size": {}, - "http_server_response_size": {}, -} - // isAgentInternalOTelMetric determines whether a metric is a internal metric in Agent on OTLP func isAgentInternalOTelMetric(name string) bool { - if _, ok := agentHTTPMetrics[name]; ok { - return true - } return strings.HasPrefix(name, "datadog_trace_agent") || strings.HasPrefix(name, "datadog_otlp") } diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/app_engine.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/app_engine.go index 0a36807033..9ce7d96fe4 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/app_engine.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/app_engine.go @@ -14,6 +14,8 @@ package gcp +import "context" + const ( // See https://cloud.google.com/appengine/docs/flexible/python/migrating#modules // for the environment variables available in GAE environments. @@ -67,7 +69,7 @@ func (d *Detector) AppEngineFlexAvailabilityZoneAndRegion() (string, string, err // AppEngineStandardAvailabilityZone returns the zone the app engine service is running in. func (d *Detector) AppEngineStandardAvailabilityZone() (string, error) { - return d.metadata.Zone() + return d.metadata.ZoneWithContext(context.TODO()) } // AppEngineStandardCloudRegion returns the region the app engine service is running in. diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/detector.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/detector.go index 2cc62de097..4eac3c74b6 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/detector.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/detector.go @@ -15,8 +15,10 @@ package gcp import ( + "context" "errors" "os" + "strings" "cloud.google.com/go/compute/metadata" ) @@ -68,27 +70,24 @@ func (d *Detector) CloudPlatform() Platform { // ProjectID returns the ID of the project in which this program is running. func (d *Detector) ProjectID() (string, error) { - return d.metadata.ProjectID() + // N.B. d.metadata.ProjectIDWithContext(context.TODO()) is cached globally, so if we use it here it's untestable. + s, err := d.metadata.GetWithContext(context.TODO(), "project/project-id") + return strings.TrimSpace(s), err +} + +// instanceID returns the ID of the project in which this program is running. +func (d *Detector) instanceID() (string, error) { + // N.B. d.metadata.InstanceIDWithContext(context.TODO()) is cached globally, so if we use it here it's untestable. + s, err := d.metadata.GetWithContext(context.TODO(), "instance/id") + return strings.TrimSpace(s), err } // Detector collects resource information for all GCP platforms. type Detector struct { - metadata metadataProvider + metadata *metadata.Client os osProvider } -// metadataProvider contains the subset of the metadata.Client functions used -// by this resource Detector to allow testing with a fake implementation. -type metadataProvider interface { - ProjectID() (string, error) - InstanceID() (string, error) - Get(string) (string, error) - InstanceName() (string, error) - Hostname() (string, error) - Zone() (string, error) - InstanceAttributeValue(string) (string, error) -} - // osProvider contains the subset of the os package functions used by. type osProvider interface { LookupEnv(string) (string, bool) diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/faas.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/faas.go index 9277608dd6..f137b1fae6 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/faas.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/faas.go @@ -15,6 +15,7 @@ package gcp import ( + "context" "strings" ) @@ -89,7 +90,7 @@ func (d *Detector) CloudRunJobTaskIndex() (string, error) { // FaaSID returns the instance id of the Cloud Run or Cloud Function. func (d *Detector) FaaSID() (string, error) { - return d.metadata.InstanceID() + return d.instanceID() } // FaaSCloudRegion detects region from the metadata server. @@ -97,7 +98,7 @@ func (d *Detector) FaaSID() (string, error) { // // https://cloud.google.com/run/docs/reference/container-contract#metadata-server func (d *Detector) FaaSCloudRegion() (string, error) { - region, err := d.metadata.Get(regionMetadataAttr) + region, err := d.metadata.GetWithContext(context.TODO(), regionMetadataAttr) if err != nil { return "", err } diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gce.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gce.go index 37259fc451..794cfdf036 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gce.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gce.go @@ -15,52 +15,59 @@ package gcp import ( + "context" "fmt" + "regexp" "strings" + + "cloud.google.com/go/compute/metadata" ) // See the available GCE instance metadata: -// https://cloud.google.com/compute/docs/metadata/default-metadata-values#vm_instance_metadata +// https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys#instance-metadata const machineTypeMetadataAttr = "instance/machine-type" +// https://cloud.google.com/compute/docs/instance-groups/getting-info-about-migs#checking_if_a_vm_instance_is_part_of_a_mig +const createdByInstanceAttr = "created-by" + func (d *Detector) onGCE() bool { - _, err := d.metadata.Get(machineTypeMetadataAttr) + _, err := d.metadata.GetWithContext(context.TODO(), machineTypeMetadataAttr) return err == nil } // GCEHostType returns the machine type of the instance on which this program is running. func (d *Detector) GCEHostType() (string, error) { - return d.metadata.Get(machineTypeMetadataAttr) + return d.metadata.GetWithContext(context.TODO(), machineTypeMetadataAttr) } // GCEHostID returns the instance ID of the instance on which this program is running. func (d *Detector) GCEHostID() (string, error) { - return d.metadata.InstanceID() + return d.instanceID() } // GCEHostName returns the instance name of the instance on which this program is running. // Recommended to use GCEInstanceName() or GCEInstanceHostname() to more accurately reflect which // value is returned. func (d *Detector) GCEHostName() (string, error) { - return d.metadata.InstanceName() + return d.metadata.InstanceNameWithContext(context.TODO()) } // GCEInstanceName returns the instance name of the instance on which this program is running. // This is the value visible in the Cloud Console UI, and the prefix for the default hostname // of the instance as defined by the default internal DNS name (see https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). func (d *Detector) GCEInstanceName() (string, error) { - return d.metadata.InstanceName() + return d.metadata.InstanceNameWithContext(context.TODO()) } // GCEInstanceHostname returns the full value of the default or custom hostname of the instance // on which this program is running. See https://cloud.google.com/compute/docs/instances/custom-hostname-vm. func (d *Detector) GCEInstanceHostname() (string, error) { - return d.metadata.Hostname() + return d.metadata.HostnameWithContext(context.TODO()) } // GCEAvailabilityZoneAndRegion returns the zone and region in which this program is running. func (d *Detector) GCEAvailabilityZoneAndRegion() (string, string, error) { - zone, err := d.metadata.Zone() + zone, err := d.metadata.ZoneWithContext(context.TODO()) if err != nil { return "", "", err } @@ -73,3 +80,38 @@ func (d *Detector) GCEAvailabilityZoneAndRegion() (string, string, error) { } return zone, strings.Join(splitZone[0:2], "-"), nil } + +type ManagedInstanceGroup struct { + Name string + Location string + Type LocationType +} + +var createdByMIGRE = regexp.MustCompile(`^projects/[^/]+/(zones|regions)/([^/]+)/instanceGroupManagers/([^/]+)$`) + +func (d *Detector) GCEManagedInstanceGroup() (ManagedInstanceGroup, error) { + createdBy, err := d.metadata.InstanceAttributeValueWithContext(context.TODO(), createdByInstanceAttr) + if _, ok := err.(metadata.NotDefinedError); ok { + return ManagedInstanceGroup{}, nil + } else if err != nil { + return ManagedInstanceGroup{}, err + } + matches := createdByMIGRE.FindStringSubmatch(createdBy) + if matches == nil { + // The "created-by" key exists, but it doesn't describe a MIG. + // Something else must have created this VM. + return ManagedInstanceGroup{}, nil + } + + mig := ManagedInstanceGroup{ + Name: matches[3], + Location: matches[2], + } + switch matches[1] { + case "zones": + mig.Type = Zone + case "regions": + mig.Type = Region + } + return mig, nil +} diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gke.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gke.go index 4971e55fb4..734d44cc03 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gke.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gke.go @@ -15,6 +15,7 @@ package gcp import ( + "context" "fmt" "strings" ) @@ -38,7 +39,7 @@ func (d *Detector) onGKE() bool { } // If we are on k8s, make sure that we are actually on GKE, and not a // different managed k8s platform. - _, err := d.GKEClusterName() + _, err := d.metadata.InstanceAttributeValueWithContext(context.TODO(), clusterLocationMetadataAttr) return err == nil } @@ -49,7 +50,7 @@ func (d *Detector) GKEHostID() (string, error) { // GKEClusterName returns the name if the GKE cluster in which this program is running. func (d *Detector) GKEClusterName() (string, error) { - return d.metadata.InstanceAttributeValue(clusterNameMetadataAttr) + return d.metadata.InstanceAttributeValueWithContext(context.TODO(), clusterNameMetadataAttr) } type LocationType int64 @@ -62,7 +63,7 @@ const ( // GKEAvailabilityZoneOrRegion returns the location of the cluster and whether the cluster is zonal or regional. func (d *Detector) GKEAvailabilityZoneOrRegion() (string, LocationType, error) { - clusterLocation, err := d.metadata.InstanceAttributeValue(clusterLocationMetadataAttr) + clusterLocation, err := d.metadata.InstanceAttributeValueWithContext(context.TODO(), clusterLocationMetadataAttr) if err != nil { return "", UndefinedLocation, err } diff --git a/vendor/github.com/antchfx/xmlquery/.gitignore b/vendor/github.com/antchfx/xmlquery/.gitignore new file mode 100644 index 0000000000..4d5d27b1d3 --- /dev/null +++ b/vendor/github.com/antchfx/xmlquery/.gitignore @@ -0,0 +1,32 @@ +# vscode +.vscode +debug +*.test + +./build + +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof \ No newline at end of file diff --git a/vendor/github.com/antchfx/xmlquery/LICENSE b/vendor/github.com/antchfx/xmlquery/LICENSE new file mode 100644 index 0000000000..e14c37141c --- /dev/null +++ b/vendor/github.com/antchfx/xmlquery/LICENSE @@ -0,0 +1,17 @@ +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. \ No newline at end of file diff --git a/vendor/github.com/antchfx/xmlquery/README.md b/vendor/github.com/antchfx/xmlquery/README.md new file mode 100644 index 0000000000..4d26bfef35 --- /dev/null +++ b/vendor/github.com/antchfx/xmlquery/README.md @@ -0,0 +1,302 @@ +# xmlquery + +[![Build Status](https://github.com/antchfx/xmlquery/actions/workflows/testing.yml/badge.svg)](https://github.com/antchfx/xmlquery/actions/workflows/testing.yml) +[![GoDoc](https://godoc.org/github.com/antchfx/xmlquery?status.svg)](https://godoc.org/github.com/antchfx/xmlquery) +[![Go Report Card](https://goreportcard.com/badge/github.com/antchfx/xmlquery)](https://goreportcard.com/report/github.com/antchfx/xmlquery) + +# Overview + +`xmlquery` is an XPath query package for XML documents, allowing you to extract +data or evaluate from XML documents with an XPath expression. + +`xmlquery` has a built-in query object caching feature that caches recently used +XPATH query strings. Enabling caching can avoid recompile XPath expression for +each query. + +You can visit this page to learn about the supported XPath(1.0/2.0) syntax. https://github.com/antchfx/xpath + +[htmlquery](https://github.com/antchfx/htmlquery) - Package for the HTML document query. + +[xmlquery](https://github.com/antchfx/xmlquery) - Package for the XML document query. + +[jsonquery](https://github.com/antchfx/jsonquery) - Package for the JSON document query. + +# Installation + +``` + $ go get github.com/antchfx/xmlquery +``` + +# Quick Starts + +```go +import ( + "github.com/antchfx/xmlquery" +) + +func main(){ + s := ` + + + W3Schools Home Page + https://www.w3schools.com + Free web building tutorials + + RSS Tutorial + https://www.w3schools.com/xml/xml_rss.asp + New RSS tutorial on W3Schools + + + XML Tutorial + https://www.w3schools.com/xml + New XML tutorial on W3Schools + + +` + + doc, err := xmlquery.Parse(strings.NewReader(s)) + if err != nil { + panic(err) + } + channel := xmlquery.FindOne(doc, "//channel") + if n := channel.SelectElement("title"); n != nil { + fmt.Printf("title: %s\n", n.InnerText()) + } + if n := channel.SelectElement("link"); n != nil { + fmt.Printf("link: %s\n", n.InnerText()) + } + for i, n := range xmlquery.Find(doc, "//item/title") { + fmt.Printf("#%d %s\n", i, n.InnerText()) + } +} +``` + +# Getting Started + +### Find specified XPath query. + +```go +list, err := xmlquery.QueryAll(doc, "a") +if err != nil { + panic(err) +} +``` + +#### Parse an XML from URL. + +```go +doc, err := xmlquery.LoadURL("http://www.example.com/sitemap.xml") +``` + +#### Parse an XML from string. + +```go +s := `` +doc, err := xmlquery.Parse(strings.NewReader(s)) +``` + +#### Parse an XML from io.Reader. + +```go +f, err := os.Open("../books.xml") +doc, err := xmlquery.Parse(f) +``` + +#### Parse an XML in a stream fashion (simple case without elements filtering). + +```go +f, _ := os.Open("../books.xml") +p, err := xmlquery.CreateStreamParser(f, "/bookstore/book") +for { + n, err := p.Read() + if err == io.EOF { + break + } + if err != nil { + panic(err) + } + fmt.Println(n) +} +``` + +Notes: `CreateStreamParser()` used for saving memory if your had a large XML file to parse. + +#### Parse an XML in a stream fashion (simple case advanced element filtering). + +```go +f, _ := os.Open("../books.xml") +p, err := xmlquery.CreateStreamParser(f, "/bookstore/book", "/bookstore/book[price>=10]") +for { + n, err := p.Read() + if err == io.EOF { + break + } + if err != nil { + panic(err) + } + fmt.Println(n) +} +``` + +#### Find authors of all books in the bookstore. + +```go +list := xmlquery.Find(doc, "//book//author") +// or +list := xmlquery.Find(doc, "//author") +``` + +#### Find the second book. + +```go +book := xmlquery.FindOne(doc, "//book[2]") +``` + +#### Find the last book. + +```go +book := xmlquery.FindOne(doc, "//book[last()]") +``` + +#### Find all book elements and only get `id` attribute. + +```go +list := xmlquery.Find(doc,"//book/@id") +fmt.Println(list[0].InnerText) // outout @id value +``` + +#### Find all books with id `bk104`. + +```go +list := xmlquery.Find(doc, "//book[@id='bk104']") +``` + +#### Find all books with price less than 5. + +```go +list := xmlquery.Find(doc, "//book[price<5]") +``` + +#### Evaluate total price of all books. + +```go +expr, err := xpath.Compile("sum(//book/price)") +price := expr.Evaluate(xmlquery.CreateXPathNavigator(doc)).(float64) +fmt.Printf("total price: %f\n", price) +``` + +#### Count the number of books. + +```go +expr, err := xpath.Compile("count(//book)") +count := expr.Evaluate(xmlquery.CreateXPathNavigator(doc)).(float64) +``` + +#### Calculate the total price of all book prices. + +```go +expr, err := xpath.Compile("sum(//book/price)") +price := expr.Evaluate(xmlquery.CreateXPathNavigator(doc)).(float64) +``` + +# Advanced Features + +### Parse `UTF-16` XML file with `ParseWithOptions()`. + +```go +f, _ := os.Open(`UTF-16.XML`) +// Convert UTF-16 XML to UTF-8 +utf16ToUtf8Transformer := unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM).NewDecoder() +utf8Reader := transform.NewReader(f, utf16ToUtf8Transformer) +// Sets `CharsetReader` +options := xmlquery.ParserOptions{ + Decoder: &xmlquery.DecoderOptions{ + CharsetReader: func(charset string, input io.Reader) (io.Reader, error) { + return input, nil + }, + }, +} +doc, err := xmlquery.ParseWithOptions(utf8Reader, options) +``` + +### Query with custom namespace prefix. + +```go +s := ` + + +RequestReplyActivity +OpClientReqActivity +300 +80 + +` +nsMap := map[string]string{ + "q": "http://xmlns.xyz.com/process/2003", + "r": "http://www.w3.org/1999/XSL/Transform", + "s": "http://www.w3.org/2001/XMLSchema", +} +expr, _ := xpath.CompileWithNS("//q:activity", nsMap) +node := xmlquery.QuerySelector(doc, expr) +``` + +#### Create XML document without call `xml.Marshal`. + +```go +doc := &xmlquery.Node{ + Type: xmlquery.DeclarationNode, + Data: "xml", + Attr: []xml.Attr{ + xml.Attr{Name: xml.Name{Local: "version"}, Value: "1.0"}, + }, +} +root := &xmlquery.Node{ + Data: "rss", + Type: xmlquery.ElementNode, +} +doc.FirstChild = root +channel := &xmlquery.Node{ + Data: "channel", + Type: xmlquery.ElementNode, +} +root.FirstChild = channel +title := &xmlquery.Node{ + Data: "title", + Type: xmlquery.ElementNode, +} +title_text := &xmlquery.Node{ + Data: "W3Schools Home Page", + Type: xmlquery.TextNode, +} +title.FirstChild = title_text +channel.FirstChild = title + +fmt.Println(doc.OutputXML(true)) +fmt.Println(doc.OutputXMLWithOptions(WithOutputSelf())) +``` + +Output: + +```xml +W3Schools Home Page +``` + +# FAQ + +#### `Find()` vs `QueryAll()`, which is better? + +`Find` and `QueryAll` both do the same thing: searches all of matched XML nodes. +`Find` panics if provided with an invalid XPath query, while `QueryAll` returns +an error. + +#### Can I save my query expression object for the next query? + +Yes, you can. We provide `QuerySelector` and `QuerySelectorAll` methods; they +accept your query expression object. + +Caching a query expression object avoids recompiling the XPath query +expression, improving query performance. + +# Questions + +Please let me know if you have any questions diff --git a/vendor/github.com/antchfx/xmlquery/cache.go b/vendor/github.com/antchfx/xmlquery/cache.go new file mode 100644 index 0000000000..3abffcdc57 --- /dev/null +++ b/vendor/github.com/antchfx/xmlquery/cache.go @@ -0,0 +1,43 @@ +package xmlquery + +import ( + "sync" + + "github.com/golang/groupcache/lru" + + "github.com/antchfx/xpath" +) + +// DisableSelectorCache will disable caching for the query selector if value is true. +var DisableSelectorCache = false + +// SelectorCacheMaxEntries allows how many selector object can be caching. Default is 50. +// Will disable caching if SelectorCacheMaxEntries <= 0. +var SelectorCacheMaxEntries = 50 + +var ( + cacheOnce sync.Once + cache *lru.Cache + cacheMutex sync.Mutex +) + +func getQuery(expr string) (*xpath.Expr, error) { + if DisableSelectorCache || SelectorCacheMaxEntries <= 0 { + return xpath.Compile(expr) + } + cacheOnce.Do(func() { + cache = lru.New(SelectorCacheMaxEntries) + }) + cacheMutex.Lock() + defer cacheMutex.Unlock() + if v, ok := cache.Get(expr); ok { + return v.(*xpath.Expr), nil + } + v, err := xpath.Compile(expr) + if err != nil { + return nil, err + } + cache.Add(expr, v) + return v, nil + +} diff --git a/vendor/github.com/antchfx/xmlquery/cached_reader.go b/vendor/github.com/antchfx/xmlquery/cached_reader.go new file mode 100644 index 0000000000..fe389c5d5c --- /dev/null +++ b/vendor/github.com/antchfx/xmlquery/cached_reader.go @@ -0,0 +1,69 @@ +package xmlquery + +import ( + "bufio" +) + +type cachedReader struct { + buffer *bufio.Reader + cache []byte + cacheCap int + cacheLen int + caching bool +} + +func newCachedReader(r *bufio.Reader) *cachedReader { + return &cachedReader{ + buffer: r, + cache: make([]byte, 4096), + cacheCap: 4096, + cacheLen: 0, + caching: false, + } +} + +func (c *cachedReader) StartCaching() { + c.cacheLen = 0 + c.caching = true +} + +func (c *cachedReader) ReadByte() (byte, error) { + if !c.caching { + return c.buffer.ReadByte() + } + b, err := c.buffer.ReadByte() + if err != nil { + return b, err + } + if c.cacheLen < c.cacheCap { + c.cache[c.cacheLen] = b + c.cacheLen++ + } + return b, err +} + +func (c *cachedReader) Cache() []byte { + return c.cache[:c.cacheLen] +} + +func (c *cachedReader) StopCaching() { + c.caching = false +} + +func (c *cachedReader) Read(p []byte) (int, error) { + n, err := c.buffer.Read(p) + if err != nil { + return n, err + } + if c.caching && c.cacheLen < c.cacheCap { + for i := 0; i < n; i++ { + c.cache[c.cacheLen] = p[i] + c.cacheLen++ + if c.cacheLen >= c.cacheCap { + break + } + } + } + return n, err +} + diff --git a/vendor/github.com/antchfx/xmlquery/node.go b/vendor/github.com/antchfx/xmlquery/node.go new file mode 100644 index 0000000000..28f3f54279 --- /dev/null +++ b/vendor/github.com/antchfx/xmlquery/node.go @@ -0,0 +1,341 @@ +package xmlquery + +import ( + "encoding/xml" + "fmt" + "html" + "strings" +) + +// A NodeType is the type of a Node. +type NodeType uint + +const ( + // DocumentNode is a document object that, as the root of the document tree, + // provides access to the entire XML document. + DocumentNode NodeType = iota + // DeclarationNode is the document type declaration, indicated by the + // following tag (for example, ). + DeclarationNode + // ElementNode is an element (for example, ). + ElementNode + // TextNode is the text content of a node. + TextNode + // CharDataNode node + CharDataNode + // CommentNode a comment (for example, ). + CommentNode + // AttributeNode is an attribute of element. + AttributeNode + // NotationNode is a directive represents in document (for example, ). + NotationNode +) + +type Attr struct { + Name xml.Name + Value string + NamespaceURI string +} + +// A Node consists of a NodeType and some Data (tag name for +// element nodes, content for text) and are part of a tree of Nodes. +type Node struct { + Parent, FirstChild, LastChild, PrevSibling, NextSibling *Node + + Type NodeType + Data string + Prefix string + NamespaceURI string + Attr []Attr + + level int // node level in the tree +} + +type outputConfiguration struct { + printSelf bool + preserveSpaces bool + emptyElementTagSupport bool + skipComments bool +} + +type OutputOption func(*outputConfiguration) + +// WithOutputSelf configures the Node to print the root node itself +func WithOutputSelf() OutputOption { + return func(oc *outputConfiguration) { + oc.printSelf = true + } +} + +// WithEmptyTagSupport empty tags should be written as and +// not as +func WithEmptyTagSupport() OutputOption { + return func(oc *outputConfiguration) { + oc.emptyElementTagSupport = true + } +} + +// WithoutComments will skip comments in output +func WithoutComments() OutputOption { + return func(oc *outputConfiguration) { + oc.skipComments = true + } +} + +// WithPreserveSpace will preserve spaces in output +func WithPreserveSpace() OutputOption { + return func(oc *outputConfiguration) { + oc.preserveSpaces = true + } +} + +func newXMLName(name string) xml.Name { + if i := strings.IndexByte(name, ':'); i > 0 { + return xml.Name{ + Space: name[:i], + Local: name[i+1:], + } + } + return xml.Name{ + Local: name, + } +} + +func (n *Node) Level() int { + return n.level +} + +// InnerText returns the text between the start and end tags of the object. +func (n *Node) InnerText() string { + var output func(*strings.Builder, *Node) + output = func(b *strings.Builder, n *Node) { + switch n.Type { + case TextNode, CharDataNode: + b.WriteString(n.Data) + case CommentNode: + default: + for child := n.FirstChild; child != nil; child = child.NextSibling { + output(b, child) + } + } + } + + var b strings.Builder + output(&b, n) + return b.String() +} + +func (n *Node) sanitizedData(preserveSpaces bool) string { + if preserveSpaces { + return n.Data + } + return strings.TrimSpace(n.Data) +} + +func calculatePreserveSpaces(n *Node, pastValue bool) bool { + if attr := n.SelectAttr("xml:space"); attr == "preserve" { + return true + } else if attr == "default" { + return false + } + return pastValue +} + +func outputXML(b *strings.Builder, n *Node, preserveSpaces bool, config *outputConfiguration) { + preserveSpaces = calculatePreserveSpaces(n, preserveSpaces) + switch n.Type { + case TextNode: + b.WriteString(html.EscapeString(n.sanitizedData(preserveSpaces))) + return + case CharDataNode: + b.WriteString("") + return + case CommentNode: + if !config.skipComments { + b.WriteString("") + } + return + case NotationNode: + fmt.Fprintf(b, "", n.Data) + return + case DeclarationNode: + b.WriteString("") + } else { + if n.FirstChild != nil || !config.emptyElementTagSupport { + b.WriteString(">") + } else { + b.WriteString("/>") + return + } + } + for child := n.FirstChild; child != nil; child = child.NextSibling { + outputXML(b, child, preserveSpaces, config) + } + if n.Type != DeclarationNode { + if n.Prefix == "" { + fmt.Fprintf(b, "", n.Data) + } else { + fmt.Fprintf(b, "", n.Prefix, n.Data) + } + } +} + +// OutputXML returns the text that including tags name. +func (n *Node) OutputXML(self bool) string { + + config := &outputConfiguration{ + printSelf: true, + emptyElementTagSupport: false, + } + preserveSpaces := calculatePreserveSpaces(n, false) + var b strings.Builder + if self && n.Type != DocumentNode { + outputXML(&b, n, preserveSpaces, config) + } else { + for n := n.FirstChild; n != nil; n = n.NextSibling { + outputXML(&b, n, preserveSpaces, config) + } + } + + return b.String() +} + +// OutputXMLWithOptions returns the text that including tags name. +func (n *Node) OutputXMLWithOptions(opts ...OutputOption) string { + + config := &outputConfiguration{} + // Set the options + for _, opt := range opts { + opt(config) + } + pastPreserveSpaces := config.preserveSpaces + preserveSpaces := calculatePreserveSpaces(n, pastPreserveSpaces) + var b strings.Builder + if config.printSelf && n.Type != DocumentNode { + outputXML(&b, n, preserveSpaces, config) + } else { + for n := n.FirstChild; n != nil; n = n.NextSibling { + outputXML(&b, n, preserveSpaces, config) + } + } + + return b.String() +} + +// AddAttr adds a new attribute specified by 'key' and 'val' to a node 'n'. +func AddAttr(n *Node, key, val string) { + attr := Attr{ + Name: newXMLName(key), + Value: val, + } + n.Attr = append(n.Attr, attr) +} + +// SetAttr allows an attribute value with the specified name to be changed. +// If the attribute did not previously exist, it will be created. +func (n *Node) SetAttr(key, value string) { + name := newXMLName(key) + for i, attr := range n.Attr { + if attr.Name == name { + n.Attr[i].Value = value + return + } + } + AddAttr(n, key, value) +} + +// RemoveAttr removes the attribute with the specified name. +func (n *Node) RemoveAttr(key string) { + name := newXMLName(key) + for i, attr := range n.Attr { + if attr.Name == name { + n.Attr = append(n.Attr[:i], n.Attr[i+1:]...) + return + } + } +} + +// AddChild adds a new node 'n' to a node 'parent' as its last child. +func AddChild(parent, n *Node) { + n.Parent = parent + n.NextSibling = nil + if parent.FirstChild == nil { + parent.FirstChild = n + n.PrevSibling = nil + } else { + parent.LastChild.NextSibling = n + n.PrevSibling = parent.LastChild + } + + parent.LastChild = n +} + +// AddSibling adds a new node 'n' as a sibling of a given node 'sibling'. +// Note it is not necessarily true that the new node 'n' would be added +// immediately after 'sibling'. If 'sibling' isn't the last child of its +// parent, then the new node 'n' will be added at the end of the sibling +// chain of their parent. +func AddSibling(sibling, n *Node) { + for t := sibling.NextSibling; t != nil; t = t.NextSibling { + sibling = t + } + n.Parent = sibling.Parent + sibling.NextSibling = n + n.PrevSibling = sibling + n.NextSibling = nil + if sibling.Parent != nil { + sibling.Parent.LastChild = n + } +} + +// RemoveFromTree removes a node and its subtree from the document +// tree it is in. If the node is the root of the tree, then it's no-op. +func RemoveFromTree(n *Node) { + if n.Parent == nil { + return + } + if n.Parent.FirstChild == n { + if n.Parent.LastChild == n { + n.Parent.FirstChild = nil + n.Parent.LastChild = nil + } else { + n.Parent.FirstChild = n.NextSibling + n.NextSibling.PrevSibling = nil + } + } else { + if n.Parent.LastChild == n { + n.Parent.LastChild = n.PrevSibling + n.PrevSibling.NextSibling = nil + } else { + n.PrevSibling.NextSibling = n.NextSibling + n.NextSibling.PrevSibling = n.PrevSibling + } + } + n.Parent = nil + n.PrevSibling = nil + n.NextSibling = nil +} diff --git a/vendor/github.com/antchfx/xmlquery/options.go b/vendor/github.com/antchfx/xmlquery/options.go new file mode 100644 index 0000000000..6b902d2148 --- /dev/null +++ b/vendor/github.com/antchfx/xmlquery/options.go @@ -0,0 +1,33 @@ +package xmlquery + +import ( + "encoding/xml" + "io" +) + +type ParserOptions struct { + Decoder *DecoderOptions +} + +func (options ParserOptions) apply(parser *parser) { + if options.Decoder != nil { + (*options.Decoder).apply(parser.decoder) + } +} + +// DecoderOptions implement the very same options than the standard +// encoding/xml package. Please refer to this documentation: +// https://golang.org/pkg/encoding/xml/#Decoder +type DecoderOptions struct { + Strict bool + AutoClose []string + Entity map[string]string + CharsetReader func(charset string, input io.Reader) (io.Reader, error) +} + +func (options DecoderOptions) apply(decoder *xml.Decoder) { + decoder.Strict = options.Strict + decoder.AutoClose = options.AutoClose + decoder.Entity = options.Entity + decoder.CharsetReader = options.CharsetReader +} diff --git a/vendor/github.com/antchfx/xmlquery/parse.go b/vendor/github.com/antchfx/xmlquery/parse.go new file mode 100644 index 0000000000..daf7233a04 --- /dev/null +++ b/vendor/github.com/antchfx/xmlquery/parse.go @@ -0,0 +1,414 @@ +package xmlquery + +import ( + "bufio" + "encoding/xml" + "fmt" + "io" + "net/http" + "regexp" + "strings" + "sync" + + "github.com/antchfx/xpath" + "golang.org/x/net/html/charset" +) + +var xmlMIMERegex = regexp.MustCompile(`(?i)((application|image|message|model)/((\w|\.|-)+\+?)?|text/)(wb)?xml`) + +// LoadURL loads the XML document from the specified URL. +func LoadURL(url string) (*Node, error) { + resp, err := http.Get(url) + if err != nil { + return nil, err + } + defer resp.Body.Close() + // Make sure the Content-Type has a valid XML MIME type + if xmlMIMERegex.MatchString(resp.Header.Get("Content-Type")) { + return Parse(resp.Body) + } + return nil, fmt.Errorf("invalid XML document(%s)", resp.Header.Get("Content-Type")) +} + +// Parse returns the parse tree for the XML from the given Reader. +func Parse(r io.Reader) (*Node, error) { + return ParseWithOptions(r, ParserOptions{}) +} + +// ParseWithOptions is like parse, but with custom options +func ParseWithOptions(r io.Reader, options ParserOptions) (*Node, error) { + p := createParser(r) + options.apply(p) + for { + _, err := p.parse() + if err == io.EOF { + return p.doc, nil + } + if err != nil { + return nil, err + } + } +} + +type parser struct { + decoder *xml.Decoder + doc *Node + level int + prev *Node + streamElementXPath *xpath.Expr // Under streaming mode, this specifies the xpath to the target element node(s). + streamElementFilter *xpath.Expr // If specified, it provides further filtering on the target element. + streamNode *Node // Need to remember the last target node So we can clean it up upon next Read() call. + streamNodePrev *Node // Need to remember target node's prev so upon target node removal, we can restore correct prev. + reader *cachedReader // Need to maintain a reference to the reader, so we can determine whether a node contains CDATA. + once sync.Once + space2prefix map[string]*xmlnsPrefix +} + +type xmlnsPrefix struct { + name string + level int +} + +func createParser(r io.Reader) *parser { + reader := newCachedReader(bufio.NewReader(r)) + p := &parser{ + decoder: xml.NewDecoder(reader), + doc: &Node{Type: DocumentNode}, + level: 0, + reader: reader, + } + if p.decoder.CharsetReader == nil { + p.decoder.CharsetReader = charset.NewReaderLabel + } + p.prev = p.doc + return p +} + +func (p *parser) parse() (*Node, error) { + p.once.Do(func() { + p.space2prefix = map[string]*xmlnsPrefix{"http://www.w3.org/XML/1998/namespace": {name: "xml", level: 0}} + }) + + var streamElementNodeCounter int + for { + p.reader.StartCaching() + tok, err := p.decoder.Token() + p.reader.StopCaching() + if err != nil { + return nil, err + } + + switch tok := tok.(type) { + case xml.StartElement: + if p.level == 0 { + // mising XML declaration + attributes := make([]Attr, 1) + attributes[0].Name = xml.Name{Local: "version"} + attributes[0].Value = "1.0" + node := &Node{ + Type: DeclarationNode, + Data: "xml", + Attr: attributes, + level: 1, + } + AddChild(p.prev, node) + p.level = 1 + p.prev = node + } + + for _, att := range tok.Attr { + if att.Name.Local == "xmlns" { + // https://github.com/antchfx/xmlquery/issues/67 + if prefix, ok := p.space2prefix[att.Value]; !ok || (ok && prefix.level >= p.level) { + p.space2prefix[att.Value] = &xmlnsPrefix{name: "", level: p.level} // reset empty if exist the default namespace + } + } else if att.Name.Space == "xmlns" { + // maybe there are have duplicate NamespaceURL? + p.space2prefix[att.Value] = &xmlnsPrefix{name: att.Name.Local, level: p.level} + } + } + + if space := tok.Name.Space; space != "" { + if _, found := p.space2prefix[space]; !found && p.decoder.Strict { + return nil, fmt.Errorf("xmlquery: invalid XML document, namespace %s is missing", space) + } + } + + attributes := make([]Attr, len(tok.Attr)) + for i, att := range tok.Attr { + name := att.Name + if prefix, ok := p.space2prefix[name.Space]; ok { + name.Space = prefix.name + } + attributes[i] = Attr{ + Name: name, + Value: att.Value, + NamespaceURI: att.Name.Space, + } + } + + node := &Node{ + Type: ElementNode, + Data: tok.Name.Local, + NamespaceURI: tok.Name.Space, + Attr: attributes, + level: p.level, + } + + if p.level == p.prev.level { + AddSibling(p.prev, node) + } else if p.level > p.prev.level { + AddChild(p.prev, node) + } else if p.level < p.prev.level { + for i := p.prev.level - p.level; i > 1; i-- { + p.prev = p.prev.Parent + } + AddSibling(p.prev.Parent, node) + } + + if node.NamespaceURI != "" { + if v, ok := p.space2prefix[node.NamespaceURI]; ok { + cached := string(p.reader.Cache()) + if strings.HasPrefix(cached, fmt.Sprintf("%s:%s", v.name, node.Data)) || strings.HasPrefix(cached, fmt.Sprintf("<%s:%s", v.name, node.Data)) { + node.Prefix = v.name + } + } + } + // If we're in the streaming mode, we need to remember the node if it is the target node + // so that when we finish processing the node's EndElement, we know how/what to return to + // caller. Also we need to remove the target node from the tree upon next Read() call so + // memory doesn't grow unbounded. + if p.streamElementXPath != nil { + if p.streamNode == nil { + if QuerySelector(p.doc, p.streamElementXPath) != nil { + p.streamNode = node + p.streamNodePrev = p.prev + streamElementNodeCounter = 1 + } + } else { + streamElementNodeCounter++ + } + } + p.prev = node + p.level++ + case xml.EndElement: + p.level-- + // If we're in streaming mode, and we already have a potential streaming + // target node identified (p.streamNode != nil) then we need to check if + // this is the real one we want to return to caller. + if p.streamNode != nil { + streamElementNodeCounter-- + if streamElementNodeCounter == 0 { + // Now we know this element node is the at least passing the initial + // p.streamElementXPath check and is a potential target node candidate. + // We need to have 1 more check with p.streamElementFilter (if given) to + // ensure it is really the element node we want. + // The reason we need a two-step check process is because the following + // situation: + // b1 + // And say the p.streamElementXPath = "/AAA/BBB[. != 'b1']". Now during + // xml.StartElement time, the node is still empty, so it will pass + // the p.streamElementXPath check. However, eventually we know this + // shouldn't be returned to the caller. Having a second more fine-grained + // filter check ensures that. So in this case, the caller should really + // setup the stream parser with: + // streamElementXPath = "/AAA/BBB[" + // streamElementFilter = "/AAA/BBB[. != 'b1']" + if p.streamElementFilter == nil || QuerySelector(p.doc, p.streamElementFilter) != nil { + return p.streamNode, nil + } + // otherwise, this isn't our target node, clean things up. + // note we also remove the underlying *Node from the node tree, to prevent + // future stream node candidate selection error. + RemoveFromTree(p.streamNode) + p.prev = p.streamNodePrev + p.streamNode = nil + p.streamNodePrev = nil + } + } + case xml.CharData: + // First, normalize the cache... + cached := strings.ToUpper(string(p.reader.Cache())) + nodeType := TextNode + if strings.HasPrefix(cached, " p.prev.level { + AddChild(p.prev, node) + } else if p.level < p.prev.level { + for i := p.prev.level - p.level; i > 1; i-- { + p.prev = p.prev.Parent + } + AddSibling(p.prev.Parent, node) + } + case xml.Comment: + node := &Node{Type: CommentNode, Data: string(tok), level: p.level} + if p.level == p.prev.level { + AddSibling(p.prev, node) + } else if p.level > p.prev.level { + AddChild(p.prev, node) + } else if p.level < p.prev.level { + for i := p.prev.level - p.level; i > 1; i-- { + p.prev = p.prev.Parent + } + AddSibling(p.prev.Parent, node) + } + case xml.ProcInst: // Processing Instruction + if p.prev.Type != DeclarationNode { + p.level++ + } + node := &Node{Type: DeclarationNode, Data: tok.Target, level: p.level} + pairs := strings.Split(string(tok.Inst), " ") + for _, pair := range pairs { + pair = strings.TrimSpace(pair) + if i := strings.Index(pair, "="); i > 0 { + AddAttr(node, pair[:i], strings.Trim(pair[i+1:], `"`)) + } + } + if p.level == p.prev.level { + AddSibling(p.prev, node) + } else if p.level > p.prev.level { + AddChild(p.prev, node) + } else if p.level < p.prev.level { + for i := p.prev.level - p.level; i > 1; i-- { + p.prev = p.prev.Parent + } + AddSibling(p.prev.Parent, node) + } + p.prev = node + case xml.Directive: + node := &Node{Type: NotationNode, Data: string(tok), level: p.level} + if p.level == p.prev.level { + AddSibling(p.prev, node) + } else if p.level > p.prev.level { + AddChild(p.prev, node) + } else if p.level < p.prev.level { + for i := p.prev.level - p.level; i > 1; i-- { + p.prev = p.prev.Parent + } + AddSibling(p.prev.Parent, node) + } + } + } +} + +// StreamParser enables loading and parsing an XML document in a streaming +// fashion. +type StreamParser struct { + p *parser +} + +// CreateStreamParser creates a StreamParser. Argument streamElementXPath is +// required. +// Argument streamElementFilter is optional and should only be used in advanced +// scenarios. +// +// Scenario 1: simple case: +// +// xml := `b1b2` +// sp, err := CreateStreamParser(strings.NewReader(xml), "/AAA/BBB") +// if err != nil { +// panic(err) +// } +// for { +// n, err := sp.Read() +// if err != nil { +// break +// } +// fmt.Println(n.OutputXML(true)) +// } +// +// Output will be: +// +// b1 +// b2 +// +// Scenario 2: advanced case: +// +// xml := `b1b2` +// sp, err := CreateStreamParser(strings.NewReader(xml), "/AAA/BBB", "/AAA/BBB[. != 'b1']") +// if err != nil { +// panic(err) +// } +// for { +// n, err := sp.Read() +// if err != nil { +// break +// } +// fmt.Println(n.OutputXML(true)) +// } +// +// Output will be: +// +// b2 +// +// As the argument names indicate, streamElementXPath should be used for +// providing xpath query pointing to the target element node only, no extra +// filtering on the element itself or its children; while streamElementFilter, +// if needed, can provide additional filtering on the target element and its +// children. +// +// CreateStreamParser returns an error if either streamElementXPath or +// streamElementFilter, if provided, cannot be successfully parsed and compiled +// into a valid xpath query. +func CreateStreamParser(r io.Reader, streamElementXPath string, streamElementFilter ...string) (*StreamParser, error) { + return CreateStreamParserWithOptions(r, ParserOptions{}, streamElementXPath, streamElementFilter...) +} + +// CreateStreamParserWithOptions is like CreateStreamParser, but with custom options +func CreateStreamParserWithOptions( + r io.Reader, + options ParserOptions, + streamElementXPath string, + streamElementFilter ...string, +) (*StreamParser, error) { + elemXPath, err := getQuery(streamElementXPath) + if err != nil { + return nil, fmt.Errorf("invalid streamElementXPath '%s', err: %s", streamElementXPath, err.Error()) + } + elemFilter := (*xpath.Expr)(nil) + if len(streamElementFilter) > 0 { + elemFilter, err = getQuery(streamElementFilter[0]) + if err != nil { + return nil, fmt.Errorf("invalid streamElementFilter '%s', err: %s", streamElementFilter[0], err.Error()) + } + } + parser := createParser(r) + options.apply(parser) + sp := &StreamParser{ + p: parser, + } + sp.p.streamElementXPath = elemXPath + sp.p.streamElementFilter = elemFilter + return sp, nil +} + +// Read returns a target node that satisfies the XPath specified by caller at +// StreamParser creation time. If there is no more satisfying target nodes after +// reading the rest of the XML document, io.EOF will be returned. At any time, +// any XML parsing error encountered will be returned, and the stream parsing +// stopped. Calling Read() after an error is returned (including io.EOF) results +// undefined behavior. Also note, due to the streaming nature, calling Read() +// will automatically remove any previous target node(s) from the document tree. +func (sp *StreamParser) Read() (*Node, error) { + // Because this is a streaming read, we need to release/remove last + // target node from the node tree to free up memory. + if sp.p.streamNode != nil { + // We need to remove all siblings before the current stream node, + // because the document may contain unwanted nodes between the target + // ones (for example new line text node), which would otherwise + // accumulate as first childs, and slow down the stream over time + for sp.p.streamNode.PrevSibling != nil { + RemoveFromTree(sp.p.streamNode.PrevSibling) + } + sp.p.prev = sp.p.streamNode.Parent + RemoveFromTree(sp.p.streamNode) + sp.p.streamNode = nil + sp.p.streamNodePrev = nil + } + return sp.p.parse() +} diff --git a/vendor/github.com/antchfx/xmlquery/query.go b/vendor/github.com/antchfx/xmlquery/query.go new file mode 100644 index 0000000000..d1353aac48 --- /dev/null +++ b/vendor/github.com/antchfx/xmlquery/query.go @@ -0,0 +1,304 @@ +/* +Package xmlquery provides extract data from XML documents using XPath expression. +*/ +package xmlquery + +import ( + "fmt" + "strings" + + "github.com/antchfx/xpath" +) + +// SelectElements finds child elements with the specified name. +func (n *Node) SelectElements(name string) []*Node { + return Find(n, name) +} + +// SelectElement finds child elements with the specified name. +func (n *Node) SelectElement(name string) *Node { + return FindOne(n, name) +} + +// SelectAttr returns the attribute value with the specified name. +func (n *Node) SelectAttr(name string) string { + if n.Type == AttributeNode { + if n.Data == name { + return n.InnerText() + } + return "" + } + xmlName := newXMLName(name) + for _, attr := range n.Attr { + if attr.Name == xmlName { + return attr.Value + } + } + return "" +} + +var _ xpath.NodeNavigator = &NodeNavigator{} + +// CreateXPathNavigator creates a new xpath.NodeNavigator for the specified +// XML Node. +func CreateXPathNavigator(top *Node) *NodeNavigator { + return &NodeNavigator{curr: top, root: top, attr: -1} +} + +func getCurrentNode(it *xpath.NodeIterator) *Node { + n := it.Current().(*NodeNavigator) + if n.NodeType() == xpath.AttributeNode { + childNode := &Node{ + Type: TextNode, + Data: n.Value(), + } + return &Node{ + Parent: n.curr, + Type: AttributeNode, + Data: n.LocalName(), + FirstChild: childNode, + LastChild: childNode, + } + } + return n.curr +} + +// Find is like QueryAll but panics if `expr` is not a valid XPath expression. +// See `QueryAll()` function. +func Find(top *Node, expr string) []*Node { + nodes, err := QueryAll(top, expr) + if err != nil { + panic(err) + } + return nodes +} + +// FindOne is like Query but panics if `expr` is not a valid XPath expression. +// See `Query()` function. +func FindOne(top *Node, expr string) *Node { + node, err := Query(top, expr) + if err != nil { + panic(err) + } + return node +} + +// QueryAll searches the XML Node that matches by the specified XPath expr. +// Returns an error if the expression `expr` cannot be parsed. +func QueryAll(top *Node, expr string) ([]*Node, error) { + exp, err := getQuery(expr) + if err != nil { + return nil, err + } + return QuerySelectorAll(top, exp), nil +} + +// Query searches the XML Node that matches by the specified XPath expr, +// and returns first matched element. +func Query(top *Node, expr string) (*Node, error) { + exp, err := getQuery(expr) + if err != nil { + return nil, err + } + return QuerySelector(top, exp), nil +} + +// QuerySelectorAll searches all of the XML Node that matches the specified +// XPath selectors. +func QuerySelectorAll(top *Node, selector *xpath.Expr) []*Node { + t := selector.Select(CreateXPathNavigator(top)) + var elems []*Node + for t.MoveNext() { + elems = append(elems, getCurrentNode(t)) + } + return elems +} + +// QuerySelector returns the first matched XML Node by the specified XPath +// selector. +func QuerySelector(top *Node, selector *xpath.Expr) *Node { + t := selector.Select(CreateXPathNavigator(top)) + if t.MoveNext() { + return getCurrentNode(t) + } + return nil +} + +// FindEach searches the html.Node and calls functions cb. +// Important: this method is deprecated, instead, use for .. = range Find(){}. +func FindEach(top *Node, expr string, cb func(int, *Node)) { + for i, n := range Find(top, expr) { + cb(i, n) + } +} + +// FindEachWithBreak functions the same as FindEach but allows to break the loop +// by returning false from the callback function `cb`. +// Important: this method is deprecated, instead, use .. = range Find(){}. +func FindEachWithBreak(top *Node, expr string, cb func(int, *Node) bool) { + for i, n := range Find(top, expr) { + if !cb(i, n) { + break + } + } +} + +type NodeNavigator struct { + root, curr *Node + attr int +} + +func (x *NodeNavigator) Current() *Node { + return x.curr +} + +func (x *NodeNavigator) NodeType() xpath.NodeType { + switch x.curr.Type { + case CommentNode: + return xpath.CommentNode + case TextNode, CharDataNode, NotationNode: + return xpath.TextNode + case DeclarationNode, DocumentNode: + return xpath.RootNode + case ElementNode: + if x.attr != -1 { + return xpath.AttributeNode + } + return xpath.ElementNode + } + panic(fmt.Sprintf("unknown XML node type: %v", x.curr.Type)) +} + +func (x *NodeNavigator) LocalName() string { + if x.attr != -1 { + return x.curr.Attr[x.attr].Name.Local + } + return x.curr.Data + +} + +func (x *NodeNavigator) Prefix() string { + if x.NodeType() == xpath.AttributeNode { + if x.attr != -1 { + return x.curr.Attr[x.attr].Name.Space + } + return "" + } + return x.curr.Prefix +} + +func (x *NodeNavigator) NamespaceURL() string { + if x.attr != -1 { + return x.curr.Attr[x.attr].NamespaceURI + } + return x.curr.NamespaceURI +} + +func (x *NodeNavigator) Value() string { + switch x.curr.Type { + case CommentNode: + return x.curr.Data + case ElementNode: + if x.attr != -1 { + return x.curr.Attr[x.attr].Value + } + return x.curr.InnerText() + case TextNode: + return x.curr.Data + } + return "" +} + +func (x *NodeNavigator) Copy() xpath.NodeNavigator { + n := *x + return &n +} + +func (x *NodeNavigator) MoveToRoot() { + x.curr = x.root +} + +func (x *NodeNavigator) MoveToParent() bool { + if x.attr != -1 { + x.attr = -1 + return true + } else if node := x.curr.Parent; node != nil { + x.curr = node + return true + } + return false +} + +func (x *NodeNavigator) MoveToNextAttribute() bool { + if x.attr >= len(x.curr.Attr)-1 { + return false + } + x.attr++ + return true +} + +func (x *NodeNavigator) MoveToChild() bool { + if x.attr != -1 { + return false + } + if node := x.curr.FirstChild; node != nil { + x.curr = node + return true + } + return false +} + +func (x *NodeNavigator) MoveToFirst() bool { + if x.attr != -1 || x.curr.PrevSibling == nil { + return false + } + for { + node := x.curr.PrevSibling + if node == nil { + break + } + x.curr = node + } + return true +} + +func (x *NodeNavigator) String() string { + return x.Value() +} + +func (x *NodeNavigator) MoveToNext() bool { + if x.attr != -1 { + return false + } + for node := x.curr.NextSibling; node != nil; node = x.curr.NextSibling { + x.curr = node + if x.curr.Type != TextNode || strings.TrimSpace(x.curr.Data) != "" { + return true + } + } + return false +} + +func (x *NodeNavigator) MoveToPrevious() bool { + if x.attr != -1 { + return false + } + for node := x.curr.PrevSibling; node != nil; node = x.curr.PrevSibling { + x.curr = node + if x.curr.Type != TextNode || strings.TrimSpace(x.curr.Data) != "" { + return true + } + } + return false +} + +func (x *NodeNavigator) MoveTo(other xpath.NodeNavigator) bool { + node, ok := other.(*NodeNavigator) + if !ok || node.root != x.root { + return false + } + + x.curr = node.curr + x.attr = node.attr + return true +} diff --git a/vendor/github.com/antchfx/xpath/.gitignore b/vendor/github.com/antchfx/xpath/.gitignore new file mode 100644 index 0000000000..4d5d27b1d3 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/.gitignore @@ -0,0 +1,32 @@ +# vscode +.vscode +debug +*.test + +./build + +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof \ No newline at end of file diff --git a/vendor/github.com/antchfx/xpath/LICENSE b/vendor/github.com/antchfx/xpath/LICENSE new file mode 100644 index 0000000000..e14c37141c --- /dev/null +++ b/vendor/github.com/antchfx/xpath/LICENSE @@ -0,0 +1,17 @@ +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. \ No newline at end of file diff --git a/vendor/github.com/antchfx/xpath/README.md b/vendor/github.com/antchfx/xpath/README.md new file mode 100644 index 0000000000..733c4c8727 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/README.md @@ -0,0 +1,167 @@ +# XPath + +[![GoDoc](https://godoc.org/github.com/antchfx/xpath?status.svg)](https://godoc.org/github.com/antchfx/xpath) +[![Coverage Status](https://coveralls.io/repos/github/antchfx/xpath/badge.svg?branch=master)](https://coveralls.io/github/antchfx/xpath?branch=master) +[![Build Status](https://github.com/antchfx/xpath/actions/workflows/testing.yml/badge.svg)](https://github.com/antchfx/xpath/actions/workflows/testing.yml) +[![Go Report Card](https://goreportcard.com/badge/github.com/antchfx/xpath)](https://goreportcard.com/report/github.com/antchfx/xpath) + +XPath is Go package provides selecting nodes from XML, HTML or other documents using XPath expression. + +# Implementation + +- [htmlquery](https://github.com/antchfx/htmlquery) - an XPath query package for HTML document + +- [xmlquery](https://github.com/antchfx/xmlquery) - an XPath query package for XML document. + +- [jsonquery](https://github.com/antchfx/jsonquery) - an XPath query package for JSON document + +# Supported Features + +#### The basic XPath patterns. + +> The basic XPath patterns cover 90% of the cases that most stylesheets will need. + +- `node` : Selects all child elements with nodeName of node. + +- `*` : Selects all child elements. + +- `@attr` : Selects the attribute attr. + +- `@*` : Selects all attributes. + +- `node()` : Matches an org.w3c.dom.Node. + +- `text()` : Matches a org.w3c.dom.Text node. + +- `comment()` : Matches a comment. + +- `.` : Selects the current node. + +- `..` : Selects the parent of current node. + +- `/` : Selects the document node. + +- `a[expr]` : Select only those nodes matching a which also satisfy the expression expr. + +- `a[n]` : Selects the nth matching node matching a When a filter's expression is a number, XPath selects based on position. + +- `a/b` : For each node matching a, add the nodes matching b to the result. + +- `a//b` : For each node matching a, add the descendant nodes matching b to the result. + +- `//b` : Returns elements in the entire document matching b. + +- `a|b` : All nodes matching a or b, union operation(not boolean or). + +- `(a, b, c)` : Evaluates each of its operands and concatenates the resulting sequences, in order, into a single result sequence + +- `(a/b)` : Selects all matches nodes as grouping set. + +#### Node Axes + +- `child::*` : The child axis selects children of the current node. + + - `child::node()`: Selects all the children of the context node. + - `child::text()`: Selects all text node children of the context node. + +- `descendant::*` : The descendant axis selects descendants of the current node. It is equivalent to '//'. + +- `descendant-or-self::*` : Selects descendants including the current node. + +- `attribute::*` : Selects attributes of the current element. It is equivalent to @\* + +- `following-sibling::*` : Selects nodes after the current node. + +- `preceding-sibling::*` : Selects nodes before the current node. + +- `following::*` : Selects the first matching node following in document order, excluding descendants. + +- `preceding::*` : Selects the first matching node preceding in document order, excluding ancestors. + +- `parent::*` : Selects the parent if it matches. The '..' pattern from the core is equivalent to 'parent::node()'. + +- `ancestor::*` : Selects matching ancestors. + +- `ancestor-or-self::*` : Selects ancestors including the current node. + +- `self::*` : Selects the current node. '.' is equivalent to 'self::node()'. + +#### Expressions + +The gxpath supported three types: number, boolean, string. + +- `path` : Selects nodes based on the path. + +- `a = b` : Standard comparisons. + + - `a = b` : True if a equals b. + - `a != b` : True if a is not equal to b. + - `a < b` : True if a is less than b. + - `a <= b` : True if a is less than or equal to b. + - `a > b` : True if a is greater than b. + - `a >= b` : True if a is greater than or equal to b. + +- `a + b` : Arithmetic expressions. + + - `- a` Unary minus + - `a + b` : Addition + - `a - b` : Subtraction + - `a * b` : Multiplication + - `a div b` : Division + - `a mod b` : Modulus (division remainder) + +- `a or b` : Boolean `or` operation. + +- `a and b` : Boolean `and` operation. + +- `(expr)` : Parenthesized expressions. + +- `fun(arg1, ..., argn)` : Function calls: + +| Function | Supported | +| ----------------------- | --------- | +| `boolean()` | ✓ | +| `ceiling()` | ✓ | +| `choose()` | ✗ | +| `concat()` | ✓ | +| `contains()` | ✓ | +| `count()` | ✓ | +| `current()` | ✗ | +| `document()` | ✗ | +| `element-available()` | ✗ | +| `ends-with()` | ✓ | +| `false()` | ✓ | +| `floor()` | ✓ | +| `format-number()` | ✗ | +| `function-available()` | ✗ | +| `generate-id()` | ✗ | +| `id()` | ✗ | +| `key()` | ✗ | +| `lang()` | ✗ | +| `last()` | ✓ | +| `local-name()` | ✓ | +| `lower-case()`[^1] | ✓ | +| `matches()` | ✓ | +| `name()` | ✓ | +| `namespace-uri()` | ✓ | +| `normalize-space()` | ✓ | +| `not()` | ✓ | +| `number()` | ✓ | +| `position()` | ✓ | +| `replace()` | ✓ | +| `reverse()` | ✓ | +| `round()` | ✓ | +| `starts-with()` | ✓ | +| `string()` | ✓ | +| `string-join()`[^1] | ✓ | +| `string-length()` | ✓ | +| `substring()` | ✓ | +| `substring-after()` | ✓ | +| `substring-before()` | ✓ | +| `sum()` | ✓ | +| `system-property()` | ✗ | +| `translate()` | ✓ | +| `true()` | ✓ | +| `unparsed-entity-url()` | ✗ | + +[^1]: XPath-2.0 expression diff --git a/vendor/github.com/antchfx/xpath/build.go b/vendor/github.com/antchfx/xpath/build.go new file mode 100644 index 0000000000..a93c8eb5f7 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/build.go @@ -0,0 +1,718 @@ +package xpath + +import ( + "errors" + "fmt" +) + +type flag int + +var flagsEnum = struct { + None flag + SmartDesc flag + PosFilter flag + Filter flag + Condition flag +}{ + None: 0, + SmartDesc: 1, + PosFilter: 2, + Filter: 4, + Condition: 8, +} + +type builderProp int + +var builderProps = struct { + None builderProp + PosFilter builderProp + HasPosition builderProp + HasLast builderProp + NonFlat builderProp +}{ + None: 0, + PosFilter: 1, + HasPosition: 2, + HasLast: 4, + NonFlat: 8, +} + +// builder provides building an XPath expressions. +type builder struct { + parseDepth int + firstInput query +} + +// axisPredicate creates a predicate to predicating for this axis node. +func axisPredicate(root *axisNode) func(NodeNavigator) bool { + nametest := root.LocalName != "" || root.Prefix != "" + predicate := func(n NodeNavigator) bool { + if root.typeTest == n.NodeType() || root.typeTest == allNode { + if nametest { + type namespaceURL interface { + NamespaceURL() string + } + if ns, ok := n.(namespaceURL); ok && root.hasNamespaceURI { + return root.LocalName == n.LocalName() && root.namespaceURI == ns.NamespaceURL() + } + if root.LocalName == n.LocalName() && root.Prefix == n.Prefix() { + return true + } + } else { + return true + } + } + return false + } + + return predicate +} + +// processAxis processes a query for the XPath axis node. +func (b *builder) processAxis(root *axisNode, flags flag, props *builderProp) (query, error) { + var ( + err error + qyInput query + qyOutput query + ) + b.firstInput = nil + predicate := axisPredicate(root) + + if root.Input == nil { + qyInput = &contextQuery{} + *props = builderProps.None + } else { + inputFlags := flagsEnum.None + if (flags & flagsEnum.Filter) == 0 { + if root.AxisType == "child" && (root.Input.Type() == nodeAxis) { + if input := root.Input.(*axisNode); input.AxisType == "descendant-or-self" { + var qyGrandInput query + if input.Input != nil { + qyGrandInput, err = b.processNode(input.Input, flagsEnum.SmartDesc, props) + if err != nil { + return nil, err + } + } else { + qyGrandInput = &contextQuery{} + } + qyOutput = &descendantQuery{name: root.LocalName, Input: qyGrandInput, Predicate: predicate, Self: false} + *props |= builderProps.NonFlat + return qyOutput, nil + } + } + if root.AxisType == "descendant" || root.AxisType == "descendant-or-self" { + inputFlags |= flagsEnum.SmartDesc + } + } + + qyInput, err = b.processNode(root.Input, inputFlags, props) + if err != nil { + return nil, err + } + } + + switch root.AxisType { + case "ancestor": + qyOutput = &ancestorQuery{name: root.LocalName, Input: qyInput, Predicate: predicate} + *props |= builderProps.NonFlat + case "ancestor-or-self": + qyOutput = &ancestorQuery{name: root.LocalName, Input: qyInput, Predicate: predicate, Self: true} + *props |= builderProps.NonFlat + case "attribute": + qyOutput = &attributeQuery{name: root.LocalName, Input: qyInput, Predicate: predicate} + case "child": + if (*props & builderProps.NonFlat) == 0 { + qyOutput = &childQuery{name: root.LocalName, Input: qyInput, Predicate: predicate} + } else { + qyOutput = &cachedChildQuery{name: root.LocalName, Input: qyInput, Predicate: predicate} + } + case "descendant": + if (flags & flagsEnum.SmartDesc) != flagsEnum.None { + qyOutput = &descendantOverDescendantQuery{name: root.LocalName, Input: qyInput, MatchSelf: false, Predicate: predicate} + } else { + qyOutput = &descendantQuery{name: root.LocalName, Input: qyInput, Predicate: predicate} + } + *props |= builderProps.NonFlat + case "descendant-or-self": + if (flags & flagsEnum.SmartDesc) != flagsEnum.None { + qyOutput = &descendantOverDescendantQuery{name: root.LocalName, Input: qyInput, MatchSelf: true, Predicate: predicate} + } else { + qyOutput = &descendantQuery{name: root.LocalName, Input: qyInput, Predicate: predicate, Self: true} + } + *props |= builderProps.NonFlat + case "following": + qyOutput = &followingQuery{Input: qyInput, Predicate: predicate} + *props |= builderProps.NonFlat + case "following-sibling": + qyOutput = &followingQuery{Input: qyInput, Predicate: predicate, Sibling: true} + case "parent": + qyOutput = &parentQuery{Input: qyInput, Predicate: predicate} + case "preceding": + qyOutput = &precedingQuery{Input: qyInput, Predicate: predicate} + *props |= builderProps.NonFlat + case "preceding-sibling": + qyOutput = &precedingQuery{Input: qyInput, Predicate: predicate, Sibling: true} + case "self": + qyOutput = &selfQuery{Input: qyInput, Predicate: predicate} + case "namespace": + // haha,what will you do someting?? + default: + err = fmt.Errorf("unknown axe type: %s", root.AxisType) + return nil, err + } + return qyOutput, nil +} + +func canBeNumber(q query) bool { + if q.ValueType() != xpathResultType.Any { + return q.ValueType() == xpathResultType.Number + } + return true +} + +// processFilterNode builds query for the XPath filter predicate. +func (b *builder) processFilter(root *filterNode, flags flag, props *builderProp) (query, error) { + first := (flags & flagsEnum.Filter) == 0 + + qyInput, err := b.processNode(root.Input, (flags | flagsEnum.Filter), props) + if err != nil { + return nil, err + } + firstInput := b.firstInput + + var propsCond builderProp + cond, err := b.processNode(root.Condition, flags, &propsCond) + if err != nil { + return nil, err + } + + // Checking whether is number + if canBeNumber(cond) || ((propsCond & (builderProps.HasPosition | builderProps.HasLast)) != 0) { + propsCond |= builderProps.HasPosition + flags |= flagsEnum.PosFilter + } + + if root.Input.Type() != nodeFilter { + *props &= ^builderProps.PosFilter + } + + if (propsCond & builderProps.HasPosition) != 0 { + *props |= builderProps.PosFilter + } + + if (propsCond & builderProps.HasPosition) != builderProps.None { + if (propsCond & builderProps.HasLast) != 0 { + // https://github.com/antchfx/xpath/issues/76 + // https://github.com/antchfx/xpath/issues/78 + if qyFunc, ok := cond.(*functionQuery); ok { + switch qyFunc.Input.(type) { + case *filterQuery: + cond = &lastFuncQuery{Input: qyFunc.Input} + } + } + } + } + + merge := (qyInput.Properties() & queryProps.Merge) != 0 + if first && firstInput != nil { + if merge && ((*props & builderProps.PosFilter) != 0) { + var ( + rootQuery = &contextQuery{} + parent query + ) + switch axisQuery := firstInput.(type) { + case *ancestorQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *attributeQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *childQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *cachedChildQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *descendantQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *followingQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *precedingQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *parentQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *selfQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *groupQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + case *descendantOverDescendantQuery: + if _, ok := axisQuery.Input.(*contextQuery); !ok { + parent = axisQuery.Input + axisQuery.Input = rootQuery + } + } + b.firstInput = nil + child := &filterQuery{Input: qyInput, Predicate: cond, NoPosition: false} + if parent != nil { + return &mergeQuery{Input: parent, Child: child}, nil + } + return child, nil + } + b.firstInput = nil + } + + resultQuery := &filterQuery{ + Input: qyInput, + Predicate: cond, + NoPosition: (propsCond & builderProps.HasPosition) == 0, + } + return resultQuery, nil +} + +// processFunctionNode processes query for the XPath function node. +func (b *builder) processFunction(root *functionNode, props *builderProp) (query, error) { + // Reset builder props + *props = builderProps.None + + var qyOutput query + switch root.FuncName { + case "lower-case": + arg, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: lowerCaseFunc(arg)} + case "starts-with": + arg1, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + arg2, err := b.processNode(root.Args[1], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: startwithFunc(arg1, arg2)} + case "ends-with": + arg1, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + arg2, err := b.processNode(root.Args[1], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: endwithFunc(arg1, arg2)} + case "contains": + arg1, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + arg2, err := b.processNode(root.Args[1], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: containsFunc(arg1, arg2)} + case "matches": + //matches(string , pattern) + if len(root.Args) != 2 { + return nil, errors.New("xpath: matches function must have two parameters") + } + var ( + arg1, arg2 query + err error + ) + if arg1, err = b.processNode(root.Args[0], flagsEnum.None, props); err != nil { + return nil, err + } + if arg2, err = b.processNode(root.Args[1], flagsEnum.None, props); err != nil { + return nil, err + } + // Issue #92, testing the regular expression before. + if q, ok := arg2.(*constantQuery); ok { + if _, err = getRegexp(q.Val.(string)); err != nil { + return nil, fmt.Errorf("matches() got error. %v", err) + } + } + qyOutput = &functionQuery{Func: matchesFunc(arg1, arg2)} + case "substring": + //substring( string , start [, length] ) + if len(root.Args) < 2 { + return nil, errors.New("xpath: substring function must have at least two parameter") + } + var ( + arg1, arg2, arg3 query + err error + ) + if arg1, err = b.processNode(root.Args[0], flagsEnum.None, props); err != nil { + return nil, err + } + if arg2, err = b.processNode(root.Args[1], flagsEnum.None, props); err != nil { + return nil, err + } + if len(root.Args) == 3 { + if arg3, err = b.processNode(root.Args[2], flagsEnum.None, props); err != nil { + return nil, err + } + } + qyOutput = &functionQuery{Func: substringFunc(arg1, arg2, arg3)} + case "substring-before", "substring-after": + //substring-xxxx( haystack, needle ) + if len(root.Args) != 2 { + return nil, errors.New("xpath: substring-before function must have two parameters") + } + var ( + arg1, arg2 query + err error + ) + if arg1, err = b.processNode(root.Args[0], flagsEnum.None, props); err != nil { + return nil, err + } + if arg2, err = b.processNode(root.Args[1], flagsEnum.None, props); err != nil { + return nil, err + } + qyOutput = &functionQuery{ + Func: substringIndFunc(arg1, arg2, root.FuncName == "substring-after"), + } + case "string-length": + // string-length( [string] ) + if len(root.Args) < 1 { + return nil, errors.New("xpath: string-length function must have at least one parameter") + } + arg1, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: stringLengthFunc(arg1)} + case "normalize-space": + var arg node + if len(root.Args) > 0 { + arg = root.Args[0] + } else { + arg = newAxisNode("self", allNode, "", "", "", nil) + } + arg1, err := b.processNode(arg, flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: normalizespaceFunc(arg1)} + case "replace": + //replace( string , string, string ) + if len(root.Args) != 3 { + return nil, errors.New("xpath: replace function must have three parameters") + } + var ( + arg1, arg2, arg3 query + err error + ) + if arg1, err = b.processNode(root.Args[0], flagsEnum.None, props); err != nil { + return nil, err + } + if arg2, err = b.processNode(root.Args[1], flagsEnum.None, props); err != nil { + return nil, err + } + if arg3, err = b.processNode(root.Args[2], flagsEnum.None, props); err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: replaceFunc(arg1, arg2, arg3)} + case "translate": + //translate( string , string, string ) + if len(root.Args) != 3 { + return nil, errors.New("xpath: translate function must have three parameters") + } + var ( + arg1, arg2, arg3 query + err error + ) + if arg1, err = b.processNode(root.Args[0], flagsEnum.None, props); err != nil { + return nil, err + } + if arg2, err = b.processNode(root.Args[1], flagsEnum.None, props); err != nil { + return nil, err + } + if arg3, err = b.processNode(root.Args[2], flagsEnum.None, props); err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: translateFunc(arg1, arg2, arg3)} + case "not": + if len(root.Args) == 0 { + return nil, errors.New("xpath: not function must have at least one parameter") + } + argQuery, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: notFunc(argQuery)} + case "name", "local-name", "namespace-uri": + if len(root.Args) > 1 { + return nil, fmt.Errorf("xpath: %s function must have at most one parameter", root.FuncName) + } + var ( + arg query + err error + ) + if len(root.Args) == 1 { + arg, err = b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + } + switch root.FuncName { + case "name": + qyOutput = &functionQuery{Func: nameFunc(arg)} + case "local-name": + qyOutput = &functionQuery{Func: localNameFunc(arg)} + case "namespace-uri": + qyOutput = &functionQuery{Func: namespaceFunc(arg)} + } + case "true", "false": + val := root.FuncName == "true" + qyOutput = &functionQuery{ + Func: func(_ query, _ iterator) interface{} { + return val + }, + } + case "last": + qyOutput = &functionQuery{Input: b.firstInput, Func: lastFunc()} + *props |= builderProps.HasLast + case "position": + qyOutput = &functionQuery{Input: b.firstInput, Func: positionFunc()} + *props |= builderProps.HasPosition + case "boolean", "number", "string": + var inp query + if len(root.Args) > 1 { + return nil, fmt.Errorf("xpath: %s function must have at most one parameter", root.FuncName) + } + if len(root.Args) == 1 { + argQuery, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + inp = argQuery + } + switch root.FuncName { + case "boolean": + qyOutput = &functionQuery{Func: booleanFunc(inp)} + case "string": + qyOutput = &functionQuery{Func: stringFunc(inp)} + case "number": + qyOutput = &functionQuery{Func: numberFunc(inp)} + } + case "count": + if len(root.Args) == 0 { + return nil, fmt.Errorf("xpath: count(node-sets) function must with have parameters node-sets") + } + argQuery, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: countFunc(argQuery)} + case "sum": + if len(root.Args) == 0 { + return nil, fmt.Errorf("xpath: sum(node-sets) function must with have parameters node-sets") + } + argQuery, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: sumFunc(argQuery)} + case "ceiling", "floor", "round": + if len(root.Args) == 0 { + return nil, fmt.Errorf("xpath: ceiling(node-sets) function must with have parameters node-sets") + } + argQuery, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + switch root.FuncName { + case "ceiling": + qyOutput = &functionQuery{Func: ceilingFunc(argQuery)} + case "floor": + qyOutput = &functionQuery{Func: floorFunc(argQuery)} + case "round": + qyOutput = &functionQuery{Func: roundFunc(argQuery)} + } + case "concat": + if len(root.Args) < 2 { + return nil, fmt.Errorf("xpath: concat() must have at least two arguments") + } + var args []query + for _, v := range root.Args { + q, err := b.processNode(v, flagsEnum.None, props) + if err != nil { + return nil, err + } + args = append(args, q) + } + qyOutput = &functionQuery{Func: concatFunc(args...)} + case "reverse": + if len(root.Args) == 0 { + return nil, fmt.Errorf("xpath: reverse(node-sets) function must with have parameters node-sets") + } + argQuery, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &transformFunctionQuery{Input: argQuery, Func: reverseFunc} + case "string-join": + if len(root.Args) != 2 { + return nil, fmt.Errorf("xpath: string-join(node-sets, separator) function requires node-set and argument") + } + input, err := b.processNode(root.Args[0], flagsEnum.None, props) + if err != nil { + return nil, err + } + arg1, err := b.processNode(root.Args[1], flagsEnum.None, props) + if err != nil { + return nil, err + } + qyOutput = &functionQuery{Func: stringJoinFunc(input, arg1)} + default: + return nil, fmt.Errorf("not yet support this function %s()", root.FuncName) + } + return qyOutput, nil +} + +func (b *builder) processOperator(root *operatorNode, props *builderProp) (query, error) { + var ( + leftProp builderProp + rightProp builderProp + ) + + left, err := b.processNode(root.Left, flagsEnum.None, &leftProp) + if err != nil { + return nil, err + } + right, err := b.processNode(root.Right, flagsEnum.None, &rightProp) + if err != nil { + return nil, err + } + *props = leftProp | rightProp + + var qyOutput query + switch root.Op { + case "+", "-", "*", "div", "mod": // Numeric operator + var exprFunc func(iterator, interface{}, interface{}) interface{} + switch root.Op { + case "+": + exprFunc = plusFunc + case "-": + exprFunc = minusFunc + case "*": + exprFunc = mulFunc + case "div": + exprFunc = divFunc + case "mod": + exprFunc = modFunc + } + qyOutput = &numericQuery{Left: left, Right: right, Do: exprFunc} + case "=", ">", ">=", "<", "<=", "!=": + var exprFunc func(iterator, interface{}, interface{}) interface{} + switch root.Op { + case "=": + exprFunc = eqFunc + case ">": + exprFunc = gtFunc + case ">=": + exprFunc = geFunc + case "<": + exprFunc = ltFunc + case "<=": + exprFunc = leFunc + case "!=": + exprFunc = neFunc + } + qyOutput = &logicalQuery{Left: left, Right: right, Do: exprFunc} + case "or", "and": + isOr := false + if root.Op == "or" { + isOr = true + } + qyOutput = &booleanQuery{Left: left, Right: right, IsOr: isOr} + case "|": + *props |= builderProps.NonFlat + qyOutput = &unionQuery{Left: left, Right: right} + } + return qyOutput, nil +} + +func (b *builder) processNode(root node, flags flag, props *builderProp) (q query, err error) { + if b.parseDepth = b.parseDepth + 1; b.parseDepth > 1024 { + err = errors.New("the xpath expressions is too complex") + return + } + *props = builderProps.None + switch root.Type() { + case nodeConstantOperand: + n := root.(*operandNode) + q = &constantQuery{Val: n.Val} + case nodeRoot: + q = &absoluteQuery{} + case nodeAxis: + q, err = b.processAxis(root.(*axisNode), flags, props) + b.firstInput = q + case nodeFilter: + q, err = b.processFilter(root.(*filterNode), flags, props) + b.firstInput = q + case nodeFunction: + q, err = b.processFunction(root.(*functionNode), props) + case nodeOperator: + q, err = b.processOperator(root.(*operatorNode), props) + case nodeGroup: + q, err = b.processNode(root.(*groupNode).Input, flagsEnum.None, props) + if err != nil { + return + } + q = &groupQuery{Input: q} + if b.firstInput == nil { + b.firstInput = q + } + } + b.parseDepth-- + return +} + +// build builds a specified XPath expressions expr. +func build(expr string, namespaces map[string]string) (q query, err error) { + defer func() { + if e := recover(); e != nil { + switch x := e.(type) { + case string: + err = errors.New(x) + case error: + err = x + default: + err = errors.New("unknown panic") + } + } + }() + root := parse(expr, namespaces) + b := &builder{} + props := builderProps.None + return b.processNode(root, flagsEnum.None, &props) +} diff --git a/vendor/github.com/antchfx/xpath/cache.go b/vendor/github.com/antchfx/xpath/cache.go new file mode 100644 index 0000000000..31a2b33565 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/cache.go @@ -0,0 +1,80 @@ +package xpath + +import ( + "regexp" + "sync" +) + +type loadFunc func(key interface{}) (interface{}, error) + +const ( + defaultCap = 65536 +) + +// The reason we're building a simple capacity-resetting loading cache (when capacity reached) instead of using +// something like github.com/hashicorp/golang-lru is primarily due to (not wanting to create) external dependency. +// Currently this library has 0 external dep (other than go sdk), and supports go 1.6, 1.9, and 1.10 (and later). +// Creating external lib dependencies (plus their transitive dependencies) would make things hard if not impossible. +// We expect under most circumstances, the defaultCap is big enough for any long running services that use this +// library if their xpath regexp cardinality is low. However, in extreme cases when the capacity is reached, we +// simply reset the cache, taking a small subsequent perf hit (next to nothing considering amortization) in trade +// of more complex and less performant LRU type of construct. +type loadingCache struct { + sync.RWMutex + cap int + load loadFunc + m map[interface{}]interface{} + reset int +} + +// NewLoadingCache creates a new instance of a loading cache with capacity. Capacity must be >= 0, or +// it will panic. Capacity == 0 means the cache growth is unbounded. +func NewLoadingCache(load loadFunc, capacity int) *loadingCache { + if capacity < 0 { + panic("capacity must be >= 0") + } + return &loadingCache{cap: capacity, load: load, m: make(map[interface{}]interface{})} +} + +func (c *loadingCache) get(key interface{}) (interface{}, error) { + c.RLock() + v, found := c.m[key] + c.RUnlock() + if found { + return v, nil + } + v, err := c.load(key) + if err != nil { + return nil, err + } + c.Lock() + if c.cap > 0 && len(c.m) >= c.cap { + c.m = map[interface{}]interface{}{key: v} + c.reset++ + } else { + c.m[key] = v + } + c.Unlock() + return v, nil +} + +var ( + // RegexpCache is a loading cache for string -> *regexp.Regexp mapping. It is exported so that in rare cases + // client can customize load func and/or capacity. + RegexpCache = defaultRegexpCache() +) + +func defaultRegexpCache() *loadingCache { + return NewLoadingCache( + func(key interface{}) (interface{}, error) { + return regexp.Compile(key.(string)) + }, defaultCap) +} + +func getRegexp(pattern string) (*regexp.Regexp, error) { + exp, err := RegexpCache.get(pattern) + if err != nil { + return nil, err + } + return exp.(*regexp.Regexp), nil +} diff --git a/vendor/github.com/antchfx/xpath/func.go b/vendor/github.com/antchfx/xpath/func.go new file mode 100644 index 0000000000..4079a194f5 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/func.go @@ -0,0 +1,679 @@ +package xpath + +import ( + "errors" + "fmt" + "math" + "strconv" + "strings" + "sync" + "unicode" +) + +// Defined an interface of stringBuilder that compatible with +// strings.Builder(go 1.10) and bytes.Buffer(< go 1.10) +type stringBuilder interface { + WriteRune(r rune) (n int, err error) + WriteString(s string) (int, error) + Reset() + Grow(n int) + String() string +} + +var builderPool = sync.Pool{New: func() interface{} { + return newStringBuilder() +}} + +// The XPath function list. + +func predicate(q query) func(NodeNavigator) bool { + type Predicater interface { + Test(NodeNavigator) bool + } + if p, ok := q.(Predicater); ok { + return p.Test + } + return func(NodeNavigator) bool { return true } +} + +// positionFunc is a XPath Node Set functions position(). +func positionFunc() func(query, iterator) interface{} { + return func(q query, t iterator) interface{} { + var ( + count = 1 + node = t.Current().Copy() + ) + test := predicate(q) + for node.MoveToPrevious() { + if test(node) { + count++ + } + } + return float64(count) + } +} + +// lastFunc is a XPath Node Set functions last(). +func lastFunc() func(query, iterator) interface{} { + return func(q query, t iterator) interface{} { + var ( + count = 0 + node = t.Current().Copy() + ) + test := predicate(q) + node.MoveToFirst() + for { + if test(node) { + count++ + } + if !node.MoveToNext() { + break + } + } + return float64(count) + } +} + +// countFunc is a XPath Node Set functions count(node-set). +func countFunc(arg query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var count = 0 + q := functionArgs(arg) + test := predicate(q) + switch typ := q.Evaluate(t).(type) { + case query: + for node := typ.Select(t); node != nil; node = typ.Select(t) { + if test(node) { + count++ + } + } + } + return float64(count) + } +} + +// sumFunc is a XPath Node Set functions sum(node-set). +func sumFunc(arg query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var sum float64 + switch typ := functionArgs(arg).Evaluate(t).(type) { + case query: + for node := typ.Select(t); node != nil; node = typ.Select(t) { + if v, err := strconv.ParseFloat(node.Value(), 64); err == nil { + sum += v + } + } + case float64: + sum = typ + case string: + v, err := strconv.ParseFloat(typ, 64) + if err != nil { + panic(errors.New("sum() function argument type must be a node-set or number")) + } + sum = v + } + return sum + } +} + +func asNumber(t iterator, o interface{}) float64 { + switch typ := o.(type) { + case query: + node := typ.Select(t) + if node == nil { + return math.NaN() + } + if v, err := strconv.ParseFloat(node.Value(), 64); err == nil { + return v + } + case float64: + return typ + case string: + v, err := strconv.ParseFloat(typ, 64) + if err == nil { + return v + } + } + return math.NaN() +} + +// ceilingFunc is a XPath Node Set functions ceiling(node-set). +func ceilingFunc(arg query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + val := asNumber(t, functionArgs(arg).Evaluate(t)) + // if math.IsNaN(val) { + // panic(errors.New("ceiling() function argument type must be a valid number")) + // } + return math.Ceil(val) + } +} + +// floorFunc is a XPath Node Set functions floor(node-set). +func floorFunc(arg query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + val := asNumber(t, functionArgs(arg).Evaluate(t)) + return math.Floor(val) + } +} + +// roundFunc is a XPath Node Set functions round(node-set). +func roundFunc(arg query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + val := asNumber(t, functionArgs(arg).Evaluate(t)) + //return math.Round(val) + return round(val) + } +} + +// nameFunc is a XPath functions name([node-set]). +func nameFunc(arg query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var v NodeNavigator + if arg == nil { + v = t.Current() + } else { + v = arg.Clone().Select(t) + if v == nil { + return "" + } + } + ns := v.Prefix() + if ns == "" { + return v.LocalName() + } + return ns + ":" + v.LocalName() + } +} + +// localNameFunc is a XPath functions local-name([node-set]). +func localNameFunc(arg query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var v NodeNavigator + if arg == nil { + v = t.Current() + } else { + v = arg.Clone().Select(t) + if v == nil { + return "" + } + } + return v.LocalName() + } +} + +// namespaceFunc is a XPath functions namespace-uri([node-set]). +func namespaceFunc(arg query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var v NodeNavigator + if arg == nil { + v = t.Current() + } else { + // Get the first node in the node-set if specified. + v = arg.Clone().Select(t) + if v == nil { + return "" + } + } + // fix about namespace-uri() bug: https://github.com/antchfx/xmlquery/issues/22 + // TODO: In the next version, add NamespaceURL() to the NodeNavigator interface. + type namespaceURL interface { + NamespaceURL() string + } + if f, ok := v.(namespaceURL); ok { + return f.NamespaceURL() + } + return v.Prefix() + } +} + +func asBool(t iterator, v interface{}) bool { + switch v := v.(type) { + case nil: + return false + case *NodeIterator: + return v.MoveNext() + case bool: + return v + case float64: + return v != 0 + case string: + return v != "" + case query: + return v.Select(t) != nil + default: + panic(fmt.Errorf("unexpected type: %T", v)) + } +} + +func asString(t iterator, v interface{}) string { + switch v := v.(type) { + case nil: + return "" + case bool: + if v { + return "true" + } + return "false" + case float64: + return strconv.FormatFloat(v, 'g', -1, 64) + case string: + return v + case query: + node := v.Select(t) + if node == nil { + return "" + } + return node.Value() + default: + panic(fmt.Errorf("unexpected type: %T", v)) + } +} + +// booleanFunc is a XPath functions boolean([node-set]). +func booleanFunc(arg1 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + v := functionArgs(arg1).Evaluate(t) + return asBool(t, v) + } +} + +// numberFunc is a XPath functions number([node-set]). +func numberFunc(arg1 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + v := functionArgs(arg1).Evaluate(t) + return asNumber(t, v) + } +} + +// stringFunc is a XPath functions string([node-set]). +func stringFunc(arg1 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + v := functionArgs(arg1).Evaluate(t) + return asString(t, v) + } +} + +// startwithFunc is a XPath functions starts-with(string, string). +func startwithFunc(arg1, arg2 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var ( + m, n string + ok bool + ) + switch typ := functionArgs(arg1).Evaluate(t).(type) { + case string: + m = typ + case query: + node := typ.Select(t) + if node == nil { + return false + } + m = node.Value() + default: + panic(errors.New("starts-with() function argument type must be string")) + } + n, ok = functionArgs(arg2).Evaluate(t).(string) + if !ok { + panic(errors.New("starts-with() function argument type must be string")) + } + return strings.HasPrefix(m, n) + } +} + +// endwithFunc is a XPath functions ends-with(string, string). +func endwithFunc(arg1, arg2 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var ( + m, n string + ok bool + ) + switch typ := functionArgs(arg1).Evaluate(t).(type) { + case string: + m = typ + case query: + node := typ.Select(t) + if node == nil { + return false + } + m = node.Value() + default: + panic(errors.New("ends-with() function argument type must be string")) + } + n, ok = functionArgs(arg2).Evaluate(t).(string) + if !ok { + panic(errors.New("ends-with() function argument type must be string")) + } + return strings.HasSuffix(m, n) + } +} + +// containsFunc is a XPath functions contains(string or @attr, string). +func containsFunc(arg1, arg2 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var ( + m, n string + ok bool + ) + switch typ := functionArgs(arg1).Evaluate(t).(type) { + case string: + m = typ + case query: + node := typ.Select(t) + if node == nil { + return false + } + m = node.Value() + default: + panic(errors.New("contains() function argument type must be string")) + } + + n, ok = functionArgs(arg2).Evaluate(t).(string) + if !ok { + panic(errors.New("contains() function argument type must be string")) + } + + return strings.Contains(m, n) + } +} + +// matchesFunc is an XPath function that tests a given string against a regexp pattern. +// Note: does not support https://www.w3.org/TR/xpath-functions-31/#func-matches 3rd optional `flags` argument; if +// needed, directly put flags in the regexp pattern, such as `(?i)^pattern$` for `i` flag. +func matchesFunc(arg1, arg2 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var s string + switch typ := functionArgs(arg1).Evaluate(t).(type) { + case string: + s = typ + case query: + node := typ.Select(t) + if node == nil { + return "" + } + s = node.Value() + } + var pattern string + var ok bool + if pattern, ok = functionArgs(arg2).Evaluate(t).(string); !ok { + panic(errors.New("matches() function second argument type must be string")) + } + re, err := getRegexp(pattern) + if err != nil { + panic(fmt.Errorf("matches() function second argument is not a valid regexp pattern, err: %s", err.Error())) + } + return re.MatchString(s) + } +} + +// normalizespaceFunc is XPath functions normalize-space(string?) +func normalizespaceFunc(arg1 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var m string + switch typ := functionArgs(arg1).Evaluate(t).(type) { + case string: + m = typ + case query: + node := typ.Select(t) + if node == nil { + return "" + } + m = node.Value() + } + var b = builderPool.Get().(stringBuilder) + b.Grow(len(m)) + + runeStr := []rune(strings.TrimSpace(m)) + l := len(runeStr) + for i := range runeStr { + r := runeStr[i] + isSpace := unicode.IsSpace(r) + if !(isSpace && (i+1 < l && unicode.IsSpace(runeStr[i+1]))) { + if isSpace { + r = ' ' + } + b.WriteRune(r) + } + } + result := b.String() + b.Reset() + builderPool.Put(b) + + return result + } +} + +// substringFunc is XPath functions substring function returns a part of a given string. +func substringFunc(arg1, arg2, arg3 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var m string + switch typ := functionArgs(arg1).Evaluate(t).(type) { + case string: + m = typ + case query: + node := typ.Select(t) + if node == nil { + return "" + } + m = node.Value() + } + + var start, length float64 + var ok bool + + if start, ok = functionArgs(arg2).Evaluate(t).(float64); !ok { + panic(errors.New("substring() function first argument type must be int")) + } else if start < 1 { + panic(errors.New("substring() function first argument type must be >= 1")) + } + start-- + if arg3 != nil { + if length, ok = functionArgs(arg3).Evaluate(t).(float64); !ok { + panic(errors.New("substring() function second argument type must be int")) + } + } + if (len(m) - int(start)) < int(length) { + panic(errors.New("substring() function start and length argument out of range")) + } + if length > 0 { + return m[int(start):int(length+start)] + } + return m[int(start):] + } +} + +// substringIndFunc is XPath functions substring-before/substring-after function returns a part of a given string. +func substringIndFunc(arg1, arg2 query, after bool) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var str string + switch v := functionArgs(arg1).Evaluate(t).(type) { + case string: + str = v + case query: + node := v.Select(t) + if node == nil { + return "" + } + str = node.Value() + } + var word string + switch v := functionArgs(arg2).Evaluate(t).(type) { + case string: + word = v + case query: + node := v.Select(t) + if node == nil { + return "" + } + word = node.Value() + } + if word == "" { + return "" + } + + i := strings.Index(str, word) + if i < 0 { + return "" + } + if after { + return str[i+len(word):] + } + return str[:i] + } +} + +// stringLengthFunc is XPATH string-length( [string] ) function that returns a number +// equal to the number of characters in a given string. +func stringLengthFunc(arg1 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + switch v := functionArgs(arg1).Evaluate(t).(type) { + case string: + return float64(len(v)) + case query: + node := v.Select(t) + if node == nil { + break + } + return float64(len(node.Value())) + } + return float64(0) + } +} + +// translateFunc is XPath functions translate() function returns a replaced string. +func translateFunc(arg1, arg2, arg3 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + str := asString(t, functionArgs(arg1).Evaluate(t)) + src := asString(t, functionArgs(arg2).Evaluate(t)) + dst := asString(t, functionArgs(arg3).Evaluate(t)) + + replace := make([]string, 0, len(src)) + for i, s := range src { + d := "" + if i < len(dst) { + d = string(dst[i]) + } + replace = append(replace, string(s), d) + } + return strings.NewReplacer(replace...).Replace(str) + } +} + +// replaceFunc is XPath functions replace() function returns a replaced string. +func replaceFunc(arg1, arg2, arg3 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + str := asString(t, functionArgs(arg1).Evaluate(t)) + src := asString(t, functionArgs(arg2).Evaluate(t)) + dst := asString(t, functionArgs(arg3).Evaluate(t)) + + return strings.Replace(str, src, dst, -1) + } +} + +// notFunc is XPATH functions not(expression) function operation. +func notFunc(arg1 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + switch v := functionArgs(arg1).Evaluate(t).(type) { + case bool: + return !v + case query: + node := v.Select(t) + return node == nil + default: + return false + } + } +} + +// concatFunc is the concat function concatenates two or more +// strings and returns the resulting string. +// concat( string1 , string2 [, stringn]* ) +func concatFunc(args ...query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + b := builderPool.Get().(stringBuilder) + for _, v := range args { + v = functionArgs(v) + + switch v := v.Evaluate(t).(type) { + case string: + b.WriteString(v) + case query: + node := v.Select(t) + if node != nil { + b.WriteString(node.Value()) + } + } + } + result := b.String() + b.Reset() + builderPool.Put(b) + + return result + } +} + +// https://github.com/antchfx/xpath/issues/43 +func functionArgs(q query) query { + if _, ok := q.(*functionQuery); ok { + return q + } + return q.Clone() +} + +func reverseFunc(q query, t iterator) func() NodeNavigator { + var list []NodeNavigator + for { + node := q.Select(t) + if node == nil { + break + } + list = append(list, node.Copy()) + } + i := len(list) + return func() NodeNavigator { + if i <= 0 { + return nil + } + i-- + node := list[i] + return node + } +} + +// string-join is a XPath Node Set functions string-join(node-set, separator). +func stringJoinFunc(q, arg1 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + var separator string + switch v := functionArgs(arg1).Evaluate(t).(type) { + case string: + separator = v + case query: + node := v.Select(t) + if node != nil { + separator = node.Value() + } + } + + q = functionArgs(q) + test := predicate(q) + var parts []string + switch v := q.Evaluate(t).(type) { + case string: + return v + case query: + for node := v.Select(t); node != nil; node = v.Select(t) { + if test(node) { + parts = append(parts, node.Value()) + } + } + } + return strings.Join(parts, separator) + } +} + +// lower-case is XPATH function that converts a string to lower case. +func lowerCaseFunc(arg1 query) func(query, iterator) interface{} { + return func(_ query, t iterator) interface{} { + v := functionArgs(arg1).Evaluate(t) + return strings.ToLower(asString(t, v)) + } +} diff --git a/vendor/github.com/antchfx/xpath/func_go110.go b/vendor/github.com/antchfx/xpath/func_go110.go new file mode 100644 index 0000000000..d6ca451393 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/func_go110.go @@ -0,0 +1,16 @@ +// +build go1.10 + +package xpath + +import ( + "math" + "strings" +) + +func round(f float64) int { + return int(math.Round(f)) +} + +func newStringBuilder() stringBuilder { + return &strings.Builder{} +} diff --git a/vendor/github.com/antchfx/xpath/func_pre_go110.go b/vendor/github.com/antchfx/xpath/func_pre_go110.go new file mode 100644 index 0000000000..335141f79f --- /dev/null +++ b/vendor/github.com/antchfx/xpath/func_pre_go110.go @@ -0,0 +1,22 @@ +// +build !go1.10 + +package xpath + +import ( + "bytes" + "math" +) + +// math.Round() is supported by Go 1.10+, +// This method just compatible for version <1.10. +// https://github.com/golang/go/issues/20100 +func round(f float64) int { + if math.Abs(f) < 0.5 { + return 0 + } + return int(f + math.Copysign(0.5, f)) +} + +func newStringBuilder() stringBuilder { + return &bytes.Buffer{} +} diff --git a/vendor/github.com/antchfx/xpath/operator.go b/vendor/github.com/antchfx/xpath/operator.go new file mode 100644 index 0000000000..2820152b36 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/operator.go @@ -0,0 +1,288 @@ +package xpath + +import ( + "strconv" +) + +// The XPath number operator function list. + +type logical func(iterator, string, interface{}, interface{}) bool + +var logicalFuncs = [][]logical{ + {cmpBooleanBoolean, nil, nil, nil}, + {nil, cmpNumericNumeric, cmpNumericString, cmpNumericNodeSet}, + {nil, cmpStringNumeric, cmpStringString, cmpStringNodeSet}, + {nil, cmpNodeSetNumeric, cmpNodeSetString, cmpNodeSetNodeSet}, +} + +// number vs number +func cmpNumberNumberF(op string, a, b float64) bool { + switch op { + case "=": + return a == b + case ">": + return a > b + case "<": + return a < b + case ">=": + return a >= b + case "<=": + return a <= b + case "!=": + return a != b + } + return false +} + +// string vs string +func cmpStringStringF(op string, a, b string) bool { + switch op { + case "=": + return a == b + case ">": + return a > b + case "<": + return a < b + case ">=": + return a >= b + case "<=": + return a <= b + case "!=": + return a != b + } + return false +} + +func cmpBooleanBooleanF(op string, a, b bool) bool { + switch op { + case "or": + return a || b + case "and": + return a && b + } + return false +} + +func cmpNumericNumeric(t iterator, op string, m, n interface{}) bool { + a := m.(float64) + b := n.(float64) + return cmpNumberNumberF(op, a, b) +} + +func cmpNumericString(t iterator, op string, m, n interface{}) bool { + a := m.(float64) + b := n.(string) + num, err := strconv.ParseFloat(b, 64) + if err != nil { + panic(err) + } + return cmpNumberNumberF(op, a, num) +} + +func cmpNumericNodeSet(t iterator, op string, m, n interface{}) bool { + a := m.(float64) + b := n.(query) + + for { + node := b.Select(t) + if node == nil { + break + } + num, err := strconv.ParseFloat(node.Value(), 64) + if err != nil { + panic(err) + } + if cmpNumberNumberF(op, a, num) { + return true + } + } + return false +} + +func cmpNodeSetNumeric(t iterator, op string, m, n interface{}) bool { + a := m.(query) + b := n.(float64) + for { + node := a.Select(t) + if node == nil { + break + } + num, err := strconv.ParseFloat(node.Value(), 64) + if err != nil { + panic(err) + } + if cmpNumberNumberF(op, num, b) { + return true + } + } + return false +} + +func cmpNodeSetString(t iterator, op string, m, n interface{}) bool { + a := m.(query) + b := n.(string) + for { + node := a.Select(t) + if node == nil { + break + } + if cmpStringStringF(op, b, node.Value()) { + return true + } + } + return false +} + +func cmpNodeSetNodeSet(t iterator, op string, m, n interface{}) bool { + a := m.(query) + b := n.(query) + for { + x := a.Select(t) + if x == nil { + return false + } + + y := b.Select(t) + if y == nil { + return false + } + + for { + if cmpStringStringF(op, x.Value(), y.Value()) { + return true + } + if y = b.Select(t); y == nil { + break + } + } + // reset + b.Evaluate(t) + } +} + +func cmpStringNumeric(t iterator, op string, m, n interface{}) bool { + a := m.(string) + b := n.(float64) + num, err := strconv.ParseFloat(a, 64) + if err != nil { + panic(err) + } + return cmpNumberNumberF(op, b, num) +} + +func cmpStringString(t iterator, op string, m, n interface{}) bool { + a := m.(string) + b := n.(string) + return cmpStringStringF(op, a, b) +} + +func cmpStringNodeSet(t iterator, op string, m, n interface{}) bool { + a := m.(string) + b := n.(query) + for { + node := b.Select(t) + if node == nil { + break + } + if cmpStringStringF(op, a, node.Value()) { + return true + } + } + return false +} + +func cmpBooleanBoolean(t iterator, op string, m, n interface{}) bool { + a := m.(bool) + b := n.(bool) + return cmpBooleanBooleanF(op, a, b) +} + +// eqFunc is an `=` operator. +func eqFunc(t iterator, m, n interface{}) interface{} { + t1 := getXPathType(m) + t2 := getXPathType(n) + return logicalFuncs[t1][t2](t, "=", m, n) +} + +// gtFunc is an `>` operator. +func gtFunc(t iterator, m, n interface{}) interface{} { + t1 := getXPathType(m) + t2 := getXPathType(n) + return logicalFuncs[t1][t2](t, ">", m, n) +} + +// geFunc is an `>=` operator. +func geFunc(t iterator, m, n interface{}) interface{} { + t1 := getXPathType(m) + t2 := getXPathType(n) + return logicalFuncs[t1][t2](t, ">=", m, n) +} + +// ltFunc is an `<` operator. +func ltFunc(t iterator, m, n interface{}) interface{} { + t1 := getXPathType(m) + t2 := getXPathType(n) + return logicalFuncs[t1][t2](t, "<", m, n) +} + +// leFunc is an `<=` operator. +func leFunc(t iterator, m, n interface{}) interface{} { + t1 := getXPathType(m) + t2 := getXPathType(n) + return logicalFuncs[t1][t2](t, "<=", m, n) +} + +// neFunc is an `!=` operator. +func neFunc(t iterator, m, n interface{}) interface{} { + t1 := getXPathType(m) + t2 := getXPathType(n) + return logicalFuncs[t1][t2](t, "!=", m, n) +} + +// orFunc is an `or` operator. +var orFunc = func(t iterator, m, n interface{}) interface{} { + t1 := getXPathType(m) + t2 := getXPathType(n) + return logicalFuncs[t1][t2](t, "or", m, n) +} + +func numericExpr(t iterator, m, n interface{}, cb func(float64, float64) float64) float64 { + a := asNumber(t, m) + b := asNumber(t, n) + return cb(a, b) +} + +// plusFunc is an `+` operator. +var plusFunc = func(t iterator, m, n interface{}) interface{} { + return numericExpr(t, m, n, func(a, b float64) float64 { + return a + b + }) +} + +// minusFunc is an `-` operator. +var minusFunc = func(t iterator, m, n interface{}) interface{} { + return numericExpr(t, m, n, func(a, b float64) float64 { + return a - b + }) +} + +// mulFunc is an `*` operator. +var mulFunc = func(t iterator, m, n interface{}) interface{} { + return numericExpr(t, m, n, func(a, b float64) float64 { + return a * b + }) +} + +// divFunc is an `DIV` operator. +var divFunc = func(t iterator, m, n interface{}) interface{} { + return numericExpr(t, m, n, func(a, b float64) float64 { + return a / b + }) +} + +// modFunc is an 'MOD' operator. +var modFunc = func(t iterator, m, n interface{}) interface{} { + return numericExpr(t, m, n, func(a, b float64) float64 { + return float64(int(a) % int(b)) + }) +} diff --git a/vendor/github.com/antchfx/xpath/parse.go b/vendor/github.com/antchfx/xpath/parse.go new file mode 100644 index 0000000000..5b44cd8268 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/parse.go @@ -0,0 +1,1256 @@ +package xpath + +import ( + "bytes" + "errors" + "fmt" + "strconv" + "unicode" + "unicode/utf8" +) + +// A XPath expression token type. +type itemType int + +const ( + itemComma itemType = iota // ',' + itemSlash // '/' + itemAt // '@' + itemDot // '.' + itemLParens // '(' + itemRParens // ')' + itemLBracket // '[' + itemRBracket // ']' + itemStar // '*' + itemPlus // '+' + itemMinus // '-' + itemEq // '=' + itemLt // '<' + itemGt // '>' + itemBang // '!' + itemDollar // '$' + itemApos // '\'' + itemQuote // '"' + itemUnion // '|' + itemNe // '!=' + itemLe // '<=' + itemGe // '>=' + itemAnd // '&&' + itemOr // '||' + itemDotDot // '..' + itemSlashSlash // '//' + itemName // XML Name + itemString // Quoted string constant + itemNumber // Number constant + itemAxe // Axe (like child::) + itemEOF // END +) + +// A node is an XPath node in the parse tree. +type node interface { + Type() nodeType +} + +// nodeType identifies the type of a parse tree node. +type nodeType int + +func (t nodeType) Type() nodeType { + return t +} + +const ( + nodeRoot nodeType = iota + nodeAxis + nodeFilter + nodeFunction + nodeOperator + nodeVariable + nodeConstantOperand + nodeGroup +) + +type parser struct { + r *scanner + d int + namespaces map[string]string +} + +// newOperatorNode returns new operator node OperatorNode. +func newOperatorNode(op string, left, right node) node { + return &operatorNode{nodeType: nodeOperator, Op: op, Left: left, Right: right} +} + +// newOperand returns new constant operand node OperandNode. +func newOperandNode(v interface{}) node { + return &operandNode{nodeType: nodeConstantOperand, Val: v} +} + +// newAxisNode returns new axis node AxisNode. +func newAxisNode(axisType string, typeTest NodeType, localName, prefix, prop string, n node, opts ...func(p *axisNode)) node { + a := axisNode{ + nodeType: nodeAxis, + typeTest: typeTest, + LocalName: localName, + Prefix: prefix, + AxisType: axisType, + Prop: prop, + Input: n, + } + for _, o := range opts { + o(&a) + } + return &a +} + +// newVariableNode returns new variable node VariableNode. +func newVariableNode(prefix, name string) node { + return &variableNode{nodeType: nodeVariable, Name: name, Prefix: prefix} +} + +// newFilterNode returns a new filter node FilterNode. +func newFilterNode(n, m node) node { + return &filterNode{nodeType: nodeFilter, Input: n, Condition: m} +} + +func newGroupNode(n node) node { + return &groupNode{nodeType: nodeGroup, Input: n} +} + +// newRootNode returns a root node. +func newRootNode(s string) node { + return &rootNode{nodeType: nodeRoot, slash: s} +} + +// newFunctionNode returns function call node. +func newFunctionNode(name, prefix string, args []node) node { + return &functionNode{nodeType: nodeFunction, Prefix: prefix, FuncName: name, Args: args} +} + +// testOp reports whether current item name is an operand op. +func testOp(r *scanner, op string) bool { + return r.typ == itemName && r.prefix == "" && r.name == op +} + +func isPrimaryExpr(r *scanner) bool { + switch r.typ { + case itemString, itemNumber, itemDollar, itemLParens: + return true + case itemName: + return r.canBeFunc && !isNodeType(r) + } + return false +} + +func isNodeType(r *scanner) bool { + switch r.name { + case "node", "text", "processing-instruction", "comment": + return r.prefix == "" + } + return false +} + +func isStep(item itemType) bool { + switch item { + case itemDot, itemDotDot, itemAt, itemAxe, itemStar, itemName: + return true + } + return false +} + +func checkItem(r *scanner, typ itemType) { + if r.typ != typ { + panic(fmt.Sprintf("%s has an invalid token", r.text)) + } +} + +// parseExpression parsing the expression with input node n. +func (p *parser) parseExpression(n node) node { + if p.d = p.d + 1; p.d > 200 { + panic("the xpath query is too complex(depth > 200)") + } + n = p.parseOrExpr(n) + p.d-- + return n +} + +// next scanning next item on forward. +func (p *parser) next() bool { + return p.r.nextItem() +} + +func (p *parser) skipItem(typ itemType) { + checkItem(p.r, typ) + p.next() +} + +// OrExpr ::= AndExpr | OrExpr 'or' AndExpr +func (p *parser) parseOrExpr(n node) node { + opnd := p.parseAndExpr(n) + for { + if !testOp(p.r, "or") { + break + } + p.next() + opnd = newOperatorNode("or", opnd, p.parseAndExpr(n)) + } + return opnd +} + +// AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr +func (p *parser) parseAndExpr(n node) node { + opnd := p.parseEqualityExpr(n) + for { + if !testOp(p.r, "and") { + break + } + p.next() + opnd = newOperatorNode("and", opnd, p.parseEqualityExpr(n)) + } + return opnd +} + +// EqualityExpr ::= RelationalExpr | EqualityExpr '=' RelationalExpr | EqualityExpr '!=' RelationalExpr +func (p *parser) parseEqualityExpr(n node) node { + opnd := p.parseRelationalExpr(n) +Loop: + for { + var op string + switch p.r.typ { + case itemEq: + op = "=" + case itemNe: + op = "!=" + default: + break Loop + } + p.next() + opnd = newOperatorNode(op, opnd, p.parseRelationalExpr(n)) + } + return opnd +} + +// RelationalExpr ::= AdditiveExpr | RelationalExpr '<' AdditiveExpr | RelationalExpr '>' AdditiveExpr +// +// | RelationalExpr '<=' AdditiveExpr +// | RelationalExpr '>=' AdditiveExpr +func (p *parser) parseRelationalExpr(n node) node { + opnd := p.parseAdditiveExpr(n) +Loop: + for { + var op string + switch p.r.typ { + case itemLt: + op = "<" + case itemGt: + op = ">" + case itemLe: + op = "<=" + case itemGe: + op = ">=" + default: + break Loop + } + p.next() + opnd = newOperatorNode(op, opnd, p.parseAdditiveExpr(n)) + } + return opnd +} + +// AdditiveExpr ::= MultiplicativeExpr | AdditiveExpr '+' MultiplicativeExpr | AdditiveExpr '-' MultiplicativeExpr +func (p *parser) parseAdditiveExpr(n node) node { + opnd := p.parseMultiplicativeExpr(n) +Loop: + for { + var op string + switch p.r.typ { + case itemPlus: + op = "+" + case itemMinus: + op = "-" + default: + break Loop + } + p.next() + opnd = newOperatorNode(op, opnd, p.parseMultiplicativeExpr(n)) + } + return opnd +} + +// MultiplicativeExpr ::= UnaryExpr | MultiplicativeExpr MultiplyOperator(*) UnaryExpr +// +// | MultiplicativeExpr 'div' UnaryExpr | MultiplicativeExpr 'mod' UnaryExpr +func (p *parser) parseMultiplicativeExpr(n node) node { + opnd := p.parseUnaryExpr(n) +Loop: + for { + var op string + if p.r.typ == itemStar { + op = "*" + } else if testOp(p.r, "div") || testOp(p.r, "mod") { + op = p.r.name + } else { + break Loop + } + p.next() + opnd = newOperatorNode(op, opnd, p.parseUnaryExpr(n)) + } + return opnd +} + +// UnaryExpr ::= UnionExpr | '-' UnaryExpr +func (p *parser) parseUnaryExpr(n node) node { + minus := false + // ignore '-' sequence + for p.r.typ == itemMinus { + p.next() + minus = !minus + } + opnd := p.parseUnionExpr(n) + if minus { + opnd = newOperatorNode("*", opnd, newOperandNode(float64(-1))) + } + return opnd +} + +// UnionExpr ::= PathExpr | UnionExpr '|' PathExpr +func (p *parser) parseUnionExpr(n node) node { + opnd := p.parsePathExpr(n) +Loop: + for { + if p.r.typ != itemUnion { + break Loop + } + p.next() + opnd2 := p.parsePathExpr(n) + // Checking the node type that must be is node set type? + opnd = newOperatorNode("|", opnd, opnd2) + } + return opnd +} + +// PathExpr ::= LocationPath | FilterExpr | FilterExpr '/' RelativeLocationPath | FilterExpr '//' RelativeLocationPath +func (p *parser) parsePathExpr(n node) node { + var opnd node + if isPrimaryExpr(p.r) { + opnd = p.parseFilterExpr(n) + switch p.r.typ { + case itemSlash: + p.next() + opnd = p.parseRelativeLocationPath(opnd) + case itemSlashSlash: + p.next() + opnd = p.parseRelativeLocationPath(newAxisNode("descendant-or-self", allNode, "", "", "", opnd)) + } + } else { + opnd = p.parseLocationPath(nil) + } + return opnd +} + +// FilterExpr ::= PrimaryExpr | FilterExpr Predicate +func (p *parser) parseFilterExpr(n node) node { + opnd := p.parsePrimaryExpr(n) + if p.r.typ == itemLBracket { + opnd = newFilterNode(opnd, p.parsePredicate(opnd)) + } + return opnd +} + +// Predicate ::= '[' PredicateExpr ']' +func (p *parser) parsePredicate(n node) node { + p.skipItem(itemLBracket) + opnd := p.parseExpression(n) + p.skipItem(itemRBracket) + return opnd +} + +// LocationPath ::= RelativeLocationPath | AbsoluteLocationPath +func (p *parser) parseLocationPath(n node) (opnd node) { + switch p.r.typ { + case itemSlash: + p.next() + opnd = newRootNode("/") + if isStep(p.r.typ) { + opnd = p.parseRelativeLocationPath(opnd) // ?? child:: or self ?? + } + case itemSlashSlash: + p.next() + opnd = newRootNode("//") + opnd = p.parseRelativeLocationPath(newAxisNode("descendant-or-self", allNode, "", "", "", opnd)) + default: + opnd = p.parseRelativeLocationPath(n) + } + return opnd +} + +// RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | AbbreviatedRelativeLocationPath +func (p *parser) parseRelativeLocationPath(n node) node { + opnd := n +Loop: + for { + opnd = p.parseStep(opnd) + switch p.r.typ { + case itemSlashSlash: + p.next() + opnd = newAxisNode("descendant-or-self", allNode, "", "", "", opnd) + case itemSlash: + p.next() + default: + break Loop + } + } + return opnd +} + +// Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep +func (p *parser) parseStep(n node) (opnd node) { + if p.r.typ == itemDot || p.r.typ == itemDotDot { + if p.r.typ == itemDot { + opnd = newAxisNode("self", allNode, "", "", "", n) + } else { + opnd = newAxisNode("parent", allNode, "", "", "", n) + } + p.next() + if p.r.typ != itemLBracket { + return opnd + } + } else { + axisType := "child" // default axes value. + switch p.r.typ { + case itemAt: + axisType = "attribute" + p.next() + case itemAxe: + axisType = p.r.name + p.next() + case itemLParens: + return p.parseSequence(n) + } + matchType := ElementNode + if axisType == "attribute" { + matchType = AttributeNode + } + opnd = p.parseNodeTest(n, axisType, matchType) + } + for p.r.typ == itemLBracket { + opnd = newFilterNode(opnd, p.parsePredicate(opnd)) + } + return opnd +} + +// Expr ::= '(' Step ("," Step)* ')' +func (p *parser) parseSequence(n node) (opnd node) { + p.skipItem(itemLParens) + opnd = p.parseStep(n) + for { + if p.r.typ != itemComma { + break + } + p.next() + opnd2 := p.parseStep(n) + opnd = newOperatorNode("|", opnd, opnd2) + } + p.skipItem(itemRParens) + return opnd +} + +// NodeTest ::= NameTest | nodeType '(' ')' | 'processing-instruction' '(' Literal ')' +func (p *parser) parseNodeTest(n node, axeTyp string, matchType NodeType) (opnd node) { + switch p.r.typ { + case itemName: + if p.r.canBeFunc && isNodeType(p.r) { + var prop string + switch p.r.name { + case "comment", "text", "processing-instruction", "node": + prop = p.r.name + } + var name string + p.next() + p.skipItem(itemLParens) + if prop == "processing-instruction" && p.r.typ != itemRParens { + checkItem(p.r, itemString) + name = p.r.strval + p.next() + } + p.skipItem(itemRParens) + switch prop { + case "comment": + matchType = CommentNode + case "text": + matchType = TextNode + case "processing-instruction": + case "node": + matchType = allNode + default: + matchType = RootNode + } + + opnd = newAxisNode(axeTyp, matchType, name, "", prop, n) + } else { + prefix := p.r.prefix + name := p.r.name + p.next() + if p.r.name == "*" { + name = "" + } + opnd = newAxisNode(axeTyp, matchType, name, prefix, "", n, func(a *axisNode) { + if prefix != "" && p.namespaces != nil { + if ns, ok := p.namespaces[prefix]; ok { + a.hasNamespaceURI = true + a.namespaceURI = ns + } else { + panic(fmt.Sprintf("prefix %s not defined.", prefix)) + } + } + }) + } + case itemStar: + opnd = newAxisNode(axeTyp, matchType, "", "", "", n) + p.next() + default: + panic("expression must evaluate to a node-set") + } + return opnd +} + +// PrimaryExpr ::= VariableReference | '(' Expr ')' | Literal | Number | FunctionCall +func (p *parser) parsePrimaryExpr(n node) (opnd node) { + switch p.r.typ { + case itemString: + opnd = newOperandNode(p.r.strval) + p.next() + case itemNumber: + opnd = newOperandNode(p.r.numval) + p.next() + case itemDollar: + p.next() + checkItem(p.r, itemName) + opnd = newVariableNode(p.r.prefix, p.r.name) + p.next() + case itemLParens: + p.next() + opnd = p.parseExpression(n) + if opnd.Type() != nodeConstantOperand { + opnd = newGroupNode(opnd) + } + p.skipItem(itemRParens) + case itemName: + if p.r.canBeFunc && !isNodeType(p.r) { + opnd = p.parseMethod(nil) + } + } + return opnd +} + +// FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument )* )? ')' +func (p *parser) parseMethod(n node) node { + var args []node + name := p.r.name + prefix := p.r.prefix + + p.skipItem(itemName) + p.skipItem(itemLParens) + if p.r.typ != itemRParens { + for { + args = append(args, p.parseExpression(n)) + if p.r.typ == itemRParens { + break + } + p.skipItem(itemComma) + } + } + p.skipItem(itemRParens) + return newFunctionNode(name, prefix, args) +} + +// Parse parsing the XPath express string expr and returns a tree node. +func parse(expr string, namespaces map[string]string) node { + r := &scanner{text: expr} + r.nextChar() + r.nextItem() + p := &parser{r: r, namespaces: namespaces} + return p.parseExpression(nil) +} + +// rootNode holds a top-level node of tree. +type rootNode struct { + nodeType + slash string +} + +func (r *rootNode) String() string { + return r.slash +} + +// operatorNode holds two Nodes operator. +type operatorNode struct { + nodeType + Op string + Left, Right node +} + +func (o *operatorNode) String() string { + return fmt.Sprintf("%v%s%v", o.Left, o.Op, o.Right) +} + +// axisNode holds a location step. +type axisNode struct { + nodeType + Input node + Prop string // node-test name.[comment|text|processing-instruction|node] + AxisType string // name of the axis.[attribute|ancestor|child|....] + LocalName string // local part name of node. + Prefix string // prefix name of node. + namespaceURI string // namespace URI of node + hasNamespaceURI bool // if namespace URI is set (can be "") + typeTest NodeType +} + +func (a *axisNode) String() string { + var b bytes.Buffer + if a.AxisType != "" { + b.Write([]byte(a.AxisType + "::")) + } + if a.Prefix != "" { + b.Write([]byte(a.Prefix + ":")) + } + b.Write([]byte(a.LocalName)) + if a.Prop != "" { + b.Write([]byte("/" + a.Prop + "()")) + } + return b.String() +} + +// operandNode holds a constant operand. +type operandNode struct { + nodeType + Val interface{} +} + +func (o *operandNode) String() string { + return fmt.Sprintf("%v", o.Val) +} + +// groupNode holds a set of node expression +type groupNode struct { + nodeType + Input node +} + +func (g *groupNode) String() string { + return fmt.Sprintf("%s", g.Input) +} + +// filterNode holds a condition filter. +type filterNode struct { + nodeType + Input, Condition node +} + +func (f *filterNode) String() string { + return fmt.Sprintf("%s[%s]", f.Input, f.Condition) +} + +// variableNode holds a variable. +type variableNode struct { + nodeType + Name, Prefix string +} + +func (v *variableNode) String() string { + if v.Prefix == "" { + return v.Name + } + return fmt.Sprintf("%s:%s", v.Prefix, v.Name) +} + +// functionNode holds a function call. +type functionNode struct { + nodeType + Args []node + Prefix string + FuncName string // function name +} + +func (f *functionNode) String() string { + var b bytes.Buffer + // fun(arg1, ..., argn) + b.Write([]byte(f.FuncName)) + b.Write([]byte("(")) + for i, arg := range f.Args { + if i > 0 { + b.Write([]byte(",")) + } + b.Write([]byte(fmt.Sprintf("%s", arg))) + } + b.Write([]byte(")")) + return b.String() +} + +type scanner struct { + text, name, prefix string + + pos int + curr rune + currSize int + typ itemType + strval string // text value at current pos + numval float64 // number value at current pos + canBeFunc bool +} + +func (s *scanner) nextChar() bool { + if s.pos >= len(s.text) { + s.curr = rune(0) + s.currSize = 1 + return false + } + + r, size := rune(s.text[s.pos]), 1 + if r >= 0x80 { // handle multi-byte runes + r, size = utf8.DecodeRuneInString(s.text[s.pos:]) + } + + s.curr = r + s.currSize = size + s.pos += size + return true +} + +func (s *scanner) nextItem() bool { + s.skipSpace() + switch s.curr { + case 0: + s.typ = itemEOF + return false + case ',', '@', '(', ')', '|', '*', '[', ']', '+', '-', '=', '#', '$': + s.typ = asItemType(s.curr) + s.nextChar() + case '<': + s.typ = itemLt + s.nextChar() + if s.curr == '=' { + s.typ = itemLe + s.nextChar() + } + case '>': + s.typ = itemGt + s.nextChar() + if s.curr == '=' { + s.typ = itemGe + s.nextChar() + } + case '!': + s.typ = itemBang + s.nextChar() + if s.curr == '=' { + s.typ = itemNe + s.nextChar() + } + case '.': + s.typ = itemDot + s.nextChar() + if s.curr == '.' { + s.typ = itemDotDot + s.nextChar() + } else if isDigit(s.curr) { + s.typ = itemNumber + s.numval = s.scanFraction() + } + case '/': + s.typ = itemSlash + s.nextChar() + if s.curr == '/' { + s.typ = itemSlashSlash + s.nextChar() + } + case '"', '\'': + s.typ = itemString + s.strval = s.scanString() + default: + if isDigit(s.curr) { + s.typ = itemNumber + s.numval = s.scanNumber() + } else if isName(s.curr) { + s.typ = itemName + s.name = s.scanName() + s.prefix = "" + // "foo:bar" is one itemem not three because it doesn't allow spaces in between + // We should distinct it from "foo::" and need process "foo ::" as well + if s.curr == ':' { + s.nextChar() + // can be "foo:bar" or "foo::" + if s.curr == ':' { + // "foo::" + s.nextChar() + s.typ = itemAxe + } else { // "foo:*", "foo:bar" or "foo: " + s.prefix = s.name + if s.curr == '*' { + s.nextChar() + s.name = "*" + } else if isName(s.curr) { + s.name = s.scanName() + } else { + panic(fmt.Sprintf("%s has an invalid qualified name.", s.text)) + } + } + } else { + s.skipSpace() + if s.curr == ':' { + s.nextChar() + // it can be "foo ::" or just "foo :" + if s.curr == ':' { + s.nextChar() + s.typ = itemAxe + } else { + panic(fmt.Sprintf("%s has an invalid qualified name.", s.text)) + } + } + } + s.skipSpace() + s.canBeFunc = s.curr == '(' + } else { + panic(fmt.Sprintf("%s has an invalid token.", s.text)) + } + } + return true +} + +func (s *scanner) skipSpace() { +Loop: + for { + if !unicode.IsSpace(s.curr) || !s.nextChar() { + break Loop + } + } +} + +func (s *scanner) scanFraction() float64 { + var ( + i = s.pos - 2 + c = 1 // '.' + ) + for isDigit(s.curr) { + s.nextChar() + c++ + } + v, err := strconv.ParseFloat(s.text[i:i+c], 64) + if err != nil { + panic(fmt.Errorf("xpath: scanFraction parse float got error: %v", err)) + } + return v +} + +func (s *scanner) scanNumber() float64 { + var ( + c int + i = s.pos - 1 + ) + for isDigit(s.curr) { + s.nextChar() + c++ + } + if s.curr == '.' { + s.nextChar() + c++ + for isDigit(s.curr) { + s.nextChar() + c++ + } + } + v, err := strconv.ParseFloat(s.text[i:i+c], 64) + if err != nil { + panic(fmt.Errorf("xpath: scanNumber parse float got error: %v", err)) + } + return v +} + +func (s *scanner) scanString() string { + var ( + c = 0 + end = s.curr + ) + s.nextChar() + i := s.pos - s.currSize + if s.currSize > 1 { + c++ + } + for s.curr != end { + if !s.nextChar() { + panic(errors.New("xpath: scanString got unclosed string")) + } + c += s.currSize + } + s.nextChar() + return s.text[i : i+c] +} + +func (s *scanner) scanName() string { + var ( + c = s.currSize - 1 + i = s.pos - s.currSize + ) + + // Detect current rune size + + for isName(s.curr) { + if !s.nextChar() { + c += s.currSize + break + } + c += s.currSize + } + return s.text[i : i+c] +} + +func isName(r rune) bool { + return string(r) != ":" && string(r) != "/" && + (unicode.Is(first, r) || unicode.Is(second, r) || string(r) == "*") +} + +func isDigit(r rune) bool { + return unicode.IsDigit(r) +} + +func asItemType(r rune) itemType { + switch r { + case ',': + return itemComma + case '@': + return itemAt + case '(': + return itemLParens + case ')': + return itemRParens + case '|': + return itemUnion + case '*': + return itemStar + case '[': + return itemLBracket + case ']': + return itemRBracket + case '+': + return itemPlus + case '-': + return itemMinus + case '=': + return itemEq + case '$': + return itemDollar + } + panic(fmt.Errorf("unknown item: %v", r)) +} + +var first = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x003A, 0x003A, 1}, + {0x0041, 0x005A, 1}, + {0x005F, 0x005F, 1}, + {0x0061, 0x007A, 1}, + {0x00C0, 0x00D6, 1}, + {0x00D8, 0x00F6, 1}, + {0x00F8, 0x00FF, 1}, + {0x0100, 0x0131, 1}, + {0x0134, 0x013E, 1}, + {0x0141, 0x0148, 1}, + {0x014A, 0x017E, 1}, + {0x0180, 0x01C3, 1}, + {0x01CD, 0x01F0, 1}, + {0x01F4, 0x01F5, 1}, + {0x01FA, 0x0217, 1}, + {0x0250, 0x02A8, 1}, + {0x02BB, 0x02C1, 1}, + {0x0386, 0x0386, 1}, + {0x0388, 0x038A, 1}, + {0x038C, 0x038C, 1}, + {0x038E, 0x03A1, 1}, + {0x03A3, 0x03CE, 1}, + {0x03D0, 0x03D6, 1}, + {0x03DA, 0x03E0, 2}, + {0x03E2, 0x03F3, 1}, + {0x0401, 0x040C, 1}, + {0x040E, 0x044F, 1}, + {0x0451, 0x045C, 1}, + {0x045E, 0x0481, 1}, + {0x0490, 0x04C4, 1}, + {0x04C7, 0x04C8, 1}, + {0x04CB, 0x04CC, 1}, + {0x04D0, 0x04EB, 1}, + {0x04EE, 0x04F5, 1}, + {0x04F8, 0x04F9, 1}, + {0x0531, 0x0556, 1}, + {0x0559, 0x0559, 1}, + {0x0561, 0x0586, 1}, + {0x05D0, 0x05EA, 1}, + {0x05F0, 0x05F2, 1}, + {0x0621, 0x063A, 1}, + {0x0641, 0x064A, 1}, + {0x0671, 0x06B7, 1}, + {0x06BA, 0x06BE, 1}, + {0x06C0, 0x06CE, 1}, + {0x06D0, 0x06D3, 1}, + {0x06D5, 0x06D5, 1}, + {0x06E5, 0x06E6, 1}, + {0x0905, 0x0939, 1}, + {0x093D, 0x093D, 1}, + {0x0958, 0x0961, 1}, + {0x0985, 0x098C, 1}, + {0x098F, 0x0990, 1}, + {0x0993, 0x09A8, 1}, + {0x09AA, 0x09B0, 1}, + {0x09B2, 0x09B2, 1}, + {0x09B6, 0x09B9, 1}, + {0x09DC, 0x09DD, 1}, + {0x09DF, 0x09E1, 1}, + {0x09F0, 0x09F1, 1}, + {0x0A05, 0x0A0A, 1}, + {0x0A0F, 0x0A10, 1}, + {0x0A13, 0x0A28, 1}, + {0x0A2A, 0x0A30, 1}, + {0x0A32, 0x0A33, 1}, + {0x0A35, 0x0A36, 1}, + {0x0A38, 0x0A39, 1}, + {0x0A59, 0x0A5C, 1}, + {0x0A5E, 0x0A5E, 1}, + {0x0A72, 0x0A74, 1}, + {0x0A85, 0x0A8B, 1}, + {0x0A8D, 0x0A8D, 1}, + {0x0A8F, 0x0A91, 1}, + {0x0A93, 0x0AA8, 1}, + {0x0AAA, 0x0AB0, 1}, + {0x0AB2, 0x0AB3, 1}, + {0x0AB5, 0x0AB9, 1}, + {0x0ABD, 0x0AE0, 0x23}, + {0x0B05, 0x0B0C, 1}, + {0x0B0F, 0x0B10, 1}, + {0x0B13, 0x0B28, 1}, + {0x0B2A, 0x0B30, 1}, + {0x0B32, 0x0B33, 1}, + {0x0B36, 0x0B39, 1}, + {0x0B3D, 0x0B3D, 1}, + {0x0B5C, 0x0B5D, 1}, + {0x0B5F, 0x0B61, 1}, + {0x0B85, 0x0B8A, 1}, + {0x0B8E, 0x0B90, 1}, + {0x0B92, 0x0B95, 1}, + {0x0B99, 0x0B9A, 1}, + {0x0B9C, 0x0B9C, 1}, + {0x0B9E, 0x0B9F, 1}, + {0x0BA3, 0x0BA4, 1}, + {0x0BA8, 0x0BAA, 1}, + {0x0BAE, 0x0BB5, 1}, + {0x0BB7, 0x0BB9, 1}, + {0x0C05, 0x0C0C, 1}, + {0x0C0E, 0x0C10, 1}, + {0x0C12, 0x0C28, 1}, + {0x0C2A, 0x0C33, 1}, + {0x0C35, 0x0C39, 1}, + {0x0C60, 0x0C61, 1}, + {0x0C85, 0x0C8C, 1}, + {0x0C8E, 0x0C90, 1}, + {0x0C92, 0x0CA8, 1}, + {0x0CAA, 0x0CB3, 1}, + {0x0CB5, 0x0CB9, 1}, + {0x0CDE, 0x0CDE, 1}, + {0x0CE0, 0x0CE1, 1}, + {0x0D05, 0x0D0C, 1}, + {0x0D0E, 0x0D10, 1}, + {0x0D12, 0x0D28, 1}, + {0x0D2A, 0x0D39, 1}, + {0x0D60, 0x0D61, 1}, + {0x0E01, 0x0E2E, 1}, + {0x0E30, 0x0E30, 1}, + {0x0E32, 0x0E33, 1}, + {0x0E40, 0x0E45, 1}, + {0x0E81, 0x0E82, 1}, + {0x0E84, 0x0E84, 1}, + {0x0E87, 0x0E88, 1}, + {0x0E8A, 0x0E8D, 3}, + {0x0E94, 0x0E97, 1}, + {0x0E99, 0x0E9F, 1}, + {0x0EA1, 0x0EA3, 1}, + {0x0EA5, 0x0EA7, 2}, + {0x0EAA, 0x0EAB, 1}, + {0x0EAD, 0x0EAE, 1}, + {0x0EB0, 0x0EB0, 1}, + {0x0EB2, 0x0EB3, 1}, + {0x0EBD, 0x0EBD, 1}, + {0x0EC0, 0x0EC4, 1}, + {0x0F40, 0x0F47, 1}, + {0x0F49, 0x0F69, 1}, + {0x10A0, 0x10C5, 1}, + {0x10D0, 0x10F6, 1}, + {0x1100, 0x1100, 1}, + {0x1102, 0x1103, 1}, + {0x1105, 0x1107, 1}, + {0x1109, 0x1109, 1}, + {0x110B, 0x110C, 1}, + {0x110E, 0x1112, 1}, + {0x113C, 0x1140, 2}, + {0x114C, 0x1150, 2}, + {0x1154, 0x1155, 1}, + {0x1159, 0x1159, 1}, + {0x115F, 0x1161, 1}, + {0x1163, 0x1169, 2}, + {0x116D, 0x116E, 1}, + {0x1172, 0x1173, 1}, + {0x1175, 0x119E, 0x119E - 0x1175}, + {0x11A8, 0x11AB, 0x11AB - 0x11A8}, + {0x11AE, 0x11AF, 1}, + {0x11B7, 0x11B8, 1}, + {0x11BA, 0x11BA, 1}, + {0x11BC, 0x11C2, 1}, + {0x11EB, 0x11F0, 0x11F0 - 0x11EB}, + {0x11F9, 0x11F9, 1}, + {0x1E00, 0x1E9B, 1}, + {0x1EA0, 0x1EF9, 1}, + {0x1F00, 0x1F15, 1}, + {0x1F18, 0x1F1D, 1}, + {0x1F20, 0x1F45, 1}, + {0x1F48, 0x1F4D, 1}, + {0x1F50, 0x1F57, 1}, + {0x1F59, 0x1F5B, 0x1F5B - 0x1F59}, + {0x1F5D, 0x1F5D, 1}, + {0x1F5F, 0x1F7D, 1}, + {0x1F80, 0x1FB4, 1}, + {0x1FB6, 0x1FBC, 1}, + {0x1FBE, 0x1FBE, 1}, + {0x1FC2, 0x1FC4, 1}, + {0x1FC6, 0x1FCC, 1}, + {0x1FD0, 0x1FD3, 1}, + {0x1FD6, 0x1FDB, 1}, + {0x1FE0, 0x1FEC, 1}, + {0x1FF2, 0x1FF4, 1}, + {0x1FF6, 0x1FFC, 1}, + {0x2126, 0x2126, 1}, + {0x212A, 0x212B, 1}, + {0x212E, 0x212E, 1}, + {0x2180, 0x2182, 1}, + {0x3007, 0x3007, 1}, + {0x3021, 0x3029, 1}, + {0x3041, 0x3094, 1}, + {0x30A1, 0x30FA, 1}, + {0x3105, 0x312C, 1}, + {0x4E00, 0x9FA5, 1}, + {0xAC00, 0xD7A3, 1}, + }, +} + +var second = &unicode.RangeTable{ + R16: []unicode.Range16{ + {0x002D, 0x002E, 1}, + {0x0030, 0x0039, 1}, + {0x00B7, 0x00B7, 1}, + {0x02D0, 0x02D1, 1}, + {0x0300, 0x0345, 1}, + {0x0360, 0x0361, 1}, + {0x0387, 0x0387, 1}, + {0x0483, 0x0486, 1}, + {0x0591, 0x05A1, 1}, + {0x05A3, 0x05B9, 1}, + {0x05BB, 0x05BD, 1}, + {0x05BF, 0x05BF, 1}, + {0x05C1, 0x05C2, 1}, + {0x05C4, 0x0640, 0x0640 - 0x05C4}, + {0x064B, 0x0652, 1}, + {0x0660, 0x0669, 1}, + {0x0670, 0x0670, 1}, + {0x06D6, 0x06DC, 1}, + {0x06DD, 0x06DF, 1}, + {0x06E0, 0x06E4, 1}, + {0x06E7, 0x06E8, 1}, + {0x06EA, 0x06ED, 1}, + {0x06F0, 0x06F9, 1}, + {0x0901, 0x0903, 1}, + {0x093C, 0x093C, 1}, + {0x093E, 0x094C, 1}, + {0x094D, 0x094D, 1}, + {0x0951, 0x0954, 1}, + {0x0962, 0x0963, 1}, + {0x0966, 0x096F, 1}, + {0x0981, 0x0983, 1}, + {0x09BC, 0x09BC, 1}, + {0x09BE, 0x09BF, 1}, + {0x09C0, 0x09C4, 1}, + {0x09C7, 0x09C8, 1}, + {0x09CB, 0x09CD, 1}, + {0x09D7, 0x09D7, 1}, + {0x09E2, 0x09E3, 1}, + {0x09E6, 0x09EF, 1}, + {0x0A02, 0x0A3C, 0x3A}, + {0x0A3E, 0x0A3F, 1}, + {0x0A40, 0x0A42, 1}, + {0x0A47, 0x0A48, 1}, + {0x0A4B, 0x0A4D, 1}, + {0x0A66, 0x0A6F, 1}, + {0x0A70, 0x0A71, 1}, + {0x0A81, 0x0A83, 1}, + {0x0ABC, 0x0ABC, 1}, + {0x0ABE, 0x0AC5, 1}, + {0x0AC7, 0x0AC9, 1}, + {0x0ACB, 0x0ACD, 1}, + {0x0AE6, 0x0AEF, 1}, + {0x0B01, 0x0B03, 1}, + {0x0B3C, 0x0B3C, 1}, + {0x0B3E, 0x0B43, 1}, + {0x0B47, 0x0B48, 1}, + {0x0B4B, 0x0B4D, 1}, + {0x0B56, 0x0B57, 1}, + {0x0B66, 0x0B6F, 1}, + {0x0B82, 0x0B83, 1}, + {0x0BBE, 0x0BC2, 1}, + {0x0BC6, 0x0BC8, 1}, + {0x0BCA, 0x0BCD, 1}, + {0x0BD7, 0x0BD7, 1}, + {0x0BE7, 0x0BEF, 1}, + {0x0C01, 0x0C03, 1}, + {0x0C3E, 0x0C44, 1}, + {0x0C46, 0x0C48, 1}, + {0x0C4A, 0x0C4D, 1}, + {0x0C55, 0x0C56, 1}, + {0x0C66, 0x0C6F, 1}, + {0x0C82, 0x0C83, 1}, + {0x0CBE, 0x0CC4, 1}, + {0x0CC6, 0x0CC8, 1}, + {0x0CCA, 0x0CCD, 1}, + {0x0CD5, 0x0CD6, 1}, + {0x0CE6, 0x0CEF, 1}, + {0x0D02, 0x0D03, 1}, + {0x0D3E, 0x0D43, 1}, + {0x0D46, 0x0D48, 1}, + {0x0D4A, 0x0D4D, 1}, + {0x0D57, 0x0D57, 1}, + {0x0D66, 0x0D6F, 1}, + {0x0E31, 0x0E31, 1}, + {0x0E34, 0x0E3A, 1}, + {0x0E46, 0x0E46, 1}, + {0x0E47, 0x0E4E, 1}, + {0x0E50, 0x0E59, 1}, + {0x0EB1, 0x0EB1, 1}, + {0x0EB4, 0x0EB9, 1}, + {0x0EBB, 0x0EBC, 1}, + {0x0EC6, 0x0EC6, 1}, + {0x0EC8, 0x0ECD, 1}, + {0x0ED0, 0x0ED9, 1}, + {0x0F18, 0x0F19, 1}, + {0x0F20, 0x0F29, 1}, + {0x0F35, 0x0F39, 2}, + {0x0F3E, 0x0F3F, 1}, + {0x0F71, 0x0F84, 1}, + {0x0F86, 0x0F8B, 1}, + {0x0F90, 0x0F95, 1}, + {0x0F97, 0x0F97, 1}, + {0x0F99, 0x0FAD, 1}, + {0x0FB1, 0x0FB7, 1}, + {0x0FB9, 0x0FB9, 1}, + {0x20D0, 0x20DC, 1}, + {0x20E1, 0x3005, 0x3005 - 0x20E1}, + {0x302A, 0x302F, 1}, + {0x3031, 0x3035, 1}, + {0x3099, 0x309A, 1}, + {0x309D, 0x309E, 1}, + {0x30FC, 0x30FE, 1}, + }, +} diff --git a/vendor/github.com/antchfx/xpath/query.go b/vendor/github.com/antchfx/xpath/query.go new file mode 100644 index 0000000000..75c4336139 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/query.go @@ -0,0 +1,1437 @@ +package xpath + +import ( + "bytes" + "fmt" + "hash/fnv" + "reflect" +) + +// The return type of the XPath expression. +type resultType int + +var xpathResultType = struct { + Boolean resultType + // A numeric value + Number resultType + String resultType + // A node collection. + NodeSet resultType + // Any of the XPath node types. + Any resultType +}{ + Boolean: 0, + Number: 1, + String: 2, + NodeSet: 3, + Any: 4, +} + +type queryProp int + +var queryProps = struct { + None queryProp + Position queryProp + Count queryProp + Cached queryProp + Reverse queryProp + Merge queryProp +}{ + None: 0, + Position: 1, + Count: 2, + Cached: 4, + Reverse: 8, + Merge: 16, +} + +type iterator interface { + Current() NodeNavigator +} + +// An XPath query interface. +type query interface { + // Select traversing iterator returns a query matched node NodeNavigator. + Select(iterator) NodeNavigator + + // Evaluate evaluates query and returns values of the current query. + Evaluate(iterator) interface{} + + Clone() query + + // ValueType returns the value type of the current query. + ValueType() resultType + + Properties() queryProp +} + +// nopQuery is an empty query that always return nil for any query. +type nopQuery struct{} + +func (nopQuery) Select(iterator) NodeNavigator { return nil } + +func (nopQuery) Evaluate(iterator) interface{} { return nil } + +func (nopQuery) Clone() query { return nopQuery{} } + +func (nopQuery) ValueType() resultType { return xpathResultType.NodeSet } + +func (nopQuery) Properties() queryProp { + return queryProps.Merge | queryProps.Position | queryProps.Count | queryProps.Cached +} + +// contextQuery is returns current node on the iterator object query. +type contextQuery struct { + count int +} + +func (c *contextQuery) Select(t iterator) NodeNavigator { + if c.count > 0 { + return nil + } + c.count++ + return t.Current().Copy() +} + +func (c *contextQuery) Evaluate(iterator) interface{} { + c.count = 0 + return c +} + +func (c *contextQuery) Clone() query { + return &contextQuery{} +} + +func (c *contextQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (c *contextQuery) Properties() queryProp { + return queryProps.Merge | queryProps.Position | queryProps.Count | queryProps.Cached +} + +type absoluteQuery struct { + count int +} + +func (a *absoluteQuery) Select(t iterator) (n NodeNavigator) { + if a.count > 0 { + return + } + a.count++ + n = t.Current().Copy() + n.MoveToRoot() + return +} + +func (a *absoluteQuery) Evaluate(t iterator) interface{} { + a.count = 0 + return a +} + +func (a *absoluteQuery) Clone() query { + return &absoluteQuery{} +} + +func (a *absoluteQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (a *absoluteQuery) Properties() queryProp { + return queryProps.Merge | queryProps.Position | queryProps.Count | queryProps.Cached +} + +// ancestorQuery is an XPath ancestor node query.(ancestor::*|ancestor-self::*) +type ancestorQuery struct { + name string + iterator func() NodeNavigator + table map[uint64]bool + + Self bool + Input query + Predicate func(NodeNavigator) bool +} + +func (a *ancestorQuery) Select(t iterator) NodeNavigator { + if a.table == nil { + a.table = make(map[uint64]bool) + } + + for { + if a.iterator == nil { + node := a.Input.Select(t) + if node == nil { + return nil + } + first := true + node = node.Copy() + a.iterator = func() NodeNavigator { + if first { + first = false + if a.Self && a.Predicate(node) { + return node + } + } + for node.MoveToParent() { + if a.Predicate(node) { + return node + } + } + return nil + } + } + + for node := a.iterator(); node != nil; node = a.iterator() { + node_id := getHashCode(node.Copy()) + if _, ok := a.table[node_id]; !ok { + a.table[node_id] = true + return node + } + } + a.iterator = nil + } +} + +func (a *ancestorQuery) Evaluate(t iterator) interface{} { + a.Input.Evaluate(t) + a.iterator = nil + return a +} + +func (a *ancestorQuery) Test(n NodeNavigator) bool { + return a.Predicate(n) +} + +func (a *ancestorQuery) Clone() query { + return &ancestorQuery{name: a.name, Self: a.Self, Input: a.Input.Clone(), Predicate: a.Predicate} +} + +func (a *ancestorQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (a *ancestorQuery) Properties() queryProp { + return queryProps.Position | queryProps.Count | queryProps.Cached | queryProps.Merge | queryProps.Reverse +} + +// attributeQuery is an XPath attribute node query.(@*) +type attributeQuery struct { + name string + iterator func() NodeNavigator + + Input query + Predicate func(NodeNavigator) bool +} + +func (a *attributeQuery) Select(t iterator) NodeNavigator { + for { + if a.iterator == nil { + node := a.Input.Select(t) + if node == nil { + return nil + } + node = node.Copy() + a.iterator = func() NodeNavigator { + for { + onAttr := node.MoveToNextAttribute() + if !onAttr { + return nil + } + if a.Predicate(node) { + return node + } + } + } + } + + if node := a.iterator(); node != nil { + return node + } + a.iterator = nil + } +} + +func (a *attributeQuery) Evaluate(t iterator) interface{} { + a.Input.Evaluate(t) + a.iterator = nil + return a +} + +func (a *attributeQuery) Test(n NodeNavigator) bool { + return a.Predicate(n) +} + +func (a *attributeQuery) Clone() query { + return &attributeQuery{name: a.name, Input: a.Input.Clone(), Predicate: a.Predicate} +} + +func (a *attributeQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (a *attributeQuery) Properties() queryProp { + return queryProps.Merge +} + +// childQuery is an XPath child node query.(child::*) +type childQuery struct { + name string + posit int + iterator func() NodeNavigator + + Input query + Predicate func(NodeNavigator) bool +} + +func (c *childQuery) Select(t iterator) NodeNavigator { + for { + if c.iterator == nil { + c.posit = 0 + node := c.Input.Select(t) + if node == nil { + return nil + } + node = node.Copy() + first := true + c.iterator = func() NodeNavigator { + for { + if (first && !node.MoveToChild()) || (!first && !node.MoveToNext()) { + return nil + } + first = false + if c.Predicate(node) { + return node + } + } + } + } + + if node := c.iterator(); node != nil { + c.posit++ + return node + } + c.iterator = nil + } +} + +func (c *childQuery) Evaluate(t iterator) interface{} { + c.Input.Evaluate(t) + c.iterator = nil + return c +} + +func (c *childQuery) Test(n NodeNavigator) bool { + return c.Predicate(n) +} + +func (c *childQuery) Clone() query { + return &childQuery{name: c.name, Input: c.Input.Clone(), Predicate: c.Predicate} +} + +func (c *childQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (c *childQuery) Properties() queryProp { + return queryProps.Merge +} + +// position returns a position of current NodeNavigator. +func (c *childQuery) position() int { + return c.posit +} + +type cachedChildQuery struct { + name string + posit int + iterator func() NodeNavigator + + Input query + Predicate func(NodeNavigator) bool +} + +func (c *cachedChildQuery) Select(t iterator) NodeNavigator { + for { + if c.iterator == nil { + c.posit = 0 + node := c.Input.Select(t) + if node == nil { + return nil + } + node = node.Copy() + first := true + c.iterator = func() NodeNavigator { + for { + if (first && !node.MoveToChild()) || (!first && !node.MoveToNext()) { + return nil + } + first = false + if c.Predicate(node) { + return node + } + } + } + } + + if node := c.iterator(); node != nil { + c.posit++ + return node + } + c.iterator = nil + } +} + +func (c *cachedChildQuery) Evaluate(t iterator) interface{} { + c.Input.Evaluate(t) + c.iterator = nil + return c +} + +func (c *cachedChildQuery) position() int { + return c.posit +} + +func (c *cachedChildQuery) Test(n NodeNavigator) bool { + return c.Predicate(n) +} + +func (c *cachedChildQuery) Clone() query { + return &childQuery{name: c.name, Input: c.Input.Clone(), Predicate: c.Predicate} +} + +func (c *cachedChildQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (c *cachedChildQuery) Properties() queryProp { + return queryProps.Merge +} + +// descendantQuery is an XPath descendant node query.(descendant::* | descendant-or-self::*) +type descendantQuery struct { + name string + iterator func() NodeNavigator + posit int + level int + + Self bool + Input query + Predicate func(NodeNavigator) bool +} + +func (d *descendantQuery) Select(t iterator) NodeNavigator { + for { + if d.iterator == nil { + d.posit = 0 + node := d.Input.Select(t) + if node == nil { + return nil + } + node = node.Copy() + d.level = 0 + first := true + d.iterator = func() NodeNavigator { + if first { + first = false + if d.Self && d.Predicate(node) { + return node + } + } + + for { + if node.MoveToChild() { + d.level = d.level + 1 + } else { + for { + if d.level == 0 { + return nil + } + if node.MoveToNext() { + break + } + node.MoveToParent() + d.level = d.level - 1 + } + } + if d.Predicate(node) { + return node + } + } + } + } + + if node := d.iterator(); node != nil { + d.posit++ + return node + } + d.iterator = nil + } +} + +func (d *descendantQuery) Evaluate(t iterator) interface{} { + d.Input.Evaluate(t) + d.iterator = nil + return d +} + +func (d *descendantQuery) Test(n NodeNavigator) bool { + return d.Predicate(n) +} + +// position returns a position of current NodeNavigator. +func (d *descendantQuery) position() int { + return d.posit +} + +func (d *descendantQuery) depth() int { + return d.level +} + +func (d *descendantQuery) Clone() query { + return &descendantQuery{name: d.name, Self: d.Self, Input: d.Input.Clone(), Predicate: d.Predicate} +} + +func (d *descendantQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (d *descendantQuery) Properties() queryProp { + return queryProps.Merge +} + +// followingQuery is an XPath following node query.(following::*|following-sibling::*) +type followingQuery struct { + posit int + iterator func() NodeNavigator + + Input query + Sibling bool // The matching sibling node of current node. + Predicate func(NodeNavigator) bool +} + +func (f *followingQuery) Select(t iterator) NodeNavigator { + for { + if f.iterator == nil { + f.posit = 0 + node := f.Input.Select(t) + if node == nil { + return nil + } + node = node.Copy() + if f.Sibling { + f.iterator = func() NodeNavigator { + for { + if !node.MoveToNext() { + return nil + } + if f.Predicate(node) { + f.posit++ + return node + } + } + } + } else { + var q *descendantQuery // descendant query + f.iterator = func() NodeNavigator { + for { + if q == nil { + for !node.MoveToNext() { + if !node.MoveToParent() { + return nil + } + } + q = &descendantQuery{ + Self: true, + Input: &contextQuery{}, + Predicate: f.Predicate, + } + t.Current().MoveTo(node) + } + if node := q.Select(t); node != nil { + f.posit = q.posit + return node + } + q = nil + } + } + } + } + + if node := f.iterator(); node != nil { + return node + } + f.iterator = nil + } +} + +func (f *followingQuery) Evaluate(t iterator) interface{} { + f.Input.Evaluate(t) + return f +} + +func (f *followingQuery) Test(n NodeNavigator) bool { + return f.Predicate(n) +} + +func (f *followingQuery) Clone() query { + return &followingQuery{Input: f.Input.Clone(), Sibling: f.Sibling, Predicate: f.Predicate} +} + +func (f *followingQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (f *followingQuery) Properties() queryProp { + return queryProps.Merge +} + +func (f *followingQuery) position() int { + return f.posit +} + +// precedingQuery is an XPath preceding node query.(preceding::*) +type precedingQuery struct { + iterator func() NodeNavigator + posit int + Input query + Sibling bool // The matching sibling node of current node. + Predicate func(NodeNavigator) bool +} + +func (p *precedingQuery) Select(t iterator) NodeNavigator { + for { + if p.iterator == nil { + p.posit = 0 + node := p.Input.Select(t) + if node == nil { + return nil + } + node = node.Copy() + if p.Sibling { + p.iterator = func() NodeNavigator { + for { + for !node.MoveToPrevious() { + return nil + } + if p.Predicate(node) { + p.posit++ + return node + } + } + } + } else { + var q query + p.iterator = func() NodeNavigator { + for { + if q == nil { + for !node.MoveToPrevious() { + if !node.MoveToParent() { + return nil + } + p.posit = 0 + } + q = &descendantQuery{ + Self: true, + Input: &contextQuery{}, + Predicate: p.Predicate, + } + t.Current().MoveTo(node) + } + if node := q.Select(t); node != nil { + p.posit++ + return node + } + q = nil + } + } + } + } + if node := p.iterator(); node != nil { + return node + } + p.iterator = nil + } +} + +func (p *precedingQuery) Evaluate(t iterator) interface{} { + p.Input.Evaluate(t) + return p +} + +func (p *precedingQuery) Test(n NodeNavigator) bool { + return p.Predicate(n) +} + +func (p *precedingQuery) Clone() query { + return &precedingQuery{Input: p.Input.Clone(), Sibling: p.Sibling, Predicate: p.Predicate} +} + +func (p *precedingQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (p *precedingQuery) Properties() queryProp { + return queryProps.Merge | queryProps.Reverse +} + +func (p *precedingQuery) position() int { + return p.posit +} + +// parentQuery is an XPath parent node query.(parent::*) +type parentQuery struct { + Input query + Predicate func(NodeNavigator) bool +} + +func (p *parentQuery) Select(t iterator) NodeNavigator { + for { + node := p.Input.Select(t) + if node == nil { + return nil + } + node = node.Copy() + if node.MoveToParent() && p.Predicate(node) { + return node + } + } +} + +func (p *parentQuery) Evaluate(t iterator) interface{} { + p.Input.Evaluate(t) + return p +} + +func (p *parentQuery) Clone() query { + return &parentQuery{Input: p.Input.Clone(), Predicate: p.Predicate} +} + +func (p *parentQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (p *parentQuery) Properties() queryProp { + return queryProps.Position | queryProps.Count | queryProps.Cached | queryProps.Merge +} + +func (p *parentQuery) Test(n NodeNavigator) bool { + return p.Predicate(n) +} + +// selfQuery is an Self node query.(self::*) +type selfQuery struct { + Input query + Predicate func(NodeNavigator) bool +} + +func (s *selfQuery) Select(t iterator) NodeNavigator { + for { + node := s.Input.Select(t) + if node == nil { + return nil + } + + if s.Predicate(node) { + return node + } + } +} + +func (s *selfQuery) Evaluate(t iterator) interface{} { + s.Input.Evaluate(t) + return s +} + +func (s *selfQuery) Test(n NodeNavigator) bool { + return s.Predicate(n) +} + +func (s *selfQuery) Clone() query { + return &selfQuery{Input: s.Input.Clone(), Predicate: s.Predicate} +} + +func (s *selfQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (s *selfQuery) Properties() queryProp { + return queryProps.Merge +} + +// filterQuery is an XPath query for predicate filter. +type filterQuery struct { + Input query + Predicate query + NoPosition bool + + posit int + positmap map[int]int +} + +func (f *filterQuery) do(t iterator) bool { + val := reflect.ValueOf(f.Predicate.Evaluate(t)) + switch val.Kind() { + case reflect.Bool: + return val.Bool() + case reflect.String: + return len(val.String()) > 0 + case reflect.Float64: + pt := getNodePosition(f.Input) + return int(val.Float()) == pt + default: + if f.Predicate != nil { + return f.Predicate.Select(t) != nil + } + } + return false +} + +func (f *filterQuery) position() int { + return f.posit +} + +func (f *filterQuery) Select(t iterator) NodeNavigator { + if f.positmap == nil { + f.positmap = make(map[int]int) + } + for { + + node := f.Input.Select(t) + if node == nil { + return nil + } + node = node.Copy() + + t.Current().MoveTo(node) + if f.do(t) { + // fix https://github.com/antchfx/htmlquery/issues/26 + // Calculate and keep the each of matching node's position in the same depth. + level := getNodeDepth(f.Input) + f.positmap[level]++ + f.posit = f.positmap[level] + return node + } + } +} + +func (f *filterQuery) Evaluate(t iterator) interface{} { + f.Input.Evaluate(t) + return f +} + +func (f *filterQuery) Clone() query { + return &filterQuery{Input: f.Input.Clone(), Predicate: f.Predicate.Clone()} +} + +func (f *filterQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (f *filterQuery) Properties() queryProp { + return (queryProps.Position | f.Input.Properties()) & (queryProps.Reverse | queryProps.Merge) +} + +// functionQuery is an XPath function that returns a computed value for +// the Evaluate call of the current NodeNavigator node. Select call isn't +// applicable for functionQuery. +type functionQuery struct { + Input query // Node Set + Func func(query, iterator) interface{} // The xpath function. +} + +func (f *functionQuery) Select(t iterator) NodeNavigator { + return nil +} + +// Evaluate call a specified function that will returns the +// following value type: number,string,boolean. +func (f *functionQuery) Evaluate(t iterator) interface{} { + return f.Func(f.Input, t) +} + +func (f *functionQuery) Clone() query { + if f.Input == nil { + return &functionQuery{Func: f.Func} + } + return &functionQuery{Input: f.Input.Clone(), Func: f.Func} +} + +func (f *functionQuery) ValueType() resultType { + return xpathResultType.Any +} + +func (f *functionQuery) Properties() queryProp { + return queryProps.Merge +} + +// transformFunctionQuery diffs from functionQuery where the latter computes a scalar +// value (number,string,boolean) for the current NodeNavigator node while the former +// (transformFunctionQuery) performs a mapping or transform of the current NodeNavigator +// and returns a new NodeNavigator. It is used for non-scalar XPath functions such as +// reverse(), remove(), subsequence(), unordered(), etc. +type transformFunctionQuery struct { + Input query + Func func(query, iterator) func() NodeNavigator + iterator func() NodeNavigator +} + +func (f *transformFunctionQuery) Select(t iterator) NodeNavigator { + if f.iterator == nil { + f.iterator = f.Func(f.Input, t) + } + return f.iterator() +} + +func (f *transformFunctionQuery) Evaluate(t iterator) interface{} { + f.Input.Evaluate(t) + f.iterator = nil + return f +} + +func (f *transformFunctionQuery) Clone() query { + return &transformFunctionQuery{Input: f.Input.Clone(), Func: f.Func} +} + +func (f *transformFunctionQuery) ValueType() resultType { + return xpathResultType.Any +} + +func (f *transformFunctionQuery) Properties() queryProp { + return queryProps.Merge +} + +// constantQuery is an XPath constant operand. +type constantQuery struct { + Val interface{} +} + +func (c *constantQuery) Select(t iterator) NodeNavigator { + return nil +} + +func (c *constantQuery) Evaluate(t iterator) interface{} { + return c.Val +} + +func (c *constantQuery) Clone() query { + return c +} + +func (c *constantQuery) ValueType() resultType { + return getXPathType(c.Val) +} + +func (c *constantQuery) Properties() queryProp { + return queryProps.Position | queryProps.Count | queryProps.Cached | queryProps.Merge +} + +type groupQuery struct { + posit int + + Input query +} + +func (g *groupQuery) Select(t iterator) NodeNavigator { + node := g.Input.Select(t) + if node == nil { + return nil + } + g.posit++ + return node +} + +func (g *groupQuery) Evaluate(t iterator) interface{} { + return g.Input.Evaluate(t) +} + +func (g *groupQuery) Clone() query { + return &groupQuery{Input: g.Input.Clone()} +} + +func (g *groupQuery) ValueType() resultType { + return g.Input.ValueType() +} + +func (g *groupQuery) Properties() queryProp { + return queryProps.Position +} + +func (g *groupQuery) position() int { + return g.posit +} + +// logicalQuery is an XPath logical expression. +type logicalQuery struct { + Left, Right query + + Do func(iterator, interface{}, interface{}) interface{} +} + +func (l *logicalQuery) Select(t iterator) NodeNavigator { + // When a XPath expr is logical expression. + node := t.Current().Copy() + val := l.Evaluate(t) + switch val.(type) { + case bool: + if val.(bool) == true { + return node + } + } + return nil +} + +func (l *logicalQuery) Evaluate(t iterator) interface{} { + m := l.Left.Evaluate(t) + n := l.Right.Evaluate(t) + return l.Do(t, m, n) +} + +func (l *logicalQuery) Clone() query { + return &logicalQuery{Left: l.Left.Clone(), Right: l.Right.Clone(), Do: l.Do} +} + +func (l *logicalQuery) ValueType() resultType { + return xpathResultType.Boolean +} + +func (l *logicalQuery) Properties() queryProp { + return queryProps.Merge +} + +// numericQuery is an XPath numeric operator expression. +type numericQuery struct { + Left, Right query + + Do func(iterator, interface{}, interface{}) interface{} +} + +func (n *numericQuery) Select(t iterator) NodeNavigator { + return nil +} + +func (n *numericQuery) Evaluate(t iterator) interface{} { + m := n.Left.Evaluate(t) + k := n.Right.Evaluate(t) + return n.Do(t, m, k) +} + +func (n *numericQuery) Clone() query { + return &numericQuery{Left: n.Left.Clone(), Right: n.Right.Clone(), Do: n.Do} +} + +func (n *numericQuery) ValueType() resultType { + return xpathResultType.Number +} + +func (n *numericQuery) Properties() queryProp { + return queryProps.Merge +} + +type booleanQuery struct { + IsOr bool + Left, Right query + iterator func() NodeNavigator +} + +func (b *booleanQuery) Select(t iterator) NodeNavigator { + if b.iterator == nil { + var list []NodeNavigator + i := 0 + root := t.Current().Copy() + if b.IsOr { + for { + node := b.Left.Select(t) + if node == nil { + break + } + node = node.Copy() + list = append(list, node) + } + t.Current().MoveTo(root) + for { + node := b.Right.Select(t) + if node == nil { + break + } + node = node.Copy() + list = append(list, node) + } + } else { + var m []NodeNavigator + var n []NodeNavigator + for { + node := b.Left.Select(t) + if node == nil { + break + } + node = node.Copy() + list = append(m, node) + } + t.Current().MoveTo(root) + for { + node := b.Right.Select(t) + if node == nil { + break + } + node = node.Copy() + list = append(n, node) + } + for _, k := range m { + for _, j := range n { + if k == j { + list = append(list, k) + } + } + } + } + + b.iterator = func() NodeNavigator { + if i >= len(list) { + return nil + } + node := list[i] + i++ + return node + } + } + return b.iterator() +} + +func (b *booleanQuery) Evaluate(t iterator) interface{} { + n := t.Current().Copy() + + m := b.Left.Evaluate(t) + left := asBool(t, m) + if b.IsOr && left { + return true + } else if !b.IsOr && !left { + return false + } + + t.Current().MoveTo(n) + m = b.Right.Evaluate(t) + return asBool(t, m) +} + +func (b *booleanQuery) Clone() query { + return &booleanQuery{IsOr: b.IsOr, Left: b.Left.Clone(), Right: b.Right.Clone()} +} + +func (b *booleanQuery) ValueType() resultType { + return xpathResultType.Boolean +} + +func (b *booleanQuery) Properties() queryProp { + return queryProps.Merge +} + +type unionQuery struct { + Left, Right query + iterator func() NodeNavigator +} + +func (u *unionQuery) Select(t iterator) NodeNavigator { + if u.iterator == nil { + var list []NodeNavigator + var m = make(map[uint64]bool) + root := t.Current().Copy() + for { + node := u.Left.Select(t) + if node == nil { + break + } + code := getHashCode(node.Copy()) + if _, ok := m[code]; !ok { + m[code] = true + list = append(list, node.Copy()) + } + } + t.Current().MoveTo(root) + for { + node := u.Right.Select(t) + if node == nil { + break + } + code := getHashCode(node.Copy()) + if _, ok := m[code]; !ok { + m[code] = true + list = append(list, node.Copy()) + } + } + var i int + u.iterator = func() NodeNavigator { + if i >= len(list) { + return nil + } + node := list[i] + i++ + return node + } + } + return u.iterator() +} + +func (u *unionQuery) Evaluate(t iterator) interface{} { + u.iterator = nil + u.Left.Evaluate(t) + u.Right.Evaluate(t) + return u +} + +func (u *unionQuery) Clone() query { + return &unionQuery{Left: u.Left.Clone(), Right: u.Right.Clone()} +} + +func (u *unionQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (u *unionQuery) Properties() queryProp { + return queryProps.Merge +} + +type lastFuncQuery struct { + buffer []NodeNavigator + counted bool + + Input query +} + +func (q *lastFuncQuery) Select(t iterator) NodeNavigator { + return nil +} + +func (q *lastFuncQuery) Evaluate(t iterator) interface{} { + if !q.counted { + for { + node := q.Input.Select(t) + if node == nil { + break + } + q.buffer = append(q.buffer, node.Copy()) + } + q.counted = true + } + return float64(len(q.buffer)) +} + +func (q *lastFuncQuery) Clone() query { + return &lastFuncQuery{Input: q.Input.Clone()} +} + +func (q *lastFuncQuery) ValueType() resultType { + return xpathResultType.Number +} + +func (q *lastFuncQuery) Properties() queryProp { + return queryProps.Merge +} + +type descendantOverDescendantQuery struct { + name string + level int + posit int + currentNode NodeNavigator + + Input query + MatchSelf bool + Predicate func(NodeNavigator) bool +} + +func (d *descendantOverDescendantQuery) moveToFirstChild() bool { + if d.currentNode.MoveToChild() { + d.level++ + return true + } + return false +} + +func (d *descendantOverDescendantQuery) moveUpUntilNext() bool { + for !d.currentNode.MoveToNext() { + d.level-- + if d.level == 0 { + return false + } + d.currentNode.MoveToParent() + } + return true +} + +func (d *descendantOverDescendantQuery) Select(t iterator) NodeNavigator { + for { + if d.level == 0 { + node := d.Input.Select(t) + if node == nil { + return nil + } + d.currentNode = node.Copy() + d.posit = 0 + if d.MatchSelf && d.Predicate(d.currentNode) { + d.posit = 1 + return d.currentNode + } + d.moveToFirstChild() + } else if !d.moveUpUntilNext() { + continue + } + for ok := true; ok; ok = d.moveToFirstChild() { + if d.Predicate(d.currentNode) { + d.posit++ + return d.currentNode + } + } + } +} + +func (d *descendantOverDescendantQuery) Evaluate(t iterator) interface{} { + d.Input.Evaluate(t) + return d +} + +func (d *descendantOverDescendantQuery) Clone() query { + return &descendantOverDescendantQuery{Input: d.Input.Clone(), Predicate: d.Predicate, MatchSelf: d.MatchSelf} +} + +func (d *descendantOverDescendantQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (d *descendantOverDescendantQuery) Properties() queryProp { + return queryProps.Merge +} + +func (d *descendantOverDescendantQuery) position() int { + return d.posit +} + +type mergeQuery struct { + Input query + Child query + + iterator func() NodeNavigator +} + +func (m *mergeQuery) Select(t iterator) NodeNavigator { + for { + if m.iterator == nil { + root := m.Input.Select(t) + if root == nil { + return nil + } + m.Child.Evaluate(t) + root = root.Copy() + t.Current().MoveTo(root) + var list []NodeNavigator + for node := m.Child.Select(t); node != nil; node = m.Child.Select(t) { + list = append(list, node.Copy()) + } + i := 0 + m.iterator = func() NodeNavigator { + if i >= len(list) { + return nil + } + result := list[i] + i++ + return result + } + } + + if node := m.iterator(); node != nil { + return node + } + m.iterator = nil + } +} + +func (m *mergeQuery) Evaluate(t iterator) interface{} { + m.Input.Evaluate(t) + return m +} + +func (m *mergeQuery) Clone() query { + return &mergeQuery{Input: m.Input.Clone(), Child: m.Child.Clone()} +} + +func (m *mergeQuery) ValueType() resultType { + return xpathResultType.NodeSet +} + +func (m *mergeQuery) Properties() queryProp { + return queryProps.Position | queryProps.Count | queryProps.Cached | queryProps.Merge +} + +func getHashCode(n NodeNavigator) uint64 { + var sb bytes.Buffer + switch n.NodeType() { + case AttributeNode, TextNode, CommentNode: + sb.WriteString(fmt.Sprintf("%s=%s", n.LocalName(), n.Value())) + // https://github.com/antchfx/htmlquery/issues/25 + d := 1 + for n.MoveToPrevious() { + d++ + } + sb.WriteString(fmt.Sprintf("-%d", d)) + for n.MoveToParent() { + d = 1 + for n.MoveToPrevious() { + d++ + } + sb.WriteString(fmt.Sprintf("-%d", d)) + } + case ElementNode: + sb.WriteString(n.Prefix() + n.LocalName()) + d := 1 + for n.MoveToPrevious() { + d++ + } + sb.WriteString(fmt.Sprintf("-%d", d)) + + for n.MoveToParent() { + d = 1 + for n.MoveToPrevious() { + d++ + } + sb.WriteString(fmt.Sprintf("-%d", d)) + } + } + h := fnv.New64a() + h.Write(sb.Bytes()) + return h.Sum64() +} + +func getNodePosition(q query) int { + type Position interface { + position() int + } + if count, ok := q.(Position); ok { + return count.position() + } + return 1 +} + +func getNodeDepth(q query) int { + type Depth interface { + depth() int + } + if count, ok := q.(Depth); ok { + return count.depth() + } + return 0 +} + +func getXPathType(i interface{}) resultType { + v := reflect.ValueOf(i) + switch v.Kind() { + case reflect.Float64: + return xpathResultType.Number + case reflect.String: + return xpathResultType.String + case reflect.Bool: + return xpathResultType.Boolean + default: + if _, ok := i.(query); ok { + return xpathResultType.NodeSet + } + } + panic(fmt.Errorf("xpath unknown value type: %v", v.Kind())) +} diff --git a/vendor/github.com/antchfx/xpath/xpath.go b/vendor/github.com/antchfx/xpath/xpath.go new file mode 100644 index 0000000000..04bbe8d4c2 --- /dev/null +++ b/vendor/github.com/antchfx/xpath/xpath.go @@ -0,0 +1,176 @@ +package xpath + +import ( + "errors" + "fmt" +) + +// NodeType represents a type of XPath node. +type NodeType int + +const ( + // RootNode is a root node of the XML document or node tree. + RootNode NodeType = iota + + // ElementNode is an element, such as . + ElementNode + + // AttributeNode is an attribute, such as id='123'. + AttributeNode + + // TextNode is the text content of a node. + TextNode + + // CommentNode is a comment node, such as + CommentNode + + // allNode is any types of node, used by xpath package only to predicate match. + allNode +) + +// NodeNavigator provides cursor model for navigating XML data. +type NodeNavigator interface { + // NodeType returns the XPathNodeType of the current node. + NodeType() NodeType + + // LocalName gets the Name of the current node. + LocalName() string + + // Prefix returns namespace prefix associated with the current node. + Prefix() string + + // Value gets the value of current node. + Value() string + + // Copy does a deep copy of the NodeNavigator and all its components. + Copy() NodeNavigator + + // MoveToRoot moves the NodeNavigator to the root node of the current node. + MoveToRoot() + + // MoveToParent moves the NodeNavigator to the parent node of the current node. + MoveToParent() bool + + // MoveToNextAttribute moves the NodeNavigator to the next attribute on current node. + MoveToNextAttribute() bool + + // MoveToChild moves the NodeNavigator to the first child node of the current node. + MoveToChild() bool + + // MoveToFirst moves the NodeNavigator to the first sibling node of the current node. + MoveToFirst() bool + + // MoveToNext moves the NodeNavigator to the next sibling node of the current node. + MoveToNext() bool + + // MoveToPrevious moves the NodeNavigator to the previous sibling node of the current node. + MoveToPrevious() bool + + // MoveTo moves the NodeNavigator to the same position as the specified NodeNavigator. + MoveTo(NodeNavigator) bool +} + +// NodeIterator holds all matched Node object. +type NodeIterator struct { + node NodeNavigator + query query +} + +// Current returns current node which matched. +func (t *NodeIterator) Current() NodeNavigator { + return t.node +} + +// MoveNext moves Navigator to the next match node. +func (t *NodeIterator) MoveNext() bool { + n := t.query.Select(t) + if n == nil { + return false + } + if !t.node.MoveTo(n) { + t.node = n.Copy() + } + return true +} + +// Select selects a node set using the specified XPath expression. +// This method is deprecated, recommend using Expr.Select() method instead. +func Select(root NodeNavigator, expr string) *NodeIterator { + exp, err := Compile(expr) + if err != nil { + panic(err) + } + return exp.Select(root) +} + +// Expr is an XPath expression for query. +type Expr struct { + s string + q query +} + +type iteratorFunc func() NodeNavigator + +func (f iteratorFunc) Current() NodeNavigator { + return f() +} + +// Evaluate returns the result of the expression. +// The result type of the expression is one of the follow: bool,float64,string,NodeIterator). +func (expr *Expr) Evaluate(root NodeNavigator) interface{} { + val := expr.q.Evaluate(iteratorFunc(func() NodeNavigator { return root })) + switch val.(type) { + case query: + return &NodeIterator{query: expr.q.Clone(), node: root} + } + return val +} + +// Select selects a node set using the specified XPath expression. +func (expr *Expr) Select(root NodeNavigator) *NodeIterator { + return &NodeIterator{query: expr.q.Clone(), node: root} +} + +// String returns XPath expression string. +func (expr *Expr) String() string { + return expr.s +} + +// Compile compiles an XPath expression string. +func Compile(expr string) (*Expr, error) { + if expr == "" { + return nil, errors.New("expr expression is nil") + } + qy, err := build(expr, nil) + if err != nil { + return nil, err + } + if qy == nil { + return nil, fmt.Errorf(fmt.Sprintf("undeclared variable in XPath expression: %s", expr)) + } + return &Expr{s: expr, q: qy}, nil +} + +// MustCompile compiles an XPath expression string and ignored error. +func MustCompile(expr string) *Expr { + exp, err := Compile(expr) + if err != nil { + return &Expr{s: expr, q: nopQuery{}} + } + return exp +} + +// CompileWithNS compiles an XPath expression string, using given namespaces map. +func CompileWithNS(expr string, namespaces map[string]string) (*Expr, error) { + if expr == "" { + return nil, errors.New("expr expression is nil") + } + qy, err := build(expr, namespaces) + if err != nil { + return nil, err + } + if qy == nil { + return nil, fmt.Errorf(fmt.Sprintf("undeclared variable in XPath expression: %s", expr)) + } + return &Expr{s: expr, q: qy}, nil +} diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/configuration.go b/vendor/github.com/apache/thrift/lib/go/thrift/configuration.go index de27edd674..a9565d399d 100644 --- a/vendor/github.com/apache/thrift/lib/go/thrift/configuration.go +++ b/vendor/github.com/apache/thrift/lib/go/thrift/configuration.go @@ -56,47 +56,47 @@ const ( // // For example, say you want to migrate this old code into using TConfiguration: // -// sccket, err := thrift.NewTSocketTimeout("host:port", time.Second, time.Second) -// transFactory := thrift.NewTFramedTransportFactoryMaxLength( -// thrift.NewTTransportFactory(), -// 1024 * 1024 * 256, -// ) -// protoFactory := thrift.NewTBinaryProtocolFactory(true, true) +// socket, err := thrift.NewTSocketTimeout("host:port", time.Second, time.Second) +// transFactory := thrift.NewTFramedTransportFactoryMaxLength( +// thrift.NewTTransportFactory(), +// 1024 * 1024 * 256, +// ) +// protoFactory := thrift.NewTBinaryProtocolFactory(true, true) // // This is the wrong way to do it because in the end the TConfiguration used by // socket and transFactory will be overwritten by the one used by protoFactory // because of TConfiguration propagation: // -// // bad example, DO NOT USE -// sccket := thrift.NewTSocketConf("host:port", &thrift.TConfiguration{ -// ConnectTimeout: time.Second, -// SocketTimeout: time.Second, -// }) -// transFactory := thrift.NewTFramedTransportFactoryConf( -// thrift.NewTTransportFactory(), -// &thrift.TConfiguration{ -// MaxFrameSize: 1024 * 1024 * 256, -// }, -// ) -// protoFactory := thrift.NewTBinaryProtocolFactoryConf(&thrift.TConfiguration{ -// TBinaryStrictRead: thrift.BoolPtr(true), -// TBinaryStrictWrite: thrift.BoolPtr(true), -// }) +// // bad example, DO NOT USE +// socket := thrift.NewTSocketConf("host:port", &thrift.TConfiguration{ +// ConnectTimeout: time.Second, +// SocketTimeout: time.Second, +// }) +// transFactory := thrift.NewTFramedTransportFactoryConf( +// thrift.NewTTransportFactory(), +// &thrift.TConfiguration{ +// MaxFrameSize: 1024 * 1024 * 256, +// }, +// ) +// protoFactory := thrift.NewTBinaryProtocolFactoryConf(&thrift.TConfiguration{ +// TBinaryStrictRead: thrift.BoolPtr(true), +// TBinaryStrictWrite: thrift.BoolPtr(true), +// }) // // This is the correct way to do it: // -// conf := &thrift.TConfiguration{ -// ConnectTimeout: time.Second, -// SocketTimeout: time.Second, +// conf := &thrift.TConfiguration{ +// ConnectTimeout: time.Second, +// SocketTimeout: time.Second, // -// MaxFrameSize: 1024 * 1024 * 256, +// MaxFrameSize: 1024 * 1024 * 256, // -// TBinaryStrictRead: thrift.BoolPtr(true), -// TBinaryStrictWrite: thrift.BoolPtr(true), -// } -// sccket := thrift.NewTSocketConf("host:port", conf) -// transFactory := thrift.NewTFramedTransportFactoryConf(thrift.NewTTransportFactory(), conf) -// protoFactory := thrift.NewTBinaryProtocolFactoryConf(conf) +// TBinaryStrictRead: thrift.BoolPtr(true), +// TBinaryStrictWrite: thrift.BoolPtr(true), +// } +// socket := thrift.NewTSocketConf("host:port", conf) +// transFactory := thrift.NewTFramedTransportFactoryConf(thrift.NewTTransportFactory(), conf) +// protoFactory := thrift.NewTBinaryProtocolFactoryConf(conf) // // [1]: https://github.com/apache/thrift/blob/master/doc/specs/thrift-tconfiguration.md type TConfiguration struct { @@ -132,6 +132,8 @@ type TConfiguration struct { // THeaderProtocolIDPtr and THeaderProtocolIDPtrMust helper functions // are provided to help filling this value. THeaderProtocolID *THeaderProtocolID + // The write transforms to be applied to THeaderTransport. + THeaderTransforms []THeaderTransformID // Used internally by deprecated constructors, to avoid overriding // underlying TTransport/TProtocol's cfg by accidental propagations. @@ -245,6 +247,18 @@ func (tc *TConfiguration) GetTHeaderProtocolID() THeaderProtocolID { return protoID } +// GetTHeaderTransforms returns the THeaderTransformIDs to be applied on +// THeaderTransport writing. +// +// It's nil-safe. If tc is nil, empty slice will be returned (meaning no +// transforms to be applied). +func (tc *TConfiguration) GetTHeaderTransforms() []THeaderTransformID { + if tc == nil { + return nil + } + return tc.THeaderTransforms +} + // THeaderProtocolIDPtr validates and returns the pointer to id. // // If id is not a valid THeaderProtocolID, a pointer to THeaderProtocolDefault diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/exception.go b/vendor/github.com/apache/thrift/lib/go/thrift/exception.go index e2f1728eac..5b4cad96fa 100644 --- a/vendor/github.com/apache/thrift/lib/go/thrift/exception.go +++ b/vendor/github.com/apache/thrift/lib/go/thrift/exception.go @@ -121,20 +121,20 @@ var _ TException = wrappedTException{} // // For a endpoint defined in thrift IDL like this: // -// service MyService { -// FooResponse foo(1: FooRequest request) throws ( -// 1: Exception1 error1, -// 2: Exception2 error2, -// ) -// } +// service MyService { +// FooResponse foo(1: FooRequest request) throws ( +// 1: Exception1 error1, +// 2: Exception2 error2, +// ) +// } // // The thrift compiler generated go code for the result TStruct would be like: // -// type MyServiceFooResult struct { -// Success *FooResponse `thrift:"success,0" db:"success" json:"success,omitempty"` -// Error1 *Exception1 `thrift:"error1,1" db:"error1" json:"error1,omitempty"` -// Error2 *Exception2 `thrift:"error2,2" db:"error2" json:"error2,omitempty"` -// } +// type MyServiceFooResult struct { +// Success *FooResponse `thrift:"success,0" db:"success" json:"success,omitempty"` +// Error1 *Exception1 `thrift:"error1,1" db:"error1" json:"error1,omitempty"` +// Error2 *Exception2 `thrift:"error2,2" db:"error2" json:"error2,omitempty"` +// } // // And this function extracts the first non-nil exception out of // *MyServiceFooResult. @@ -144,7 +144,7 @@ func ExtractExceptionFromResult(result TStruct) error { return nil } typ := v.Type() - for i := 0; i < v.NumField(); i++ { + for i := range v.NumField() { if typ.Field(i).Name == "Success" { continue } diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/header_protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/header_protocol.go index 36777b4ca0..bec84b85c4 100644 --- a/vendor/github.com/apache/thrift/lib/go/thrift/header_protocol.go +++ b/vendor/github.com/apache/thrift/lib/go/thrift/header_protocol.go @@ -119,6 +119,11 @@ func (p *THeaderProtocol) ClearWriteHeaders() { } // AddTransform add a transform for writing. +// +// Deprecated: This only applies to the next message written, and the next read +// message will cause write transforms to be reset from what's configured in +// TConfiguration. For sticky transforms, use TConfiguration.THeaderTransforms +// instead. func (p *THeaderProtocol) AddTransform(transform THeaderTransformID) error { return p.transport.AddTransform(transform) } diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/header_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/header_transport.go index 3aea5a9888..d6d64160af 100644 --- a/vendor/github.com/apache/thrift/lib/go/thrift/header_transport.go +++ b/vendor/github.com/apache/thrift/lib/go/thrift/header_transport.go @@ -128,7 +128,7 @@ var _ io.ReadCloser = (*TransformReader)(nil) // // If you don't know the closers capacity beforehand, just use // -// &TransformReader{Reader: baseReader} +// &TransformReader{Reader: baseReader} // // instead would be sufficient. func NewTransformReaderWithCapacity(baseReader io.Reader, capacity int) *TransformReader { @@ -151,6 +151,11 @@ func (tr *TransformReader) Close() error { } // AddTransform adds a transform. +// +// Deprecated: This only applies to the next message written, and the next read +// message will cause write transforms to be reset from what's configured in +// TConfiguration. For sticky transforms, use TConfiguration.THeaderTransforms +// instead. func (tr *TransformReader) AddTransform(id THeaderTransformID) error { switch id { default: @@ -206,6 +211,25 @@ func (tw *TransformWriter) Close() error { return nil } +var zlibDefaultLevelWriterPool = newPool( + func() *zlib.Writer { + return zlib.NewWriter(nil) + }, + nil, +) + +type zlibPoolCloser struct { + writer *zlib.Writer +} + +func (z *zlibPoolCloser) Close() error { + defer func() { + z.writer.Reset(nil) + zlibDefaultLevelWriterPool.put(&z.writer) + }() + return z.writer.Close() +} + // AddTransform adds a transform. func (tw *TransformWriter) AddTransform(id THeaderTransformID) error { switch id { @@ -217,9 +241,12 @@ func (tw *TransformWriter) AddTransform(id THeaderTransformID) error { case TransformNone: // no-op case TransformZlib: - writeCloser := zlib.NewWriter(tw.Writer) + writeCloser := zlibDefaultLevelWriterPool.get() + writeCloser.Reset(tw.Writer) tw.Writer = writeCloser - tw.closers = append(tw.closers, writeCloser) + tw.closers = append(tw.closers, &zlibPoolCloser{ + writer: writeCloser, + }) } return nil } @@ -300,11 +327,12 @@ func NewTHeaderTransportConf(trans TTransport, conf *TConfiguration) *THeaderTra } PropagateTConfiguration(trans, conf) return &THeaderTransport{ - transport: trans, - reader: bufio.NewReader(trans), - writeHeaders: make(THeaderMap), - protocolID: conf.GetTHeaderProtocolID(), - cfg: conf, + transport: trans, + reader: bufio.NewReader(trans), + writeHeaders: make(THeaderMap), + writeTransforms: conf.GetTHeaderTransforms(), + protocolID: conf.GetTHeaderProtocolID(), + cfg: conf, } } @@ -449,6 +477,11 @@ func (t *THeaderTransport) parseHeaders(ctx context.Context, frameSize uint32) e } t.protocolID = THeaderProtocolID(protoID) + // Reset writeTransforms to the ones from cfg, as we are going to add + // compression transforms from what we read, we don't want to accumulate + // different transforms read from different requests + t.writeTransforms = t.cfg.GetTHeaderTransforms() + var transformCount int32 transformCount, err = hp.readVarint32() if err != nil { @@ -461,12 +494,21 @@ func (t *THeaderTransport) parseHeaders(ctx context.Context, frameSize uint32) e ) t.frameReader = reader transformIDs := make([]THeaderTransformID, transformCount) - for i := 0; i < int(transformCount); i++ { + for i := range int(transformCount) { id, err := hp.readVarint32() if err != nil { return err } - transformIDs[i] = THeaderTransformID(id) + tID := THeaderTransformID(id) + transformIDs[i] = tID + + // For compression transforms, we should also add them + // to writeTransforms so that the response (assuming we + // are reading a request) would do the same compression. + switch tID { + case TransformZlib: + t.addWriteTransformsDedupe(tID) + } } // The transform IDs on the wire was added based on the order of // writing, so on the reading side we need to reverse the order. @@ -494,7 +536,7 @@ func (t *THeaderTransport) parseHeaders(ctx context.Context, frameSize uint32) e if err != nil { return err } - for i := 0; i < int(count); i++ { + for range int(count) { key, err := hp.ReadString(ctx) if err != nil { return err @@ -544,7 +586,7 @@ func (t *THeaderTransport) Read(p []byte) (read int, err error) { // the last Read finished the frame, do endOfFrame // handling here. err = t.endOfFrame() - } else if err == io.EOF { + } else if errors.Is(err, io.EOF) { err = t.endOfFrame() if err != nil { return @@ -726,6 +768,9 @@ func (t *THeaderTransport) ClearWriteHeaders() { } // AddTransform add a transform for writing. +// +// NOTE: This is provided as a low-level API, but in general you should use +// TConfiguration.THeaderTransforms to set transforms for writing instead. func (t *THeaderTransport) AddTransform(transform THeaderTransformID) error { if !supportedTransformIDs[transform] { return NewTProtocolExceptionWithType( @@ -758,6 +803,17 @@ func (t *THeaderTransport) isFramed() bool { } } +// addWriteTransformsDedupe adds id to writeTransforms only if it's not already +// there. +func (t *THeaderTransport) addWriteTransformsDedupe(id THeaderTransformID) { + for _, existingID := range t.writeTransforms { + if existingID == id { + return + } + } + t.writeTransforms = append(t.writeTransforms, id) +} + // SetTConfiguration implements TConfigurationSetter. func (t *THeaderTransport) SetTConfiguration(cfg *TConfiguration) { PropagateTConfiguration(t.transport, cfg) diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/protocol.go index 2ee14caaad..68cfe4aaa2 100644 --- a/vendor/github.com/apache/thrift/lib/go/thrift/protocol.go +++ b/vendor/github.com/apache/thrift/lib/go/thrift/protocol.go @@ -146,7 +146,7 @@ func Skip(ctx context.Context, self TProtocol, fieldType TType, maxDepth int) (e if err != nil { return err } - for i := 0; i < size; i++ { + for range size { err := Skip(ctx, self, keyType, maxDepth-1) if err != nil { return err @@ -163,7 +163,7 @@ func Skip(ctx context.Context, self TProtocol, fieldType TType, maxDepth int) (e if err != nil { return err } - for i := 0; i < size; i++ { + for range size { err := Skip(ctx, self, elemType, maxDepth-1) if err != nil { return err @@ -175,7 +175,7 @@ func Skip(ctx context.Context, self TProtocol, fieldType TType, maxDepth int) (e if err != nil { return err } - for i := 0; i < size; i++ { + for range size { err := Skip(ctx, self, elemType, maxDepth-1) if err != nil { return err diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol.go index 8b1284fd1b..ec12991a1d 100644 --- a/vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol.go +++ b/vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol.go @@ -30,6 +30,7 @@ import ( "io" "math" "strconv" + "strings" ) type _ParseContext int @@ -922,15 +923,7 @@ func (p *TSimpleJSONProtocol) ParseStringBody() (string, error) { if err != nil { return "", NewTProtocolException(err) } - l := len(line) - // count number of escapes to see if we need to keep going - i := 1 - for ; i < l; i++ { - if line[l-i-1] != '\\' { - break - } - } - if i&0x01 == 1 { + if endsWithoutEscapedQuote(line) { v, ok := jsonUnquote(string(JSON_QUOTE) + line) if !ok { return "", NewTProtocolException(err) @@ -951,27 +944,29 @@ func (p *TSimpleJSONProtocol) ParseStringBody() (string, error) { } func (p *TSimpleJSONProtocol) ParseQuotedStringBody() (string, error) { - line, err := p.reader.ReadString(JSON_QUOTE) - if err != nil { - return "", NewTProtocolException(err) + var sb strings.Builder + + for { + line, err := p.reader.ReadString(JSON_QUOTE) + if err != nil { + return "", NewTProtocolException(err) + } + sb.WriteString(line) + if endsWithoutEscapedQuote(line) { + return sb.String(), nil + } } - l := len(line) - // count number of escapes to see if we need to keep going +} + +func endsWithoutEscapedQuote(s string) bool { + l := len(s) i := 1 for ; i < l; i++ { - if line[l-i-1] != '\\' { + if s[l-i-1] != '\\' { break } } - if i&0x01 == 1 { - return line, nil - } - s, err := p.ParseQuotedStringBody() - if err != nil { - return "", NewTProtocolException(err) - } - v := line + s - return v, nil + return i&0x01 == 1 } func (p *TSimpleJSONProtocol) ParseBase64EncodedBody() ([]byte, error) { @@ -1200,7 +1195,7 @@ func (p *TSimpleJSONProtocol) readNumeric() (Numeric, error) { for continueFor { c, err := p.reader.ReadByte() if err != nil { - if err == io.EOF { + if errors.Is(err, io.EOF) { break } return NUMERIC_NULL, NewTProtocolException(err) @@ -1311,7 +1306,7 @@ func (p *TSimpleJSONProtocol) readNumeric() (Numeric, error) { // Safely peeks into the buffer, reading only what is necessary func (p *TSimpleJSONProtocol) safePeekContains(b []byte) bool { - for i := 0; i < len(b); i++ { + for i := range b { a, _ := p.reader.Peek(i + 1) if len(a) < (i+1) || a[i] != b[i] { return false diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go index 907afca326..3f05ad93db 100644 --- a/vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go +++ b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go @@ -93,6 +93,9 @@ func (p *TSSLServerSocket) Open() error { } func (p *TSSLServerSocket) Addr() net.Addr { + if p.listener != nil { + return p.listener.Addr() + } return p.addr } 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 4321d2f8aa..ef3cc27962 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.31.0" +const goModuleVersion = "1.32.6" 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 19d6107c46..0000000000 --- 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/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go index ff0bc921f1..ab4e619073 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go @@ -34,6 +34,9 @@ const ( FeatureMetadata2 ) +// Hardcoded value to specify which version of the user agent we're using +const uaMetadata = "ua/2.1" + func (k SDKAgentKeyType) string() string { switch k { case APIMetadata: @@ -85,6 +88,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. @@ -106,6 +110,7 @@ type RequestUserAgent struct { func NewRequestUserAgent() *RequestUserAgent { userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder() addProductName(userAgent) + addUserAgentMetadata(userAgent) addProductName(sdkAgent) r := &RequestUserAgent{ @@ -133,6 +138,10 @@ func addProductName(builder *smithyhttp.UserAgentBuilder) { builder.AddKeyValue(aws.SDKName, aws.SDKVersion) } +func addUserAgentMetadata(builder *smithyhttp.UserAgentBuilder) { + builder.AddKey(uaMetadata) +} + // AddUserAgentKey retrieves a requestUserAgent from the provided stack, or initializes one. func AddUserAgentKey(key string) func(*middleware.Stack) error { return func(stack *middleware.Stack) error { @@ -257,10 +266,10 @@ func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildI func (u *RequestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) { const userAgent = "User-Agent" - updateHTTPHeader(request, userAgent, u.userAgent.Build()) if len(u.features) > 0 { updateHTTPHeader(request, userAgent, buildFeatureMetrics(u.features)) } + updateHTTPHeader(request, userAgent, u.userAgent.Build()) } func (u *RequestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md index 3f902af873..a4872987ae 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.6.7 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. + +# v1.6.6 (2024-10-04) + +* No change notes available for this release. + # v1.6.5 (2024-09-20) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go index d1fc3e01c4..78af41cbed 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go @@ -3,4 +3,4 @@ package eventstream // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.6.5" +const goModuleVersion = "1.6.7" 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 286892adc8..52d59b04bf 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,7 +8,6 @@ import ( "strings" "time" - privatemetrics "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" @@ -271,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 := privatemetrics.Context(ctx) - if mctx != nil { - attempt, err := mctx.Data().LatestAttempt() - if err != nil { - attempt.RetryDelay = retryDelay - } - } if reqErr != nil { return out, attemptResult, releaseRetryToken, reqErr } 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 a10ee510af..8a46220a37 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 @@ -372,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/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 64e4bbb591..9b8d8fcd77 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,56 @@ +# v1.28.6 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.5 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.4 (2024-11-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.3 (2024-11-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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 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 b3e268a2a3..8f24539c91 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.37" +const goModuleVersion = "1.28.6" 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 5f643977b0..dc6c7d29a8 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/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 503f8c7af7..8c564551c4 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,52 @@ +# v1.17.47 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.46 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.45 (2024-11-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.44 (2024-11-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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 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 bf8566ed75..1c2a23ec71 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.35" +const goModuleVersion = "1.17.47" 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 045ceee610..3ccbbb7562 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,32 @@ +# v1.16.21 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.20 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.19 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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 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 3134fabd36..82104b8ffc 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.14" +const goModuleVersion = "1.16.21" 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 4370f9481f..bc8865c52f 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,32 @@ +# v1.3.25 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.24 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.23 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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 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 236805edc9..43c49a952d 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.18" +const goModuleVersion = "1.3.25" 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 351e4f2d87..b2620757c5 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,32 @@ +# v2.6.25 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.24 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.23 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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 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 7b257d351b..25b2ae62ae 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.18" +const goModuleVersion = "2.6.25" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md index ac92e88744..6b092a26a0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md @@ -1,3 +1,32 @@ +# v1.3.25 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.24 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.23 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go index efd25fc382..9a246dd652 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go @@ -3,4 +3,4 @@ package v4a // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.18" +const goModuleVersion = "1.3.25" 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 d4bc00fdee..8ab28d3a98 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,11 @@ +# 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. 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 823c5f1574..1514acbe34 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.5" +const goModuleVersion = "1.12.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md index 027bd785b2..65b7f66add 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md @@ -1,3 +1,33 @@ +# v1.4.6 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.5 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.20 (2024-09-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go index d14de9a82e..4eecd777cf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go @@ -3,4 +3,4 @@ package checksum // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.20" +const goModuleVersion = "1.4.6" 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 8e859f5b1f..ac9a7fb265 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,33 @@ +# v1.12.6 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.5 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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 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 fa0269d34f..1a2ae56cb9 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.20" +const goModuleVersion = "1.12.6" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md index e6d4667d62..16f204bd72 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md @@ -1,3 +1,33 @@ +# v1.18.6 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.5 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.18 (2024-09-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go index ecbe3a5cef..73a74aae1f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go @@ -3,4 +3,4 @@ package s3shared // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.18" +const goModuleVersion = "1.18.6" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md index ce4f4c5615..992c35e4ec 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md @@ -1,3 +1,92 @@ +# v1.71.0 (2024-12-03.2) + +* **Feature**: Amazon S3 Metadata stores object metadata in read-only, fully managed Apache Iceberg metadata tables that you can query. You can create metadata table configurations for S3 general purpose buckets. + +# v1.70.0 (2024-12-02) + +* **Feature**: Amazon S3 introduces support for AWS Dedicated Local Zones +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.0 (2024-11-25) + +* **Feature**: Amazon Simple Storage Service / Features: Add support for ETag based conditional writes in PutObject and CompleteMultiPartUpload APIs to prevent unintended object modifications. + +# v1.68.0 (2024-11-21) + +* **Feature**: Add support for conditional deletes for the S3 DeleteObject and DeleteObjects APIs. Add support for write offset bytes option used to append to objects with the S3 PutObject API. + +# v1.67.1 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.0 (2024-11-14) + +* **Feature**: This release updates the ListBuckets API Reference documentation in support of the new 10,000 general purpose bucket default quota on all AWS accounts. To increase your bucket quota from 10,000 to up to 1 million buckets, simply request a quota increase via Service Quotas. + +# v1.66.3 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.66.2 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.66.1 (2024-10-25) + +* **Bug Fix**: Update presign post URL resolution to use the exact result from EndpointResolverV2 + +# v1.66.0 (2024-10-16) + +* **Feature**: Add support for the new optional bucket-region and prefix query parameters in the ListBuckets API. For ListBuckets requests that express pagination, Amazon S3 will now return both the bucket names and associated AWS regions in the response. + +# v1.65.3 (2024-10-11) + +* **Bug Fix**: **BREAKING CHANGE**: S3 ReplicationRuleFilter and LifecycleRuleFilter shapes are being changed from union to structure types + +# v1.65.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.65.1 (2024-10-07) + +* **Bug Fix**: **CHANGE IN BEHAVIOR**: Allow serialization of headers with empty string for prefix headers. We are deploying this fix because the behavior is actively preventing users from transmitting keys with empty values to the service. If you were setting metadata keys with empty values before this change, they will now actually be sent to the service. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.65.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.1 (2024-10-03) + +* No change notes available for this release. + +# v1.64.0 (2024-10-02) + +* **Feature**: This release introduces a header representing the minimum object size limit for Lifecycle transitions. + +# v1.63.3 (2024-09-27) + +* No change notes available for this release. + +# v1.63.2 (2024-09-25) + +* No change notes available for this release. + +# v1.63.1 (2024-09-23) + +* No change notes available for this release. + +# v1.63.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.62.0 (2024-09-18) + +* **Feature**: Added SSE-KMS support for directory buckets. + # v1.61.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. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go index 0be018b93f..08e432799a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go @@ -4,6 +4,7 @@ package s3 import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -26,7 +27,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" @@ -37,6 +40,133 @@ import ( const ServiceID = "S3" const ServiceAPIVersion = "2006-03-01" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + 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/s3") + 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/s3") +} + // Client provides the API client to make operations call for Amazon Simple // Storage Service. type Client struct { @@ -66,6 +196,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveHTTPSignerV4a(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -102,8 +236,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() @@ -133,15 +274,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/s3") + }) + 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 } @@ -179,7 +361,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 @@ -467,6 +649,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) } @@ -510,6 +716,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/s3") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -638,6 +845,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 addMetadataRetrieverMiddleware(stack *middleware.Stack) error { return s3shared.AddMetadataRetrieverMiddleware(stack) } @@ -966,3 +1185,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/s3/api_op_AbortMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go index 659ab8a716..467a4647e5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/s3/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "time" ) // This operation aborts a multipart upload. After a multipart upload is aborted, @@ -28,15 +29,16 @@ import ( // progress, you can't delete the bucket until all the in-progress multipart // uploads are aborted or completed. To delete these in-progress multipart uploads, // use the ListMultipartUploads operation to list the in-progress multipart -// uploads in the bucket and use the AbortMultupartUpload operation to abort all +// uploads in the bucket and use the AbortMultipartUpload operation to abort all // the in-progress multipart uploads. // // - Directory buckets - For directory buckets, you must make requests for this // API operation to the Zonal endpoint. These endpoints support // virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . -// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the -// Amazon S3 User Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information +// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions // @@ -56,7 +58,7 @@ import ( // expires. For more information about authorization, see [CreateSession]CreateSession . // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to AbortMultipartUpload : // @@ -72,11 +74,12 @@ import ( // // [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html // [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html // [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html // [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html func (c *Client) AbortMultipartUpload(ctx context.Context, params *AbortMultipartUploadInput, optFns ...func(*Options)) (*AbortMultipartUploadOutput, error) { if params == nil { @@ -99,11 +102,12 @@ type AbortMultipartUploadInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -147,6 +151,16 @@ type AbortMultipartUploadInput struct { // status code 403 Forbidden (access denied). ExpectedBucketOwner *string + // If present, this header aborts an in progress multipart upload only if it was + // initiated on the provided timestamp. If the initiated timestamp of the multipart + // upload does not match the provided value, the operation returns a 412 + // Precondition Failed error. If the initiated timestamp matches or if the + // multipart upload doesn’t exist, the operation returns a 204 Success (No Content) + // response. + // + // This functionality is only supported for directory buckets. + IfMatchInitiatedTime *time.Time + // Confirms that the requester knows that they will be charged for the request. // Bucket owners need not specify this parameter in their requests. If either the // source or destination S3 bucket has Requester Pays enabled, the requester will @@ -226,6 +240,9 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(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 } @@ -283,6 +300,18 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go index e7039d2b11..8c6eaebe8c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go @@ -54,30 +54,36 @@ import ( // Directory buckets - For directory buckets, you must make requests for this API // operation to the Zonal endpoint. These endpoints support virtual-hosted-style // requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style -// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User -// Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about +// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions -// // - General purpose bucket permissions - For information about permissions // required to use the multipart upload API, see [Multipart Upload and Permissions]in the Amazon S3 User Guide. // -// - Directory bucket permissions - To grant access to this API operation on a -// directory bucket, we recommend that you use the [CreateSession]CreateSession API operation -// for session-based authorization. Specifically, you grant the -// s3express:CreateSession permission to the directory bucket in a bucket policy -// or an IAM identity-based policy. Then, you make the CreateSession API call on -// the bucket to obtain a session token. With the session token in your request -// header, you can make API requests to this operation. After the session token -// expires, you make another CreateSession API call to generate a new session -// token for use. Amazon Web Services CLI or SDKs create session and refresh the -// session token automatically to avoid service interruptions when a session -// expires. For more information about authorization, see [CreateSession]CreateSession . -// -// - If you provide an [additional checksum value]in your MultipartUpload requests and the object is -// encrypted with Key Management Service, you must have permission to use the -// kms:Decrypt action for the CompleteMultipartUpload request to succeed. +// If you provide an [additional checksum value]in your MultipartUpload requests and the object is encrypted +// +// with Key Management Service, you must have permission to use the kms:Decrypt +// action for the CompleteMultipartUpload request to succeed. +// +// - Directory bucket permissions - To grant access to this API operation on a +// directory bucket, we recommend that you use the [CreateSession]CreateSession API operation +// for session-based authorization. Specifically, you grant the +// s3express:CreateSession permission to the directory bucket in a bucket policy +// or an IAM identity-based policy. Then, you make the CreateSession API call on +// the bucket to obtain a session token. With the session token in your request +// header, you can make API requests to this operation. After the session token +// expires, you make another CreateSession API call to generate a new session +// token for use. Amazon Web Services CLI or SDKs create session and refresh the +// session token automatically to avoid service interruptions when a session +// expires. For more information about authorization, see [CreateSession]CreateSession . +// +// If the object is encrypted with SSE-KMS, you must also have the +// +// kms:GenerateDataKey and kms:Decrypt permissions in IAM identity-based policies +// and KMS key policies for the KMS key. // // Special errors // @@ -111,7 +117,7 @@ import ( // - HTTP Status Code: 404 Not Found // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to CompleteMultipartUpload : // @@ -127,16 +133,18 @@ import ( // // [Uploading Objects Using Multipart Upload]: https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html // [Amazon S3 Error Best Practices]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html -// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html // [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html // [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [additional checksum value]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html -// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html -// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html // [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html -// [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html +// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html +// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html +// [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// +// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html func (c *Client) CompleteMultipartUpload(ctx context.Context, params *CompleteMultipartUploadInput, optFns ...func(*Options)) (*CompleteMultipartUploadOutput, error) { if params == nil { params = &CompleteMultipartUploadInput{} @@ -158,11 +166,12 @@ type CompleteMultipartUploadInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -203,7 +212,7 @@ type CompleteMultipartUploadInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html @@ -211,8 +220,8 @@ type CompleteMultipartUploadInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32C checksum of the object. For more information, see [Checking object integrity] - // in the Amazon S3 User Guide. + // base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see + // [Checking object integrity]in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32C *string @@ -238,6 +247,24 @@ type CompleteMultipartUploadInput struct { // status code 403 Forbidden (access denied). ExpectedBucketOwner *string + // Uploads the object only if the ETag (entity tag) value provided during the + // WRITE operation matches the ETag of the object in S3. If the ETag values do not + // match, the operation returns a 412 Precondition Failed error. + // + // If a conflicting operation occurs during the upload S3 returns a 409 + // ConditionalRequestConflict response. On a 409 failure you should fetch the + // object's ETag, re-initiate the multipart upload with CreateMultipartUpload , and + // re-upload each part. + // + // Expects the ETag value as a string. + // + // For more information about conditional requests, see [RFC 7232], or [Conditional requests] in the Amazon S3 + // User Guide. + // + // [Conditional requests]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html + // [RFC 7232]: https://tools.ietf.org/html/rfc7232 + IfMatch *string + // Uploads the object only if the object key name does not already exist in the // bucket specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error. // @@ -317,11 +344,9 @@ type CompleteMultipartUploadOutput struct { // Indicates whether the multipart upload uses an S3 Bucket Key for server-side // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. BucketKeyEnabled *bool - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -332,7 +357,7 @@ type CompleteMultipartUploadOutput struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -394,17 +419,11 @@ type CompleteMultipartUploadOutput struct { // This functionality is not supported for directory buckets. RequestCharged types.RequestCharged - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. + // If present, indicates the ID of the KMS key that was used for object encryption. SSEKMSKeyId *string // The server-side encryption algorithm used when storing this object in Amazon S3 // (for example, AES256 , aws:kms ). - // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. ServerSideEncryption types.ServerSideEncryption // Version ID of the newly created object, in case the bucket has versioning @@ -462,6 +481,9 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(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 } @@ -522,6 +544,18 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go index 5403315af1..4951820392 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go @@ -31,9 +31,10 @@ import ( // - Directory buckets - For directory buckets, you must make requests for this // API operation to the Zonal endpoint. These endpoints support // virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . -// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the -// Amazon S3 User Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information +// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // - VPC endpoints don't support cross-Region requests (including copies). If // you're using VPC endpoints, your source and destination buckets should be in the @@ -88,6 +89,11 @@ import ( // the object to the destination. The s3express:SessionMode condition key can't // be set to ReadOnly on the copy destination bucket. // +// If the object is encrypted with SSE-KMS, you must also have the +// +// kms:GenerateDataKey and kms:Decrypt permissions in IAM identity-based policies +// and KMS key policies for the KMS key. +// // For example policies, see [Example bucket policies for S3 Express One Zone]and [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]in the Amazon S3 User Guide. // // Response and special errors When the request is an HTTP 1.1 request, the @@ -130,7 +136,7 @@ import ( // billed to the copy source account. For pricing information, see [Amazon S3 pricing]. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to CopyObject : // @@ -143,11 +149,12 @@ import ( // [Copy Object Using the REST Multipart Upload API]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html // [REST Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html // [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [Enable or disable a Region for standalone accounts]: https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html#manage-acct-regions-enable-standalone // [Transfer Acceleration]: https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html // [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html // [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [Amazon S3 pricing]: http://aws.amazon.com/s3/pricing/ func (c *Client) CopyObject(ctx context.Context, params *CopyObjectInput, optFns ...func(*Options)) (*CopyObjectOutput, error) { if params == nil { @@ -170,11 +177,18 @@ type CopyObjectInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // + // Copying objects across different Amazon Web Services Regions isn't supported + // when the source or destination bucket is in Amazon Web Services Local Zones. The + // source and destination buckets must have the same parent Amazon Web Services + // Region. Otherwise, you get an HTTP 400 Bad Request error with the error code + // InvalidRequest . // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -309,10 +323,14 @@ type CopyObjectInput struct { // // For more information, see [Amazon S3 Bucket Keys] in the Amazon S3 User Guide. // - // This functionality is not supported when the destination bucket is a directory - // bucket. + // Directory buckets - S3 Bucket Keys aren't supported, when you copy SSE-KMS + // encrypted objects from general purpose buckets to directory buckets, from + // directory buckets to general purpose buckets, or between directory buckets, + // through [CopyObject]. In this case, Amazon S3 makes a call to KMS every time a copy request + // is made for a KMS-encrypted object. // // [Amazon S3 Bucket Keys]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html + // [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html BucketKeyEnabled *bool // Specifies the caching behavior along the request/reply chain. @@ -554,31 +572,50 @@ type CopyObjectInput struct { // bucket. SSECustomerKeyMD5 *string - // Specifies the Amazon Web Services KMS Encryption Context to use for object - // encryption. The value of this header is a base64-encoded UTF-8 string holding - // JSON with the encryption context key-value pairs. This value must be explicitly - // added to specify encryption context for CopyObject requests. + // Specifies the Amazon Web Services KMS Encryption Context as an additional + // encryption context to use for the destination object encryption. The value of + // this header is a base64-encoded UTF-8 string holding JSON with the encryption + // context key-value pairs. // - // This functionality is not supported when the destination bucket is a directory - // bucket. + // General purpose buckets - This value must be explicitly added to specify + // encryption context for CopyObject requests if you want an additional encryption + // context for your destination object. The additional encryption context of the + // source object won't be copied to the destination object. For more information, + // see [Encryption context]in the Amazon S3 User Guide. + // + // Directory buckets - You can optionally provide an explicit encryption context + // value. The value must match the default encryption context - the bucket Amazon + // Resource Name (ARN). An additional encryption context value is not supported. + // + // [Encryption context]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context SSEKMSEncryptionContext *string - // Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object + // Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object // encryption. All GET and PUT requests for an object protected by KMS will fail if // they're not made via SSL or using SigV4. For information about configuring any // of the officially supported Amazon Web Services SDKs and Amazon Web Services // CLI, see [Specifying the Signature Version in Request Authentication]in the Amazon S3 User Guide. // - // This functionality is not supported when the destination bucket is a directory - // bucket. - // + // Directory buckets - If you specify x-amz-server-side-encryption with aws:kms , + // the x-amz-server-side-encryption-aws-kms-key-id header is implicitly assigned + // the ID of the KMS symmetric encryption customer managed key that's configured + // for your directory bucket's default encryption setting. If you want to specify + // the x-amz-server-side-encryption-aws-kms-key-id header explicitly, you can only + // specify it with the ID (Key ID or Key ARN) of the KMS customer managed key + // that's configured for your directory bucket's default encryption setting. + // Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key + // ARN. The key alias format of the KMS key isn't supported. Your SSE-KMS + // configuration can only support 1 [customer managed key]per directory bucket for the lifetime of the + // bucket. The [Amazon Web Services managed key]( aws/s3 ) isn't supported. + // + // [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk // [Specifying the Signature Version in Request Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk SSEKMSKeyId *string - // The server-side encryption algorithm used when storing this object in Amazon S3 - // (for example, AES256 , aws:kms , aws:kms:dsse ). Unrecognized or unsupported - // values won’t write a destination object and will receive a 400 Bad Request - // response. + // The server-side encryption algorithm used when storing this object in Amazon + // S3. Unrecognized or unsupported values won’t write a destination object and will + // receive a 400 Bad Request response. // // Amazon S3 automatically encrypts all new objects that are copied to an S3 // bucket. When copying an object, if you don't specify encryption information in @@ -586,27 +623,58 @@ type CopyObjectInput struct { // default encryption configuration of the destination bucket. By default, all // buckets have a base level of encryption configuration that uses server-side // encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a - // default encryption configuration that uses server-side encryption with Key - // Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with - // Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with - // customer-provided encryption keys (SSE-C), Amazon S3 uses the corresponding KMS - // key, or a customer-provided key to encrypt the target object copy. - // - // When you perform a CopyObject operation, if you want to use a different type of - // encryption setting for the target object, you can specify appropriate - // encryption-related headers to encrypt the target object with an Amazon S3 - // managed key, a KMS key, or a customer-provided key. If the encryption setting in - // your request is different from the default encryption configuration of the - // destination bucket, the encryption setting in your request takes precedence. + // different default encryption configuration, Amazon S3 uses the corresponding + // encryption key to encrypt the target object copy. // // With server-side encryption, Amazon S3 encrypts your data as it writes your // data to disks in its data centers and decrypts the data when you access it. For // more information about server-side encryption, see [Using Server-Side Encryption]in the Amazon S3 User Guide. // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. + // General purpose buckets + // + // - For general purpose buckets, there are the following supported options for + // server-side encryption: server-side encryption with Key Management Service (KMS) + // keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS + // keys (DSSE-KMS), and server-side encryption with customer-provided encryption + // keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided + // key to encrypt the target object copy. + // + // - When you perform a CopyObject operation, if you want to use a different type + // of encryption setting for the target object, you can specify appropriate + // encryption-related headers to encrypt the target object with an Amazon S3 + // managed key, a KMS key, or a customer-provided key. If the encryption setting in + // your request is different from the default encryption configuration of the + // destination bucket, the encryption setting in your request takes precedence. + // + // Directory buckets + // + // - For directory buckets, there are only two supported options for server-side + // encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) ( + // AES256 ) and server-side encryption with KMS keys (SSE-KMS) ( aws:kms ). We + // recommend that the bucket's default encryption uses the desired encryption + // configuration and you don't override the bucket default encryption in your + // CreateSession requests or PUT object requests. Then, new objects are + // automatically encrypted with the desired encryption settings. For more + // information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide. For more information about the + // encryption overriding behaviors in directory buckets, see [Specifying server-side encryption with KMS for new object uploads]. + // + // - To encrypt new object copies to a directory bucket with SSE-KMS, we + // recommend you specify SSE-KMS as the directory bucket's default encryption + // configuration with a KMS key (specifically, a [customer managed key]). The [Amazon Web Services managed key]( aws/s3 ) isn't + // supported. Your SSE-KMS configuration can only support 1 [customer managed key]per directory bucket + // for the lifetime of the bucket. After you specify a customer managed key for + // SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS + // configuration. Then, when you perform a CopyObject operation and want to + // specify server-side encryption settings for new object copies with SSE-KMS in + // the encryption-related request headers, you must ensure the encryption key is + // the same customer managed key that you specified for the directory bucket's + // default encryption configuration. // // [Using Server-Side Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html + // [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html + // [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk + // [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk ServerSideEncryption types.ServerSideEncryption // If the x-amz-storage-class header is not used, the copied object will be stored @@ -752,8 +820,6 @@ type CopyObjectOutput struct { // Indicates whether the copied object uses an S3 Bucket Key for server-side // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. BucketKeyEnabled *bool // Container for all response elements. @@ -767,7 +833,9 @@ type CopyObjectOutput struct { // If the object expiration is configured, the response includes this header. // - // This functionality is not supported for directory buckets. + // Object expiration information is not returned in directory buckets and this + // header returns the value " NotImplemented " in all responses for directory + // buckets. Expiration *string // If present, indicates that the requester was successfully charged for the @@ -793,21 +861,13 @@ type CopyObjectOutput struct { // If present, indicates the Amazon Web Services KMS Encryption Context to use for // object encryption. The value of this header is a base64-encoded UTF-8 string // holding JSON with the encryption context key-value pairs. - // - // This functionality is not supported for directory buckets. SSEKMSEncryptionContext *string - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. + // If present, indicates the ID of the KMS key that was used for object encryption. SSEKMSKeyId *string // The server-side encryption algorithm used when you store this object in Amazon // S3 (for example, AES256 , aws:kms , aws:kms:dsse ). - // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. ServerSideEncryption types.ServerSideEncryption // Version ID of the newly created copy. @@ -864,6 +924,9 @@ func (c *Client) addOperationCopyObjectMiddlewares(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 } @@ -924,6 +987,18 @@ func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, opti if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go index 6334c1cfcf..6b4283e9f6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go @@ -36,9 +36,10 @@ import ( // - Directory buckets - For directory buckets, you must make requests for this // API operation to the Regional endpoint. These endpoints support path-style // requests in the format -// https://s3express-control.region_code.amazonaws.com/bucket-name . -// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in -// the Amazon S3 User Guide. +// https://s3express-control.region-code.amazonaws.com/bucket-name . +// Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions // @@ -104,7 +105,7 @@ import ( // supported S3 features for directory buckets, see [Features of S3 Express One Zone]in the Amazon S3 User Guide. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// s3express-control.region.amazonaws.com . +// s3express-control.region-code.amazonaws.com . // // The following operations are related to CreateBucket : // @@ -113,18 +114,19 @@ import ( // [DeleteBucket] // // [Creating, configuring, and working with Amazon S3 buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html -// [DeleteBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html // [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html +// [DeleteBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html // [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html // [Virtual hosting of buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // // [DeletePublicAccessBlock]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html // [Directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html // [Features of S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-one-zone.html#s3-express-features +// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html // [Controlling ownership of objects and disabling ACLs for your bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html // [Blocking public access to your Amazon S3 storage]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html -// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html func (c *Client) CreateBucket(ctx context.Context, params *CreateBucketInput, optFns ...func(*Options)) (*CreateBucketOutput, error) { if params == nil { params = &CreateBucketInput{} @@ -149,12 +151,12 @@ type CreateBucketInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use path-style requests in the format - // https://s3express-control.region_code.amazonaws.com/bucket-name . + // https://s3express-control.region-code.amazonaws.com/bucket-name . // Virtual-hosted-style requests aren't supported. Directory bucket names must be - // unique in the chosen Availability Zone. Bucket names must also follow the format - // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 - // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User - // Guide + // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must + // also follow the format bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide // // [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html // [Bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html @@ -295,6 +297,9 @@ func (c *Client) addOperationCreateBucketMiddlewares(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 } @@ -352,6 +357,18 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go new file mode 100644 index 0000000000..4e61399544 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go @@ -0,0 +1,286 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package s3 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum" + s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations" + "github.com/aws/aws-sdk-go-v2/service/s3/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a metadata table configuration for a general purpose bucket. For more +// information, see [Accelerating data discovery with S3 Metadata]in the Amazon S3 User Guide. +// +// Permissions To use this operation, you must have the following permissions. For +// more information, see [Setting up permissions for configuring metadata tables]in the Amazon S3 User Guide. +// +// If you also want to integrate your table bucket with Amazon Web Services +// analytics services so that you can query your metadata table, you need +// additional permissions. For more information, see [Integrating Amazon S3 Tables with Amazon Web Services analytics services]in the Amazon S3 User Guide. +// +// - s3:CreateBucketMetadataTableConfiguration +// +// - s3tables:CreateNamespace +// +// - s3tables:GetTable +// +// - s3tables:CreateTable +// +// - s3tables:PutTablePolicy +// +// The following operations are related to CreateBucketMetadataTableConfiguration : +// +// [DeleteBucketMetadataTableConfiguration] +// +// [GetBucketMetadataTableConfiguration] +// +// [Setting up permissions for configuring metadata tables]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html +// [GetBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataTableConfiguration.html +// [DeleteBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataTableConfiguration.html +// [Accelerating data discovery with S3 Metadata]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html +// [Integrating Amazon S3 Tables with Amazon Web Services analytics services]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-integrating-aws.html +func (c *Client) CreateBucketMetadataTableConfiguration(ctx context.Context, params *CreateBucketMetadataTableConfigurationInput, optFns ...func(*Options)) (*CreateBucketMetadataTableConfigurationOutput, error) { + if params == nil { + params = &CreateBucketMetadataTableConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateBucketMetadataTableConfiguration", params, optFns, c.addOperationCreateBucketMetadataTableConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateBucketMetadataTableConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateBucketMetadataTableConfigurationInput struct { + + // The general purpose bucket that you want to create the metadata table + // configuration in. + // + // This member is required. + Bucket *string + + // The contents of your metadata table configuration. + // + // This member is required. + MetadataTableConfiguration *types.MetadataTableConfiguration + + // The checksum algorithm to use with your metadata table configuration. + ChecksumAlgorithm types.ChecksumAlgorithm + + // The Content-MD5 header for the metadata table configuration. + ContentMD5 *string + + // The expected owner of the general purpose bucket that contains your metadata + // table configuration. + ExpectedBucketOwner *string + + noSmithyDocumentSerde +} + +func (in *CreateBucketMetadataTableConfigurationInput) bindEndpointParams(p *EndpointParameters) { + + p.Bucket = in.Bucket + p.UseS3ExpressControlEndpoint = ptr.Bool(true) +} + +type CreateBucketMetadataTableConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateBucketMetadataTableConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateBucketMetadataTableConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateBucketMetadataTableConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateBucketMetadataTableConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addPutBucketContextMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } + if err = addOpCreateBucketMetadataTableConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBucketMetadataTableConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addMetadataRetrieverMiddleware(stack); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addCreateBucketMetadataTableConfigurationInputChecksumMiddlewares(stack, options); err != nil { + return err + } + if err = addCreateBucketMetadataTableConfigurationUpdateEndpoint(stack, options); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil { + return err + } + if err = disableAcceptEncodingGzip(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { + return err + } + if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func (v *CreateBucketMetadataTableConfigurationInput) bucket() (string, bool) { + if v.Bucket == nil { + return "", false + } + return *v.Bucket, true +} + +func newServiceMetadataMiddleware_opCreateBucketMetadataTableConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateBucketMetadataTableConfiguration", + } +} + +// getCreateBucketMetadataTableConfigurationRequestAlgorithmMember gets the +// request checksum algorithm value provided as input. +func getCreateBucketMetadataTableConfigurationRequestAlgorithmMember(input interface{}) (string, bool) { + in := input.(*CreateBucketMetadataTableConfigurationInput) + if len(in.ChecksumAlgorithm) == 0 { + return "", false + } + return string(in.ChecksumAlgorithm), true +} + +func addCreateBucketMetadataTableConfigurationInputChecksumMiddlewares(stack *middleware.Stack, options Options) error { + return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{ + GetAlgorithm: getCreateBucketMetadataTableConfigurationRequestAlgorithmMember, + RequireChecksum: true, + EnableTrailingChecksum: false, + EnableComputeSHA256PayloadHash: true, + EnableDecodedContentLengthHeader: true, + }) +} + +// getCreateBucketMetadataTableConfigurationBucketMember returns a pointer to +// string denoting a provided bucket member valueand a boolean indicating if the +// input has a modeled bucket name, +func getCreateBucketMetadataTableConfigurationBucketMember(input interface{}) (*string, bool) { + in := input.(*CreateBucketMetadataTableConfigurationInput) + if in.Bucket == nil { + return nil, false + } + return in.Bucket, true +} +func addCreateBucketMetadataTableConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error { + return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{ + Accessor: s3cust.UpdateEndpointParameterAccessor{ + GetBucketFromInput: getCreateBucketMetadataTableConfigurationBucketMember, + }, + UsePathStyle: options.UsePathStyle, + UseAccelerate: options.UseAccelerate, + SupportsAccelerate: true, + TargetS3ObjectLambda: false, + EndpointResolver: options.EndpointResolver, + EndpointResolverOptions: options.EndpointOptions, + UseARNRegion: options.UseARNRegion, + DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints, + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go index 4af112049d..156aba56ab 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go @@ -38,9 +38,10 @@ import ( // - Directory buckets - For directory buckets, you must make requests for this // API operation to the Zonal endpoint. These endpoints support // virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . -// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the -// Amazon S3 User Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information +// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Request signing For request signing, multipart upload is just a series of // regular requests. You initiate a multipart upload, send one or more requests to @@ -147,11 +148,47 @@ import ( // // encryption keys (SSE-C), see [Protecting data using server-side encryption with customer-provided encryption keys (SSE-C)]in the Amazon S3 User Guide. // -// - Directory buckets -For directory buckets, only server-side encryption with -// Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported. +// - Directory buckets - For directory buckets, there are only two supported +// options for server-side encryption: server-side encryption with Amazon S3 +// managed keys (SSE-S3) ( AES256 ) and server-side encryption with KMS keys +// (SSE-KMS) ( aws:kms ). We recommend that the bucket's default encryption uses +// the desired encryption configuration and you don't override the bucket default +// encryption in your CreateSession requests or PUT object requests. Then, new +// objects are automatically encrypted with the desired encryption settings. For +// more information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide. For more information about +// the encryption overriding behaviors in directory buckets, see [Specifying server-side encryption with KMS for new object uploads]. +// +// In the Zonal endpoint API calls (except [CopyObject]and [UploadPartCopy]) using the REST API, the +// +// encryption request headers must match the encryption settings that are specified +// in the CreateSession request. You can't override the values of the encryption +// settings ( x-amz-server-side-encryption , +// x-amz-server-side-encryption-aws-kms-key-id , +// x-amz-server-side-encryption-context , and +// x-amz-server-side-encryption-bucket-key-enabled ) that are specified in the +// CreateSession request. You don't need to explicitly specify these encryption +// settings values in Zonal endpoint API calls, and Amazon S3 will use the +// encryption settings values from the CreateSession request to protect new +// objects in the directory bucket. +// +// When you use the CLI or the Amazon Web Services SDKs, for CreateSession , the +// +// session token refreshes automatically to avoid service interruptions when a +// session expires. The CLI or the Amazon Web Services SDKs use the bucket's +// default encryption configuration for the CreateSession request. It's not +// supported to override the encryption settings values in the CreateSession +// request. So in the Zonal endpoint API calls (except [CopyObject]and [UploadPartCopy]), the encryption +// request headers must match the default encryption configuration of the directory +// bucket. +// +// For directory buckets, when you perform a CreateMultipartUpload operation and an +// +// UploadPartCopy operation, the request headers you provide in the +// CreateMultipartUpload request must match the default encryption configuration +// of the destination bucket. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to CreateMultipartUpload : // @@ -168,20 +205,24 @@ import ( // [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html // [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html // [Protecting Data Using Server-Side Encryption with KMS keys]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [Specifying the Signature Version in Request Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version // [Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config +// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html // [Multipart upload API and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions // [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html // [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [Authenticating Requests (Amazon Web Services Signature Version 4)]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html // [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html // [Multipart Upload Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html // [Protecting data using server-side encryption with Amazon Web Services KMS]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html // [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // +// [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html // [Protecting data using server-side encryption with customer-provided encryption keys (SSE-C)]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html +// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html func (c *Client) CreateMultipartUpload(ctx context.Context, params *CreateMultipartUploadInput, optFns ...func(*Options)) (*CreateMultipartUploadOutput, error) { if params == nil { params = &CreateMultipartUploadInput{} @@ -204,11 +245,12 @@ type CreateMultipartUploadInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -263,13 +305,22 @@ type CreateMultipartUploadInput struct { // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption // with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). - // Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object - // encryption with SSE-KMS. - // - // Specifying this header with an object action doesn’t affect bucket-level - // settings for S3 Bucket Key. // - // This functionality is not supported for directory buckets. + // General purpose buckets - Setting this header to true causes Amazon S3 to use + // an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this + // header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key. + // + // Directory buckets - S3 Bucket Keys are always enabled for GET and PUT + // operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't + // supported, when you copy SSE-KMS encrypted objects from general purpose buckets + // to directory buckets, from directory buckets to general purpose buckets, or + // between directory buckets, through [CopyObject], [UploadPartCopy], [the Copy operation in Batch Operations], or [the import jobs]. In this case, Amazon S3 makes a + // call to KMS every time a copy request is made for a KMS-encrypted object. + // + // [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html + // [the import jobs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job + // [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html + // [the Copy operation in Batch Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops BucketKeyEnabled *bool // Specifies caching behavior along the request/reply chain. @@ -581,23 +632,80 @@ type CreateMultipartUploadInput struct { SSECustomerKeyMD5 *string // Specifies the Amazon Web Services KMS Encryption Context to use for object - // encryption. The value of this header is a base64-encoded UTF-8 string holding - // JSON with the encryption context key-value pairs. + // encryption. The value of this header is a Base64-encoded string of a UTF-8 + // encoded JSON, which contains the encryption context as key-value pairs. // - // This functionality is not supported for directory buckets. + // Directory buckets - You can optionally provide an explicit encryption context + // value. The value must match the default encryption context - the bucket Amazon + // Resource Name (ARN). An additional encryption context value is not supported. SSEKMSEncryptionContext *string - // Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric encryption - // customer managed key to use for object encryption. - // - // This functionality is not supported for directory buckets. + // Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object + // encryption. If the KMS key doesn't exist in the same account that's issuing the + // command, you must use the full Key ARN not the Key ID. + // + // General purpose buckets - If you specify x-amz-server-side-encryption with + // aws:kms or aws:kms:dsse , this header specifies the ID (Key ID, Key ARN, or Key + // Alias) of the KMS key to use. If you specify + // x-amz-server-side-encryption:aws:kms or + // x-amz-server-side-encryption:aws:kms:dsse , but do not provide + // x-amz-server-side-encryption-aws-kms-key-id , Amazon S3 uses the Amazon Web + // Services managed key ( aws/s3 ) to protect the data. + // + // Directory buckets - If you specify x-amz-server-side-encryption with aws:kms , + // the x-amz-server-side-encryption-aws-kms-key-id header is implicitly assigned + // the ID of the KMS symmetric encryption customer managed key that's configured + // for your directory bucket's default encryption setting. If you want to specify + // the x-amz-server-side-encryption-aws-kms-key-id header explicitly, you can only + // specify it with the ID (Key ID or Key ARN) of the KMS customer managed key + // that's configured for your directory bucket's default encryption setting. + // Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key + // ARN. The key alias format of the KMS key isn't supported. Your SSE-KMS + // configuration can only support 1 [customer managed key]per directory bucket for the lifetime of the + // bucket. The [Amazon Web Services managed key]( aws/s3 ) isn't supported. + // + // [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk SSEKMSKeyId *string // The server-side encryption algorithm used when you store this object in Amazon // S3 (for example, AES256 , aws:kms ). // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. + // - Directory buckets - For directory buckets, there are only two supported + // options for server-side encryption: server-side encryption with Amazon S3 + // managed keys (SSE-S3) ( AES256 ) and server-side encryption with KMS keys + // (SSE-KMS) ( aws:kms ). We recommend that the bucket's default encryption uses + // the desired encryption configuration and you don't override the bucket default + // encryption in your CreateSession requests or PUT object requests. Then, new + // objects are automatically encrypted with the desired encryption settings. For + // more information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide. For more information about + // the encryption overriding behaviors in directory buckets, see [Specifying server-side encryption with KMS for new object uploads]. + // + // In the Zonal endpoint API calls (except [CopyObject]and [UploadPartCopy]) using the REST API, the + // encryption request headers must match the encryption settings that are specified + // in the CreateSession request. You can't override the values of the encryption + // settings ( x-amz-server-side-encryption , + // x-amz-server-side-encryption-aws-kms-key-id , + // x-amz-server-side-encryption-context , and + // x-amz-server-side-encryption-bucket-key-enabled ) that are specified in the + // CreateSession request. You don't need to explicitly specify these encryption + // settings values in Zonal endpoint API calls, and Amazon S3 will use the + // encryption settings values from the CreateSession request to protect new + // objects in the directory bucket. + // + // When you use the CLI or the Amazon Web Services SDKs, for CreateSession , the + // session token refreshes automatically to avoid service interruptions when a + // session expires. The CLI or the Amazon Web Services SDKs use the bucket's + // default encryption configuration for the CreateSession request. It's not + // supported to override the encryption settings values in the CreateSession + // request. So in the Zonal endpoint API calls (except [CopyObject]and [UploadPartCopy]), the encryption + // request headers must match the default encryption configuration of the directory + // bucket. + // + // [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html + // [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html + // [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html + // [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html ServerSideEncryption types.ServerSideEncryption // By default, Amazon S3 uses the STANDARD Storage Class to store newly created @@ -666,8 +774,6 @@ type CreateMultipartUploadOutput struct { // Indicates whether the multipart upload uses an S3 Bucket Key for server-side // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. BucketKeyEnabled *bool // The algorithm that was used to create a checksum of the object. @@ -697,23 +803,15 @@ type CreateMultipartUploadOutput struct { SSECustomerKeyMD5 *string // If present, indicates the Amazon Web Services KMS Encryption Context to use for - // object encryption. The value of this header is a base64-encoded UTF-8 string - // holding JSON with the encryption context key-value pairs. - // - // This functionality is not supported for directory buckets. + // object encryption. The value of this header is a Base64-encoded string of a + // UTF-8 encoded JSON, which contains the encryption context as key-value pairs. SSEKMSEncryptionContext *string - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. + // If present, indicates the ID of the KMS key that was used for object encryption. SSEKMSKeyId *string // The server-side encryption algorithm used when you store this object in Amazon // S3 (for example, AES256 , aws:kms ). - // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. ServerSideEncryption types.ServerSideEncryption // ID for the initiated multipart upload. @@ -768,6 +866,9 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(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 } @@ -828,6 +929,18 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware. if err = addSetCreateMPUChecksumAlgorithm(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go index b8c1736b40..f933f7835a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go @@ -15,9 +15,10 @@ import ( ) // Creates a session that establishes temporary security credentials to support -// fast authentication and authorization for the Zonal endpoint APIs on directory -// buckets. For more information about Zonal endpoint APIs that include the -// Availability Zone in the request endpoint, see [S3 Express One Zone APIs]in the Amazon S3 User Guide. +// fast authentication and authorization for the Zonal endpoint API operations on +// directory buckets. For more information about Zonal endpoint API operations that +// include the Availability Zone in the request endpoint, see [S3 Express One Zone APIs]in the Amazon S3 +// User Guide. // // To make Zonal endpoint API requests on a directory bucket, use the CreateSession // API operation. Specifically, you grant s3express:CreateSession permission to a @@ -25,12 +26,12 @@ import ( // credentials to make the CreateSession API request on the bucket, which returns // temporary security credentials that include the access key ID, secret access // key, session token, and expiration. These credentials have associated -// permissions to access the Zonal endpoint APIs. After the session is created, you -// don’t need to use other policies to grant permissions to each Zonal endpoint API -// individually. Instead, in your Zonal endpoint API requests, you sign your -// requests by applying the temporary security credentials of the session to the -// request headers and following the SigV4 protocol for authentication. You also -// apply the session token to the x-amz-s3session-token request header for +// permissions to access the Zonal endpoint API operations. After the session is +// created, you don’t need to use other policies to grant permissions to each Zonal +// endpoint API individually. Instead, in your Zonal endpoint API requests, you +// sign your requests by applying the temporary security credentials of the session +// to the request headers and following the SigV4 protocol for authentication. You +// also apply the session token to the x-amz-s3session-token request header for // authorization. Temporary security credentials are scoped to the bucket and // expire after 5 minutes. After the expiration time, any calls that you make with // those credentials will fail. You must use IAM credentials again to make a @@ -46,20 +47,22 @@ import ( // // - You must make requests for this API operation to the Zonal endpoint. These // endpoints support virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests -// are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style +// requests are not supported. For more information about endpoints in Availability +// Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about endpoints +// in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // -// - CopyObject API operation - Unlike other Zonal endpoint APIs, the CopyObject -// API operation doesn't use the temporary security credentials returned from the -// CreateSession API operation for authentication and authorization. For -// information about authentication and authorization of the CopyObject API -// operation on directory buckets, see [CopyObject]. +// - CopyObject API operation - Unlike other Zonal endpoint API operations, the +// CopyObject API operation doesn't use the temporary security credentials +// returned from the CreateSession API operation for authentication and +// authorization. For information about authentication and authorization of the +// CopyObject API operation on directory buckets, see [CopyObject]. // -// - HeadBucket API operation - Unlike other Zonal endpoint APIs, the HeadBucket -// API operation doesn't use the temporary security credentials returned from the -// CreateSession API operation for authentication and authorization. For -// information about authentication and authorization of the HeadBucket API -// operation on directory buckets, see [HeadBucket]. +// - HeadBucket API operation - Unlike other Zonal endpoint API operations, the +// HeadBucket API operation doesn't use the temporary security credentials +// returned from the CreateSession API operation for authentication and +// authorization. For information about authentication and authorization of the +// HeadBucket API operation on directory buckets, see [HeadBucket]. // // Permissions To obtain temporary security credentials, you must create a bucket // policy or an IAM identity-based policy that grants s3express:CreateSession @@ -69,20 +72,73 @@ import ( // x-amz-create-session-mode . For example policies, see [Example bucket policies for S3 Express One Zone] and [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone] in the Amazon S3 // User Guide. // -// To grant cross-account access to Zonal endpoint APIs, the bucket policy should -// also grant both accounts the s3express:CreateSession permission. +// To grant cross-account access to Zonal endpoint API operations, the bucket +// policy should also grant both accounts the s3express:CreateSession permission. +// +// If you want to encrypt objects with SSE-KMS, you must also have the +// kms:GenerateDataKey and the kms:Decrypt permissions in IAM identity-based +// policies and KMS key policies for the target KMS key. +// +// Encryption For directory buckets, there are only two supported options for +// server-side encryption: server-side encryption with Amazon S3 managed keys +// (SSE-S3) ( AES256 ) and server-side encryption with KMS keys (SSE-KMS) ( aws:kms +// ). We recommend that the bucket's default encryption uses the desired encryption +// configuration and you don't override the bucket default encryption in your +// CreateSession requests or PUT object requests. Then, new objects are +// automatically encrypted with the desired encryption settings. For more +// information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide. For more information about the +// encryption overriding behaviors in directory buckets, see [Specifying server-side encryption with KMS for new object uploads]. +// +// For [Zonal endpoint (object-level) API operations] except [CopyObject] and [UploadPartCopy], you authenticate and authorize requests through [CreateSession] for low +// latency. To encrypt new objects in a directory bucket with SSE-KMS, you must +// specify SSE-KMS as the directory bucket's default encryption configuration with +// a KMS key (specifically, a [customer managed key]). Then, when a session is created for Zonal +// endpoint API operations, new objects are automatically encrypted and decrypted +// with SSE-KMS and S3 Bucket Keys during the session. +// +// Only 1 [customer managed key] is supported per directory bucket for the lifetime of the bucket. The [Amazon Web Services managed key] ( +// aws/s3 ) isn't supported. After you specify SSE-KMS as your bucket's default +// encryption configuration with a customer managed key, you can't change the +// customer managed key for the bucket's SSE-KMS configuration. +// +// In the Zonal endpoint API calls (except [CopyObject] and [UploadPartCopy]) using the REST API, you can't +// override the values of the encryption settings ( x-amz-server-side-encryption , +// x-amz-server-side-encryption-aws-kms-key-id , +// x-amz-server-side-encryption-context , and +// x-amz-server-side-encryption-bucket-key-enabled ) from the CreateSession +// request. You don't need to explicitly specify these encryption settings values +// in Zonal endpoint API calls, and Amazon S3 will use the encryption settings +// values from the CreateSession request to protect new objects in the directory +// bucket. +// +// When you use the CLI or the Amazon Web Services SDKs, for CreateSession , the +// session token refreshes automatically to avoid service interruptions when a +// session expires. The CLI or the Amazon Web Services SDKs use the bucket's +// default encryption configuration for the CreateSession request. It's not +// supported to override the encryption settings values in the CreateSession +// request. Also, in the Zonal endpoint API calls (except [CopyObject]and [UploadPartCopy]), it's not +// supported to override the values of the encryption settings from the +// CreateSession request. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // -// [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html +// [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html // [Performance guidelines and design patterns]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-optimizing-performance-guidelines-design-patterns.html#s3-express-optimizing-performance-session-authentication -// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html -// [x-amz-create-session-mode]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html#API_CreateSession_RequestParameters +// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html // [S3 Express One Zone APIs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-APIs.html // [HeadBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html +// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html +// [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk +// [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html +// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html +// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk +// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html +// [x-amz-create-session-mode]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html#API_CreateSession_RequestParameters +// [Zonal endpoint (object-level) API operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-differences.html#s3-express-differences-api-operations +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html func (c *Client) CreateSession(ctx context.Context, params *CreateSessionInput, optFns ...func(*Options)) (*CreateSessionOutput, error) { if params == nil { params = &CreateSessionInput{} @@ -105,12 +161,73 @@ type CreateSessionInput struct { // This member is required. Bucket *string + // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption + // with server-side encryption using KMS keys (SSE-KMS). + // + // S3 Bucket Keys are always enabled for GET and PUT operations in a directory + // bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy + // SSE-KMS encrypted objects from general purpose buckets to directory buckets, + // from directory buckets to general purpose buckets, or between directory buckets, + // through [CopyObject], [UploadPartCopy], [the Copy operation in Batch Operations], or [the import jobs]. In this case, Amazon S3 makes a call to KMS every time a + // copy request is made for a KMS-encrypted object. + // + // [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html + // [the import jobs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job + // [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html + // [the Copy operation in Batch Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops + BucketKeyEnabled *bool + + // Specifies the Amazon Web Services KMS Encryption Context as an additional + // encryption context to use for object encryption. The value of this header is a + // Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption + // context as key-value pairs. This value is stored as object metadata and + // automatically gets passed on to Amazon Web Services KMS for future GetObject + // operations on this object. + // + // General purpose buckets - This value must be explicitly added during CopyObject + // operations if you want an additional encryption context for your object. For + // more information, see [Encryption context]in the Amazon S3 User Guide. + // + // Directory buckets - You can optionally provide an explicit encryption context + // value. The value must match the default encryption context - the bucket Amazon + // Resource Name (ARN). An additional encryption context value is not supported. + // + // [Encryption context]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context + SSEKMSEncryptionContext *string + + // If you specify x-amz-server-side-encryption with aws:kms , you must specify the + // x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key + // ARN) of the KMS symmetric encryption customer managed key to use. Otherwise, you + // get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key + // alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist + // in the same account that't issuing the command, you must use the full Key ARN + // not the Key ID. + // + // Your SSE-KMS configuration can only support 1 [customer managed key] per directory bucket for the + // lifetime of the bucket. The [Amazon Web Services managed key]( aws/s3 ) isn't supported. + // + // [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk + SSEKMSKeyId *string + + // The server-side encryption algorithm to use when you store objects in the + // directory bucket. + // + // For directory buckets, there are only two supported options for server-side + // encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) ( AES256 + // ) and server-side encryption with KMS keys (SSE-KMS) ( aws:kms ). By default, + // Amazon S3 encrypts data with SSE-S3. For more information, see [Protecting data with server-side encryption]in the Amazon S3 + // User Guide. + // + // [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html + ServerSideEncryption types.ServerSideEncryption + // Specifies the mode of the session that will be created, either ReadWrite or // ReadOnly . By default, a ReadWrite session is created. A ReadWrite session is - // capable of executing all the Zonal endpoint APIs on a directory bucket. A - // ReadOnly session is constrained to execute the following Zonal endpoint APIs: - // GetObject , HeadObject , ListObjectsV2 , GetObjectAttributes , ListParts , and - // ListMultipartUploads . + // capable of executing all the Zonal endpoint API operations on a directory + // bucket. A ReadOnly session is constrained to execute the following Zonal + // endpoint API operations: GetObject , HeadObject , ListObjectsV2 , + // GetObjectAttributes , ListParts , and ListMultipartUploads . SessionMode types.SessionMode noSmithyDocumentSerde @@ -129,6 +246,26 @@ type CreateSessionOutput struct { // This member is required. Credentials *types.SessionCredentials + // Indicates whether to use an S3 Bucket Key for server-side encryption with KMS + // keys (SSE-KMS). + BucketKeyEnabled *bool + + // If present, indicates the Amazon Web Services KMS Encryption Context to use for + // object encryption. The value of this header is a Base64-encoded string of a + // UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + // This value is stored as object metadata and automatically gets passed on to + // Amazon Web Services KMS for future GetObject operations on this object. + SSEKMSEncryptionContext *string + + // If you specify x-amz-server-side-encryption with aws:kms , this header indicates + // the ID of the KMS symmetric encryption customer managed key that was used for + // object encryption. + SSEKMSKeyId *string + + // The server-side encryption algorithm used when you store objects in the + // directory bucket. + ServerSideEncryption types.ServerSideEncryption + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -178,6 +315,9 @@ func (c *Client) addOperationCreateSessionMiddlewares(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 } @@ -235,6 +375,18 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go index e0654a0c18..8e34c67c59 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go @@ -23,9 +23,10 @@ import ( // - Directory buckets - For directory buckets, you must make requests for this // API operation to the Regional endpoint. These endpoints support path-style // requests in the format -// https://s3express-control.region_code.amazonaws.com/bucket-name . -// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in -// the Amazon S3 User Guide. +// https://s3express-control.region-code.amazonaws.com/bucket-name . +// Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions // @@ -40,7 +41,7 @@ import ( // Amazon S3 User Guide. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// s3express-control.region.amazonaws.com . +// s3express-control.region-code.amazonaws.com . // // The following operations are related to DeleteBucket : // @@ -49,8 +50,9 @@ import ( // [DeleteObject] // // [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, optFns ...func(*Options)) (*DeleteBucketOutput, error) { if params == nil { @@ -73,12 +75,12 @@ type DeleteBucketInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use path-style requests in the format - // https://s3express-control.region_code.amazonaws.com/bucket-name . + // https://s3express-control.region-code.amazonaws.com/bucket-name . // Virtual-hosted-style requests aren't supported. Directory bucket names must be - // unique in the chosen Availability Zone. Bucket names must also follow the format - // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 - // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User - // Guide + // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must + // also follow the format bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide // // [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html // @@ -153,6 +155,9 @@ func (c *Client) addOperationDeleteBucketMiddlewares(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 } @@ -210,6 +215,18 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go index e4e0d3b72a..ebeba22954 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Deletes an analytics configuration for the bucket (specified by the analytics // configuration ID). @@ -130,6 +130,9 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(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 } @@ -187,6 +190,18 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go index cbf7315835..e101447514 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Deletes the cors configuration information set for the bucket. // @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(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) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go index fa37719c0b..c1a1b810dc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go @@ -13,17 +13,32 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. -// // This implementation of the DELETE action resets the default encryption for the -// bucket as server-side encryption with Amazon S3 managed keys (SSE-S3). For -// information about the bucket default encryption feature, see [Amazon S3 Bucket Default Encryption]in the Amazon S3 -// User Guide. +// bucket as server-side encryption with Amazon S3 managed keys (SSE-S3). +// +// - General purpose buckets - For information about the bucket default +// encryption feature, see [Amazon S3 Bucket Default Encryption]in the Amazon S3 User Guide. +// +// - Directory buckets - For directory buckets, there are only two supported +// options for server-side encryption: SSE-S3 and SSE-KMS. For information about +// the default encryption configuration in directory buckets, see [Setting default server-side encryption behavior for directory buckets]. +// +// Permissions +// +// - General purpose bucket permissions - The s3:PutEncryptionConfiguration +// permission is required in a policy. The bucket owner has this permission by +// default. The bucket owner can grant this permission to others. For more +// information about permissions, see [Permissions Related to Bucket Operations]and [Managing Access Permissions to Your Amazon S3 Resources]. // -// To use this operation, you must have permissions to perform the -// s3:PutEncryptionConfiguration action. The bucket owner has this permission by -// default. The bucket owner can grant this permission to others. For more -// information about permissions, see [Permissions Related to Bucket Subresource Operations]and [Managing Access Permissions to your Amazon S3 Resources] in the Amazon S3 User Guide. +// - Directory bucket permissions - To grant access to this API operation, you +// must have the s3express:PutEncryptionConfiguration permission in an IAM +// identity-based policy instead of a bucket policy. Cross-account access to this +// API operation isn't supported. This operation can only be performed by the +// Amazon Web Services account that owns the resource. For more information about +// directory bucket policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]in the Amazon S3 User Guide. +// +// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is +// s3express-control.region-code.amazonaws.com . // // The following operations are related to DeleteBucketEncryption : // @@ -33,9 +48,11 @@ import ( // // [GetBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html // [PutBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html -// [Permissions Related to Bucket Subresource Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources -// [Managing Access Permissions to your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html +// [Setting default server-side encryption behavior for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-bucket-encryption.html // [Amazon S3 Bucket Default Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html +// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html +// [Permissions Related to Bucket Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources +// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html func (c *Client) DeleteBucketEncryption(ctx context.Context, params *DeleteBucketEncryptionInput, optFns ...func(*Options)) (*DeleteBucketEncryptionOutput, error) { if params == nil { params = &DeleteBucketEncryptionInput{} @@ -56,12 +73,27 @@ type DeleteBucketEncryptionInput struct { // The name of the bucket containing the server-side encryption configuration to // delete. // + // Directory buckets - When you use this operation with a directory bucket, you + // must use path-style requests in the format + // https://s3express-control.region-code.amazonaws.com/bucket-name . + // Virtual-hosted-style requests aren't supported. Directory bucket names must be + // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must + // also follow the format bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide + // + // [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html + // // This member is required. Bucket *string // The account ID of the expected bucket owner. If the account ID that you provide // does not match the actual owner of the bucket, the request fails with the HTTP // status code 403 Forbidden (access denied). + // + // For directory buckets, this header is not supported in this API operation. If + // you specify this header, the request fails with the HTTP status code 501 Not + // Implemented . ExpectedBucketOwner *string noSmithyDocumentSerde @@ -123,6 +155,9 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(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 +215,18 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go index 2a64710c17..3fd1f17cd0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Deletes the S3 Intelligent-Tiering configuration from the specified bucket. // @@ -132,6 +132,9 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa if err = 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) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go index 8fa7d1e438..68fbe69dfd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Deletes an inventory configuration (identified by the inventory ID) from the // bucket. @@ -130,6 +130,9 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(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 } @@ -187,6 +190,18 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go index 4c843ee5ff..7eb820b468 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go @@ -13,20 +13,44 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. -// // Deletes the lifecycle configuration from the specified bucket. Amazon S3 // removes all the lifecycle configuration rules in the lifecycle subresource // associated with the bucket. Your objects never expire, and Amazon S3 no longer // automatically deletes any objects on the basis of rules contained in the deleted // lifecycle configuration. // -// To use this operation, you must have permission to perform the -// s3:PutLifecycleConfiguration action. By default, the bucket owner has this -// permission and the bucket owner can grant this permission to others. +// Permissions +// - General purpose bucket permissions - By default, all Amazon S3 resources +// are private, including buckets, objects, and related subresources (for example, +// lifecycle configuration and website configuration). Only the resource owner +// (that is, the Amazon Web Services account that created it) can access the +// resource. The resource owner can optionally grant access permissions to others +// by writing an access policy. For this operation, a user must have the +// s3:PutLifecycleConfiguration permission. +// +// For more information about permissions, see [Managing Access Permissions to Your Amazon S3 Resources]. +// +// - Directory bucket permissions - You must have the +// s3express:PutLifecycleConfiguration permission in an IAM identity-based policy +// to use this operation. Cross-account access to this API operation isn't +// supported. The resource owner can optionally grant access permissions to others +// by creating a role or user for them as long as they are within the same account +// as the owner and resource. +// +// For more information about directory bucket policies and permissions, see [Authorizing Regional endpoint APIs with IAM]in +// +// the Amazon S3 User Guide. // -// There is usually some time lag before lifecycle configuration deletion is fully -// propagated to all the Amazon S3 systems. +// Directory buckets - For directory buckets, you must make requests for this API +// +// operation to the Regional endpoint. These endpoints support path-style requests +// in the format https://s3express-control.region-code.amazonaws.com/bucket-name +// . Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. +// +// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is +// s3express-control.region.amazonaws.com . // // For more information about the object expiration, see [Elements to Describe Lifecycle Actions]. // @@ -39,6 +63,11 @@ import ( // [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html // [Elements to Describe Lifecycle Actions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions // [GetBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html +// [Authorizing Regional endpoint APIs with IAM]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html +// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html +// +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html func (c *Client) DeleteBucketLifecycle(ctx context.Context, params *DeleteBucketLifecycleInput, optFns ...func(*Options)) (*DeleteBucketLifecycleOutput, error) { if params == nil { params = &DeleteBucketLifecycleInput{} @@ -64,6 +93,9 @@ type DeleteBucketLifecycleInput struct { // The account ID of the expected bucket owner. If the account ID that you provide // does not match the actual owner of the bucket, the request fails with the HTTP // status code 403 Forbidden (access denied). + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. ExpectedBucketOwner *string noSmithyDocumentSerde @@ -125,6 +157,9 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(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 +217,18 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware. if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go new file mode 100644 index 0000000000..ff44efe085 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go @@ -0,0 +1,234 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package s3 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a metadata table configuration from a general purpose bucket. For more +// +// information, see [Accelerating data discovery with S3 Metadata]in the Amazon S3 User Guide. +// +// Permissions To use this operation, you must have the +// s3:DeleteBucketMetadataTableConfiguration permission. For more information, see [Setting up permissions for configuring metadata tables] +// in the Amazon S3 User Guide. +// +// The following operations are related to DeleteBucketMetadataTableConfiguration : +// +// [CreateBucketMetadataTableConfiguration] +// +// [GetBucketMetadataTableConfiguration] +// +// [Setting up permissions for configuring metadata tables]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html +// [GetBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataTableConfiguration.html +// [CreateBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataTableConfiguration.html +// [Accelerating data discovery with S3 Metadata]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html +func (c *Client) DeleteBucketMetadataTableConfiguration(ctx context.Context, params *DeleteBucketMetadataTableConfigurationInput, optFns ...func(*Options)) (*DeleteBucketMetadataTableConfigurationOutput, error) { + if params == nil { + params = &DeleteBucketMetadataTableConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteBucketMetadataTableConfiguration", params, optFns, c.addOperationDeleteBucketMetadataTableConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteBucketMetadataTableConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteBucketMetadataTableConfigurationInput struct { + + // The general purpose bucket that you want to remove the metadata table + // configuration from. + // + // This member is required. + Bucket *string + + // The expected bucket owner of the general purpose bucket that you want to + // remove the metadata table configuration from. + ExpectedBucketOwner *string + + noSmithyDocumentSerde +} + +func (in *DeleteBucketMetadataTableConfigurationInput) bindEndpointParams(p *EndpointParameters) { + + p.Bucket = in.Bucket + p.UseS3ExpressControlEndpoint = ptr.Bool(true) +} + +type DeleteBucketMetadataTableConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteBucketMetadataTableConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketMetadataTableConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketMetadataTableConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketMetadataTableConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addPutBucketContextMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } + if err = addOpDeleteBucketMetadataTableConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketMetadataTableConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addMetadataRetrieverMiddleware(stack); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addDeleteBucketMetadataTableConfigurationUpdateEndpoint(stack, options); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil { + return err + } + if err = disableAcceptEncodingGzip(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func (v *DeleteBucketMetadataTableConfigurationInput) bucket() (string, bool) { + if v.Bucket == nil { + return "", false + } + return *v.Bucket, true +} + +func newServiceMetadataMiddleware_opDeleteBucketMetadataTableConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteBucketMetadataTableConfiguration", + } +} + +// getDeleteBucketMetadataTableConfigurationBucketMember returns a pointer to +// string denoting a provided bucket member valueand a boolean indicating if the +// input has a modeled bucket name, +func getDeleteBucketMetadataTableConfigurationBucketMember(input interface{}) (*string, bool) { + in := input.(*DeleteBucketMetadataTableConfigurationInput) + if in.Bucket == nil { + return nil, false + } + return in.Bucket, true +} +func addDeleteBucketMetadataTableConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error { + return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{ + Accessor: s3cust.UpdateEndpointParameterAccessor{ + GetBucketFromInput: getDeleteBucketMetadataTableConfigurationBucketMember, + }, + UsePathStyle: options.UsePathStyle, + UseAccelerate: options.UseAccelerate, + SupportsAccelerate: true, + TargetS3ObjectLambda: false, + EndpointResolver: options.EndpointResolver, + EndpointResolverOptions: options.EndpointOptions, + UseARNRegion: options.UseARNRegion, + DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints, + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go index 645b5712b7..86ab957322 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Deletes a metrics configuration for the Amazon CloudWatch request metrics // (specified by the metrics configuration ID) from the bucket. Note that this @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(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 } @@ -191,6 +194,18 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack * if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go index 893b0f1d55..da46b921e8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you // must have the s3:PutBucketOwnershipControls permission. For more information @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(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 } @@ -172,6 +175,18 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go index f9e53d5495..8e1d89b76c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go @@ -17,9 +17,10 @@ import ( // // Directory buckets - For directory buckets, you must make requests for this API // operation to the Regional endpoint. These endpoints support path-style requests -// in the format https://s3express-control.region_code.amazonaws.com/bucket-name . -// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in -// the Amazon S3 User Guide. +// in the format https://s3express-control.region-code.amazonaws.com/bucket-name . +// Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions If you are using an identity other than the root user of the Amazon // Web Services account that owns the bucket, the calling identity must both have @@ -51,7 +52,7 @@ import ( // policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]in the Amazon S3 User Guide. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// s3express-control.region.amazonaws.com . +// s3express-control.region-code.amazonaws.com . // // # The following operations are related to DeleteBucketPolicy // @@ -60,9 +61,10 @@ import ( // [DeleteObject] // // [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [Using Bucket Policies and User Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html // [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPolicyInput, optFns ...func(*Options)) (*DeleteBucketPolicyOutput, error) { if params == nil { @@ -85,12 +87,12 @@ type DeleteBucketPolicyInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use path-style requests in the format - // https://s3express-control.region_code.amazonaws.com/bucket-name . + // https://s3express-control.region-code.amazonaws.com/bucket-name . // Virtual-hosted-style requests aren't supported. Directory bucket names must be - // unique in the chosen Availability Zone. Bucket names must also follow the format - // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 - // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User - // Guide + // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must + // also follow the format bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide // // [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html // @@ -165,6 +167,9 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(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 } @@ -222,6 +227,18 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go index c7e9803e53..d2c8b03288 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Deletes the replication configuration from the bucket. // @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(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) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go index 3f511103b4..22f0656eda 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Deletes the tags from the bucket. // @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(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 } @@ -172,6 +175,18 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go index 58ae1d017a..46aded0bb1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // This action removes the website configuration for a bucket. Amazon S3 returns a // 200 OK response upon successfully deleting a website configuration on the @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(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 } @@ -181,6 +184,18 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go index 9af132c8c6..fa0031a578 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/s3/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "time" ) // Removes an object from a bucket. The behavior depends on the bucket's @@ -40,9 +41,10 @@ import ( // - Directory buckets - For directory buckets, you must make requests for this // API operation to the Zonal endpoint. These endpoints support // virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . -// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the -// Amazon S3 User Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information +// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // To remove a specific version, you must use the versionId query parameter. Using // this query parameter permanently deletes the version. If the object deleted is a @@ -88,19 +90,20 @@ import ( // expires. For more information about authorization, see [CreateSession]CreateSession . // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following action is related to DeleteObject : // // [PutObject] // // [Sample Request]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [Deleting objects from versioning-suspended buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html // [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html // [PutBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html // [Deleting object versions from a versioning-enabled bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [Using MFA Delete]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, optFns ...func(*Options)) (*DeleteObjectOutput, error) { if params == nil { @@ -123,11 +126,12 @@ type DeleteObjectInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -173,6 +177,38 @@ type DeleteObjectInput struct { // status code 403 Forbidden (access denied). ExpectedBucketOwner *string + // The If-Match header field makes the request method conditional on ETags. If the + // ETag value does not match, the operation returns a 412 Precondition Failed + // error. If the ETag matches or if the object doesn't exist, the operation will + // return a 204 Success (No Content) response . + // + // For more information about conditional requests, see [RFC 7232]. + // + // This functionality is only supported for directory buckets. + // + // [RFC 7232]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232 + IfMatch *string + + // If present, the object is deleted only if its modification times matches the + // provided Timestamp . If the Timestamp values do not match, the operation + // returns a 412 Precondition Failed error. If the Timestamp matches or if the + // object doesn’t exist, the operation returns a 204 Success (No Content) response. + // + // This functionality is only supported for directory buckets. + IfMatchLastModifiedTime *time.Time + + // If present, the object is deleted only if its size matches the provided size in + // bytes. If the Size value does not match, the operation returns a 412 + // Precondition Failed error. If the Size matches or if the object doesn’t exist, + // the operation returns a 204 Success (No Content) response. + // + // This functionality is only supported for directory buckets. + // + // You can use the If-Match , x-amz-if-match-last-modified-time and + // x-amz-if-match-size conditional headers in conjunction with each-other or + // individually. + IfMatchSize *int64 + // The concatenation of the authentication device's serial number, a space, and // the value that is displayed on your authentication device. Required to // permanently delete a versioned object if versioning is configured with MFA @@ -280,6 +316,9 @@ func (c *Client) addOperationDeleteObjectMiddlewares(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 } @@ -337,6 +376,18 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go index 473479057b..54bfd7d72a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Removes the entire tag set from the specified object. For more information // about managing object tags, see [Object Tagging]. @@ -151,6 +151,9 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(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 } @@ -208,6 +211,18 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go index fff3d896d5..7ab24a882b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go @@ -33,9 +33,10 @@ import ( // - Directory buckets - For directory buckets, you must make requests for this // API operation to the Zonal endpoint. These endpoints support // virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . -// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the -// Amazon S3 User Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information +// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // The operation supports two modes for the response: verbose and quiet. By // default, the operation uses verbose mode in which the response includes the @@ -89,7 +90,7 @@ import ( // Multi-Object Delete requests. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to DeleteObjects : // @@ -106,9 +107,10 @@ import ( // [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html // [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html // [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html // [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [MFA Delete]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete // [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html func (c *Client) DeleteObjects(ctx context.Context, params *DeleteObjectsInput, optFns ...func(*Options)) (*DeleteObjectsOutput, error) { @@ -132,11 +134,12 @@ type DeleteObjectsInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -317,6 +320,9 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(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 } @@ -380,6 +386,18 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go index dee7f1f194..7205bb88dd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use // this operation, you must have the s3:PutBucketPublicAccessBlock permission. For @@ -121,6 +121,9 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(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) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go index c8e93d0285..8d33fa67d9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // This implementation of the GET action uses the accelerate subresource to return // the Transfer Acceleration state of a bucket, which is either Enabled or @@ -152,6 +152,9 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(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 } @@ -209,6 +212,18 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack * if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go index 73557d2eef..8ae6505d07 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // This implementation of the GET action uses the acl subresource to return the // access control list (ACL) of a bucket. To use GET to return the ACL of the @@ -147,6 +147,9 @@ func (c *Client) addOperationGetBucketAclMiddlewares(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 } @@ -204,6 +207,18 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go index d3b27f9ffc..a0e8ac7c02 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // This implementation of the GET action returns an analytics configuration // (identified by the analytics configuration ID) from the bucket. @@ -136,6 +136,9 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(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 } @@ -193,6 +196,18 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go index ef33218e37..ee1d6b9118 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the Cross-Origin Resource Sharing (CORS) configuration information set // for the bucket. @@ -146,6 +146,9 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(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 } @@ -203,6 +206,18 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go index 8e768fe0d0..a7dda520a8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go @@ -14,17 +14,33 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. -// // Returns the default encryption configuration for an Amazon S3 bucket. By // default, all buckets have a default encryption configuration that uses -// server-side encryption with Amazon S3 managed keys (SSE-S3). For information -// about the bucket default encryption feature, see [Amazon S3 Bucket Default Encryption]in the Amazon S3 User Guide. +// server-side encryption with Amazon S3 managed keys (SSE-S3). +// +// - General purpose buckets - For information about the bucket default +// encryption feature, see [Amazon S3 Bucket Default Encryption]in the Amazon S3 User Guide. +// +// - Directory buckets - For directory buckets, there are only two supported +// options for server-side encryption: SSE-S3 and SSE-KMS. For information about +// the default encryption configuration in directory buckets, see [Setting default server-side encryption behavior for directory buckets]. +// +// Permissions +// +// - General purpose bucket permissions - The s3:GetEncryptionConfiguration +// permission is required in a policy. The bucket owner has this permission by +// default. The bucket owner can grant this permission to others. For more +// information about permissions, see [Permissions Related to Bucket Operations]and [Managing Access Permissions to Your Amazon S3 Resources]. // -// To use this operation, you must have permission to perform the -// s3:GetEncryptionConfiguration action. The bucket owner has this permission by -// default. The bucket owner can grant this permission to others. For more -// information about permissions, see [Permissions Related to Bucket Subresource Operations]and [Managing Access Permissions to Your Amazon S3 Resources]. +// - Directory bucket permissions - To grant access to this API operation, you +// must have the s3express:GetEncryptionConfiguration permission in an IAM +// identity-based policy instead of a bucket policy. Cross-account access to this +// API operation isn't supported. This operation can only be performed by the +// Amazon Web Services account that owns the resource. For more information about +// directory bucket policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]in the Amazon S3 User Guide. +// +// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is +// s3express-control.region-code.amazonaws.com . // // The following operations are related to GetBucketEncryption : // @@ -34,9 +50,11 @@ import ( // // [DeleteBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html // [PutBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html -// [Permissions Related to Bucket Subresource Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources +// [Setting default server-side encryption behavior for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-bucket-encryption.html // [Amazon S3 Bucket Default Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html // [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html +// [Permissions Related to Bucket Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources +// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html func (c *Client) GetBucketEncryption(ctx context.Context, params *GetBucketEncryptionInput, optFns ...func(*Options)) (*GetBucketEncryptionOutput, error) { if params == nil { params = &GetBucketEncryptionInput{} @@ -57,12 +75,27 @@ type GetBucketEncryptionInput struct { // The name of the bucket from which the server-side encryption configuration is // retrieved. // + // Directory buckets - When you use this operation with a directory bucket, you + // must use path-style requests in the format + // https://s3express-control.region-code.amazonaws.com/bucket-name . + // Virtual-hosted-style requests aren't supported. Directory bucket names must be + // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must + // also follow the format bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide + // + // [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html + // // This member is required. Bucket *string // The account ID of the expected bucket owner. If the account ID that you provide // does not match the actual owner of the bucket, the request fails with the HTTP // status code 403 Forbidden (access denied). + // + // For directory buckets, this header is not supported in this API operation. If + // you specify this header, the request fails with the HTTP status code 501 Not + // Implemented . ExpectedBucketOwner *string noSmithyDocumentSerde @@ -128,6 +161,9 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(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 } @@ -185,6 +221,18 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go index def1765a6b..ccf065ee9f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Gets the S3 Intelligent-Tiering configuration from the specified bucket. // @@ -137,6 +137,9 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares if err = 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) addOperationGetBucketIntelligentTieringConfigurationMiddlewares if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go index 8e09aec2c3..8d61953c25 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns an inventory configuration (identified by the inventory configuration // ID) from the bucket. @@ -135,6 +135,9 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(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 } @@ -192,6 +195,18 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go index 4d3e018d08..547097bcf0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go @@ -14,26 +14,53 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// Returns the lifecycle configuration information set on the bucket. For +// information about lifecycle configuration, see [Object Lifecycle Management]. // // Bucket lifecycle configuration now supports specifying a lifecycle rule using // an object key name prefix, one or more object tags, object size, or any -// combination of these. Accordingly, this section describes the latest API. The -// previous version of the API supported filtering based only on an object key name -// prefix, which is supported for backward compatibility. For the related API -// description, see [GetBucketLifecycle]. Accordingly, this section describes the latest API. The -// response describes the new filter element that you can use to specify a filter -// to select a subset of objects to which the rule applies. If you are using a -// previous version of the lifecycle configuration, it still works. For the earlier -// action, +// combination of these. Accordingly, this section describes the latest API, which +// is compatible with the new functionality. The previous version of the API +// supported filtering based only on an object key name prefix, which is supported +// for general purpose buckets for backward compatibility. For the related API +// description, see [GetBucketLifecycle]. // -// Returns the lifecycle configuration information set on the bucket. For -// information about lifecycle configuration, see [Object Lifecycle Management]. +// Lifecyle configurations for directory buckets only support expiring objects and +// cancelling multipart uploads. Expiring of versioned objects, transitions and tag +// filters are not supported. +// +// Permissions +// - General purpose bucket permissions - By default, all Amazon S3 resources +// are private, including buckets, objects, and related subresources (for example, +// lifecycle configuration and website configuration). Only the resource owner +// (that is, the Amazon Web Services account that created it) can access the +// resource. The resource owner can optionally grant access permissions to others +// by writing an access policy. For this operation, a user must have the +// s3:GetLifecycleConfiguration permission. +// +// For more information about permissions, see [Managing Access Permissions to Your Amazon S3 Resources]. +// +// - Directory bucket permissions - You must have the +// s3express:GetLifecycleConfiguration permission in an IAM identity-based policy +// to use this operation. Cross-account access to this API operation isn't +// supported. The resource owner can optionally grant access permissions to others +// by creating a role or user for them as long as they are within the same account +// as the owner and resource. // -// To use this operation, you must have permission to perform the -// s3:GetLifecycleConfiguration action. The bucket owner has this permission, by -// default. The bucket owner can grant this permission to others. For more -// information about permissions, see [Permissions Related to Bucket Subresource Operations]and [Managing Access Permissions to Your Amazon S3 Resources]. +// For more information about directory bucket policies and permissions, see [Authorizing Regional endpoint APIs with IAM]in +// +// the Amazon S3 User Guide. +// +// Directory buckets - For directory buckets, you must make requests for this API +// +// operation to the Regional endpoint. These endpoints support path-style requests +// in the format https://s3express-control.region-code.amazonaws.com/bucket-name +// . Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. +// +// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is +// s3express-control.region.amazonaws.com . // // GetBucketLifecycleConfiguration has the following special error: // @@ -55,10 +82,13 @@ import ( // // [GetBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html // [Object Lifecycle Management]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html -// [Permissions Related to Bucket Subresource Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources +// [Authorizing Regional endpoint APIs with IAM]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html // [PutBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html // [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html // [DeleteBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html +// +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html func (c *Client) GetBucketLifecycleConfiguration(ctx context.Context, params *GetBucketLifecycleConfigurationInput, optFns ...func(*Options)) (*GetBucketLifecycleConfigurationOutput, error) { if params == nil { params = &GetBucketLifecycleConfigurationInput{} @@ -84,6 +114,9 @@ type GetBucketLifecycleConfigurationInput struct { // The account ID of the expected bucket owner. If the account ID that you provide // does not match the actual owner of the bucket, the request fails with the HTTP // status code 403 Forbidden (access denied). + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. ExpectedBucketOwner *string noSmithyDocumentSerde @@ -100,6 +133,25 @@ type GetBucketLifecycleConfigurationOutput struct { // Container for a lifecycle rule. Rules []types.LifecycleRule + // Indicates which default minimum object size behavior is applied to the + // lifecycle configuration. + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. + // + // - all_storage_classes_128K - Objects smaller than 128 KB will not transition + // to any storage class by default. + // + // - varies_by_storage_class - Objects smaller than 128 KB will transition to + // Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, + // all other storage classes will prevent transitions smaller than 128 KB. + // + // To customize the minimum object size for any transition you can add a filter + // that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body + // of your transition rule. Custom filters always take precedence over the default + // transition behavior. + TransitionDefaultMinimumObjectSize types.TransitionDefaultMinimumObjectSize + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -149,6 +201,9 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(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 } @@ -206,6 +261,18 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go index 6ff8e95779..973f395989 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go @@ -20,7 +20,7 @@ import ( "io" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the Region the bucket resides in. You set the bucket's Region using the // LocationConstraint request parameter in a CreateBucket request. For more @@ -153,6 +153,9 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(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 } @@ -213,6 +216,18 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go index fec538ee64..b774266d32 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the logging status of a bucket and the permissions users have to view // and modify that status. @@ -121,6 +121,9 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(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) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go new file mode 100644 index 0000000000..e3b17f1aee --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go @@ -0,0 +1,239 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package s3 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations" + "github.com/aws/aws-sdk-go-v2/service/s3/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the metadata table configuration for a general purpose bucket. For +// +// more information, see [Accelerating data discovery with S3 Metadata]in the Amazon S3 User Guide. +// +// Permissions To use this operation, you must have the +// s3:GetBucketMetadataTableConfiguration permission. For more information, see [Setting up permissions for configuring metadata tables] +// in the Amazon S3 User Guide. +// +// The following operations are related to GetBucketMetadataTableConfiguration : +// +// [CreateBucketMetadataTableConfiguration] +// +// [DeleteBucketMetadataTableConfiguration] +// +// [Setting up permissions for configuring metadata tables]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html +// [CreateBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataTableConfiguration.html +// [DeleteBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataTableConfiguration.html +// [Accelerating data discovery with S3 Metadata]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html +func (c *Client) GetBucketMetadataTableConfiguration(ctx context.Context, params *GetBucketMetadataTableConfigurationInput, optFns ...func(*Options)) (*GetBucketMetadataTableConfigurationOutput, error) { + if params == nil { + params = &GetBucketMetadataTableConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetBucketMetadataTableConfiguration", params, optFns, c.addOperationGetBucketMetadataTableConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetBucketMetadataTableConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetBucketMetadataTableConfigurationInput struct { + + // The general purpose bucket that contains the metadata table configuration that + // you want to retrieve. + // + // This member is required. + Bucket *string + + // The expected owner of the general purpose bucket that you want to retrieve the + // metadata table configuration from. + ExpectedBucketOwner *string + + noSmithyDocumentSerde +} + +func (in *GetBucketMetadataTableConfigurationInput) bindEndpointParams(p *EndpointParameters) { + + p.Bucket = in.Bucket + p.UseS3ExpressControlEndpoint = ptr.Bool(true) +} + +type GetBucketMetadataTableConfigurationOutput struct { + + // The metadata table configuration for the general purpose bucket. + GetBucketMetadataTableConfigurationResult *types.GetBucketMetadataTableConfigurationResult + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetBucketMetadataTableConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketMetadataTableConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketMetadataTableConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketMetadataTableConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addPutBucketContextMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } + if err = addOpGetBucketMetadataTableConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketMetadataTableConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addMetadataRetrieverMiddleware(stack); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addGetBucketMetadataTableConfigurationUpdateEndpoint(stack, options); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil { + return err + } + if err = disableAcceptEncodingGzip(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func (v *GetBucketMetadataTableConfigurationInput) bucket() (string, bool) { + if v.Bucket == nil { + return "", false + } + return *v.Bucket, true +} + +func newServiceMetadataMiddleware_opGetBucketMetadataTableConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetBucketMetadataTableConfiguration", + } +} + +// getGetBucketMetadataTableConfigurationBucketMember returns a pointer to string +// denoting a provided bucket member valueand a boolean indicating if the input has +// a modeled bucket name, +func getGetBucketMetadataTableConfigurationBucketMember(input interface{}) (*string, bool) { + in := input.(*GetBucketMetadataTableConfigurationInput) + if in.Bucket == nil { + return nil, false + } + return in.Bucket, true +} +func addGetBucketMetadataTableConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error { + return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{ + Accessor: s3cust.UpdateEndpointParameterAccessor{ + GetBucketFromInput: getGetBucketMetadataTableConfigurationBucketMember, + }, + UsePathStyle: options.UsePathStyle, + UseAccelerate: options.UseAccelerate, + SupportsAccelerate: true, + TargetS3ObjectLambda: false, + EndpointResolver: options.EndpointResolver, + EndpointResolverOptions: options.EndpointOptions, + UseARNRegion: options.UseARNRegion, + DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints, + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go index 13cf42f403..a83b72620f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Gets a metrics configuration (specified by the metrics configuration ID) from // the bucket. Note that this doesn't include the daily storage metrics. @@ -138,6 +138,9 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(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 } @@ -195,6 +198,18 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go index 66915f732f..8f744ba308 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the notification configuration of a bucket. // @@ -161,6 +161,9 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(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 } @@ -218,6 +221,18 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go index f8d2486b55..ac69a47343 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you // must have the s3:GetBucketOwnershipControls permission. For more information @@ -121,6 +121,9 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(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 } @@ -178,6 +181,18 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go index 1a2f25193a..0c0a39e710 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go @@ -17,9 +17,10 @@ import ( // // Directory buckets - For directory buckets, you must make requests for this API // operation to the Regional endpoint. These endpoints support path-style requests -// in the format https://s3express-control.region_code.amazonaws.com/bucket-name . -// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in -// the Amazon S3 User Guide. +// in the format https://s3express-control.region-code.amazonaws.com/bucket-name . +// Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions If you are using an identity other than the root user of the Amazon // Web Services account that owns the bucket, the calling identity must both have @@ -56,7 +57,7 @@ import ( // Directory bucket example bucket policies - See [Example bucket policies for S3 Express One Zone] in the Amazon S3 User Guide. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// s3express-control.region.amazonaws.com . +// s3express-control.region-code.amazonaws.com . // // The following action is related to GetBucketPolicy : // @@ -64,9 +65,10 @@ import ( // // [Bucket policy examples]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html // [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [Using Bucket Policies and User Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html // [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInput, optFns ...func(*Options)) (*GetBucketPolicyOutput, error) { if params == nil { @@ -89,12 +91,12 @@ type GetBucketPolicyInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use path-style requests in the format - // https://s3express-control.region_code.amazonaws.com/bucket-name . + // https://s3express-control.region-code.amazonaws.com/bucket-name . // Virtual-hosted-style requests aren't supported. Directory bucket names must be - // unique in the chosen Availability Zone. Bucket names must also follow the format - // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 - // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User - // Guide + // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must + // also follow the format bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide // // Access points - When you use this API operation with an access point, provide // the alias of the access point in place of the bucket name. @@ -186,6 +188,9 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(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 } @@ -243,6 +248,18 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack, if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go index 57cee1fb3f..a5cac1be1c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Retrieves the policy status for an Amazon S3 bucket, indicating whether the // bucket is public. In order to use this operation, you must have the @@ -129,6 +129,9 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(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 } @@ -186,6 +189,18 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware. if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go index 10a0f6a109..fac6ec2d98 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the replication configuration of a bucket. // @@ -136,6 +136,9 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(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 } @@ -193,6 +196,18 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go index 2a4c058428..3398dfc5ff 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the request payment configuration of a bucket. To use this version of // the operation, you must be the bucket owner. For more information, see [Requester Pays Buckets]. @@ -115,6 +115,9 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(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 } @@ -172,6 +175,18 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go index 61c62de03a..6ff16896e0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the tag set associated with the bucket. // @@ -128,6 +128,9 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(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 } @@ -185,6 +188,18 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go index 86fcc67bb8..919cf688c5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the versioning state of a bucket. // @@ -130,6 +130,9 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(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 } @@ -187,6 +190,18 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go index 72254092ae..3758b87895 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the website configuration for a bucket. To host website on Amazon S3, // you can configure a bucket as website by adding a website configuration. For @@ -134,6 +134,9 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(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 } @@ -191,6 +194,18 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go index 618e9e4daa..3b1f59cc7d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go @@ -36,9 +36,10 @@ import ( // /photos/2006/February/sample.jpg . Also, when you make requests to this API // operation, your requests are sent to the Zonal endpoint. These endpoints support // virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style -// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User -// Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about +// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions // - General purpose bucket permissions - You must have the required permissions @@ -79,6 +80,11 @@ import ( // session token automatically to avoid service interruptions when a session // expires. For more information about authorization, see [CreateSession]CreateSession . // +// If the object is encrypted using SSE-KMS, you must also have the +// +// kms:GenerateDataKey and kms:Decrypt permissions in IAM identity-based policies +// and KMS key policies for the KMS key. +// // Storage classes If the object you are retrieving is stored in the S3 Glacier // Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the // S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep @@ -99,6 +105,10 @@ import ( // include the header in your GetObject requests for the object that uses these // types of keys, you’ll get an HTTP 400 Bad Request error. // +// Directory buckets - For directory buckets, there are only two supported options +// for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more +// information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide. +// // Overriding response header values through the request There are times when you // want to override certain response header values of a GetObject response. For // example, you might override the Content-Disposition response header value @@ -134,7 +144,7 @@ import ( // unsigned (anonymous) request. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to GetObject : // @@ -143,12 +153,14 @@ import ( // [GetObjectAcl] // // [RestoreObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html // [ListBuckets]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html // [HTTP Host Header Bucket Specification]: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket // [Restoring Archived Objects]: https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html // [GetObjectAcl]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html // [Specifying permissions in a policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns ...func(*Options)) (*GetObjectOutput, error) { @@ -172,11 +184,12 @@ type GetObjectInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -217,9 +230,10 @@ type GetObjectInput struct { // To retrieve the checksum, this mode must be enabled. // - // In addition, if you enable checksum mode and the object is uploaded with a [checksum] and - // encrypted with an Key Management Service (KMS) key, you must have permission to - // use the kms:Decrypt action to retrieve the checksum. + // General purpose buckets - In addition, if you enable checksum mode and the + // object is uploaded with a [checksum]and encrypted with an Key Management Service (KMS) + // key, you must have permission to use the kms:Decrypt action to retrieve the + // checksum. // // [checksum]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html ChecksumMode types.ChecksumMode @@ -430,21 +444,19 @@ type GetObjectOutput struct { // Indicates whether the object uses an S3 Bucket Key for server-side encryption // with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. BucketKeyEnabled *bool // Specifies caching behavior along the request/reply chain. CacheControl *string - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. For more information, see [Checking object integrity]in the // Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. For more information, see [Checking object integrity]in the // Amazon S3 User Guide. // @@ -506,7 +518,9 @@ type GetObjectOutput struct { // key-value pairs providing object expiration information. The value of the // rule-id is URL-encoded. // - // This functionality is not supported for directory buckets. + // Object expiration information is not returned in directory buckets and this + // header returns the value " NotImplemented " in all responses for directory + // buckets. // // [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html Expiration *string @@ -597,17 +611,11 @@ type GetObjectOutput struct { // This functionality is not supported for directory buckets. SSECustomerKeyMD5 *string - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. + // If present, indicates the ID of the KMS key that was used for object encryption. SSEKMSKeyId *string // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256 , aws:kms , aws:kms:dsse ). - // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. + // S3. ServerSideEncryption types.ServerSideEncryption // Provides storage class information of the object. Amazon S3 returns this header @@ -688,6 +696,9 @@ func (c *Client) addOperationGetObjectMiddlewares(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 } @@ -745,6 +756,18 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go index debdaab0e3..fde39a9696 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the access control list (ACL) of an object. To use this operation, you // must have s3:GetObjectAcl permissions or READ_ACP access to the object. For @@ -179,6 +179,9 @@ func (c *Client) addOperationGetObjectAclMiddlewares(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 } @@ -236,6 +239,18 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go index 98ebb0d7be..ee210cc94f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go @@ -24,21 +24,22 @@ import ( // Directory buckets - For directory buckets, you must make requests for this API // operation to the Zonal endpoint. These endpoints support virtual-hosted-style // requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style -// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User -// Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about +// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions // // - General purpose bucket permissions - To use GetObjectAttributes , you must // have READ access to the object. The permissions that you need to use this -// operation with depend on whether the bucket is versioned. If the bucket is -// versioned, you need both the s3:GetObjectVersion and -// s3:GetObjectVersionAttributes permissions for this operation. If the bucket is -// not versioned, you need the s3:GetObject and s3:GetObjectAttributes -// permissions. For more information, see [Specifying Permissions in a Policy]in the Amazon S3 User Guide. If the -// object that you request does not exist, the error Amazon S3 returns depends on -// whether you also have the s3:ListBucket permission. +// operation depend on whether the bucket is versioned. If the bucket is versioned, +// you need both the s3:GetObjectVersion and s3:GetObjectVersionAttributes +// permissions for this operation. If the bucket is not versioned, you need the +// s3:GetObject and s3:GetObjectAttributes permissions. For more information, see [Specifying Permissions in a Policy] +// in the Amazon S3 User Guide. If the object that you request does not exist, the +// error Amazon S3 returns depends on whether you also have the s3:ListBucket +// permission. // // - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an // HTTP status code 404 Not Found ("no such key") error. @@ -58,6 +59,11 @@ import ( // session token automatically to avoid service interruptions when a session // expires. For more information about authorization, see [CreateSession]CreateSession . // +// If the object is encrypted with SSE-KMS, you must also have the +// +// kms:GenerateDataKey and kms:Decrypt permissions in IAM identity-based policies +// and KMS key policies for the KMS key. +// // Encryption Encryption request headers, like x-amz-server-side-encryption , // should not be sent for HEAD requests if your object uses server-side encryption // with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side @@ -83,8 +89,15 @@ import ( // // For more information about SSE-C, see [Server-Side Encryption (Using Customer-Provided Encryption Keys)] in the Amazon S3 User Guide. // -// Directory bucket permissions - For directory buckets, only server-side -// encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported. +// Directory bucket permissions - For directory buckets, there are only two +// supported options for server-side encryption: server-side encryption with Amazon +// S3 managed keys (SSE-S3) ( AES256 ) and server-side encryption with KMS keys +// (SSE-KMS) ( aws:kms ). We recommend that the bucket's default encryption uses +// the desired encryption configuration and you don't override the bucket default +// encryption in your CreateSession requests or PUT object requests. Then, new +// objects are automatically encrypted with the desired encryption settings. For +// more information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide. For more information about +// the encryption overriding behaviors in directory buckets, see [Specifying server-side encryption with KMS for new object uploads]. // // Versioning Directory buckets - S3 Versioning isn't enabled and supported for // directory buckets. For this API operation, only the null value of the version @@ -114,7 +127,7 @@ import ( // For more information about conditional requests, see [RFC 7232]. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following actions are related to GetObjectAttributes : // @@ -134,19 +147,22 @@ import ( // // [ListParts] // +// [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html // [GetObjectLegalHold]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html // [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html // [Server-Side Encryption (Using Customer-Provided Encryption Keys)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html // [GetObjectTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html // [Specifying Permissions in a Policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html // [RFC 7232]: https://tools.ietf.org/html/rfc7232 +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [HeadObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html // [GetObjectLockConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html +// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html // [GetObjectAcl]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html // [GetObjectRetention]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html // [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html func (c *Client) GetObjectAttributes(ctx context.Context, params *GetObjectAttributesInput, optFns ...func(*Options)) (*GetObjectAttributesOutput, error) { if params == nil { params = &GetObjectAttributesInput{} @@ -168,11 +184,12 @@ type GetObjectAttributesInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -289,7 +306,7 @@ type GetObjectAttributesOutput struct { // of a resource found at a URL. ETag *string - // The creation date of the object. + // Date and time when the object was last modified. LastModified *time.Time // A collection of parts associated with a multipart upload. @@ -369,6 +386,9 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(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 } @@ -426,6 +446,18 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go index 0c39051e5a..f341d2adb7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Gets an object's current legal hold status. For more information, see [Locking Objects]. // @@ -147,6 +147,9 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(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 } @@ -204,6 +207,18 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go index 28ea0fd129..7b34287c81 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Gets the Object Lock configuration for a bucket. The rule specified in the // Object Lock configuration will be applied by default to every new object placed @@ -126,6 +126,9 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(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 } @@ -183,6 +186,18 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middle if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go index 678afb91b2..7a72820ec2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Retrieves an object's retention settings. For more information, see [Locking Objects]. // @@ -147,6 +147,9 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(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 } @@ -204,6 +207,18 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Sta if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go index bd70ccadd6..805d16c22a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns the tag-set of an object. You send the GET request against the tagging // subresource associated with the object. @@ -177,6 +177,9 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(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 } @@ -234,6 +237,18 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go index 5be63e2e33..dc314d663c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go @@ -14,7 +14,7 @@ import ( "io" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns torrent files from a bucket. BitTorrent can save you bandwidth when // you're distributing large files. @@ -145,6 +145,9 @@ func (c *Client) addOperationGetObjectTorrentMiddlewares(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 } @@ -199,6 +202,18 @@ func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go index 3eac86cb6c..bd760d74c0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use // this operation, you must have the s3:GetBucketPublicAccessBlock permission. For @@ -138,6 +138,9 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(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 } @@ -195,6 +198,18 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go index 81a1952857..e98b80c4ec 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go @@ -57,18 +57,21 @@ import ( // User Guide. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // You must make requests for this API operation to the Zonal endpoint. These // endpoints support virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests -// are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style +// requests are not supported. For more information about endpoints in Availability +// Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about endpoints in +// Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html // [REST Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html // [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [Managing access permissions to your Amazon S3 resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html func (c *Client) HeadBucket(ctx context.Context, params *HeadBucketInput, optFns ...func(*Options)) (*HeadBucketOutput, error) { if params == nil { params = &HeadBucketInput{} @@ -90,11 +93,12 @@ type HeadBucketInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -153,8 +157,9 @@ type HeadBucketOutput struct { // The name of the location where the bucket will be created. // - // For directory buckets, the AZ ID of the Availability Zone where the bucket is - // created. An example AZ ID value is usw2-az1 . + // For directory buckets, the Zone ID of the Availability Zone or the Local Zone + // where the bucket is created. An example Zone ID value for an Availability Zone + // is usw2-az1 . // // This functionality is only supported by directory buckets. BucketLocationName *string @@ -216,6 +221,9 @@ func (c *Client) addOperationHeadBucketMiddlewares(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 } @@ -273,6 +281,18 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go index 7f3417b16b..fe72ac6bfe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go @@ -35,7 +35,8 @@ import ( // - General purpose bucket permissions - To use HEAD , you must have the // s3:GetObject permission. You need the relevant read object (or version) // permission for this operation. For more information, see [Actions, resources, and condition keys for Amazon S3]in the Amazon S3 -// User Guide. +// User Guide. For more information about the permissions to S3 API operations by +// S3 resource types, see Required permissions for Amazon S3 API operationsin the Amazon S3 User Guide. // // If the object you request doesn't exist, the error that Amazon S3 returns // @@ -59,6 +60,13 @@ import ( // session token automatically to avoid service interruptions when a session // expires. For more information about authorization, see [CreateSession]CreateSession . // +// If you enable x-amz-checksum-mode in the request and the object is encrypted +// +// with Amazon Web Services Key Management Service (Amazon Web Services KMS), you +// must also have the kms:GenerateDataKey and kms:Decrypt permissions in IAM +// identity-based policies and KMS key policies for the KMS key to retrieve the +// checksum of the object. +// // Encryption Encryption request headers, like x-amz-server-side-encryption , // should not be sent for HEAD requests if your object uses server-side encryption // with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side @@ -84,8 +92,9 @@ import ( // // For more information about SSE-C, see [Server-Side Encryption (Using Customer-Provided Encryption Keys)] in the Amazon S3 User Guide. // -// Directory bucket permissions - For directory buckets, only server-side -// encryption with Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported. +// Directory bucket - For directory buckets, there are only two supported options +// for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more +// information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide. // // Versioning // @@ -96,7 +105,7 @@ import ( // - If the specified version is a delete marker, the response returns a 405 // Method Not Allowed error and the Last-Modified: timestamp response header. // -// - Directory buckets - Delete marker is not supported by directory buckets. +// - Directory buckets - Delete marker is not supported for directory buckets. // // - Directory buckets - S3 Versioning isn't enabled and supported for directory // buckets. For this API operation, only the null value of the version ID is @@ -104,13 +113,14 @@ import ( // query parameter in the request. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // For directory buckets, you must make requests for this API operation to the // Zonal endpoint. These endpoints support virtual-hosted-style requests in the -// format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . -// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon -// S3 User Guide. +// format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name +// . Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about +// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // The following actions are related to HeadObject : // @@ -119,11 +129,13 @@ import ( // [GetObjectAttributes] // // [Server-Side Encryption (Using Customer-Provided Encryption Keys)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [GetObjectAttributes]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html +// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html // [Actions, resources, and condition keys for Amazon S3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html // [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html // [Common Request Headers]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html func (c *Client) HeadObject(ctx context.Context, params *HeadObjectInput, optFns ...func(*Options)) (*HeadObjectOutput, error) { @@ -147,11 +159,12 @@ type HeadObjectInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -187,9 +200,15 @@ type HeadObjectInput struct { // To retrieve the checksum, this parameter must be enabled. // - // In addition, if you enable checksum mode and the object is uploaded with a [checksum] and - // encrypted with an Key Management Service (KMS) key, you must have permission to - // use the kms:Decrypt action to retrieve the checksum. + // General purpose buckets - If you enable checksum mode and the object is + // uploaded with a [checksum]and encrypted with an Key Management Service (KMS) key, you + // must have permission to use the kms:Decrypt action to retrieve the checksum. + // + // Directory buckets - If you enable ChecksumMode and the object is encrypted with + // Amazon Web Services Key Management Service (Amazon Web Services KMS), you must + // also have the kms:GenerateDataKey and kms:Decrypt permissions in IAM + // identity-based policies and KMS key policies for the KMS key to retrieve the + // checksum of the object. // // [checksum]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html ChecksumMode types.ChecksumMode @@ -357,14 +376,12 @@ type HeadObjectOutput struct { // Indicates whether the object uses an S3 Bucket Key for server-side encryption // with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. BucketKeyEnabled *bool // Specifies caching behavior along the request/reply chain. CacheControl *string - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -375,7 +392,7 @@ type HeadObjectOutput struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -440,7 +457,9 @@ type HeadObjectOutput struct { // key-value pairs providing object expiration information. The value of the // rule-id is URL-encoded. // - // This functionality is not supported for directory buckets. + // Object expiration information is not returned in directory buckets and this + // header returns the value " NotImplemented " in all responses for directory + // buckets. // // [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html Expiration *string @@ -583,17 +602,11 @@ type HeadObjectOutput struct { // This functionality is not supported for directory buckets. SSECustomerKeyMD5 *string - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. + // If present, indicates the ID of the KMS key that was used for object encryption. SSEKMSKeyId *string // The server-side encryption algorithm used when you store this object in Amazon // S3 (for example, AES256 , aws:kms , aws:kms:dsse ). - // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. ServerSideEncryption types.ServerSideEncryption // Provides storage class information of the object. Amazon S3 returns this header @@ -668,6 +681,9 @@ func (c *Client) addOperationHeadObjectMiddlewares(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 } @@ -725,6 +741,18 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go index f2ba344395..dd35f119c6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Lists the analytics configurations for the bucket. You can have up to 1,000 // analytics configurations per bucket. @@ -156,6 +156,9 @@ func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(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) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go index 01b66028e1..3f6d19a34a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Lists the S3 Intelligent-Tiering configuration from the specified bucket. // @@ -150,6 +150,9 @@ func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewar if err = 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) addOperationListBucketIntelligentTieringConfigurationsMiddlewar if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go index 889ad02647..5a675d2a9a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns a list of inventory configurations for the bucket. You can have up to // 1,000 analytics configurations per bucket. @@ -158,6 +158,9 @@ func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(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) addOperationListBucketInventoryConfigurationsMiddlewares(stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go index 8a3a080afa..e6484f4b01 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Lists the metrics configurations for the bucket. The metrics configurations are // only for the request metrics of the bucket and do not provide information on @@ -160,6 +160,9 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(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 } @@ -217,6 +220,18 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *m if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go index b047b239c7..d87540829a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go @@ -13,13 +13,22 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns a list of all buckets owned by the authenticated sender of the request. -// To use this operation, you must have the s3:ListAllMyBuckets permission. +// To grant IAM permission to use this operation, you must add the +// s3:ListAllMyBuckets policy action. // // For information about Amazon S3 buckets, see [Creating, configuring, and working with Amazon S3 buckets]. // +// We strongly recommend using only paginated ListBuckets requests. Unpaginated +// ListBuckets requests are only supported for Amazon Web Services accounts set to +// the default general purpose bucket quota of 10,000. If you have an approved +// general purpose bucket quota above 10,000, you must send paginated ListBuckets +// requests to list your account’s buckets. All unpaginated ListBuckets requests +// will be rejected for Amazon Web Services accounts with a general purpose bucket +// quota greater than 10,000. +// // [Creating, configuring, and working with Amazon S3 buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html func (c *Client) ListBuckets(ctx context.Context, params *ListBucketsInput, optFns ...func(*Options)) (*ListBucketsOutput, error) { if params == nil { @@ -38,6 +47,20 @@ func (c *Client) ListBuckets(ctx context.Context, params *ListBucketsInput, optF type ListBucketsInput struct { + // Limits the response to buckets that are located in the specified Amazon Web + // Services Region. The Amazon Web Services Region must be expressed according to + // the Amazon Web Services Region code, such as us-west-2 for the US West (Oregon) + // Region. For a list of the valid values for all of the Amazon Web Services + // Regions, see [Regions and Endpoints]. + // + // Requests made to a Regional endpoint that is different from the bucket-region + // parameter are not supported. For example, if you want to limit the response to + // your buckets in Region us-west-2 , the request must be made to an endpoint in + // Region us-west-2 . + // + // [Regions and Endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region + BucketRegion *string + // ContinuationToken indicates to Amazon S3 that the list is being continued on // this bucket with a token. ContinuationToken is obfuscated and is not a real // key. You can use this ContinuationToken for pagination of the list results. @@ -45,6 +68,11 @@ type ListBucketsInput struct { // Length Constraints: Minimum length of 0. Maximum length of 1024. // // Required: No. + // + // If you specify the bucket-region , prefix , or continuation-token query + // parameters without using max-buckets to set the maximum number of buckets + // returned in the response, Amazon S3 applies a default page size of 10,000 and + // provides a continuation token if there are more buckets. ContinuationToken *string // Maximum number of buckets to be returned in response. When the number is more @@ -52,6 +80,10 @@ type ListBucketsInput struct { // return all the buckets in response. MaxBuckets *int32 + // Limits the response to bucket names that begin with the specified bucket name + // prefix. + Prefix *string + noSmithyDocumentSerde } @@ -69,6 +101,11 @@ type ListBucketsOutput struct { // The owner of the buckets listed. Owner *types.Owner + // If Prefix was sent with the request, it is included in the response. + // + // All bucket names in the response begin with the specified bucket name prefix. + Prefix *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -118,6 +155,9 @@ func (c *Client) addOperationListBucketsMiddlewares(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 } @@ -172,6 +212,18 @@ func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, opt if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go index 8fccf32bc1..ca9ccb587d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go @@ -20,9 +20,10 @@ import ( // // Directory buckets - For directory buckets, you must make requests for this API // operation to the Regional endpoint. These endpoints support path-style requests -// in the format https://s3express-control.region_code.amazonaws.com/bucket-name . -// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in -// the Amazon S3 User Guide. +// in the format https://s3express-control.region-code.amazonaws.com/bucket-name . +// Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions You must have the s3express:ListAllMyDirectoryBuckets permission in // an IAM identity-based policy instead of a bucket policy. Cross-account access to @@ -33,8 +34,12 @@ import ( // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is // s3express-control.region.amazonaws.com . // -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// The BucketRegion response element is not part of the ListDirectoryBuckets +// Response Syntax. +// // [Directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html func (c *Client) ListDirectoryBuckets(ctx context.Context, params *ListDirectoryBucketsInput, optFns ...func(*Options)) (*ListDirectoryBucketsOutput, error) { if params == nil { @@ -130,6 +135,9 @@ func (c *Client) addOperationListDirectoryBucketsMiddlewares(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 } @@ -184,6 +192,18 @@ func (c *Client) addOperationListDirectoryBucketsMiddlewares(stack *middleware.S if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go index e84fae68ac..1c2ecf1dba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go @@ -21,7 +21,7 @@ import ( // you can't delete the bucket until all the in-progress multipart uploads are // aborted or completed. To delete these in-progress multipart uploads, use the // ListMultipartUploads operation to list the in-progress multipart uploads in the -// bucket and use the AbortMultupartUpload operation to abort all the in-progress +// bucket and use the AbortMultipartUpload operation to abort all the in-progress // multipart uploads. // // The ListMultipartUploads operation returns a maximum of 1,000 multipart uploads @@ -46,9 +46,10 @@ import ( // Directory buckets - For directory buckets, you must make requests for this API // operation to the Zonal endpoint. These endpoints support virtual-hosted-style // requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style -// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User -// Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about +// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions // @@ -84,7 +85,7 @@ import ( // uploads aren't sorted lexicographically based on the object keys. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to ListMultipartUploads : // @@ -102,10 +103,11 @@ import ( // [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html // [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html // [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html // [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html // [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html func (c *Client) ListMultipartUploads(ctx context.Context, params *ListMultipartUploadsInput, optFns ...func(*Options)) (*ListMultipartUploadsOutput, error) { if params == nil { @@ -128,11 +130,12 @@ type ListMultipartUploadsInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -388,6 +391,9 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(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 } @@ -445,6 +451,18 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go index 4e1b840ce0..32898706e0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns metadata about all versions of the objects in a bucket. You can also // use request parameters as selection criteria to return metadata about a subset @@ -253,6 +253,9 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(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 } @@ -310,6 +313,18 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Sta if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go index 599f2cad35..de91cd3b5b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go @@ -13,7 +13,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Returns some or all (up to 1,000) of the objects in a bucket. You can use the // request parameters as selection criteria to return a subset of the objects in a @@ -63,11 +63,12 @@ type ListObjectsInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -279,6 +280,9 @@ func (c *Client) addOperationListObjectsMiddlewares(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 } @@ -336,6 +340,18 @@ func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, opt if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go index e3af9b0bff..6ba1083d57 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go @@ -17,10 +17,8 @@ import ( // You can use the request parameters as selection criteria to return a subset of // the objects in a bucket. A 200 OK response can contain valid or invalid XML. // Make sure to design your application to parse the contents of the response and -// handle it appropriately. -// -// For more information about listing objects, see [Listing object keys programmatically] in the Amazon S3 User Guide. -// To get a list of your buckets, see [ListBuckets]. +// handle it appropriately. For more information about listing objects, see [Listing object keys programmatically]in the +// Amazon S3 User Guide. To get a list of your buckets, see [ListBuckets]. // // - General purpose bucket - For general purpose buckets, ListObjectsV2 doesn't // return prefixes that are related only to in-progress multipart uploads. @@ -31,9 +29,10 @@ import ( // - Directory buckets - For directory buckets, you must make requests for this // API operation to the Zonal endpoint. These endpoints support // virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . -// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the -// Amazon S3 User Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information +// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions // @@ -64,7 +63,7 @@ import ( // objects in lexicographical order. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // This section describes the latest revision of this action. We recommend that // you use this revised API operation for application development. For backward @@ -82,13 +81,14 @@ import ( // [ListObjects]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html // [Permissions Related to Bucket Subresource Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources // [Listing object keys programmatically]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [ListBuckets]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html // [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html // [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html // [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html // [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html func (c *Client) ListObjectsV2(ctx context.Context, params *ListObjectsV2Input, optFns ...func(*Options)) (*ListObjectsV2Output, error) { if params == nil { params = &ListObjectsV2Input{} @@ -108,11 +108,12 @@ type ListObjectsV2Input struct { // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -374,6 +375,9 @@ func (c *Client) addOperationListObjectsV2Middlewares(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 } @@ -431,6 +435,18 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go index 9ff3365815..c4a8b61786 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go @@ -33,9 +33,10 @@ import ( // Directory buckets - For directory buckets, you must make requests for this API // operation to the Zonal endpoint. These endpoints support virtual-hosted-style // requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style -// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User -// Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about +// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions // - General purpose bucket permissions - For information about permissions @@ -60,7 +61,7 @@ import ( // expires. For more information about authorization, see [CreateSession]CreateSession . // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to ListParts : // @@ -79,12 +80,13 @@ import ( // [Uploading Objects Using Multipart Upload]: https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html // [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html // [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [GetObjectAttributes]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html // [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html // [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html // [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html // [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html func (c *Client) ListParts(ctx context.Context, params *ListPartsInput, optFns ...func(*Options)) (*ListPartsOutput, error) { @@ -108,11 +110,12 @@ type ListPartsInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -344,6 +347,9 @@ func (c *Client) addOperationListPartsMiddlewares(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 } @@ -401,6 +407,18 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go index 03da71d2e4..737f8bfde9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer // Acceleration is a bucket-level feature that enables you to perform faster data @@ -158,6 +158,9 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(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 } @@ -218,6 +221,18 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack * if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go index 35282558c4..eeac549e33 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Sets the permissions on an existing bucket using access control lists (ACL). // For more information, see [Using ACLs]. To set the ACL of a bucket, you must have the @@ -302,6 +302,9 @@ func (c *Client) addOperationPutBucketAclMiddlewares(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 } @@ -365,6 +368,18 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go index 9d0908613d..ff457d603f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Sets an analytics configuration for the bucket (specified by the analytics // configuration ID). You can have up to 1,000 analytics configurations per bucket. @@ -171,6 +171,9 @@ func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(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 } @@ -228,6 +231,18 @@ func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *m if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go index 6ce434d6f7..9eaa35fe83 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Sets the cors configuration for your bucket. If the configuration exists, // Amazon S3 replaces it. @@ -180,6 +180,9 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(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 } @@ -243,6 +246,18 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, o if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go index bcf0d44096..8584186031 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go @@ -15,19 +15,59 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation configures default encryption and Amazon S3 Bucket Keys for an +// existing bucket. // -// This action uses the encryption subresource to configure default encryption and -// Amazon S3 Bucket Keys for an existing bucket. +// Directory buckets - For directory buckets, you must make requests for this API +// operation to the Regional endpoint. These endpoints support path-style requests +// in the format https://s3express-control.region-code.amazonaws.com/bucket-name . +// Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // By default, all buckets have a default encryption configuration that uses -// server-side encryption with Amazon S3 managed keys (SSE-S3). You can optionally -// configure default encryption for a bucket by using server-side encryption with -// Key Management Service (KMS) keys (SSE-KMS) or dual-layer server-side encryption -// with Amazon Web Services KMS keys (DSSE-KMS). If you specify default encryption -// by using SSE-KMS, you can also configure [Amazon S3 Bucket Keys]. If you use PutBucketEncryption to -// set your [default bucket encryption]to SSE-KMS, you should verify that your KMS key ID is correct. Amazon -// S3 does not validate the KMS key ID provided in PutBucketEncryption requests. +// server-side encryption with Amazon S3 managed keys (SSE-S3). +// +// - General purpose buckets +// +// - You can optionally configure default encryption for a bucket by using +// server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or +// dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). +// If you specify default encryption by using SSE-KMS, you can also configure [Amazon S3 Bucket Keys]. +// For information about the bucket default encryption feature, see [Amazon S3 Bucket Default Encryption]in the +// Amazon S3 User Guide. +// +// - If you use PutBucketEncryption to set your [default bucket encryption]to SSE-KMS, you should verify +// that your KMS key ID is correct. Amazon S3 doesn't validate the KMS key ID +// provided in PutBucketEncryption requests. +// +// - Directory buckets - You can optionally configure default encryption for a +// bucket by using server-side encryption with Key Management Service (KMS) keys +// (SSE-KMS). +// +// - We recommend that the bucket's default encryption uses the desired +// encryption configuration and you don't override the bucket default encryption in +// your CreateSession requests or PUT object requests. Then, new objects are +// automatically encrypted with the desired encryption settings. For more +// information about the encryption overriding behaviors in directory buckets, see [Specifying server-side encryption with KMS for new object uploads] +// . +// +// - Your SSE-KMS configuration can only support 1 [customer managed key]per directory bucket for the +// lifetime of the bucket. The [Amazon Web Services managed key]( aws/s3 ) isn't supported. +// +// - S3 Bucket Keys are always enabled for GET and PUT operations in a directory +// bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy +// SSE-KMS encrypted objects from general purpose buckets to directory buckets, +// from directory buckets to general purpose buckets, or between directory buckets, +// through [CopyObject], [UploadPartCopy], [the Copy operation in Batch Operations], or [the import jobs]. In this case, Amazon S3 makes a call to KMS every time a +// copy request is made for a KMS-encrypted object. +// +// - When you specify an [KMS customer managed key]for encryption in your directory bucket, only use the +// key ID or key ARN. The key alias format of the KMS key isn't supported. +// +// - For directory buckets, if you use PutBucketEncryption to set your [default bucket encryption]to +// SSE-KMS, Amazon S3 validates the KMS key ID provided in PutBucketEncryption +// requests. // // If you're specifying a customer managed KMS key, we recommend using a fully // qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the @@ -38,10 +78,27 @@ import ( // Also, this action requires Amazon Web Services Signature Version 4. For more // information, see [Authenticating Requests (Amazon Web Services Signature Version 4)]. // -// To use this operation, you must have permission to perform the -// s3:PutEncryptionConfiguration action. The bucket owner has this permission by -// default. The bucket owner can grant this permission to others. For more -// information about permissions, see [Permissions Related to Bucket Subresource Operations]and [Managing Access Permissions to Your Amazon S3 Resources] in the Amazon S3 User Guide. +// Permissions +// +// - General purpose bucket permissions - The s3:PutEncryptionConfiguration +// permission is required in a policy. The bucket owner has this permission by +// default. The bucket owner can grant this permission to others. For more +// information about permissions, see [Permissions Related to Bucket Operations]and [Managing Access Permissions to Your Amazon S3 Resources]in the Amazon S3 User Guide. +// +// - Directory bucket permissions - To grant access to this API operation, you +// must have the s3express:PutEncryptionConfiguration permission in an IAM +// identity-based policy instead of a bucket policy. Cross-account access to this +// API operation isn't supported. This operation can only be performed by the +// Amazon Web Services account that owns the resource. For more information about +// directory bucket policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]in the Amazon S3 User Guide. +// +// To set a directory bucket default encryption with SSE-KMS, you must also have +// +// the kms:GenerateDataKey and the kms:Decrypt permissions in IAM identity-based +// policies and KMS key policies for the target KMS key. +// +// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is +// s3express-control.region-code.amazonaws.com . // // The following operations are related to PutBucketEncryption : // @@ -49,13 +106,25 @@ import ( // // [DeleteBucketEncryption] // +// [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html +// [KMS customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk +// [Amazon S3 Bucket Default Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html +// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html +// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html +// [Permissions Related to Bucket Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources +// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html +// [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk +// [Authenticating Requests (Amazon Web Services Signature Version 4)]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html +// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html // [Amazon S3 Bucket Keys]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html // [GetBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html // [DeleteBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html -// [Permissions Related to Bucket Subresource Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources +// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk // [default bucket encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html -// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html -// [Authenticating Requests (Amazon Web Services Signature Version 4)]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html +// [the import jobs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job +// [the Copy operation in Batch Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html func (c *Client) PutBucketEncryption(ctx context.Context, params *PutBucketEncryptionInput, optFns ...func(*Options)) (*PutBucketEncryptionOutput, error) { if params == nil { params = &PutBucketEncryptionInput{} @@ -74,14 +143,18 @@ func (c *Client) PutBucketEncryption(ctx context.Context, params *PutBucketEncry type PutBucketEncryptionInput struct { // Specifies default encryption for a bucket using server-side encryption with - // different key options. By default, all buckets have a default encryption - // configuration that uses server-side encryption with Amazon S3 managed keys - // (SSE-S3). You can optionally configure default encryption for a bucket by using - // server-side encryption with an Amazon Web Services KMS key (SSE-KMS) or a - // customer-provided key (SSE-C). For information about the bucket default - // encryption feature, see [Amazon S3 Bucket Default Encryption]in the Amazon S3 User Guide. + // different key options. // - // [Amazon S3 Bucket Default Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html + // Directory buckets - When you use this operation with a directory bucket, you + // must use path-style requests in the format + // https://s3express-control.region-code.amazonaws.com/bucket-name . + // Virtual-hosted-style requests aren't supported. Directory bucket names must be + // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must + // also follow the format bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide + // + // [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html // // This member is required. Bucket *string @@ -101,6 +174,9 @@ type PutBucketEncryptionInput struct { // If you provide an individual checksum, Amazon S3 ignores any provided // ChecksumAlgorithm parameter. // + // For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the + // default checksum algorithm that's used for performance. + // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumAlgorithm types.ChecksumAlgorithm @@ -109,11 +185,17 @@ type PutBucketEncryptionInput struct { // // For requests made using the Amazon Web Services Command Line Interface (CLI) or // Amazon Web Services SDKs, this field is calculated automatically. + // + // This functionality is not supported for directory buckets. ContentMD5 *string // The account ID of the expected bucket owner. If the account ID that you provide // does not match the actual owner of the bucket, the request fails with the HTTP // status code 403 Forbidden (access denied). + // + // For directory buckets, this header is not supported in this API operation. If + // you specify this header, the request fails with the HTTP status code 501 Not + // Implemented . ExpectedBucketOwner *string noSmithyDocumentSerde @@ -175,6 +257,9 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(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 } @@ -238,6 +323,18 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.St if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go index 5087cdee95..6a11a0946b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can // have up to 1,000 S3 Intelligent-Tiering configurations per bucket. @@ -158,6 +158,9 @@ func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares if err = 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) addOperationPutBucketIntelligentTieringConfigurationMiddlewares if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go index b15df17a15..d4ea335a48 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // This implementation of the PUT action adds an inventory configuration // (identified by the inventory ID) to the bucket. You can have up to 1,000 @@ -180,6 +180,9 @@ func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(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 } @@ -237,6 +240,18 @@ func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *m if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go index 5f20c6d566..24e7f2fa1c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go @@ -15,8 +15,6 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. -// // Creates a new lifecycle configuration for the bucket or replaces an existing // lifecycle configuration. Keep in mind that this will overwrite an existing // lifecycle configuration, so if you want to retain any configuration details, @@ -30,10 +28,23 @@ import ( // prefix, which is supported for backward compatibility. For the related API // description, see [PutBucketLifecycle]. // -// Rules You specify the lifecycle configuration in your request body. The -// lifecycle configuration is specified as XML consisting of one or more rules. An -// Amazon S3 Lifecycle configuration can have up to 1,000 rules. This limit is not -// adjustable. Each rule consists of the following: +// Rules Permissions HTTP Host header syntax You specify the lifecycle +// configuration in your request body. The lifecycle configuration is specified as +// XML consisting of one or more rules. An Amazon S3 Lifecycle configuration can +// have up to 1,000 rules. This limit is not adjustable. +// +// Bucket lifecycle configuration supports specifying a lifecycle rule using an +// object key name prefix, one or more object tags, object size, or any combination +// of these. Accordingly, this section describes the latest API. The previous +// version of the API supported filtering based only on an object key name prefix, +// which is supported for backward compatibility for general purpose buckets. For +// the related API description, see [PutBucketLifecycle]. +// +// Lifecyle configurations for directory buckets only support expiring objects and +// cancelling multipart uploads. Expiring of versioned objects,transitions and tag +// filters are not supported. +// +// A lifecycle rule consists of the following: // // - A filter identifying a subset of objects to which the rule applies. The // filter can be based on a key name prefix, object tags, object size, or any @@ -50,42 +61,67 @@ import ( // // For more information, see [Object Lifecycle Management] and [Lifecycle Configuration Elements]. // -// Permissions By default, all Amazon S3 resources are private, including buckets, -// objects, and related subresources (for example, lifecycle configuration and -// website configuration). Only the resource owner (that is, the Amazon Web -// Services account that created it) can access the resource. The resource owner -// can optionally grant access permissions to others by writing an access policy. -// For this operation, a user must get the s3:PutLifecycleConfiguration permission. +// - General purpose bucket permissions - By default, all Amazon S3 resources +// are private, including buckets, objects, and related subresources (for example, +// lifecycle configuration and website configuration). Only the resource owner +// (that is, the Amazon Web Services account that created it) can access the +// resource. The resource owner can optionally grant access permissions to others +// by writing an access policy. For this operation, a user must have the +// s3:PutLifecycleConfiguration permission. // // You can also explicitly deny permissions. An explicit deny also supersedes any -// other permissions. If you want to block users or accounts from removing or -// deleting objects from your bucket, you must deny them permissions for the -// following actions: // -// - s3:DeleteObject +// other permissions. If you want to block users or accounts from removing or +// deleting objects from your bucket, you must deny them permissions for the +// following actions: +// +// - s3:DeleteObject // -// - s3:DeleteObjectVersion +// - s3:DeleteObjectVersion // -// - s3:PutLifecycleConfiguration +// - s3:PutLifecycleConfiguration // // For more information about permissions, see [Managing Access Permissions to Your Amazon S3 Resources]. // -// The following operations are related to PutBucketLifecycleConfiguration : +// - Directory bucket permissions - You must have the +// s3express:PutLifecycleConfiguration permission in an IAM identity-based policy +// to use this operation. Cross-account access to this API operation isn't +// supported. The resource owner can optionally grant access permissions to others +// by creating a role or user for them as long as they are within the same account +// as the owner and resource. +// +// For more information about directory bucket policies and permissions, see [Authorizing Regional endpoint APIs with IAM]in +// +// the Amazon S3 User Guide. +// +// Directory buckets - For directory buckets, you must make requests for this API // -// [Examples of Lifecycle Configuration] +// operation to the Regional endpoint. These endpoints support path-style requests +// in the format https://s3express-control.region-code.amazonaws.com/bucket-name +// . Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. +// +// Directory buckets - The HTTP Host header syntax is +// s3express-control.region.amazonaws.com . +// +// The following operations are related to PutBucketLifecycleConfiguration : // // [GetBucketLifecycleConfiguration] // // [DeleteBucketLifecycle] // -// [Examples of Lifecycle Configuration]: https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html // [Object Lifecycle Management]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html // [Lifecycle Configuration Elements]: https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html // [GetBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html +// [Authorizing Regional endpoint APIs with IAM]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html // [PutBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html // [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html // [DeleteBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html // [Managing your storage lifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html +// +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html func (c *Client) PutBucketLifecycleConfiguration(ctx context.Context, params *PutBucketLifecycleConfigurationInput, optFns ...func(*Options)) (*PutBucketLifecycleConfigurationOutput, error) { if params == nil { params = &PutBucketLifecycleConfigurationInput{} @@ -124,11 +160,33 @@ type PutBucketLifecycleConfigurationInput struct { // The account ID of the expected bucket owner. If the account ID that you provide // does not match the actual owner of the bucket, the request fails with the HTTP // status code 403 Forbidden (access denied). + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. ExpectedBucketOwner *string // Container for lifecycle rules. You can add as many as 1,000 rules. LifecycleConfiguration *types.BucketLifecycleConfiguration + // Indicates which default minimum object size behavior is applied to the + // lifecycle configuration. + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. + // + // - all_storage_classes_128K - Objects smaller than 128 KB will not transition + // to any storage class by default. + // + // - varies_by_storage_class - Objects smaller than 128 KB will transition to + // Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, + // all other storage classes will prevent transitions smaller than 128 KB. + // + // To customize the minimum object size for any transition you can add a filter + // that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body + // of your transition rule. Custom filters always take precedence over the default + // transition behavior. + TransitionDefaultMinimumObjectSize types.TransitionDefaultMinimumObjectSize + noSmithyDocumentSerde } @@ -139,6 +197,26 @@ func (in *PutBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointPa } type PutBucketLifecycleConfigurationOutput struct { + + // Indicates which default minimum object size behavior is applied to the + // lifecycle configuration. + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. + // + // - all_storage_classes_128K - Objects smaller than 128 KB will not transition + // to any storage class by default. + // + // - varies_by_storage_class - Objects smaller than 128 KB will transition to + // Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, + // all other storage classes will prevent transitions smaller than 128 KB. + // + // To customize the minimum object size for any transition you can add a filter + // that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body + // of your transition rule. Custom filters always take precedence over the default + // transition behavior. + TransitionDefaultMinimumObjectSize types.TransitionDefaultMinimumObjectSize + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -188,6 +266,9 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(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 } @@ -251,6 +332,18 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go index cf2183d0eb..01380c4bac 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Set the logging parameters for a bucket and to specify permissions for who can // view and modify the logging parameters. All logs are saved to buckets in the @@ -187,6 +187,9 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(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 } @@ -250,6 +253,18 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go index 837e7180cc..0cd04f456b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Sets a metrics configuration (specified by the metrics configuration ID) for // the bucket. You can have up to 1,000 metrics configurations per bucket. If @@ -149,6 +149,9 @@ func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(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 } @@ -206,6 +209,18 @@ func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *mid if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go index d6d4e51096..cbc39609f9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Enables notifications of specified events for a bucket. For more information // about event notifications, see [Configuring Event Notifications]. @@ -163,6 +163,9 @@ func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(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 } @@ -220,6 +223,18 @@ func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go index 99e26fd558..7eeb45dac4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this // operation, you must have the s3:PutBucketOwnershipControls permission. For more @@ -129,6 +129,9 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(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 } @@ -192,6 +195,18 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middle if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go index 93f66ab619..4c0c875a6c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go @@ -19,9 +19,10 @@ import ( // // Directory buckets - For directory buckets, you must make requests for this API // operation to the Regional endpoint. These endpoints support path-style requests -// in the format https://s3express-control.region_code.amazonaws.com/bucket-name . -// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in -// the Amazon S3 User Guide. +// in the format https://s3express-control.region-code.amazonaws.com/bucket-name . +// Virtual-hosted-style requests aren't supported. For more information about +// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more +// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions If you are using an identity other than the root user of the Amazon // Web Services account that owns the bucket, the calling identity must both have @@ -58,7 +59,7 @@ import ( // Directory bucket example bucket policies - See [Example bucket policies for S3 Express One Zone] in the Amazon S3 User Guide. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// s3express-control.region.amazonaws.com . +// s3express-control.region-code.amazonaws.com . // // The following operations are related to PutBucketPolicy : // @@ -68,10 +69,11 @@ import ( // // [Bucket policy examples]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html // [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [DeleteBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html // [Using Bucket Policies and User Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html // [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html func (c *Client) PutBucketPolicy(ctx context.Context, params *PutBucketPolicyInput, optFns ...func(*Options)) (*PutBucketPolicyOutput, error) { if params == nil { @@ -94,12 +96,12 @@ type PutBucketPolicyInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use path-style requests in the format - // https://s3express-control.region_code.amazonaws.com/bucket-name . + // https://s3express-control.region-code.amazonaws.com/bucket-name . // Virtual-hosted-style requests aren't supported. Directory bucket names must be - // unique in the chosen Availability Zone. Bucket names must also follow the format - // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 - // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User - // Guide + // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must + // also follow the format bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide // // [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html // @@ -227,6 +229,9 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(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 } @@ -290,6 +295,18 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack, if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go index 2f9d26774f..2655ff2470 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Creates a replication configuration or replaces an existing one. For more // information, see [Replication]in the Amazon S3 User Guide. @@ -198,6 +198,9 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(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 } @@ -261,6 +264,18 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go index e0f9f31ef7..14b2a5b694 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Sets the request payment configuration for a bucket. By default, the bucket // owner pays for downloads from the bucket. This configuration parameter enables @@ -145,6 +145,9 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(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 } @@ -208,6 +211,18 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middlewar if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go index 2ed4fb6a17..5d9761c006 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Sets the tags for a bucket. // @@ -177,6 +177,9 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(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 } @@ -240,6 +243,18 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go index fefdc109d6..fdff8fced5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go @@ -15,11 +15,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // When you enable versioning on a bucket for the first time, it might take a -// short amount of time for the change to be fully propagated. We recommend that -// you wait for 15 minutes after enabling versioning before issuing write +// short amount of time for the change to be fully propagated. While this change is +// propagating, you may encounter intermittent HTTP 404 NoSuchKey errors for +// requests to objects created or updated after enabling versioning. We recommend +// that you wait for 15 minutes after enabling versioning before issuing write // operations ( PUT or DELETE ) on objects in the bucket. // // Sets the versioning state of an existing bucket. @@ -179,6 +181,9 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(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 } @@ -242,6 +247,18 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go index 65a7f39e44..be78f71af5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Sets the configuration of the website that is specified in the website // subresource. To configure a bucket as a website, you can add this subresource on @@ -200,6 +200,9 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(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 } @@ -263,6 +266,18 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go index a5e18d5856..37ea14349a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go @@ -31,9 +31,10 @@ import ( // - Directory buckets - For directory buckets, you must make requests for this // API operation to the Zonal endpoint. These endpoints support // virtual-hosted-style requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . -// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the -// Amazon S3 User Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information +// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Amazon S3 is a distributed system. If it receives multiple write requests for // the same object simultaneously, it overwrites all but the last object written. @@ -81,6 +82,11 @@ import ( // session token automatically to avoid service interruptions when a session // expires. For more information about authorization, see [CreateSession]CreateSession . // +// If the object is encrypted with SSE-KMS, you must also have the +// +// kms:GenerateDataKey and kms:Decrypt permissions in IAM identity-based policies +// and KMS key policies for the KMS key. +// // Data integrity with Content-MD5 // // - General purpose bucket - To ensure that data is not corrupted traversing @@ -94,7 +100,7 @@ import ( // buckets. // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // For more information about related Amazon S3 APIs, see the following: // @@ -104,10 +110,11 @@ import ( // // [Amazon S3 Object Lock]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html // [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [Adding Objects to Versioning-Enabled Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html // [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html // [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [GetBucketVersioning]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html func (c *Client) PutObject(ctx context.Context, params *PutObjectInput, optFns ...func(*Options)) (*PutObjectOutput, error) { if params == nil { @@ -130,11 +137,12 @@ type PutObjectInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -202,13 +210,22 @@ type PutObjectInput struct { // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption // with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). - // Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object - // encryption with SSE-KMS. - // - // Specifying this header with a PUT action doesn’t affect bucket-level settings - // for S3 Bucket Key. // - // This functionality is not supported for directory buckets. + // General purpose buckets - Setting this header to true causes Amazon S3 to use + // an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this + // header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key. + // + // Directory buckets - S3 Bucket Keys are always enabled for GET and PUT + // operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't + // supported, when you copy SSE-KMS encrypted objects from general purpose buckets + // to directory buckets, from directory buckets to general purpose buckets, or + // between directory buckets, through [CopyObject], [UploadPartCopy], [the Copy operation in Batch Operations], or [the import jobs]. In this case, Amazon S3 makes a + // call to KMS every time a copy request is made for a KMS-encrypted object. + // + // [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html + // [the import jobs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job + // [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html + // [the Copy operation in Batch Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops BucketKeyEnabled *bool // Can be used to specify caching behavior along the request/reply chain. For more @@ -242,15 +259,20 @@ type PutObjectInput struct { // parameter and uses the checksum algorithm that matches the provided value in // x-amz-checksum-algorithm . // + // The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any + // request to upload an object with a retention period configured using Amazon S3 + // Object Lock. For more information, see [Uploading objects to an Object Lock enabled bucket]in the Amazon S3 User Guide. + // // For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the // default checksum algorithm that's used for performance. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html + // [Uploading objects to an Object Lock enabled bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object ChecksumAlgorithm types.ChecksumAlgorithm // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html @@ -258,8 +280,8 @@ type PutObjectInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32C checksum of the object. For more information, see [Checking object integrity] - // in the Amazon S3 User Guide. + // base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see + // [Checking object integrity]in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32C *string @@ -307,14 +329,14 @@ type PutObjectInput struct { // optional, we recommend using the Content-MD5 mechanism as an end-to-end // integrity check. For more information about REST request authentication, see [REST Authentication]. // - // The Content-MD5 header is required for any request to upload an object with a - // retention period configured using Amazon S3 Object Lock. For more information - // about Amazon S3 Object Lock, see [Amazon S3 Object Lock Overview]in the Amazon S3 User Guide. + // The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any + // request to upload an object with a retention period configured using Amazon S3 + // Object Lock. For more information, see [Uploading objects to an Object Lock enabled bucket]in the Amazon S3 User Guide. // // This functionality is not supported for directory buckets. // // [REST Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html - // [Amazon S3 Object Lock Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html + // [Uploading objects to an Object Lock enabled bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object ContentMD5 *string // A standard MIME type describing the format of the contents. For more @@ -362,6 +384,23 @@ type PutObjectInput struct { // - This functionality is not supported for Amazon S3 on Outposts. GrantWriteACP *string + // Uploads the object only if the ETag (entity tag) value provided during the + // WRITE operation matches the ETag of the object in S3. If the ETag values do not + // match, the operation returns a 412 Precondition Failed error. + // + // If a conflicting operation occurs during the upload S3 returns a 409 + // ConditionalRequestConflict response. On a 409 failure you should fetch the + // object's ETag and retry the upload. + // + // Expects the ETag value as a string. + // + // For more information about conditional requests, see [RFC 7232], or [Conditional requests] in the Amazon S3 + // User Guide. + // + // [Conditional requests]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html + // [RFC 7232]: https://tools.ietf.org/html/rfc7232 + IfMatch *string + // Uploads the object only if the object key name does not already exist in the // bucket specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error. // @@ -433,46 +472,101 @@ type PutObjectInput struct { // This functionality is not supported for directory buckets. SSECustomerKeyMD5 *string - // Specifies the Amazon Web Services KMS Encryption Context to use for object - // encryption. The value of this header is a base64-encoded UTF-8 string holding - // JSON with the encryption context key-value pairs. This value is stored as object - // metadata and automatically gets passed on to Amazon Web Services KMS for future - // GetObject or CopyObject operations on this object. This value must be - // explicitly added during CopyObject operations. + // Specifies the Amazon Web Services KMS Encryption Context as an additional + // encryption context to use for object encryption. The value of this header is a + // Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption + // context as key-value pairs. This value is stored as object metadata and + // automatically gets passed on to Amazon Web Services KMS for future GetObject + // operations on this object. // - // This functionality is not supported for directory buckets. + // General purpose buckets - This value must be explicitly added during CopyObject + // operations if you want an additional encryption context for your object. For + // more information, see [Encryption context]in the Amazon S3 User Guide. + // + // Directory buckets - You can optionally provide an explicit encryption context + // value. The value must match the default encryption context - the bucket Amazon + // Resource Name (ARN). An additional encryption context value is not supported. + // + // [Encryption context]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context SSEKMSEncryptionContext *string - // If x-amz-server-side-encryption has a valid value of aws:kms or aws:kms:dsse , - // this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key - // Management Service (KMS) symmetric encryption customer managed key that was used - // for the object. If you specify x-amz-server-side-encryption:aws:kms or + // Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object + // encryption. If the KMS key doesn't exist in the same account that's issuing the + // command, you must use the full Key ARN not the Key ID. + // + // General purpose buckets - If you specify x-amz-server-side-encryption with + // aws:kms or aws:kms:dsse , this header specifies the ID (Key ID, Key ARN, or Key + // Alias) of the KMS key to use. If you specify + // x-amz-server-side-encryption:aws:kms or // x-amz-server-side-encryption:aws:kms:dsse , but do not provide // x-amz-server-side-encryption-aws-kms-key-id , Amazon S3 uses the Amazon Web - // Services managed key ( aws/s3 ) to protect the data. If the KMS key does not - // exist in the same account that's issuing the command, you must use the full ARN - // and not just the ID. - // - // This functionality is not supported for directory buckets. + // Services managed key ( aws/s3 ) to protect the data. + // + // Directory buckets - If you specify x-amz-server-side-encryption with aws:kms , + // the x-amz-server-side-encryption-aws-kms-key-id header is implicitly assigned + // the ID of the KMS symmetric encryption customer managed key that's configured + // for your directory bucket's default encryption setting. If you want to specify + // the x-amz-server-side-encryption-aws-kms-key-id header explicitly, you can only + // specify it with the ID (Key ID or Key ARN) of the KMS customer managed key + // that's configured for your directory bucket's default encryption setting. + // Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key + // ARN. The key alias format of the KMS key isn't supported. Your SSE-KMS + // configuration can only support 1 [customer managed key]per directory bucket for the lifetime of the + // bucket. The [Amazon Web Services managed key]( aws/s3 ) isn't supported. + // + // [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk SSEKMSKeyId *string // The server-side encryption algorithm that was used when you store this object // in Amazon S3 (for example, AES256 , aws:kms , aws:kms:dsse ). // - // General purpose buckets - You have four mutually exclusive options to protect - // data using server-side encryption in Amazon S3, depending on how you choose to - // manage the encryption keys. Specifically, the encryption key options are Amazon - // S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), - // and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side - // encryption by using Amazon S3 managed keys (SSE-S3) by default. You can - // optionally tell Amazon S3 to encrypt data at rest by using server-side - // encryption with other key options. For more information, see [Using Server-Side Encryption]in the Amazon S3 - // User Guide. - // - // Directory buckets - For directory buckets, only the server-side encryption with - // Amazon S3 managed keys (SSE-S3) ( AES256 ) value is supported. + // - General purpose buckets - You have four mutually exclusive options to + // protect data using server-side encryption in Amazon S3, depending on how you + // choose to manage the encryption keys. Specifically, the encryption key options + // are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or + // DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with + // server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You + // can optionally tell Amazon S3 to encrypt data at rest by using server-side + // encryption with other key options. For more information, see [Using Server-Side Encryption]in the Amazon S3 + // User Guide. + // + // - Directory buckets - For directory buckets, there are only two supported + // options for server-side encryption: server-side encryption with Amazon S3 + // managed keys (SSE-S3) ( AES256 ) and server-side encryption with KMS keys + // (SSE-KMS) ( aws:kms ). We recommend that the bucket's default encryption uses + // the desired encryption configuration and you don't override the bucket default + // encryption in your CreateSession requests or PUT object requests. Then, new + // objects are automatically encrypted with the desired encryption settings. For + // more information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide. For more information about + // the encryption overriding behaviors in directory buckets, see [Specifying server-side encryption with KMS for new object uploads]. + // + // In the Zonal endpoint API calls (except [CopyObject]and [UploadPartCopy]) using the REST API, the + // encryption request headers must match the encryption settings that are specified + // in the CreateSession request. You can't override the values of the encryption + // settings ( x-amz-server-side-encryption , + // x-amz-server-side-encryption-aws-kms-key-id , + // x-amz-server-side-encryption-context , and + // x-amz-server-side-encryption-bucket-key-enabled ) that are specified in the + // CreateSession request. You don't need to explicitly specify these encryption + // settings values in Zonal endpoint API calls, and Amazon S3 will use the + // encryption settings values from the CreateSession request to protect new + // objects in the directory bucket. + // + // When you use the CLI or the Amazon Web Services SDKs, for CreateSession , the + // session token refreshes automatically to avoid service interruptions when a + // session expires. The CLI or the Amazon Web Services SDKs use the bucket's + // default encryption configuration for the CreateSession request. It's not + // supported to override the encryption settings values in the CreateSession + // request. So in the Zonal endpoint API calls (except [CopyObject]and [UploadPartCopy]), the encryption + // request headers must match the default encryption configuration of the directory + // bucket. // // [Using Server-Side Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html + // [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html + // [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html + // [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html + // [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html ServerSideEncryption types.ServerSideEncryption // By default, Amazon S3 uses the STANDARD Storage Class to store newly created @@ -519,6 +613,14 @@ type PutObjectInput struct { // [Object Key and Metadata]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html WebsiteRedirectLocation *string + // Specifies the offset for appending data to existing objects in bytes. The + // offset must be equal to the size of the existing object being appended to. If no + // object exists, setting this header to 0 will create a new object. + // + // This functionality is only supported for objects in the Amazon S3 Express One + // Zone storage class in directory buckets. + WriteOffsetBytes *int64 + noSmithyDocumentSerde } @@ -533,11 +635,9 @@ type PutObjectOutput struct { // Indicates whether the uploaded object uses an S3 Bucket Key for server-side // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. BucketKeyEnabled *bool - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -548,7 +648,7 @@ type PutObjectOutput struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -597,7 +697,9 @@ type PutObjectOutput struct { // rule-id key-value pairs that provide information about object expiration. The // value of the rule-id is URL-encoded. // - // This functionality is not supported for directory buckets. + // Object expiration information is not returned in directory buckets and this + // header returns the value " NotImplemented " in all responses for directory + // buckets. // // [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html Expiration *string @@ -623,28 +725,26 @@ type PutObjectOutput struct { SSECustomerKeyMD5 *string // If present, indicates the Amazon Web Services KMS Encryption Context to use for - // object encryption. The value of this header is a base64-encoded UTF-8 string - // holding JSON with the encryption context key-value pairs. This value is stored - // as object metadata and automatically gets passed on to Amazon Web Services KMS - // for future GetObject or CopyObject operations on this object. - // - // This functionality is not supported for directory buckets. + // object encryption. The value of this header is a Base64-encoded string of a + // UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + // This value is stored as object metadata and automatically gets passed on to + // Amazon Web Services KMS for future GetObject operations on this object. SSEKMSEncryptionContext *string - // If x-amz-server-side-encryption has a valid value of aws:kms or aws:kms:dsse , - // this header indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. + // If present, indicates the ID of the KMS key that was used for object encryption. SSEKMSKeyId *string // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256 , aws:kms , aws:kms:dsse ). - // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. + // S3. ServerSideEncryption types.ServerSideEncryption + // The size of the object in bytes. This will only be present if you append to an + // object. + // + // This functionality is only supported for objects in the Amazon S3 Express One + // Zone storage class in directory buckets. + Size *int64 + // Version ID of the object. // // If you enable versioning for a bucket, Amazon S3 automatically generates a @@ -709,6 +809,9 @@ func (c *Client) addOperationPutObjectMiddlewares(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 } @@ -775,6 +878,18 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go index b0b50898aa..6c13ee838b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Uses the acl subresource to set the access control list (ACL) permissions for a // new or existing object in an S3 bucket. You must have the WRITE_ACP permission @@ -354,6 +354,9 @@ func (c *Client) addOperationPutObjectAclMiddlewares(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 } @@ -417,6 +420,18 @@ func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, op if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go index cbd9af75ef..be713b88c9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Applies a legal hold configuration to the specified object. For more // information, see [Locking Objects]. @@ -169,6 +169,9 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(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 } @@ -232,6 +235,18 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Sta if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go index 9a737f2853..e1f7930f2e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Places an Object Lock configuration on the specified bucket. The rule specified // in the Object Lock configuration will be applied by default to every new object @@ -160,6 +160,9 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(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 } @@ -223,6 +226,18 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middle if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go index 00709c0774..7c5a611a24 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Places an Object Retention configuration on an object. For more information, // see [Locking Objects]. Users or accounts require the s3:PutObjectRetention permission in order @@ -176,6 +176,9 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(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 } @@ -239,6 +242,18 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Sta if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go index 54485241db..2703eef4ee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go @@ -14,7 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Sets the supplied tag-set to an object that already exists in a bucket. A tag // is a key-value pair. For more information, see [Object Tagging]. @@ -212,6 +212,9 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(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 } @@ -275,6 +278,18 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go index 97b8a8ae9e..d1d05a6f44 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go @@ -15,7 +15,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Creates or modifies the PublicAccessBlock configuration for an Amazon S3 // bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock @@ -163,6 +163,9 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(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 } @@ -226,6 +229,18 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go index 6f168bf2b6..022dad38ee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go @@ -14,11 +14,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This operation is not supported by directory buckets. -// -// The SELECT job type for the RestoreObject operation is no longer available to -// new customers. Existing customers of Amazon S3 Select can continue to use the -// feature as usual. [Learn more] +// This operation is not supported for directory buckets. // // # Restores an archived copy of an object back into Amazon S3 // @@ -154,7 +150,6 @@ import ( // // [GetBucketNotificationConfiguration] // -// [Learn more]: http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/ // [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html // [Object Lifecycle Management]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html // [Permissions Related to Bucket Subresource Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources @@ -319,6 +314,9 @@ func (c *Client) addOperationRestoreObjectMiddlewares(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 } @@ -379,6 +377,18 @@ func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, o if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go index 749cf14c09..b22b0dd0e4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go @@ -14,11 +14,7 @@ import ( "sync" ) -// This operation is not supported by directory buckets. -// -// The SelectObjectContent operation is no longer available to new customers. -// Existing customers of Amazon S3 Select can continue to use the operation as -// usual. [Learn more] +// This operation is not supported for directory buckets. // // This action filters the contents of an Amazon S3 object based on a simple // structured query language (SQL) statement. In the request, along with the SQL @@ -93,17 +89,16 @@ import ( // // [PutBucketLifecycleConfiguration] // -// [Learn more]: http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/ +// [Appendix: SelectObjectContent Response]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html // [Selecting Content from Objects]: https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html // [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html +// [SelectObjectContentRequest - ScanRange]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange // [List of SELECT Object Content Error Codes]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList // [GetBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html // [Using Amazon S3 storage classes]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html // [SELECT Command]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-glacier-select-sql-reference-select.html -// [Specifying Permissions in a Policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html -// [Appendix: SelectObjectContent Response]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html -// [SelectObjectContentRequest - ScanRange]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange // [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html +// [Specifying Permissions in a Policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html // // [Server-Side Encryption (Using Customer-Provided Encryption Keys)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html // [Protecting Data Using Server-Side Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html @@ -279,6 +274,9 @@ func (c *Client) addOperationSelectObjectContentMiddlewares(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 } @@ -330,6 +328,18 @@ func (c *Client) addOperationSelectObjectContentMiddlewares(stack *middleware.St if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go index a1e8078cc4..c4b4de2906 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go @@ -46,9 +46,10 @@ import ( // Directory buckets - For directory buckets, you must make requests for this API // operation to the Zonal endpoint. These endpoints support virtual-hosted-style // requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style -// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User -// Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about +// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Permissions // - General purpose bucket permissions - To perform a multipart upload with @@ -77,6 +78,11 @@ import ( // session token automatically to avoid service interruptions when a session // expires. For more information about authorization, see [CreateSession]CreateSession . // +// If the object is encrypted with SSE-KMS, you must also have the +// +// kms:GenerateDataKey and kms:Decrypt permissions in IAM identity-based policies +// and KMS key policies for the KMS key. +// // Data integrity General purpose bucket - To ensure that data is not corrupted // traversing the network, specify the Content-MD5 header in the upload part // request. Amazon S3 checks the part data against the provided MD5 value. If they @@ -118,10 +124,12 @@ import ( // // - x-amz-server-side-encryption-customer-key-MD5 // -// - Directory bucket - For directory buckets, only server-side encryption with -// Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported. +// For more information, see [Using Server-Side Encryption]in the Amazon S3 User Guide. // -// For more information, see [Using Server-Side Encryption] in the Amazon S3 User Guide. +// - Directory buckets - For directory buckets, there are only two supported +// options for server-side encryption: server-side encryption with Amazon S3 +// managed keys (SSE-S3) ( AES256 ) and server-side encryption with KMS keys +// (SSE-KMS) ( aws:kms ). // // Special errors // @@ -135,7 +143,7 @@ import ( // - SOAP Fault Code Prefix: Client // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to UploadPart : // @@ -151,15 +159,16 @@ import ( // // [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html // [Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version 4)]: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html // [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html // [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [Using Server-Side Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html // [Multipart upload limits]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html // [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html // [Multipart Upload Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html // [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // // [Protecting data using server-side encryption with KMS]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html // [Multipart upload and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html @@ -186,11 +195,12 @@ type UploadPartInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -256,7 +266,7 @@ type UploadPartInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html @@ -264,8 +274,8 @@ type UploadPartInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32C checksum of the object. For more information, see [Checking object integrity] - // in the Amazon S3 User Guide. + // base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see + // [Checking object integrity]in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32C *string @@ -350,11 +360,9 @@ type UploadPartOutput struct { // Indicates whether the multipart upload uses an S3 Bucket Key for server-side // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. BucketKeyEnabled *bool - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -365,7 +373,7 @@ type UploadPartOutput struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -421,17 +429,11 @@ type UploadPartOutput struct { // This functionality is not supported for directory buckets. SSECustomerKeyMD5 *string - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. + // If present, indicates the ID of the KMS key that was used for object encryption. SSEKMSKeyId *string // The server-side encryption algorithm used when you store this object in Amazon // S3 (for example, AES256 , aws:kms ). - // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. ServerSideEncryption types.ServerSideEncryption // Metadata pertaining to the operation's result. @@ -483,6 +485,9 @@ func (c *Client) addOperationUploadPartMiddlewares(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 } @@ -549,6 +554,18 @@ func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, opti if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go index 77c77b2f93..10cc2e748e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go @@ -37,9 +37,10 @@ import ( // Directory buckets - For directory buckets, you must make requests for this API // operation to the Zonal endpoint. These endpoints support virtual-hosted-style // requests in the format -// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style -// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User -// Guide. +// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name . +// Path-style requests are not supported. For more information about endpoints in +// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about +// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide. // // Authentication and authorization All UploadPartCopy requests must be // authenticated and signed by using IAM credentials (access key ID and secret @@ -92,17 +93,36 @@ import ( // the object to the destination. The s3express:SessionMode condition key cannot // be set to ReadOnly on the copy destination. // +// If the object is encrypted with SSE-KMS, you must also have the +// +// kms:GenerateDataKey and kms:Decrypt permissions in IAM identity-based policies +// and KMS key policies for the KMS key. +// // For example policies, see [Example bucket policies for S3 Express One Zone]and [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]in the Amazon S3 User Guide. // // Encryption -// - General purpose buckets - // -// For information about using server-side encryption with customer-provided +// - General purpose buckets - For information about using server-side +// encryption with customer-provided encryption keys with the UploadPartCopy +// operation, see [CopyObject]and [UploadPart]. +// +// - Directory buckets - For directory buckets, there are only two supported +// options for server-side encryption: server-side encryption with Amazon S3 +// managed keys (SSE-S3) ( AES256 ) and server-side encryption with KMS keys +// (SSE-KMS) ( aws:kms ). For more information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide. // -// encryption keys with the UploadPartCopy operation, see [CopyObject]and [UploadPart]. +// For directory buckets, when you perform a CreateMultipartUpload operation and an // -// - Directory buckets - For directory buckets, only server-side encryption with -// Amazon S3 managed keys (SSE-S3) ( AES256 ) is supported. +// UploadPartCopy operation, the request headers you provide in the +// CreateMultipartUpload request must match the default encryption configuration +// of the destination bucket. +// +// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from +// +// general purpose buckets to directory buckets, from directory buckets to general +// purpose buckets, or between directory buckets, through [UploadPartCopy]. In this case, Amazon +// S3 makes a call to KMS every time a copy request is made for a KMS-encrypted +// object. // // Special errors // @@ -121,7 +141,7 @@ import ( // - HTTP Status Code: 400 Bad Request // // HTTP Host header syntax Directory buckets - The HTTP Host header syntax is -// Bucket_name.s3express-az_id.region.amazonaws.com . +// Bucket-name.s3express-zone-id.region-code.amazonaws.com . // // The following operations are related to UploadPartCopy : // @@ -140,11 +160,12 @@ import ( // [Uploading Objects Using Multipart Upload]: https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html // [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html // [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html -// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // [Protecting data using server-side encryption with KMS]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html +// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html // [Multipart upload and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html // [Multipart upload API and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions // [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html +// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html // [Multipart upload limits]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html // [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html @@ -152,9 +173,11 @@ import ( // [REST Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html // [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html // [Operations on Objects]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html +// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html // [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html +// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html // -// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html +// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html func (c *Client) UploadPartCopy(ctx context.Context, params *UploadPartCopyInput, optFns ...func(*Options)) (*UploadPartCopyOutput, error) { if params == nil { params = &UploadPartCopyInput{} @@ -176,11 +199,18 @@ type UploadPartCopyInput struct { // // Directory buckets - When you use this operation with a directory bucket, you // must use virtual-hosted-style requests in the format - // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not - // supported. Directory bucket names must be unique in the chosen Availability - // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for - // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket - // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests + // are not supported. Directory bucket names must be unique in the chosen Zone + // (Availability Zone or Local Zone). Bucket names must follow the format + // bucket-base-name--zone-id--x-s3 (for example, + // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming + // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide. + // + // Copying objects across different Amazon Web Services Regions isn't supported + // when the source or destination bucket is in Amazon Web Services Local Zones. The + // source and destination buckets must have the same parent Amazon Web Services + // Region. Otherwise, you get an HTTP 400 Bad Request error with the error code + // InvalidRequest . // // Access points - When you use this action with an access point, you must provide // the alias of the access point in place of the bucket name or specify the access @@ -421,8 +451,6 @@ type UploadPartCopyOutput struct { // Indicates whether the multipart upload uses an S3 Bucket Key for server-side // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. BucketKeyEnabled *bool // Container for all response elements. @@ -455,17 +483,11 @@ type UploadPartCopyOutput struct { // This functionality is not supported for directory buckets. SSECustomerKeyMD5 *string - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. + // If present, indicates the ID of the KMS key that was used for object encryption. SSEKMSKeyId *string // The server-side encryption algorithm used when you store this object in Amazon // S3 (for example, AES256 , aws:kms ). - // - // For directory buckets, only server-side encryption with Amazon S3 managed keys - // (SSE-S3) ( AES256 ) is supported. ServerSideEncryption types.ServerSideEncryption // Metadata pertaining to the operation's result. @@ -517,6 +539,9 @@ func (c *Client) addOperationUploadPartCopyMiddlewares(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 } @@ -577,6 +602,18 @@ func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack, if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go index 5f065ee791..83c91bafa3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go @@ -18,7 +18,7 @@ import ( "time" ) -// This operation is not supported by directory buckets. +// This operation is not supported for directory buckets. // // Passes transformed objects to a GetObject operation when using Object Lambda // access points. For information about Object Lambda access points, see [Transforming objects with Object Lambda access points]in the @@ -109,7 +109,7 @@ type WriteGetObjectResponseInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This specifies the - // base64-encoded, 32-bit CRC32 checksum of the object returned by the Object + // base64-encoded, 32-bit CRC-32 checksum of the object returned by the Object // Lambda function. This may not match the checksum for the object stored in Amazon // S3. Amazon S3 will perform validation of the checksum values only when the // original GetObject request required checksum validation. For more information @@ -123,7 +123,7 @@ type WriteGetObjectResponseInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This specifies the - // base64-encoded, 32-bit CRC32C checksum of the object returned by the Object + // base64-encoded, 32-bit CRC-32C checksum of the object returned by the Object // Lambda function. This may not match the checksum for the object stored in Amazon // S3. Amazon S3 will perform validation of the checksum values only when the // original GetObject request required checksum validation. For more information @@ -382,6 +382,9 @@ func (c *Client) addOperationWriteGetObjectResponseMiddlewares(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 } @@ -442,6 +445,18 @@ func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go index 3a7bc64afe..6faedcc0b3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/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" ) @@ -179,6 +181,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 { @@ -191,6 +196,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) } @@ -250,7 +258,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") } @@ -260,12 +271,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) } @@ -281,6 +300,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -290,6 +310,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) @@ -310,9 +333,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/s3/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go index 62972c320f..c1ccf10608 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go @@ -20,6 +20,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" @@ -51,6 +52,10 @@ func (m *awsRestxml_deserializeOpAbortMultipartUpload) 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)} @@ -67,6 +72,7 @@ func (m *awsRestxml_deserializeOpAbortMultipartUpload) HandleDeserialize(ctx con return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -141,6 +147,10 @@ func (m *awsRestxml_deserializeOpCompleteMultipartUpload) 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)} @@ -185,6 +195,7 @@ func (m *awsRestxml_deserializeOpCompleteMultipartUpload) HandleDeserialize(ctx } } + span.End() return out, metadata, err } @@ -424,6 +435,10 @@ func (m *awsRestxml_deserializeOpCopyObject) 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)} @@ -468,6 +483,7 @@ func (m *awsRestxml_deserializeOpCopyObject) HandleDeserialize(ctx context.Conte } } + span.End() return out, metadata, err } @@ -632,6 +648,10 @@ func (m *awsRestxml_deserializeOpCreateBucket) 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)} @@ -648,6 +668,7 @@ func (m *awsRestxml_deserializeOpCreateBucket) HandleDeserialize(ctx context.Con return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -710,6 +731,86 @@ func awsRestxml_deserializeOpHttpBindingsCreateBucketOutput(v *CreateBucketOutpu return nil } +type awsRestxml_deserializeOpCreateBucketMetadataTableConfiguration struct { +} + +func (*awsRestxml_deserializeOpCreateBucketMetadataTableConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateBucketMetadataTableConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateBucketMetadataTableConfiguration(response, &metadata) + } + output := &CreateBucketMetadataTableConfigurationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateBucketMetadataTableConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{ + UseStatusCode: true, StatusCode: response.StatusCode, + }) + if err != nil { + return err + } + if hostID := errorComponents.HostID; len(hostID) != 0 { + s3shared.SetHostIDMetadata(metadata, hostID) + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestxml_deserializeOpCreateMultipartUpload struct { } @@ -725,6 +826,10 @@ func (m *awsRestxml_deserializeOpCreateMultipartUpload) 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)} @@ -769,6 +874,7 @@ func (m *awsRestxml_deserializeOpCreateMultipartUpload) HandleDeserialize(ctx co } } + span.End() return out, metadata, err } @@ -967,6 +1073,10 @@ func (m *awsRestxml_deserializeOpCreateSession) 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)} @@ -978,6 +1088,11 @@ func (m *awsRestxml_deserializeOpCreateSession) HandleDeserialize(ctx context.Co output := &CreateSessionOutput{} out.Result = output + err = awsRestxml_deserializeOpHttpBindingsCreateSessionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) @@ -1006,6 +1121,7 @@ func (m *awsRestxml_deserializeOpCreateSession) HandleDeserialize(ctx context.Co } } + span.End() return out, metadata, err } @@ -1052,6 +1168,37 @@ func awsRestxml_deserializeOpErrorCreateSession(response *smithyhttp.Response, m } } +func awsRestxml_deserializeOpHttpBindingsCreateSessionOutput(v *CreateSessionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-server-side-encryption-bucket-key-enabled"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseBool(headerValues[0]) + if err != nil { + return err + } + v.BucketKeyEnabled = ptr.Bool(vv) + } + + if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-server-side-encryption-context"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.SSEKMSEncryptionContext = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-server-side-encryption-aws-kms-key-id"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.SSEKMSKeyId = ptr.String(headerValues[0]) + } + + return nil +} func awsRestxml_deserializeOpDocumentCreateSessionOutput(v **CreateSessionOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -1109,6 +1256,10 @@ func (m *awsRestxml_deserializeOpDeleteBucket) 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)} @@ -1126,6 +1277,7 @@ func (m *awsRestxml_deserializeOpDeleteBucket) HandleDeserialize(ctx context.Con } } + span.End() return out, metadata, err } @@ -1184,6 +1336,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketAnalyticsConfiguration) 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)} @@ -1201,6 +1357,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketAnalyticsConfiguration) HandleDeser } } + span.End() return out, metadata, err } @@ -1259,6 +1416,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketCors) 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)} @@ -1276,6 +1437,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketCors) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -1334,6 +1496,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketEncryption) 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)} @@ -1351,6 +1517,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketEncryption) HandleDeserialize(ctx c } } + span.End() return out, metadata, err } @@ -1409,6 +1576,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketIntelligentTieringConfiguration) Ha return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1426,6 +1597,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketIntelligentTieringConfiguration) Ha } } + span.End() return out, metadata, err } @@ -1484,6 +1656,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketInventoryConfiguration) 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)} @@ -1501,6 +1677,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketInventoryConfiguration) HandleDeser } } + span.End() return out, metadata, err } @@ -1559,6 +1736,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketLifecycle) 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)} @@ -1576,6 +1757,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketLifecycle) HandleDeserialize(ctx co } } + span.End() return out, metadata, err } @@ -1619,6 +1801,86 @@ func awsRestxml_deserializeOpErrorDeleteBucketLifecycle(response *smithyhttp.Res } } +type awsRestxml_deserializeOpDeleteBucketMetadataTableConfiguration struct { +} + +func (*awsRestxml_deserializeOpDeleteBucketMetadataTableConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteBucketMetadataTableConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketMetadataTableConfiguration(response, &metadata) + } + output := &DeleteBucketMetadataTableConfigurationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteBucketMetadataTableConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{ + UseStatusCode: true, StatusCode: response.StatusCode, + }) + if err != nil { + return err + } + if hostID := errorComponents.HostID; len(hostID) != 0 { + s3shared.SetHostIDMetadata(metadata, hostID) + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestxml_deserializeOpDeleteBucketMetricsConfiguration struct { } @@ -1634,6 +1896,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketMetricsConfiguration) 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)} @@ -1651,6 +1917,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketMetricsConfiguration) HandleDeseria } } + span.End() return out, metadata, err } @@ -1709,6 +1976,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketOwnershipControls) 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)} @@ -1726,6 +1997,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketOwnershipControls) HandleDeserializ } } + span.End() return out, metadata, err } @@ -1784,6 +2056,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketPolicy) 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)} @@ -1801,6 +2077,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketPolicy) HandleDeserialize(ctx conte } } + span.End() return out, metadata, err } @@ -1859,6 +2136,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketReplication) 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)} @@ -1876,6 +2157,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketReplication) HandleDeserialize(ctx } } + span.End() return out, metadata, err } @@ -1934,6 +2216,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketTagging) 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)} @@ -1951,6 +2237,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketTagging) HandleDeserialize(ctx cont } } + span.End() return out, metadata, err } @@ -2009,6 +2296,10 @@ func (m *awsRestxml_deserializeOpDeleteBucketWebsite) 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)} @@ -2026,6 +2317,7 @@ func (m *awsRestxml_deserializeOpDeleteBucketWebsite) HandleDeserialize(ctx cont } } + span.End() return out, metadata, err } @@ -2084,6 +2376,10 @@ func (m *awsRestxml_deserializeOpDeleteObject) 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)} @@ -2100,6 +2396,7 @@ func (m *awsRestxml_deserializeOpDeleteObject) HandleDeserialize(ctx context.Con return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -2185,6 +2482,10 @@ func (m *awsRestxml_deserializeOpDeleteObjects) 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)} @@ -2229,6 +2530,7 @@ func (m *awsRestxml_deserializeOpDeleteObjects) HandleDeserialize(ctx context.Co } } + span.End() return out, metadata, err } @@ -2347,6 +2649,10 @@ func (m *awsRestxml_deserializeOpDeleteObjectTagging) 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)} @@ -2363,6 +2669,7 @@ func (m *awsRestxml_deserializeOpDeleteObjectTagging) HandleDeserialize(ctx cont return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -2434,6 +2741,10 @@ func (m *awsRestxml_deserializeOpDeletePublicAccessBlock) 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)} @@ -2451,6 +2762,7 @@ func (m *awsRestxml_deserializeOpDeletePublicAccessBlock) HandleDeserialize(ctx } } + span.End() return out, metadata, err } @@ -2509,6 +2821,10 @@ func (m *awsRestxml_deserializeOpGetBucketAccelerateConfiguration) 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)} @@ -2553,6 +2869,7 @@ func (m *awsRestxml_deserializeOpGetBucketAccelerateConfiguration) HandleDeseria } } + span.End() return out, metadata, err } @@ -2672,6 +2989,10 @@ func (m *awsRestxml_deserializeOpGetBucketAcl) 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)} @@ -2711,6 +3032,7 @@ func (m *awsRestxml_deserializeOpGetBucketAcl) HandleDeserialize(ctx context.Con } } + span.End() return out, metadata, err } @@ -2817,6 +3139,10 @@ func (m *awsRestxml_deserializeOpGetBucketAnalyticsConfiguration) 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)} @@ -2856,6 +3182,7 @@ func (m *awsRestxml_deserializeOpGetBucketAnalyticsConfiguration) HandleDeserial } } + span.End() return out, metadata, err } @@ -2956,6 +3283,10 @@ func (m *awsRestxml_deserializeOpGetBucketCors) 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)} @@ -2995,6 +3326,7 @@ func (m *awsRestxml_deserializeOpGetBucketCors) HandleDeserialize(ctx context.Co } } + span.End() return out, metadata, err } @@ -3095,6 +3427,10 @@ func (m *awsRestxml_deserializeOpGetBucketEncryption) 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)} @@ -3134,6 +3470,7 @@ func (m *awsRestxml_deserializeOpGetBucketEncryption) HandleDeserialize(ctx cont } } + span.End() return out, metadata, err } @@ -3234,6 +3571,10 @@ func (m *awsRestxml_deserializeOpGetBucketIntelligentTieringConfiguration) 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)} @@ -3273,6 +3614,7 @@ func (m *awsRestxml_deserializeOpGetBucketIntelligentTieringConfiguration) Handl } } + span.End() return out, metadata, err } @@ -3373,6 +3715,10 @@ func (m *awsRestxml_deserializeOpGetBucketInventoryConfiguration) 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)} @@ -3412,6 +3758,7 @@ func (m *awsRestxml_deserializeOpGetBucketInventoryConfiguration) HandleDeserial } } + span.End() return out, metadata, err } @@ -3512,6 +3859,10 @@ func (m *awsRestxml_deserializeOpGetBucketLifecycleConfiguration) 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)} @@ -3523,6 +3874,11 @@ func (m *awsRestxml_deserializeOpGetBucketLifecycleConfiguration) HandleDeserial output := &GetBucketLifecycleConfigurationOutput{} out.Result = output + err = awsRestxml_deserializeOpHttpBindingsGetBucketLifecycleConfigurationOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) @@ -3551,6 +3907,7 @@ func (m *awsRestxml_deserializeOpGetBucketLifecycleConfiguration) HandleDeserial } } + span.End() return out, metadata, err } @@ -3594,6 +3951,18 @@ func awsRestxml_deserializeOpErrorGetBucketLifecycleConfiguration(response *smit } } +func awsRestxml_deserializeOpHttpBindingsGetBucketLifecycleConfigurationOutput(v *GetBucketLifecycleConfigurationOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-transition-default-minimum-object-size"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.TransitionDefaultMinimumObjectSize = types.TransitionDefaultMinimumObjectSize(headerValues[0]) + } + + return nil +} func awsRestxml_deserializeOpDocumentGetBucketLifecycleConfigurationOutput(v **GetBucketLifecycleConfigurationOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3651,6 +4020,10 @@ func (m *awsRestxml_deserializeOpGetBucketLocation) 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)} @@ -3690,6 +4063,7 @@ func (m *awsRestxml_deserializeOpGetBucketLocation) HandleDeserialize(ctx contex } } + span.End() return out, metadata, err } @@ -3797,6 +4171,10 @@ func (m *awsRestxml_deserializeOpGetBucketLogging) 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)} @@ -3836,6 +4214,7 @@ func (m *awsRestxml_deserializeOpGetBucketLogging) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -3921,6 +4300,150 @@ func awsRestxml_deserializeOpDocumentGetBucketLoggingOutput(v **GetBucketLogging return nil } +type awsRestxml_deserializeOpGetBucketMetadataTableConfiguration struct { +} + +func (*awsRestxml_deserializeOpGetBucketMetadataTableConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetBucketMetadataTableConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetBucketMetadataTableConfiguration(response, &metadata) + } + output := &GetBucketMetadataTableConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentGetBucketMetadataTableConfigurationResult(&output.GetBucketMetadataTableConfigurationResult, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetBucketMetadataTableConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{ + UseStatusCode: true, StatusCode: response.StatusCode, + }) + if err != nil { + return err + } + if hostID := errorComponents.HostID; len(hostID) != 0 { + s3shared.SetHostIDMetadata(metadata, hostID) + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetBucketMetadataTableConfigurationOutput(v **GetBucketMetadataTableConfigurationOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetBucketMetadataTableConfigurationOutput + if *v == nil { + sv = &GetBucketMetadataTableConfigurationOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("GetBucketMetadataTableConfigurationResult", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentGetBucketMetadataTableConfigurationResult(&sv.GetBucketMetadataTableConfigurationResult, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + type awsRestxml_deserializeOpGetBucketMetricsConfiguration struct { } @@ -3936,6 +4459,10 @@ func (m *awsRestxml_deserializeOpGetBucketMetricsConfiguration) 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)} @@ -3975,6 +4502,7 @@ func (m *awsRestxml_deserializeOpGetBucketMetricsConfiguration) HandleDeserializ } } + span.End() return out, metadata, err } @@ -4075,6 +4603,10 @@ func (m *awsRestxml_deserializeOpGetBucketNotificationConfiguration) 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)} @@ -4114,6 +4646,7 @@ func (m *awsRestxml_deserializeOpGetBucketNotificationConfiguration) HandleDeser } } + span.End() return out, metadata, err } @@ -4232,6 +4765,10 @@ func (m *awsRestxml_deserializeOpGetBucketOwnershipControls) 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)} @@ -4271,6 +4808,7 @@ func (m *awsRestxml_deserializeOpGetBucketOwnershipControls) HandleDeserialize(c } } + span.End() return out, metadata, err } @@ -4371,6 +4909,10 @@ func (m *awsRestxml_deserializeOpGetBucketPolicy) 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)} @@ -4387,6 +4929,7 @@ func (m *awsRestxml_deserializeOpGetBucketPolicy) HandleDeserialize(ctx context. return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} } + span.End() return out, metadata, err } @@ -4466,6 +5009,10 @@ func (m *awsRestxml_deserializeOpGetBucketPolicyStatus) 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)} @@ -4505,6 +5052,7 @@ func (m *awsRestxml_deserializeOpGetBucketPolicyStatus) HandleDeserialize(ctx co } } + span.End() return out, metadata, err } @@ -4605,6 +5153,10 @@ func (m *awsRestxml_deserializeOpGetBucketReplication) 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)} @@ -4644,6 +5196,7 @@ func (m *awsRestxml_deserializeOpGetBucketReplication) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -4744,6 +5297,10 @@ func (m *awsRestxml_deserializeOpGetBucketRequestPayment) 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)} @@ -4783,6 +5340,7 @@ func (m *awsRestxml_deserializeOpGetBucketRequestPayment) HandleDeserialize(ctx } } + span.End() return out, metadata, err } @@ -4890,6 +5448,10 @@ func (m *awsRestxml_deserializeOpGetBucketTagging) 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)} @@ -4929,6 +5491,7 @@ func (m *awsRestxml_deserializeOpGetBucketTagging) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -5029,6 +5592,10 @@ func (m *awsRestxml_deserializeOpGetBucketVersioning) 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)} @@ -5068,6 +5635,7 @@ func (m *awsRestxml_deserializeOpGetBucketVersioning) HandleDeserialize(ctx cont } } + span.End() return out, metadata, err } @@ -5188,6 +5756,10 @@ func (m *awsRestxml_deserializeOpGetBucketWebsite) 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)} @@ -5227,6 +5799,7 @@ func (m *awsRestxml_deserializeOpGetBucketWebsite) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -5345,6 +5918,10 @@ func (m *awsRestxml_deserializeOpGetObject) 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)} @@ -5366,6 +5943,7 @@ func (m *awsRestxml_deserializeOpGetObject) HandleDeserialize(ctx context.Contex return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} } + span.End() return out, metadata, err } @@ -5666,6 +6244,10 @@ func (m *awsRestxml_deserializeOpGetObjectAcl) 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)} @@ -5710,6 +6292,7 @@ func (m *awsRestxml_deserializeOpGetObjectAcl) HandleDeserialize(ctx context.Con } } + span.End() return out, metadata, err } @@ -5831,6 +6414,10 @@ func (m *awsRestxml_deserializeOpGetObjectAttributes) 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)} @@ -5875,6 +6462,7 @@ func (m *awsRestxml_deserializeOpGetObjectAttributes) HandleDeserialize(ctx cont } } + span.End() return out, metadata, err } @@ -6062,6 +6650,10 @@ func (m *awsRestxml_deserializeOpGetObjectLegalHold) 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)} @@ -6101,6 +6693,7 @@ func (m *awsRestxml_deserializeOpGetObjectLegalHold) HandleDeserialize(ctx conte } } + span.End() return out, metadata, err } @@ -6201,6 +6794,10 @@ func (m *awsRestxml_deserializeOpGetObjectLockConfiguration) 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)} @@ -6240,6 +6837,7 @@ func (m *awsRestxml_deserializeOpGetObjectLockConfiguration) HandleDeserialize(c } } + span.End() return out, metadata, err } @@ -6340,6 +6938,10 @@ func (m *awsRestxml_deserializeOpGetObjectRetention) 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)} @@ -6379,6 +6981,7 @@ func (m *awsRestxml_deserializeOpGetObjectRetention) HandleDeserialize(ctx conte } } + span.End() return out, metadata, err } @@ -6479,6 +7082,10 @@ func (m *awsRestxml_deserializeOpGetObjectTagging) 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)} @@ -6523,6 +7130,7 @@ func (m *awsRestxml_deserializeOpGetObjectTagging) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -6635,6 +7243,10 @@ func (m *awsRestxml_deserializeOpGetObjectTorrent) 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)} @@ -6656,6 +7268,7 @@ func (m *awsRestxml_deserializeOpGetObjectTorrent) HandleDeserialize(ctx context return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} } + span.End() return out, metadata, err } @@ -6734,6 +7347,10 @@ func (m *awsRestxml_deserializeOpGetPublicAccessBlock) 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)} @@ -6773,6 +7390,7 @@ func (m *awsRestxml_deserializeOpGetPublicAccessBlock) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -6873,6 +7491,10 @@ func (m *awsRestxml_deserializeOpHeadBucket) 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)} @@ -6889,6 +7511,7 @@ func (m *awsRestxml_deserializeOpHeadBucket) HandleDeserialize(ctx context.Conte return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -6982,6 +7605,10 @@ func (m *awsRestxml_deserializeOpHeadObject) 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)} @@ -6998,6 +7625,7 @@ func (m *awsRestxml_deserializeOpHeadObject) HandleDeserialize(ctx context.Conte return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -7279,6 +7907,10 @@ func (m *awsRestxml_deserializeOpListBucketAnalyticsConfigurations) 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)} @@ -7318,6 +7950,7 @@ func (m *awsRestxml_deserializeOpListBucketAnalyticsConfigurations) HandleDeseri } } + span.End() return out, metadata, err } @@ -7460,6 +8093,10 @@ func (m *awsRestxml_deserializeOpListBucketIntelligentTieringConfigurations) 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)} @@ -7499,6 +8136,7 @@ func (m *awsRestxml_deserializeOpListBucketIntelligentTieringConfigurations) Han } } + span.End() return out, metadata, err } @@ -7641,6 +8279,10 @@ func (m *awsRestxml_deserializeOpListBucketInventoryConfigurations) 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)} @@ -7680,6 +8322,7 @@ func (m *awsRestxml_deserializeOpListBucketInventoryConfigurations) HandleDeseri } } + span.End() return out, metadata, err } @@ -7822,6 +8465,10 @@ func (m *awsRestxml_deserializeOpListBucketMetricsConfigurations) 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)} @@ -7861,6 +8508,7 @@ func (m *awsRestxml_deserializeOpListBucketMetricsConfigurations) HandleDeserial } } + span.End() return out, metadata, err } @@ -8003,6 +8651,10 @@ func (m *awsRestxml_deserializeOpListBuckets) 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)} @@ -8042,6 +8694,7 @@ func (m *awsRestxml_deserializeOpListBuckets) HandleDeserialize(ctx context.Cont } } + span.End() return out, metadata, err } @@ -8132,6 +8785,19 @@ func awsRestxml_deserializeOpDocumentListBucketsOutput(v **ListBucketsOutput, de return err } + case strings.EqualFold("Prefix", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Prefix = ptr.String(xtv) + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -8161,6 +8827,10 @@ func (m *awsRestxml_deserializeOpListDirectoryBuckets) 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)} @@ -8200,6 +8870,7 @@ func (m *awsRestxml_deserializeOpListDirectoryBuckets) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -8313,6 +8984,10 @@ func (m *awsRestxml_deserializeOpListMultipartUploads) 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)} @@ -8357,6 +9032,7 @@ func (m *awsRestxml_deserializeOpListMultipartUploads) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -8612,6 +9288,10 @@ func (m *awsRestxml_deserializeOpListObjects) 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)} @@ -8656,6 +9336,7 @@ func (m *awsRestxml_deserializeOpListObjects) HandleDeserialize(ctx context.Cont } } + span.End() return out, metadata, err } @@ -8888,6 +9569,10 @@ func (m *awsRestxml_deserializeOpListObjectsV2) 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)} @@ -8932,6 +9617,7 @@ func (m *awsRestxml_deserializeOpListObjectsV2) HandleDeserialize(ctx context.Co } } + span.End() return out, metadata, err } @@ -9194,6 +9880,10 @@ func (m *awsRestxml_deserializeOpListObjectVersions) 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)} @@ -9238,6 +9928,7 @@ func (m *awsRestxml_deserializeOpListObjectVersions) HandleDeserialize(ctx conte } } + span.End() return out, metadata, err } @@ -9499,6 +10190,10 @@ func (m *awsRestxml_deserializeOpListParts) 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)} @@ -9543,6 +10238,7 @@ func (m *awsRestxml_deserializeOpListParts) HandleDeserialize(ctx context.Contex } } + span.End() return out, metadata, err } @@ -9805,6 +10501,10 @@ func (m *awsRestxml_deserializeOpPutBucketAccelerateConfiguration) 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)} @@ -9822,6 +10522,7 @@ func (m *awsRestxml_deserializeOpPutBucketAccelerateConfiguration) HandleDeseria } } + span.End() return out, metadata, err } @@ -9880,6 +10581,10 @@ func (m *awsRestxml_deserializeOpPutBucketAcl) 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)} @@ -9897,6 +10602,7 @@ func (m *awsRestxml_deserializeOpPutBucketAcl) HandleDeserialize(ctx context.Con } } + span.End() return out, metadata, err } @@ -9955,6 +10661,10 @@ func (m *awsRestxml_deserializeOpPutBucketAnalyticsConfiguration) 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)} @@ -9972,6 +10682,7 @@ func (m *awsRestxml_deserializeOpPutBucketAnalyticsConfiguration) HandleDeserial } } + span.End() return out, metadata, err } @@ -10030,6 +10741,10 @@ func (m *awsRestxml_deserializeOpPutBucketCors) 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)} @@ -10047,6 +10762,7 @@ func (m *awsRestxml_deserializeOpPutBucketCors) HandleDeserialize(ctx context.Co } } + span.End() return out, metadata, err } @@ -10105,6 +10821,10 @@ func (m *awsRestxml_deserializeOpPutBucketEncryption) 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)} @@ -10122,6 +10842,7 @@ func (m *awsRestxml_deserializeOpPutBucketEncryption) HandleDeserialize(ctx cont } } + span.End() return out, metadata, err } @@ -10180,6 +10901,10 @@ func (m *awsRestxml_deserializeOpPutBucketIntelligentTieringConfiguration) 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)} @@ -10197,6 +10922,7 @@ func (m *awsRestxml_deserializeOpPutBucketIntelligentTieringConfiguration) Handl } } + span.End() return out, metadata, err } @@ -10255,6 +10981,10 @@ func (m *awsRestxml_deserializeOpPutBucketInventoryConfiguration) 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)} @@ -10272,6 +11002,7 @@ func (m *awsRestxml_deserializeOpPutBucketInventoryConfiguration) HandleDeserial } } + span.End() return out, metadata, err } @@ -10330,6 +11061,10 @@ func (m *awsRestxml_deserializeOpPutBucketLifecycleConfiguration) 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)} @@ -10341,12 +11076,12 @@ func (m *awsRestxml_deserializeOpPutBucketLifecycleConfiguration) HandleDeserial output := &PutBucketLifecycleConfigurationOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } + err = awsRestxml_deserializeOpHttpBindingsPutBucketLifecycleConfigurationOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -10390,6 +11125,19 @@ func awsRestxml_deserializeOpErrorPutBucketLifecycleConfiguration(response *smit } } +func awsRestxml_deserializeOpHttpBindingsPutBucketLifecycleConfigurationOutput(v *PutBucketLifecycleConfigurationOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-transition-default-minimum-object-size"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.TransitionDefaultMinimumObjectSize = types.TransitionDefaultMinimumObjectSize(headerValues[0]) + } + + return nil +} + type awsRestxml_deserializeOpPutBucketLogging struct { } @@ -10405,6 +11153,10 @@ func (m *awsRestxml_deserializeOpPutBucketLogging) 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)} @@ -10422,6 +11174,7 @@ func (m *awsRestxml_deserializeOpPutBucketLogging) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -10480,6 +11233,10 @@ func (m *awsRestxml_deserializeOpPutBucketMetricsConfiguration) 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)} @@ -10497,6 +11254,7 @@ func (m *awsRestxml_deserializeOpPutBucketMetricsConfiguration) HandleDeserializ } } + span.End() return out, metadata, err } @@ -10555,6 +11313,10 @@ func (m *awsRestxml_deserializeOpPutBucketNotificationConfiguration) 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)} @@ -10572,6 +11334,7 @@ func (m *awsRestxml_deserializeOpPutBucketNotificationConfiguration) HandleDeser } } + span.End() return out, metadata, err } @@ -10630,6 +11393,10 @@ func (m *awsRestxml_deserializeOpPutBucketOwnershipControls) 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)} @@ -10647,6 +11414,7 @@ func (m *awsRestxml_deserializeOpPutBucketOwnershipControls) HandleDeserialize(c } } + span.End() return out, metadata, err } @@ -10705,6 +11473,10 @@ func (m *awsRestxml_deserializeOpPutBucketPolicy) 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)} @@ -10722,6 +11494,7 @@ func (m *awsRestxml_deserializeOpPutBucketPolicy) HandleDeserialize(ctx context. } } + span.End() return out, metadata, err } @@ -10780,6 +11553,10 @@ func (m *awsRestxml_deserializeOpPutBucketReplication) 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)} @@ -10797,6 +11574,7 @@ func (m *awsRestxml_deserializeOpPutBucketReplication) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -10855,6 +11633,10 @@ func (m *awsRestxml_deserializeOpPutBucketRequestPayment) 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)} @@ -10872,6 +11654,7 @@ func (m *awsRestxml_deserializeOpPutBucketRequestPayment) HandleDeserialize(ctx } } + span.End() return out, metadata, err } @@ -10930,6 +11713,10 @@ func (m *awsRestxml_deserializeOpPutBucketTagging) 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)} @@ -10947,6 +11734,7 @@ func (m *awsRestxml_deserializeOpPutBucketTagging) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -11005,6 +11793,10 @@ func (m *awsRestxml_deserializeOpPutBucketVersioning) 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)} @@ -11022,6 +11814,7 @@ func (m *awsRestxml_deserializeOpPutBucketVersioning) HandleDeserialize(ctx cont } } + span.End() return out, metadata, err } @@ -11080,6 +11873,10 @@ func (m *awsRestxml_deserializeOpPutBucketWebsite) 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)} @@ -11097,6 +11894,7 @@ func (m *awsRestxml_deserializeOpPutBucketWebsite) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -11155,6 +11953,10 @@ func (m *awsRestxml_deserializeOpPutObject) 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)} @@ -11171,6 +11973,7 @@ func (m *awsRestxml_deserializeOpPutObject) HandleDeserialize(ctx context.Contex return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -11204,6 +12007,18 @@ func awsRestxml_deserializeOpErrorPutObject(response *smithyhttp.Response, metad } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("EncryptionTypeMismatch", errorCode): + return awsRestxml_deserializeErrorEncryptionTypeMismatch(response, errorBody) + + case strings.EqualFold("InvalidRequest", errorCode): + return awsRestxml_deserializeErrorInvalidRequest(response, errorBody) + + case strings.EqualFold("InvalidWriteOffset", errorCode): + return awsRestxml_deserializeErrorInvalidWriteOffset(response, errorBody) + + case strings.EqualFold("TooManyParts", errorCode): + return awsRestxml_deserializeErrorTooManyParts(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11263,9 +12078,18 @@ func awsRestxml_deserializeOpHttpBindingsPutObjectOutput(v *PutObjectOutput, res v.RequestCharged = types.RequestCharged(headerValues[0]) } - if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 { + if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-object-size"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 64) + if err != nil { + return err + } + v.Size = ptr.Int64(vv) } if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-algorithm"); len(headerValues) != 0 { @@ -11311,6 +12135,10 @@ func (m *awsRestxml_deserializeOpPutObjectAcl) 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)} @@ -11327,6 +12155,7 @@ func (m *awsRestxml_deserializeOpPutObjectAcl) HandleDeserialize(ctx context.Con return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -11401,6 +12230,10 @@ func (m *awsRestxml_deserializeOpPutObjectLegalHold) 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)} @@ -11417,6 +12250,7 @@ func (m *awsRestxml_deserializeOpPutObjectLegalHold) HandleDeserialize(ctx conte return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -11488,6 +12322,10 @@ func (m *awsRestxml_deserializeOpPutObjectLockConfiguration) 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)} @@ -11504,6 +12342,7 @@ func (m *awsRestxml_deserializeOpPutObjectLockConfiguration) HandleDeserialize(c return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -11575,6 +12414,10 @@ func (m *awsRestxml_deserializeOpPutObjectRetention) 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)} @@ -11591,6 +12434,7 @@ func (m *awsRestxml_deserializeOpPutObjectRetention) HandleDeserialize(ctx conte return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -11662,6 +12506,10 @@ func (m *awsRestxml_deserializeOpPutObjectTagging) 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)} @@ -11678,6 +12526,7 @@ func (m *awsRestxml_deserializeOpPutObjectTagging) HandleDeserialize(ctx context return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -11749,6 +12598,10 @@ func (m *awsRestxml_deserializeOpPutPublicAccessBlock) 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)} @@ -11766,6 +12619,7 @@ func (m *awsRestxml_deserializeOpPutPublicAccessBlock) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -11824,6 +12678,10 @@ func (m *awsRestxml_deserializeOpRestoreObject) 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)} @@ -11840,6 +12698,7 @@ func (m *awsRestxml_deserializeOpRestoreObject) HandleDeserialize(ctx context.Co return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -11919,6 +12778,10 @@ func (m *awsRestxml_deserializeOpSelectObjectContent) 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)} @@ -11930,6 +12793,7 @@ func (m *awsRestxml_deserializeOpSelectObjectContent) HandleDeserialize(ctx cont output := &SelectObjectContentOutput{} out.Result = output + span.End() return out, metadata, err } @@ -11988,6 +12852,10 @@ func (m *awsRestxml_deserializeOpUploadPart) 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)} @@ -12004,6 +12872,7 @@ func (m *awsRestxml_deserializeOpUploadPart) HandleDeserialize(ctx context.Conte return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + span.End() return out, metadata, err } @@ -12129,6 +12998,10 @@ func (m *awsRestxml_deserializeOpUploadPartCopy) 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)} @@ -12173,6 +13046,7 @@ func (m *awsRestxml_deserializeOpUploadPartCopy) HandleDeserialize(ctx context.C } } + span.End() return out, metadata, err } @@ -12319,6 +13193,10 @@ func (m *awsRestxml_deserializeOpWriteGetObjectResponse) 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)} @@ -12336,6 +13214,7 @@ func (m *awsRestxml_deserializeOpWriteGetObjectResponse) HandleDeserialize(ctx c } } + span.End() return out, metadata, err } @@ -12897,6 +13776,11 @@ func awsRestxml_deserializeErrorBucketAlreadyOwnedByYou(response *smithyhttp.Res return output } +func awsRestxml_deserializeErrorEncryptionTypeMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EncryptionTypeMismatch{} + return output +} + func awsRestxml_deserializeErrorInvalidObjectState(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidObjectState{} var buff [1024]byte @@ -12930,6 +13814,16 @@ func awsRestxml_deserializeErrorInvalidObjectState(response *smithyhttp.Response return output } +func awsRestxml_deserializeErrorInvalidRequest(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRequest{} + return output +} + +func awsRestxml_deserializeErrorInvalidWriteOffset(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidWriteOffset{} + return output +} + func awsRestxml_deserializeErrorNoSuchBucket(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.NoSuchBucket{} return output @@ -12960,6 +13854,11 @@ func awsRestxml_deserializeErrorObjectNotInActiveTierError(response *smithyhttp. return output } +func awsRestxml_deserializeErrorTooManyParts(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyParts{} + return output +} + func awsRestxml_deserializeDocumentAbortIncompleteMultipartUpload(v **types.AbortIncompleteMultipartUpload, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13709,6 +14608,19 @@ func awsRestxml_deserializeDocumentBucket(v **types.Bucket, decoder smithyxml.No originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("BucketRegion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.BucketRegion = ptr.String(xtv) + } + case strings.EqualFold("CreationDate", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -15242,6 +16154,42 @@ func awsRestxml_deserializeDocumentEncryptionConfiguration(v **types.EncryptionC return nil } +func awsRestxml_deserializeDocumentEncryptionTypeMismatch(v **types.EncryptionTypeMismatch, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EncryptionTypeMismatch + if *v == nil { + sv = &types.EncryptionTypeMismatch{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentError(v **types.Error, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15330,6 +16278,68 @@ func awsRestxml_deserializeDocumentError(v **types.Error, decoder smithyxml.Node return nil } +func awsRestxml_deserializeDocumentErrorDetails(v **types.ErrorDetails, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ErrorDetails + if *v == nil { + sv = &types.ErrorDetails{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ErrorCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ErrorCode = ptr.String(xtv) + } + + case strings.EqualFold("ErrorMessage", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ErrorMessage = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentErrorDocument(v **types.ErrorDocument, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15822,6 +16832,67 @@ func awsRestxml_deserializeDocumentFilterRuleListUnwrapped(v *[]types.FilterRule *v = sv return nil } +func awsRestxml_deserializeDocumentGetBucketMetadataTableConfigurationResult(v **types.GetBucketMetadataTableConfigurationResult, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.GetBucketMetadataTableConfigurationResult + if *v == nil { + sv = &types.GetBucketMetadataTableConfigurationResult{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Error", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentErrorDetails(&sv.Error, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MetadataTableConfigurationResult", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentMetadataTableConfigurationResult(&sv.MetadataTableConfigurationResult, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentGetObjectAttributesParts(v **types.GetObjectAttributesParts, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16535,13 +17606,111 @@ func awsRestxml_deserializeDocumentIntelligentTieringFilter(v **types.Intelligen return nil } -func awsRestxml_deserializeDocumentInvalidObjectState(v **types.InvalidObjectState, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentInvalidObjectState(v **types.InvalidObjectState, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidObjectState + if *v == nil { + sv = &types.InvalidObjectState{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AccessTier", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AccessTier = types.IntelligentTieringAccessTier(xtv) + } + + case strings.EqualFold("StorageClass", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StorageClass = types.StorageClass(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidRequest(v **types.InvalidRequest, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidRequest + if *v == nil { + sv = &types.InvalidRequest{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidWriteOffset(v **types.InvalidWriteOffset, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidObjectState + var sv *types.InvalidWriteOffset if *v == nil { - sv = &types.InvalidObjectState{} + sv = &types.InvalidWriteOffset{} } else { sv = *v } @@ -16557,32 +17726,6 @@ func awsRestxml_deserializeDocumentInvalidObjectState(v **types.InvalidObjectSta originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("AccessTier", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AccessTier = types.IntelligentTieringAccessTier(xtv) - } - - case strings.EqualFold("StorageClass", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StorageClass = types.StorageClass(xtv) - } - default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -17557,12 +18700,17 @@ func awsRestxml_deserializeDocumentLifecycleRuleAndOperator(v **types.LifecycleR return nil } -func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFilter, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentLifecycleRuleFilter(v **types.LifecycleRuleFilter, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var uv types.LifecycleRuleFilter - var memberFound bool + var sv *types.LifecycleRuleFilter + if *v == nil { + sv = &types.LifecycleRuleFilter{} + } else { + sv = *v + } + for { t, done, err := decoder.Token() if err != nil { @@ -17571,27 +18719,16 @@ func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFil if done { break } - if memberFound { - if err = decoder.Decoder.Skip(); err != nil { - return err - } - } originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { case strings.EqualFold("And", t.Name.Local): - var mv types.LifecycleRuleAndOperator nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentLifecycleRuleAndOperator(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentLifecycleRuleAndOperator(&sv.And, nodeDecoder); err != nil { return err } - mv = *destAddr - uv = &types.LifecycleRuleFilterMemberAnd{Value: mv} - memberFound = true case strings.EqualFold("ObjectSizeGreaterThan", t.Name.Local): - var mv int64 val, err := decoder.Value() if err != nil { return err @@ -17605,13 +18742,10 @@ func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFil if err != nil { return err } - mv = i64 + sv.ObjectSizeGreaterThan = ptr.Int64(i64) } - uv = &types.LifecycleRuleFilterMemberObjectSizeGreaterThan{Value: mv} - memberFound = true case strings.EqualFold("ObjectSizeLessThan", t.Name.Local): - var mv int64 val, err := decoder.Value() if err != nil { return err @@ -17625,13 +18759,10 @@ func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFil if err != nil { return err } - mv = i64 + sv.ObjectSizeLessThan = ptr.Int64(i64) } - uv = &types.LifecycleRuleFilterMemberObjectSizeLessThan{Value: mv} - memberFound = true case strings.EqualFold("Prefix", t.Name.Local): - var mv string val, err := decoder.Value() if err != nil { return err @@ -17641,30 +18772,26 @@ func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFil } { xtv := string(val) - mv = xtv + sv.Prefix = ptr.String(xtv) } - uv = &types.LifecycleRuleFilterMemberPrefix{Value: mv} - memberFound = true case strings.EqualFold("Tag", t.Name.Local): - var mv types.Tag nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentTag(&sv.Tag, nodeDecoder); err != nil { return err } - mv = *destAddr - uv = &types.LifecycleRuleFilterMemberTag{Value: mv} - memberFound = true default: - uv = &types.UnknownUnionMember{Tag: t.Name.Local} - memberFound = true + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } } decoder = originalDecoder } - *v = uv + *v = sv return nil } @@ -17810,6 +18937,48 @@ func awsRestxml_deserializeDocumentLoggingEnabled(v **types.LoggingEnabled, deco return nil } +func awsRestxml_deserializeDocumentMetadataTableConfigurationResult(v **types.MetadataTableConfigurationResult, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MetadataTableConfigurationResult + if *v == nil { + sv = &types.MetadataTableConfigurationResult{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("S3TablesDestinationResult", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentS3TablesDestinationResult(&sv.S3TablesDestinationResult, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentMetrics(v **types.Metrics, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -20856,12 +22025,17 @@ func awsRestxml_deserializeDocumentReplicationRuleAndOperator(v **types.Replicat return nil } -func awsRestxml_deserializeDocumentReplicationRuleFilter(v *types.ReplicationRuleFilter, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentReplicationRuleFilter(v **types.ReplicationRuleFilter, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var uv types.ReplicationRuleFilter - var memberFound bool + var sv *types.ReplicationRuleFilter + if *v == nil { + sv = &types.ReplicationRuleFilter{} + } else { + sv = *v + } + for { t, done, err := decoder.Token() if err != nil { @@ -20870,27 +22044,16 @@ func awsRestxml_deserializeDocumentReplicationRuleFilter(v *types.ReplicationRul if done { break } - if memberFound { - if err = decoder.Decoder.Skip(); err != nil { - return err - } - } originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { case strings.EqualFold("And", t.Name.Local): - var mv types.ReplicationRuleAndOperator nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentReplicationRuleAndOperator(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentReplicationRuleAndOperator(&sv.And, nodeDecoder); err != nil { return err } - mv = *destAddr - uv = &types.ReplicationRuleFilterMemberAnd{Value: mv} - memberFound = true case strings.EqualFold("Prefix", t.Name.Local): - var mv string val, err := decoder.Value() if err != nil { return err @@ -20900,30 +22063,26 @@ func awsRestxml_deserializeDocumentReplicationRuleFilter(v *types.ReplicationRul } { xtv := string(val) - mv = xtv + sv.Prefix = ptr.String(xtv) } - uv = &types.ReplicationRuleFilterMemberPrefix{Value: mv} - memberFound = true case strings.EqualFold("Tag", t.Name.Local): - var mv types.Tag nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentTag(&sv.Tag, nodeDecoder); err != nil { return err } - mv = *destAddr - uv = &types.ReplicationRuleFilterMemberTag{Value: mv} - memberFound = true default: - uv = &types.UnknownUnionMember{Tag: t.Name.Local} - memberFound = true + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } } decoder = originalDecoder } - *v = uv + *v = sv return nil } @@ -21330,6 +22489,94 @@ func awsRestxml_deserializeDocumentS3KeyFilter(v **types.S3KeyFilter, decoder sm return nil } +func awsRestxml_deserializeDocumentS3TablesDestinationResult(v **types.S3TablesDestinationResult, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.S3TablesDestinationResult + if *v == nil { + sv = &types.S3TablesDestinationResult{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TableArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TableArn = ptr.String(xtv) + } + + case strings.EqualFold("TableBucketArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TableBucketArn = ptr.String(xtv) + } + + case strings.EqualFold("TableName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TableName = ptr.String(xtv) + } + + case strings.EqualFold("TableNamespace", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TableNamespace = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentServerSideEncryptionByDefault(v **types.ServerSideEncryptionByDefault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -22402,6 +23649,42 @@ func awsRestxml_deserializeDocumentTieringListUnwrapped(v *[]types.Tiering, deco *v = sv return nil } +func awsRestxml_deserializeDocumentTooManyParts(v **types.TooManyParts, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyParts + if *v == nil { + sv = &types.TooManyParts{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentTopicConfiguration(v **types.TopicConfiguration, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go index bc4f4adeb1..1a4af28228 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go @@ -20,6 +20,7 @@ import ( "github.com/aws/smithy-go/endpoints/private/rulesfn" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -992,13 +993,389 @@ func (r *resolver) ResolveEndpoint( } } } + if exprVal := rulesfn.SubString(_Bucket, 6, 19, true); exprVal != nil { + _s3expressAvailabilityZoneId := *exprVal + _ = _s3expressAvailabilityZoneId + if exprVal := rulesfn.SubString(_Bucket, 19, 21, true); exprVal != nil { + _s3expressAvailabilityZoneDelim := *exprVal + _ = _s3expressAvailabilityZoneDelim + if _s3expressAvailabilityZoneDelim == "--" { + if _UseFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-fips-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if exprVal := rulesfn.SubString(_Bucket, 6, 20, true); exprVal != nil { + _s3expressAvailabilityZoneId := *exprVal + _ = _s3expressAvailabilityZoneId + if exprVal := rulesfn.SubString(_Bucket, 20, 22, true); exprVal != nil { + _s3expressAvailabilityZoneDelim := *exprVal + _ = _s3expressAvailabilityZoneDelim + if _s3expressAvailabilityZoneDelim == "--" { + if _UseFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-fips-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if exprVal := rulesfn.SubString(_Bucket, 6, 26, true); exprVal != nil { + _s3expressAvailabilityZoneId := *exprVal + _ = _s3expressAvailabilityZoneId + if exprVal := rulesfn.SubString(_Bucket, 26, 28, true); exprVal != nil { + _s3expressAvailabilityZoneDelim := *exprVal + _ = _s3expressAvailabilityZoneDelim + if _s3expressAvailabilityZoneDelim == "--" { + if _UseFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-fips-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } return endpoint, fmt.Errorf("endpoint rule error, %s", "Unrecognized S3Express bucket name format.") } } - if exprVal := rulesfn.SubString(_Bucket, 6, 14, true); exprVal != nil { + if exprVal := rulesfn.SubString(_Bucket, 6, 14, true); exprVal != nil { + _s3expressAvailabilityZoneId := *exprVal + _ = _s3expressAvailabilityZoneId + if exprVal := rulesfn.SubString(_Bucket, 14, 16, true); exprVal != nil { + _s3expressAvailabilityZoneDelim := *exprVal + _ = _s3expressAvailabilityZoneDelim + if _s3expressAvailabilityZoneDelim == "--" { + if _UseFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-fips-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "sigv4-s3express", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "sigv4-s3express", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if exprVal := rulesfn.SubString(_Bucket, 6, 15, true); exprVal != nil { _s3expressAvailabilityZoneId := *exprVal _ = _s3expressAvailabilityZoneId - if exprVal := rulesfn.SubString(_Bucket, 14, 16, true); exprVal != nil { + if exprVal := rulesfn.SubString(_Bucket, 15, 17, true); exprVal != nil { _s3expressAvailabilityZoneDelim := *exprVal _ = _s3expressAvailabilityZoneDelim if _s3expressAvailabilityZoneDelim == "--" { @@ -1089,10 +1466,198 @@ func (r *resolver) ResolveEndpoint( } } } - if exprVal := rulesfn.SubString(_Bucket, 6, 15, true); exprVal != nil { + if exprVal := rulesfn.SubString(_Bucket, 6, 19, true); exprVal != nil { _s3expressAvailabilityZoneId := *exprVal _ = _s3expressAvailabilityZoneId - if exprVal := rulesfn.SubString(_Bucket, 15, 17, true); exprVal != nil { + if exprVal := rulesfn.SubString(_Bucket, 19, 21, true); exprVal != nil { + _s3expressAvailabilityZoneDelim := *exprVal + _ = _s3expressAvailabilityZoneDelim + if _s3expressAvailabilityZoneDelim == "--" { + if _UseFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-fips-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "sigv4-s3express", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "sigv4-s3express", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if exprVal := rulesfn.SubString(_Bucket, 6, 20, true); exprVal != nil { + _s3expressAvailabilityZoneId := *exprVal + _ = _s3expressAvailabilityZoneId + if exprVal := rulesfn.SubString(_Bucket, 20, 22, true); exprVal != nil { + _s3expressAvailabilityZoneDelim := *exprVal + _ = _s3expressAvailabilityZoneDelim + if _s3expressAvailabilityZoneDelim == "--" { + if _UseFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-fips-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "sigv4-s3express", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://") + out.WriteString(_Bucket) + out.WriteString(".s3express-") + out.WriteString(_s3expressAvailabilityZoneId) + out.WriteString(".") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("backend", "S3Express") + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "sigv4-s3express", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetDisableDoubleEncoding(&sp, true) + + smithyhttp.SetSigV4SigningName(&sp, "s3express") + smithyhttp.SetSigV4ASigningName(&sp, "s3express") + + smithyhttp.SetSigV4SigningRegion(&sp, _Region) + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if exprVal := rulesfn.SubString(_Bucket, 6, 26, true); exprVal != nil { + _s3expressAvailabilityZoneId := *exprVal + _ = _s3expressAvailabilityZoneId + if exprVal := rulesfn.SubString(_Bucket, 26, 28, true); exprVal != nil { _s3expressAvailabilityZoneDelim := *exprVal _ = _s3expressAvailabilityZoneDelim if _s3expressAvailabilityZoneDelim == "--" { @@ -3754,8 +4319,8 @@ func (r *resolver) ResolveEndpoint( return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Outposts does not support S3 Accelerate") } if exprVal := _bucketArn.ResourceId.Get(4); exprVal != nil { - _var_275 := *exprVal - _ = _var_275 + _var_287 := *exprVal + _ = _var_287 return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Arn: Outpost Access Point ARN contains sub resources") } if exprVal := _bucketArn.ResourceId.Get(1); exprVal != nil { @@ -3998,8 +4563,8 @@ func (r *resolver) ResolveEndpoint( } if _ForcePathStyle == true { if exprVal := awsrulesfn.ParseARN(_Bucket); exprVal != nil { - _var_288 := *exprVal - _ = _var_288 + _var_300 := *exprVal + _ = _var_300 return endpoint, fmt.Errorf("endpoint rule error, %s", "Path-style addressing cannot be used with ARN buckets") } } @@ -5800,6 +6365,9 @@ 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) } @@ -5814,11 +6382,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 } @@ -5840,8 +6413,11 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + ctx = setS3ResolvedURI(ctx, endpt.URI.String()) + backend := s3cust.GetPropertiesBackend(&endpt.Properties) ctx = internalcontext.SetS3Backend(ctx, backend) + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json index 6e392285ef..d865ac68d8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json @@ -18,6 +18,7 @@ "api_op_CompleteMultipartUpload.go", "api_op_CopyObject.go", "api_op_CreateBucket.go", + "api_op_CreateBucketMetadataTableConfiguration.go", "api_op_CreateMultipartUpload.go", "api_op_CreateSession.go", "api_op_DeleteBucket.go", @@ -27,6 +28,7 @@ "api_op_DeleteBucketIntelligentTieringConfiguration.go", "api_op_DeleteBucketInventoryConfiguration.go", "api_op_DeleteBucketLifecycle.go", + "api_op_DeleteBucketMetadataTableConfiguration.go", "api_op_DeleteBucketMetricsConfiguration.go", "api_op_DeleteBucketOwnershipControls.go", "api_op_DeleteBucketPolicy.go", @@ -47,6 +49,7 @@ "api_op_GetBucketLifecycleConfiguration.go", "api_op_GetBucketLocation.go", "api_op_GetBucketLogging.go", + "api_op_GetBucketMetadataTableConfiguration.go", "api_op_GetBucketMetricsConfiguration.go", "api_op_GetBucketNotificationConfiguration.go", "api_op_GetBucketOwnershipControls.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go index 074068f7f3..8694445773 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go @@ -3,4 +3,4 @@ package s3 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.61.3" +const goModuleVersion = "1.71.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go index c5ab084d12..8c67e4c621 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go @@ -12,7 +12,9 @@ import ( s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations" 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" ) @@ -84,6 +86,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 @@ -118,6 +123,9 @@ type Options struct { // within your applications. RuntimeEnvironment aws.RuntimeEnvironment + // The client tracer provider. + TracerProvider tracing.TracerProvider + // Allows you to enable arn region support for the service. UseARNRegion bool diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/presign_post.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/presign_post.go index 6bdbcde668..491ed2e5da 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/presign_post.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/presign_post.go @@ -8,7 +8,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "net/url" "strings" "time" @@ -211,10 +210,6 @@ func (s *presignPostRequestMiddleware) HandleFinalize( ) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected request middleware type %T", in.Request) - } input := getOperationInput(ctx) asS3Put, ok := input.(*PutObjectInput) @@ -230,8 +225,7 @@ func (s *presignPostRequestMiddleware) HandleFinalize( return out, metadata, fmt.Errorf("PutObject input does not have a key input") } - httpReq := req.Build(ctx) - u := httpReq.URL.String() + uri := getS3ResolvedURI(ctx) signingName := awsmiddleware.GetSigningName(ctx) signingRegion := awsmiddleware.GetSigningRegion(ctx) @@ -265,22 +259,14 @@ func (s *presignPostRequestMiddleware) HandleFinalize( } } - // Other middlewares may set default values on the URL on the path or as query params. Remove them - baseURL := toBaseURL(u) - out.Result = &PresignedPostRequest{ - URL: baseURL, + URL: uri, Values: fields, } return out, metadata, nil } -func toBaseURL(fullURL string) string { - a, _ := url.Parse(fullURL) - return a.Scheme + "://" + a.Host -} - // Adapted from existing PresignConverter middleware func (c presignPostConverter) ConvertToPresignMiddleware(stack *middleware.Stack, options Options) (err error) { stack.Build.Remove("UserAgent") diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go index 9dd09cd6e6..fcdea87c0f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go @@ -12,6 +12,7 @@ import ( smithyxml "github.com/aws/smithy-go/encoding/xml" "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" "net/http" "strconv" @@ -28,6 +29,10 @@ func (*awsRestxml_serializeOpAbortMultipartUpload) ID() string { func (m *awsRestxml_serializeOpAbortMultipartUpload) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -64,6 +69,8 @@ func (m *awsRestxml_serializeOpAbortMultipartUpload) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsAbortMultipartUploadInput(v *AbortMultipartUploadInput, encoder *httpbinding.Encoder) error { @@ -71,11 +78,16 @@ func awsRestxml_serializeOpHttpBindingsAbortMultipartUploadInput(v *AbortMultipa return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } + if v.IfMatchInitiatedTime != nil { + locationName := "X-Amz-If-Match-Initiated-Time" + encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfMatchInitiatedTime)) + } + if v.Key == nil || len(*v.Key) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")} } @@ -107,6 +119,10 @@ func (*awsRestxml_serializeOpCompleteMultipartUpload) ID() string { func (m *awsRestxml_serializeOpCompleteMultipartUpload) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -167,6 +183,8 @@ func (m *awsRestxml_serializeOpCompleteMultipartUpload) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(v *CompleteMultipartUploadInput, encoder *httpbinding.Encoder) error { @@ -174,32 +192,37 @@ func awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(v *CompleteM return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChecksumCRC32 != nil && len(*v.ChecksumCRC32) > 0 { + if v.ChecksumCRC32 != nil { locationName := "X-Amz-Checksum-Crc32" encoder.SetHeader(locationName).String(*v.ChecksumCRC32) } - if v.ChecksumCRC32C != nil && len(*v.ChecksumCRC32C) > 0 { + if v.ChecksumCRC32C != nil { locationName := "X-Amz-Checksum-Crc32c" encoder.SetHeader(locationName).String(*v.ChecksumCRC32C) } - if v.ChecksumSHA1 != nil && len(*v.ChecksumSHA1) > 0 { + if v.ChecksumSHA1 != nil { locationName := "X-Amz-Checksum-Sha1" encoder.SetHeader(locationName).String(*v.ChecksumSHA1) } - if v.ChecksumSHA256 != nil && len(*v.ChecksumSHA256) > 0 { + if v.ChecksumSHA256 != nil { locationName := "X-Amz-Checksum-Sha256" encoder.SetHeader(locationName).String(*v.ChecksumSHA256) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 { + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.IfNoneMatch != nil { locationName := "If-None-Match" encoder.SetHeader(locationName).String(*v.IfNoneMatch) } @@ -218,17 +241,17 @@ func awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(v *CompleteM encoder.SetHeader(locationName).String(string(v.RequestPayer)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } @@ -250,6 +273,10 @@ func (*awsRestxml_serializeOpCopyObject) ID() string { func (m *awsRestxml_serializeOpCopyObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -286,6 +313,8 @@ func (m *awsRestxml_serializeOpCopyObject) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encoder *httpbinding.Encoder) error { @@ -303,7 +332,7 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod encoder.SetHeader(locationName).Boolean(*v.BucketKeyEnabled) } - if v.CacheControl != nil && len(*v.CacheControl) > 0 { + if v.CacheControl != nil { locationName := "Cache-Control" encoder.SetHeader(locationName).String(*v.CacheControl) } @@ -313,32 +342,32 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentDisposition != nil && len(*v.ContentDisposition) > 0 { + if v.ContentDisposition != nil { locationName := "Content-Disposition" encoder.SetHeader(locationName).String(*v.ContentDisposition) } - if v.ContentEncoding != nil && len(*v.ContentEncoding) > 0 { + if v.ContentEncoding != nil { locationName := "Content-Encoding" encoder.SetHeader(locationName).String(*v.ContentEncoding) } - if v.ContentLanguage != nil && len(*v.ContentLanguage) > 0 { + if v.ContentLanguage != nil { locationName := "Content-Language" encoder.SetHeader(locationName).String(*v.ContentLanguage) } - if v.ContentType != nil && len(*v.ContentType) > 0 { + if v.ContentType != nil { locationName := "Content-Type" encoder.SetHeader(locationName).String(*v.ContentType) } - if v.CopySource != nil && len(*v.CopySource) > 0 { + if v.CopySource != nil { locationName := "X-Amz-Copy-Source" encoder.SetHeader(locationName).String(*v.CopySource) } - if v.CopySourceIfMatch != nil && len(*v.CopySourceIfMatch) > 0 { + if v.CopySourceIfMatch != nil { locationName := "X-Amz-Copy-Source-If-Match" encoder.SetHeader(locationName).String(*v.CopySourceIfMatch) } @@ -348,7 +377,7 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.CopySourceIfModifiedSince)) } - if v.CopySourceIfNoneMatch != nil && len(*v.CopySourceIfNoneMatch) > 0 { + if v.CopySourceIfNoneMatch != nil { locationName := "X-Amz-Copy-Source-If-None-Match" encoder.SetHeader(locationName).String(*v.CopySourceIfNoneMatch) } @@ -358,27 +387,27 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.CopySourceIfUnmodifiedSince)) } - if v.CopySourceSSECustomerAlgorithm != nil && len(*v.CopySourceSSECustomerAlgorithm) > 0 { + if v.CopySourceSSECustomerAlgorithm != nil { locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerAlgorithm) } - if v.CopySourceSSECustomerKey != nil && len(*v.CopySourceSSECustomerKey) > 0 { + if v.CopySourceSSECustomerKey != nil { locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerKey) } - if v.CopySourceSSECustomerKeyMD5 != nil && len(*v.CopySourceSSECustomerKeyMD5) > 0 { + if v.CopySourceSSECustomerKeyMD5 != nil { locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerKeyMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.ExpectedSourceBucketOwner != nil && len(*v.ExpectedSourceBucketOwner) > 0 { + if v.ExpectedSourceBucketOwner != nil { locationName := "X-Amz-Source-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedSourceBucketOwner) } @@ -388,22 +417,22 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.Expires)) } - if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 { + if v.GrantFullControl != nil { locationName := "X-Amz-Grant-Full-Control" encoder.SetHeader(locationName).String(*v.GrantFullControl) } - if v.GrantRead != nil && len(*v.GrantRead) > 0 { + if v.GrantRead != nil { locationName := "X-Amz-Grant-Read" encoder.SetHeader(locationName).String(*v.GrantRead) } - if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 { + if v.GrantReadACP != nil { locationName := "X-Amz-Grant-Read-Acp" encoder.SetHeader(locationName).String(*v.GrantReadACP) } - if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 { + if v.GrantWriteACP != nil { locationName := "X-Amz-Grant-Write-Acp" encoder.SetHeader(locationName).String(*v.GrantWriteACP) } @@ -420,9 +449,7 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod if v.Metadata != nil { hv := encoder.Headers("X-Amz-Meta-") for mapKey, mapVal := range v.Metadata { - if len(mapVal) > 0 { - hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal) - } + hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal) } } @@ -456,27 +483,27 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod encoder.SetHeader(locationName).String(string(v.ServerSideEncryption)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } - if v.SSEKMSEncryptionContext != nil && len(*v.SSEKMSEncryptionContext) > 0 { + if v.SSEKMSEncryptionContext != nil { locationName := "X-Amz-Server-Side-Encryption-Context" encoder.SetHeader(locationName).String(*v.SSEKMSEncryptionContext) } - if v.SSEKMSKeyId != nil && len(*v.SSEKMSKeyId) > 0 { + if v.SSEKMSKeyId != nil { locationName := "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id" encoder.SetHeader(locationName).String(*v.SSEKMSKeyId) } @@ -486,7 +513,7 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod encoder.SetHeader(locationName).String(string(v.StorageClass)) } - if v.Tagging != nil && len(*v.Tagging) > 0 { + if v.Tagging != nil { locationName := "X-Amz-Tagging" encoder.SetHeader(locationName).String(*v.Tagging) } @@ -496,7 +523,7 @@ func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encod encoder.SetHeader(locationName).String(string(v.TaggingDirective)) } - if v.WebsiteRedirectLocation != nil && len(*v.WebsiteRedirectLocation) > 0 { + if v.WebsiteRedirectLocation != nil { locationName := "X-Amz-Website-Redirect-Location" encoder.SetHeader(locationName).String(*v.WebsiteRedirectLocation) } @@ -514,6 +541,10 @@ func (*awsRestxml_serializeOpCreateBucket) ID() string { func (m *awsRestxml_serializeOpCreateBucket) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -574,6 +605,8 @@ func (m *awsRestxml_serializeOpCreateBucket) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsCreateBucketInput(v *CreateBucketInput, encoder *httpbinding.Encoder) error { @@ -586,27 +619,27 @@ func awsRestxml_serializeOpHttpBindingsCreateBucketInput(v *CreateBucketInput, e encoder.SetHeader(locationName).String(string(v.ACL)) } - if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 { + if v.GrantFullControl != nil { locationName := "X-Amz-Grant-Full-Control" encoder.SetHeader(locationName).String(*v.GrantFullControl) } - if v.GrantRead != nil && len(*v.GrantRead) > 0 { + if v.GrantRead != nil { locationName := "X-Amz-Grant-Read" encoder.SetHeader(locationName).String(*v.GrantRead) } - if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 { + if v.GrantReadACP != nil { locationName := "X-Amz-Grant-Read-Acp" encoder.SetHeader(locationName).String(*v.GrantReadACP) } - if v.GrantWrite != nil && len(*v.GrantWrite) > 0 { + if v.GrantWrite != nil { locationName := "X-Amz-Grant-Write" encoder.SetHeader(locationName).String(*v.GrantWrite) } - if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 { + if v.GrantWriteACP != nil { locationName := "X-Amz-Grant-Write-Acp" encoder.SetHeader(locationName).String(*v.GrantWriteACP) } @@ -624,6 +657,107 @@ func awsRestxml_serializeOpHttpBindingsCreateBucketInput(v *CreateBucketInput, e return nil } +type awsRestxml_serializeOpCreateBucketMetadataTableConfiguration struct { +} + +func (*awsRestxml_serializeOpCreateBucketMetadataTableConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateBucketMetadataTableConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateBucketMetadataTableConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/?metadataTable") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsCreateBucketMetadataTableConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.MetadataTableConfiguration != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MetadataTableConfiguration", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/")) + if err := awsRestxml_serializeDocumentMetadataTableConfiguration(input.MetadataTableConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateBucketMetadataTableConfigurationInput(v *CreateBucketMetadataTableConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.ChecksumAlgorithm) > 0 { + locationName := "X-Amz-Sdk-Checksum-Algorithm" + encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) + } + + if v.ContentMD5 != nil { + locationName := "Content-Md5" + encoder.SetHeader(locationName).String(*v.ContentMD5) + } + + if v.ExpectedBucketOwner != nil { + locationName := "X-Amz-Expected-Bucket-Owner" + encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) + } + + return nil +} + type awsRestxml_serializeOpCreateMultipartUpload struct { } @@ -634,6 +768,10 @@ func (*awsRestxml_serializeOpCreateMultipartUpload) ID() string { func (m *awsRestxml_serializeOpCreateMultipartUpload) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -670,6 +808,8 @@ func (m *awsRestxml_serializeOpCreateMultipartUpload) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMultipartUploadInput, encoder *httpbinding.Encoder) error { @@ -687,7 +827,7 @@ func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMulti encoder.SetHeader(locationName).Boolean(*v.BucketKeyEnabled) } - if v.CacheControl != nil && len(*v.CacheControl) > 0 { + if v.CacheControl != nil { locationName := "Cache-Control" encoder.SetHeader(locationName).String(*v.CacheControl) } @@ -697,27 +837,27 @@ func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMulti encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentDisposition != nil && len(*v.ContentDisposition) > 0 { + if v.ContentDisposition != nil { locationName := "Content-Disposition" encoder.SetHeader(locationName).String(*v.ContentDisposition) } - if v.ContentEncoding != nil && len(*v.ContentEncoding) > 0 { + if v.ContentEncoding != nil { locationName := "Content-Encoding" encoder.SetHeader(locationName).String(*v.ContentEncoding) } - if v.ContentLanguage != nil && len(*v.ContentLanguage) > 0 { + if v.ContentLanguage != nil { locationName := "Content-Language" encoder.SetHeader(locationName).String(*v.ContentLanguage) } - if v.ContentType != nil && len(*v.ContentType) > 0 { + if v.ContentType != nil { locationName := "Content-Type" encoder.SetHeader(locationName).String(*v.ContentType) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -727,22 +867,22 @@ func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMulti encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.Expires)) } - if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 { + if v.GrantFullControl != nil { locationName := "X-Amz-Grant-Full-Control" encoder.SetHeader(locationName).String(*v.GrantFullControl) } - if v.GrantRead != nil && len(*v.GrantRead) > 0 { + if v.GrantRead != nil { locationName := "X-Amz-Grant-Read" encoder.SetHeader(locationName).String(*v.GrantRead) } - if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 { + if v.GrantReadACP != nil { locationName := "X-Amz-Grant-Read-Acp" encoder.SetHeader(locationName).String(*v.GrantReadACP) } - if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 { + if v.GrantWriteACP != nil { locationName := "X-Amz-Grant-Write-Acp" encoder.SetHeader(locationName).String(*v.GrantWriteACP) } @@ -759,9 +899,7 @@ func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMulti if v.Metadata != nil { hv := encoder.Headers("X-Amz-Meta-") for mapKey, mapVal := range v.Metadata { - if len(mapVal) > 0 { - hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal) - } + hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal) } } @@ -790,27 +928,27 @@ func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMulti encoder.SetHeader(locationName).String(string(v.ServerSideEncryption)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } - if v.SSEKMSEncryptionContext != nil && len(*v.SSEKMSEncryptionContext) > 0 { + if v.SSEKMSEncryptionContext != nil { locationName := "X-Amz-Server-Side-Encryption-Context" encoder.SetHeader(locationName).String(*v.SSEKMSEncryptionContext) } - if v.SSEKMSKeyId != nil && len(*v.SSEKMSKeyId) > 0 { + if v.SSEKMSKeyId != nil { locationName := "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id" encoder.SetHeader(locationName).String(*v.SSEKMSKeyId) } @@ -820,12 +958,12 @@ func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMulti encoder.SetHeader(locationName).String(string(v.StorageClass)) } - if v.Tagging != nil && len(*v.Tagging) > 0 { + if v.Tagging != nil { locationName := "X-Amz-Tagging" encoder.SetHeader(locationName).String(*v.Tagging) } - if v.WebsiteRedirectLocation != nil && len(*v.WebsiteRedirectLocation) > 0 { + if v.WebsiteRedirectLocation != nil { locationName := "X-Amz-Website-Redirect-Location" encoder.SetHeader(locationName).String(*v.WebsiteRedirectLocation) } @@ -843,6 +981,10 @@ func (*awsRestxml_serializeOpCreateSession) ID() string { func (m *awsRestxml_serializeOpCreateSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -879,6 +1021,8 @@ func (m *awsRestxml_serializeOpCreateSession) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsCreateSessionInput(v *CreateSessionInput, encoder *httpbinding.Encoder) error { @@ -886,11 +1030,31 @@ func awsRestxml_serializeOpHttpBindingsCreateSessionInput(v *CreateSessionInput, return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.BucketKeyEnabled != nil { + locationName := "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled" + encoder.SetHeader(locationName).Boolean(*v.BucketKeyEnabled) + } + + if len(v.ServerSideEncryption) > 0 { + locationName := "X-Amz-Server-Side-Encryption" + encoder.SetHeader(locationName).String(string(v.ServerSideEncryption)) + } + if len(v.SessionMode) > 0 { locationName := "X-Amz-Create-Session-Mode" encoder.SetHeader(locationName).String(string(v.SessionMode)) } + if v.SSEKMSEncryptionContext != nil { + locationName := "X-Amz-Server-Side-Encryption-Context" + encoder.SetHeader(locationName).String(*v.SSEKMSEncryptionContext) + } + + if v.SSEKMSKeyId != nil { + locationName := "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id" + encoder.SetHeader(locationName).String(*v.SSEKMSKeyId) + } + return nil } @@ -904,6 +1068,10 @@ func (*awsRestxml_serializeOpDeleteBucket) ID() string { func (m *awsRestxml_serializeOpDeleteBucket) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -940,6 +1108,8 @@ func (m *awsRestxml_serializeOpDeleteBucket) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketInput(v *DeleteBucketInput, encoder *httpbinding.Encoder) error { @@ -947,7 +1117,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketInput(v *DeleteBucketInput, e return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -965,6 +1135,10 @@ func (*awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration) ID() string { func (m *awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1001,6 +1175,8 @@ func (m *awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketAnalyticsConfigurationInput(v *DeleteBucketAnalyticsConfigurationInput, encoder *httpbinding.Encoder) error { @@ -1008,7 +1184,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketAnalyticsConfigurationInput(v return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1030,6 +1206,10 @@ func (*awsRestxml_serializeOpDeleteBucketCors) ID() string { func (m *awsRestxml_serializeOpDeleteBucketCors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1066,6 +1246,8 @@ func (m *awsRestxml_serializeOpDeleteBucketCors) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketCorsInput(v *DeleteBucketCorsInput, encoder *httpbinding.Encoder) error { @@ -1073,7 +1255,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketCorsInput(v *DeleteBucketCors return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1091,6 +1273,10 @@ func (*awsRestxml_serializeOpDeleteBucketEncryption) ID() string { func (m *awsRestxml_serializeOpDeleteBucketEncryption) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1127,6 +1313,8 @@ func (m *awsRestxml_serializeOpDeleteBucketEncryption) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketEncryptionInput(v *DeleteBucketEncryptionInput, encoder *httpbinding.Encoder) error { @@ -1134,7 +1322,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketEncryptionInput(v *DeleteBuck return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1152,6 +1340,10 @@ func (*awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration) ID() s func (m *awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1188,6 +1380,8 @@ func (m *awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration) Hand } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketIntelligentTieringConfigurationInput(v *DeleteBucketIntelligentTieringConfigurationInput, encoder *httpbinding.Encoder) error { @@ -1212,6 +1406,10 @@ func (*awsRestxml_serializeOpDeleteBucketInventoryConfiguration) ID() string { func (m *awsRestxml_serializeOpDeleteBucketInventoryConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1248,6 +1446,8 @@ func (m *awsRestxml_serializeOpDeleteBucketInventoryConfiguration) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketInventoryConfigurationInput(v *DeleteBucketInventoryConfigurationInput, encoder *httpbinding.Encoder) error { @@ -1255,7 +1455,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketInventoryConfigurationInput(v return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1277,6 +1477,10 @@ func (*awsRestxml_serializeOpDeleteBucketLifecycle) ID() string { func (m *awsRestxml_serializeOpDeleteBucketLifecycle) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1313,6 +1517,8 @@ func (m *awsRestxml_serializeOpDeleteBucketLifecycle) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketLifecycleInput(v *DeleteBucketLifecycleInput, encoder *httpbinding.Encoder) error { @@ -1320,7 +1526,74 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketLifecycleInput(v *DeleteBucke return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { + locationName := "X-Amz-Expected-Bucket-Owner" + encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) + } + + return nil +} + +type awsRestxml_serializeOpDeleteBucketMetadataTableConfiguration struct { +} + +func (*awsRestxml_serializeOpDeleteBucketMetadataTableConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteBucketMetadataTableConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteBucketMetadataTableConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/?metadataTable") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteBucketMetadataTableConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteBucketMetadataTableConfigurationInput(v *DeleteBucketMetadataTableConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1338,6 +1611,10 @@ func (*awsRestxml_serializeOpDeleteBucketMetricsConfiguration) ID() string { func (m *awsRestxml_serializeOpDeleteBucketMetricsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1374,6 +1651,8 @@ func (m *awsRestxml_serializeOpDeleteBucketMetricsConfiguration) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketMetricsConfigurationInput(v *DeleteBucketMetricsConfigurationInput, encoder *httpbinding.Encoder) error { @@ -1381,7 +1660,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketMetricsConfigurationInput(v * return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1403,6 +1682,10 @@ func (*awsRestxml_serializeOpDeleteBucketOwnershipControls) ID() string { func (m *awsRestxml_serializeOpDeleteBucketOwnershipControls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1439,6 +1722,8 @@ func (m *awsRestxml_serializeOpDeleteBucketOwnershipControls) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketOwnershipControlsInput(v *DeleteBucketOwnershipControlsInput, encoder *httpbinding.Encoder) error { @@ -1446,7 +1731,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketOwnershipControlsInput(v *Del return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1464,6 +1749,10 @@ func (*awsRestxml_serializeOpDeleteBucketPolicy) ID() string { func (m *awsRestxml_serializeOpDeleteBucketPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1500,6 +1789,8 @@ func (m *awsRestxml_serializeOpDeleteBucketPolicy) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketPolicyInput(v *DeleteBucketPolicyInput, encoder *httpbinding.Encoder) error { @@ -1507,7 +1798,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketPolicyInput(v *DeleteBucketPo return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1525,6 +1816,10 @@ func (*awsRestxml_serializeOpDeleteBucketReplication) ID() string { func (m *awsRestxml_serializeOpDeleteBucketReplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1561,6 +1856,8 @@ func (m *awsRestxml_serializeOpDeleteBucketReplication) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketReplicationInput(v *DeleteBucketReplicationInput, encoder *httpbinding.Encoder) error { @@ -1568,7 +1865,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketReplicationInput(v *DeleteBuc return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1586,6 +1883,10 @@ func (*awsRestxml_serializeOpDeleteBucketTagging) ID() string { func (m *awsRestxml_serializeOpDeleteBucketTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1622,6 +1923,8 @@ func (m *awsRestxml_serializeOpDeleteBucketTagging) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketTaggingInput(v *DeleteBucketTaggingInput, encoder *httpbinding.Encoder) error { @@ -1629,7 +1932,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketTaggingInput(v *DeleteBucketT return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1647,6 +1950,10 @@ func (*awsRestxml_serializeOpDeleteBucketWebsite) ID() string { func (m *awsRestxml_serializeOpDeleteBucketWebsite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1683,6 +1990,8 @@ func (m *awsRestxml_serializeOpDeleteBucketWebsite) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteBucketWebsiteInput(v *DeleteBucketWebsiteInput, encoder *httpbinding.Encoder) error { @@ -1690,7 +1999,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketWebsiteInput(v *DeleteBucketW return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1708,6 +2017,10 @@ func (*awsRestxml_serializeOpDeleteObject) ID() string { func (m *awsRestxml_serializeOpDeleteObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1744,6 +2057,8 @@ func (m *awsRestxml_serializeOpDeleteObject) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteObjectInput(v *DeleteObjectInput, encoder *httpbinding.Encoder) error { @@ -1756,11 +2071,26 @@ func awsRestxml_serializeOpHttpBindingsDeleteObjectInput(v *DeleteObjectInput, e encoder.SetHeader(locationName).Boolean(*v.BypassGovernanceRetention) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.IfMatchLastModifiedTime != nil { + locationName := "X-Amz-If-Match-Last-Modified-Time" + encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfMatchLastModifiedTime)) + } + + if v.IfMatchSize != nil { + locationName := "X-Amz-If-Match-Size" + encoder.SetHeader(locationName).Long(*v.IfMatchSize) + } + if v.Key == nil || len(*v.Key) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")} } @@ -1770,7 +2100,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteObjectInput(v *DeleteObjectInput, e } } - if v.MFA != nil && len(*v.MFA) > 0 { + if v.MFA != nil { locationName := "X-Amz-Mfa" encoder.SetHeader(locationName).String(*v.MFA) } @@ -1797,6 +2127,10 @@ func (*awsRestxml_serializeOpDeleteObjects) ID() string { func (m *awsRestxml_serializeOpDeleteObjects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1857,6 +2191,8 @@ func (m *awsRestxml_serializeOpDeleteObjects) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteObjectsInput(v *DeleteObjectsInput, encoder *httpbinding.Encoder) error { @@ -1874,12 +2210,12 @@ func awsRestxml_serializeOpHttpBindingsDeleteObjectsInput(v *DeleteObjectsInput, encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.MFA != nil && len(*v.MFA) > 0 { + if v.MFA != nil { locationName := "X-Amz-Mfa" encoder.SetHeader(locationName).String(*v.MFA) } @@ -1902,6 +2238,10 @@ func (*awsRestxml_serializeOpDeleteObjectTagging) ID() string { func (m *awsRestxml_serializeOpDeleteObjectTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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 +2278,8 @@ func (m *awsRestxml_serializeOpDeleteObjectTagging) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeleteObjectTaggingInput(v *DeleteObjectTaggingInput, encoder *httpbinding.Encoder) error { @@ -1945,7 +2287,7 @@ func awsRestxml_serializeOpHttpBindingsDeleteObjectTaggingInput(v *DeleteObjectT return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -1976,6 +2318,10 @@ func (*awsRestxml_serializeOpDeletePublicAccessBlock) ID() string { func (m *awsRestxml_serializeOpDeletePublicAccessBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2012,6 +2358,8 @@ func (m *awsRestxml_serializeOpDeletePublicAccessBlock) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsDeletePublicAccessBlockInput(v *DeletePublicAccessBlockInput, encoder *httpbinding.Encoder) error { @@ -2019,7 +2367,7 @@ func awsRestxml_serializeOpHttpBindingsDeletePublicAccessBlockInput(v *DeletePub return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2037,6 +2385,10 @@ func (*awsRestxml_serializeOpGetBucketAccelerateConfiguration) ID() string { func (m *awsRestxml_serializeOpGetBucketAccelerateConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2073,6 +2425,8 @@ func (m *awsRestxml_serializeOpGetBucketAccelerateConfiguration) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketAccelerateConfigurationInput(v *GetBucketAccelerateConfigurationInput, encoder *httpbinding.Encoder) error { @@ -2080,7 +2434,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketAccelerateConfigurationInput(v * return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2103,6 +2457,10 @@ func (*awsRestxml_serializeOpGetBucketAcl) ID() string { func (m *awsRestxml_serializeOpGetBucketAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2139,6 +2497,8 @@ func (m *awsRestxml_serializeOpGetBucketAcl) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketAclInput(v *GetBucketAclInput, encoder *httpbinding.Encoder) error { @@ -2146,7 +2506,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketAclInput(v *GetBucketAclInput, e return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2164,6 +2524,10 @@ func (*awsRestxml_serializeOpGetBucketAnalyticsConfiguration) ID() string { func (m *awsRestxml_serializeOpGetBucketAnalyticsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2200,6 +2564,8 @@ func (m *awsRestxml_serializeOpGetBucketAnalyticsConfiguration) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketAnalyticsConfigurationInput(v *GetBucketAnalyticsConfigurationInput, encoder *httpbinding.Encoder) error { @@ -2207,7 +2573,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketAnalyticsConfigurationInput(v *G return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2229,6 +2595,10 @@ func (*awsRestxml_serializeOpGetBucketCors) ID() string { func (m *awsRestxml_serializeOpGetBucketCors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2265,6 +2635,8 @@ func (m *awsRestxml_serializeOpGetBucketCors) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketCorsInput(v *GetBucketCorsInput, encoder *httpbinding.Encoder) error { @@ -2272,7 +2644,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketCorsInput(v *GetBucketCorsInput, return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2290,6 +2662,10 @@ func (*awsRestxml_serializeOpGetBucketEncryption) ID() string { func (m *awsRestxml_serializeOpGetBucketEncryption) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2326,6 +2702,8 @@ func (m *awsRestxml_serializeOpGetBucketEncryption) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketEncryptionInput(v *GetBucketEncryptionInput, encoder *httpbinding.Encoder) error { @@ -2333,7 +2711,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketEncryptionInput(v *GetBucketEncr return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2351,6 +2729,10 @@ func (*awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration) ID() stri func (m *awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2387,6 +2769,8 @@ func (m *awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration) HandleS } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketIntelligentTieringConfigurationInput(v *GetBucketIntelligentTieringConfigurationInput, encoder *httpbinding.Encoder) error { @@ -2411,6 +2795,10 @@ func (*awsRestxml_serializeOpGetBucketInventoryConfiguration) ID() string { func (m *awsRestxml_serializeOpGetBucketInventoryConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2447,6 +2835,8 @@ func (m *awsRestxml_serializeOpGetBucketInventoryConfiguration) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketInventoryConfigurationInput(v *GetBucketInventoryConfigurationInput, encoder *httpbinding.Encoder) error { @@ -2454,7 +2844,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketInventoryConfigurationInput(v *G return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2476,6 +2866,10 @@ func (*awsRestxml_serializeOpGetBucketLifecycleConfiguration) ID() string { func (m *awsRestxml_serializeOpGetBucketLifecycleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2512,6 +2906,8 @@ func (m *awsRestxml_serializeOpGetBucketLifecycleConfiguration) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketLifecycleConfigurationInput(v *GetBucketLifecycleConfigurationInput, encoder *httpbinding.Encoder) error { @@ -2519,7 +2915,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketLifecycleConfigurationInput(v *G return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2537,6 +2933,10 @@ func (*awsRestxml_serializeOpGetBucketLocation) ID() string { func (m *awsRestxml_serializeOpGetBucketLocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2573,6 +2973,8 @@ func (m *awsRestxml_serializeOpGetBucketLocation) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketLocationInput(v *GetBucketLocationInput, encoder *httpbinding.Encoder) error { @@ -2580,7 +2982,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketLocationInput(v *GetBucketLocati return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2598,6 +3000,10 @@ func (*awsRestxml_serializeOpGetBucketLogging) ID() string { func (m *awsRestxml_serializeOpGetBucketLogging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2634,6 +3040,8 @@ func (m *awsRestxml_serializeOpGetBucketLogging) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketLoggingInput(v *GetBucketLoggingInput, encoder *httpbinding.Encoder) error { @@ -2641,7 +3049,74 @@ func awsRestxml_serializeOpHttpBindingsGetBucketLoggingInput(v *GetBucketLogging return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { + locationName := "X-Amz-Expected-Bucket-Owner" + encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) + } + + return nil +} + +type awsRestxml_serializeOpGetBucketMetadataTableConfiguration struct { +} + +func (*awsRestxml_serializeOpGetBucketMetadataTableConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetBucketMetadataTableConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetBucketMetadataTableConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/?metadataTable") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetBucketMetadataTableConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetBucketMetadataTableConfigurationInput(v *GetBucketMetadataTableConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2659,6 +3134,10 @@ func (*awsRestxml_serializeOpGetBucketMetricsConfiguration) ID() string { func (m *awsRestxml_serializeOpGetBucketMetricsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2695,6 +3174,8 @@ func (m *awsRestxml_serializeOpGetBucketMetricsConfiguration) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketMetricsConfigurationInput(v *GetBucketMetricsConfigurationInput, encoder *httpbinding.Encoder) error { @@ -2702,7 +3183,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketMetricsConfigurationInput(v *Get return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2724,6 +3205,10 @@ func (*awsRestxml_serializeOpGetBucketNotificationConfiguration) ID() string { func (m *awsRestxml_serializeOpGetBucketNotificationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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 +3245,8 @@ func (m *awsRestxml_serializeOpGetBucketNotificationConfiguration) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketNotificationConfigurationInput(v *GetBucketNotificationConfigurationInput, encoder *httpbinding.Encoder) error { @@ -2767,7 +3254,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketNotificationConfigurationInput(v return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2785,6 +3272,10 @@ func (*awsRestxml_serializeOpGetBucketOwnershipControls) ID() string { func (m *awsRestxml_serializeOpGetBucketOwnershipControls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2821,6 +3312,8 @@ func (m *awsRestxml_serializeOpGetBucketOwnershipControls) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketOwnershipControlsInput(v *GetBucketOwnershipControlsInput, encoder *httpbinding.Encoder) error { @@ -2828,7 +3321,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketOwnershipControlsInput(v *GetBuc return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2846,6 +3339,10 @@ func (*awsRestxml_serializeOpGetBucketPolicy) ID() string { func (m *awsRestxml_serializeOpGetBucketPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2882,6 +3379,8 @@ func (m *awsRestxml_serializeOpGetBucketPolicy) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketPolicyInput(v *GetBucketPolicyInput, encoder *httpbinding.Encoder) error { @@ -2889,7 +3388,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketPolicyInput(v *GetBucketPolicyIn return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2907,6 +3406,10 @@ func (*awsRestxml_serializeOpGetBucketPolicyStatus) ID() string { func (m *awsRestxml_serializeOpGetBucketPolicyStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2943,6 +3446,8 @@ func (m *awsRestxml_serializeOpGetBucketPolicyStatus) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketPolicyStatusInput(v *GetBucketPolicyStatusInput, encoder *httpbinding.Encoder) error { @@ -2950,7 +3455,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketPolicyStatusInput(v *GetBucketPo return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -2968,6 +3473,10 @@ func (*awsRestxml_serializeOpGetBucketReplication) ID() string { func (m *awsRestxml_serializeOpGetBucketReplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3004,6 +3513,8 @@ func (m *awsRestxml_serializeOpGetBucketReplication) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketReplicationInput(v *GetBucketReplicationInput, encoder *httpbinding.Encoder) error { @@ -3011,7 +3522,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketReplicationInput(v *GetBucketRep return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3029,6 +3540,10 @@ func (*awsRestxml_serializeOpGetBucketRequestPayment) ID() string { func (m *awsRestxml_serializeOpGetBucketRequestPayment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3065,6 +3580,8 @@ func (m *awsRestxml_serializeOpGetBucketRequestPayment) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketRequestPaymentInput(v *GetBucketRequestPaymentInput, encoder *httpbinding.Encoder) error { @@ -3072,7 +3589,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketRequestPaymentInput(v *GetBucket return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3090,6 +3607,10 @@ func (*awsRestxml_serializeOpGetBucketTagging) ID() string { func (m *awsRestxml_serializeOpGetBucketTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3126,6 +3647,8 @@ func (m *awsRestxml_serializeOpGetBucketTagging) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketTaggingInput(v *GetBucketTaggingInput, encoder *httpbinding.Encoder) error { @@ -3133,7 +3656,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketTaggingInput(v *GetBucketTagging return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3151,6 +3674,10 @@ func (*awsRestxml_serializeOpGetBucketVersioning) ID() string { func (m *awsRestxml_serializeOpGetBucketVersioning) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3187,6 +3714,8 @@ func (m *awsRestxml_serializeOpGetBucketVersioning) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketVersioningInput(v *GetBucketVersioningInput, encoder *httpbinding.Encoder) error { @@ -3194,7 +3723,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketVersioningInput(v *GetBucketVers return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3212,6 +3741,10 @@ func (*awsRestxml_serializeOpGetBucketWebsite) ID() string { func (m *awsRestxml_serializeOpGetBucketWebsite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3248,6 +3781,8 @@ func (m *awsRestxml_serializeOpGetBucketWebsite) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetBucketWebsiteInput(v *GetBucketWebsiteInput, encoder *httpbinding.Encoder) error { @@ -3255,7 +3790,7 @@ func awsRestxml_serializeOpHttpBindingsGetBucketWebsiteInput(v *GetBucketWebsite return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3273,6 +3808,10 @@ func (*awsRestxml_serializeOpGetObject) ID() string { func (m *awsRestxml_serializeOpGetObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3309,6 +3848,8 @@ func (m *awsRestxml_serializeOpGetObject) HandleSerialize(ctx context.Context, i } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetObjectInput(v *GetObjectInput, encoder *httpbinding.Encoder) error { @@ -3321,12 +3862,12 @@ func awsRestxml_serializeOpHttpBindingsGetObjectInput(v *GetObjectInput, encoder encoder.SetHeader(locationName).String(string(v.ChecksumMode)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.IfMatch != nil && len(*v.IfMatch) > 0 { + if v.IfMatch != nil { locationName := "If-Match" encoder.SetHeader(locationName).String(*v.IfMatch) } @@ -3336,7 +3877,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectInput(v *GetObjectInput, encoder encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfModifiedSince)) } - if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 { + if v.IfNoneMatch != nil { locationName := "If-None-Match" encoder.SetHeader(locationName).String(*v.IfNoneMatch) } @@ -3359,7 +3900,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectInput(v *GetObjectInput, encoder encoder.SetQuery("partNumber").Integer(*v.PartNumber) } - if v.Range != nil && len(*v.Range) > 0 { + if v.Range != nil { locationName := "Range" encoder.SetHeader(locationName).String(*v.Range) } @@ -3393,17 +3934,17 @@ func awsRestxml_serializeOpHttpBindingsGetObjectInput(v *GetObjectInput, encoder encoder.SetQuery("response-expires").String(smithytime.FormatHTTPDate(*v.ResponseExpires)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } @@ -3425,6 +3966,10 @@ func (*awsRestxml_serializeOpGetObjectAcl) ID() string { func (m *awsRestxml_serializeOpGetObjectAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3461,6 +4006,8 @@ func (m *awsRestxml_serializeOpGetObjectAcl) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetObjectAclInput(v *GetObjectAclInput, encoder *httpbinding.Encoder) error { @@ -3468,7 +4015,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectAclInput(v *GetObjectAclInput, e return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3504,6 +4051,10 @@ func (*awsRestxml_serializeOpGetObjectAttributes) ID() string { func (m *awsRestxml_serializeOpGetObjectAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3540,6 +4091,8 @@ func (m *awsRestxml_serializeOpGetObjectAttributes) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetObjectAttributesInput(v *GetObjectAttributesInput, encoder *httpbinding.Encoder) error { @@ -3547,7 +4100,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectAttributesInput(v *GetObjectAttr return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3568,6 +4121,9 @@ func awsRestxml_serializeOpHttpBindingsGetObjectAttributesInput(v *GetObjectAttr if v.ObjectAttributes != nil { locationName := "X-Amz-Object-Attributes" + if len(v.ObjectAttributes) == 0 { + encoder.AddHeader(locationName).String("") + } for i := range v.ObjectAttributes { if len(v.ObjectAttributes[i]) > 0 { escaped := string(v.ObjectAttributes[i]) @@ -3580,7 +4136,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectAttributesInput(v *GetObjectAttr } } - if v.PartNumberMarker != nil && len(*v.PartNumberMarker) > 0 { + if v.PartNumberMarker != nil { locationName := "X-Amz-Part-Number-Marker" encoder.SetHeader(locationName).String(*v.PartNumberMarker) } @@ -3590,17 +4146,17 @@ func awsRestxml_serializeOpHttpBindingsGetObjectAttributesInput(v *GetObjectAttr encoder.SetHeader(locationName).String(string(v.RequestPayer)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } @@ -3622,6 +4178,10 @@ func (*awsRestxml_serializeOpGetObjectLegalHold) ID() string { func (m *awsRestxml_serializeOpGetObjectLegalHold) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3658,6 +4218,8 @@ func (m *awsRestxml_serializeOpGetObjectLegalHold) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetObjectLegalHoldInput(v *GetObjectLegalHoldInput, encoder *httpbinding.Encoder) error { @@ -3665,7 +4227,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectLegalHoldInput(v *GetObjectLegal return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3701,6 +4263,10 @@ func (*awsRestxml_serializeOpGetObjectLockConfiguration) ID() string { func (m *awsRestxml_serializeOpGetObjectLockConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3737,6 +4303,8 @@ func (m *awsRestxml_serializeOpGetObjectLockConfiguration) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetObjectLockConfigurationInput(v *GetObjectLockConfigurationInput, encoder *httpbinding.Encoder) error { @@ -3744,7 +4312,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectLockConfigurationInput(v *GetObj return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3762,6 +4330,10 @@ func (*awsRestxml_serializeOpGetObjectRetention) ID() string { func (m *awsRestxml_serializeOpGetObjectRetention) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3798,6 +4370,8 @@ func (m *awsRestxml_serializeOpGetObjectRetention) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetObjectRetentionInput(v *GetObjectRetentionInput, encoder *httpbinding.Encoder) error { @@ -3805,7 +4379,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectRetentionInput(v *GetObjectReten return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3841,6 +4415,10 @@ func (*awsRestxml_serializeOpGetObjectTagging) ID() string { func (m *awsRestxml_serializeOpGetObjectTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3877,6 +4455,8 @@ func (m *awsRestxml_serializeOpGetObjectTagging) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetObjectTaggingInput(v *GetObjectTaggingInput, encoder *httpbinding.Encoder) error { @@ -3884,7 +4464,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectTaggingInput(v *GetObjectTagging return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3920,6 +4500,10 @@ func (*awsRestxml_serializeOpGetObjectTorrent) ID() string { func (m *awsRestxml_serializeOpGetObjectTorrent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3956,6 +4540,8 @@ func (m *awsRestxml_serializeOpGetObjectTorrent) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetObjectTorrentInput(v *GetObjectTorrentInput, encoder *httpbinding.Encoder) error { @@ -3963,7 +4549,7 @@ func awsRestxml_serializeOpHttpBindingsGetObjectTorrentInput(v *GetObjectTorrent return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -3995,6 +4581,10 @@ func (*awsRestxml_serializeOpGetPublicAccessBlock) ID() string { func (m *awsRestxml_serializeOpGetPublicAccessBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4031,6 +4621,8 @@ func (m *awsRestxml_serializeOpGetPublicAccessBlock) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsGetPublicAccessBlockInput(v *GetPublicAccessBlockInput, encoder *httpbinding.Encoder) error { @@ -4038,7 +4630,7 @@ func awsRestxml_serializeOpHttpBindingsGetPublicAccessBlockInput(v *GetPublicAcc return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -4056,6 +4648,10 @@ func (*awsRestxml_serializeOpHeadBucket) ID() string { func (m *awsRestxml_serializeOpHeadBucket) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4092,6 +4688,8 @@ func (m *awsRestxml_serializeOpHeadBucket) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsHeadBucketInput(v *HeadBucketInput, encoder *httpbinding.Encoder) error { @@ -4099,7 +4697,7 @@ func awsRestxml_serializeOpHttpBindingsHeadBucketInput(v *HeadBucketInput, encod return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -4117,6 +4715,10 @@ func (*awsRestxml_serializeOpHeadObject) ID() string { func (m *awsRestxml_serializeOpHeadObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4153,6 +4755,8 @@ func (m *awsRestxml_serializeOpHeadObject) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsHeadObjectInput(v *HeadObjectInput, encoder *httpbinding.Encoder) error { @@ -4165,12 +4769,12 @@ func awsRestxml_serializeOpHttpBindingsHeadObjectInput(v *HeadObjectInput, encod encoder.SetHeader(locationName).String(string(v.ChecksumMode)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.IfMatch != nil && len(*v.IfMatch) > 0 { + if v.IfMatch != nil { locationName := "If-Match" encoder.SetHeader(locationName).String(*v.IfMatch) } @@ -4180,7 +4784,7 @@ func awsRestxml_serializeOpHttpBindingsHeadObjectInput(v *HeadObjectInput, encod encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfModifiedSince)) } - if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 { + if v.IfNoneMatch != nil { locationName := "If-None-Match" encoder.SetHeader(locationName).String(*v.IfNoneMatch) } @@ -4203,7 +4807,7 @@ func awsRestxml_serializeOpHttpBindingsHeadObjectInput(v *HeadObjectInput, encod encoder.SetQuery("partNumber").Integer(*v.PartNumber) } - if v.Range != nil && len(*v.Range) > 0 { + if v.Range != nil { locationName := "Range" encoder.SetHeader(locationName).String(*v.Range) } @@ -4237,17 +4841,17 @@ func awsRestxml_serializeOpHttpBindingsHeadObjectInput(v *HeadObjectInput, encod encoder.SetQuery("response-expires").String(smithytime.FormatHTTPDate(*v.ResponseExpires)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } @@ -4269,6 +4873,10 @@ func (*awsRestxml_serializeOpListBucketAnalyticsConfigurations) ID() string { func (m *awsRestxml_serializeOpListBucketAnalyticsConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4305,6 +4913,8 @@ func (m *awsRestxml_serializeOpListBucketAnalyticsConfigurations) HandleSerializ } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListBucketAnalyticsConfigurationsInput(v *ListBucketAnalyticsConfigurationsInput, encoder *httpbinding.Encoder) error { @@ -4316,7 +4926,7 @@ func awsRestxml_serializeOpHttpBindingsListBucketAnalyticsConfigurationsInput(v encoder.SetQuery("continuation-token").String(*v.ContinuationToken) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -4334,6 +4944,10 @@ func (*awsRestxml_serializeOpListBucketIntelligentTieringConfigurations) ID() st func (m *awsRestxml_serializeOpListBucketIntelligentTieringConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4370,6 +4984,8 @@ func (m *awsRestxml_serializeOpListBucketIntelligentTieringConfigurations) Handl } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListBucketIntelligentTieringConfigurationsInput(v *ListBucketIntelligentTieringConfigurationsInput, encoder *httpbinding.Encoder) error { @@ -4394,6 +5010,10 @@ func (*awsRestxml_serializeOpListBucketInventoryConfigurations) ID() string { func (m *awsRestxml_serializeOpListBucketInventoryConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4430,6 +5050,8 @@ func (m *awsRestxml_serializeOpListBucketInventoryConfigurations) HandleSerializ } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListBucketInventoryConfigurationsInput(v *ListBucketInventoryConfigurationsInput, encoder *httpbinding.Encoder) error { @@ -4441,7 +5063,7 @@ func awsRestxml_serializeOpHttpBindingsListBucketInventoryConfigurationsInput(v encoder.SetQuery("continuation-token").String(*v.ContinuationToken) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -4459,6 +5081,10 @@ func (*awsRestxml_serializeOpListBucketMetricsConfigurations) ID() string { func (m *awsRestxml_serializeOpListBucketMetricsConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4495,6 +5121,8 @@ func (m *awsRestxml_serializeOpListBucketMetricsConfigurations) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListBucketMetricsConfigurationsInput(v *ListBucketMetricsConfigurationsInput, encoder *httpbinding.Encoder) error { @@ -4506,7 +5134,7 @@ func awsRestxml_serializeOpHttpBindingsListBucketMetricsConfigurationsInput(v *L encoder.SetQuery("continuation-token").String(*v.ContinuationToken) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -4524,6 +5152,10 @@ func (*awsRestxml_serializeOpListBuckets) ID() string { func (m *awsRestxml_serializeOpListBuckets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4560,6 +5192,8 @@ func (m *awsRestxml_serializeOpListBuckets) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListBucketsInput(v *ListBucketsInput, encoder *httpbinding.Encoder) error { @@ -4567,6 +5201,10 @@ func awsRestxml_serializeOpHttpBindingsListBucketsInput(v *ListBucketsInput, enc return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.BucketRegion != nil { + encoder.SetQuery("bucket-region").String(*v.BucketRegion) + } + if v.ContinuationToken != nil { encoder.SetQuery("continuation-token").String(*v.ContinuationToken) } @@ -4575,6 +5213,10 @@ func awsRestxml_serializeOpHttpBindingsListBucketsInput(v *ListBucketsInput, enc encoder.SetQuery("max-buckets").Integer(*v.MaxBuckets) } + if v.Prefix != nil { + encoder.SetQuery("prefix").String(*v.Prefix) + } + return nil } @@ -4588,6 +5230,10 @@ func (*awsRestxml_serializeOpListDirectoryBuckets) ID() string { func (m *awsRestxml_serializeOpListDirectoryBuckets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4624,6 +5270,8 @@ func (m *awsRestxml_serializeOpListDirectoryBuckets) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListDirectoryBucketsInput(v *ListDirectoryBucketsInput, encoder *httpbinding.Encoder) error { @@ -4652,6 +5300,10 @@ func (*awsRestxml_serializeOpListMultipartUploads) ID() string { func (m *awsRestxml_serializeOpListMultipartUploads) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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 +5340,8 @@ func (m *awsRestxml_serializeOpListMultipartUploads) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListMultipartUploadsInput(v *ListMultipartUploadsInput, encoder *httpbinding.Encoder) error { @@ -4703,7 +5357,7 @@ func awsRestxml_serializeOpHttpBindingsListMultipartUploadsInput(v *ListMultipar encoder.SetQuery("encoding-type").String(string(v.EncodingType)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -4742,6 +5396,10 @@ func (*awsRestxml_serializeOpListObjects) ID() string { func (m *awsRestxml_serializeOpListObjects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4778,6 +5436,8 @@ func (m *awsRestxml_serializeOpListObjects) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListObjectsInput(v *ListObjectsInput, encoder *httpbinding.Encoder) error { @@ -4793,7 +5453,7 @@ func awsRestxml_serializeOpHttpBindingsListObjectsInput(v *ListObjectsInput, enc encoder.SetQuery("encoding-type").String(string(v.EncodingType)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -4808,6 +5468,9 @@ func awsRestxml_serializeOpHttpBindingsListObjectsInput(v *ListObjectsInput, enc if v.OptionalObjectAttributes != nil { locationName := "X-Amz-Optional-Object-Attributes" + if len(v.OptionalObjectAttributes) == 0 { + encoder.AddHeader(locationName).String("") + } for i := range v.OptionalObjectAttributes { if len(v.OptionalObjectAttributes[i]) > 0 { escaped := string(v.OptionalObjectAttributes[i]) @@ -4842,6 +5505,10 @@ func (*awsRestxml_serializeOpListObjectsV2) ID() string { func (m *awsRestxml_serializeOpListObjectsV2) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4878,6 +5545,8 @@ func (m *awsRestxml_serializeOpListObjectsV2) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListObjectsV2Input(v *ListObjectsV2Input, encoder *httpbinding.Encoder) error { @@ -4897,7 +5566,7 @@ func awsRestxml_serializeOpHttpBindingsListObjectsV2Input(v *ListObjectsV2Input, encoder.SetQuery("encoding-type").String(string(v.EncodingType)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -4912,6 +5581,9 @@ func awsRestxml_serializeOpHttpBindingsListObjectsV2Input(v *ListObjectsV2Input, if v.OptionalObjectAttributes != nil { locationName := "X-Amz-Optional-Object-Attributes" + if len(v.OptionalObjectAttributes) == 0 { + encoder.AddHeader(locationName).String("") + } for i := range v.OptionalObjectAttributes { if len(v.OptionalObjectAttributes[i]) > 0 { escaped := string(v.OptionalObjectAttributes[i]) @@ -4950,6 +5622,10 @@ func (*awsRestxml_serializeOpListObjectVersions) ID() string { func (m *awsRestxml_serializeOpListObjectVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4986,6 +5662,8 @@ func (m *awsRestxml_serializeOpListObjectVersions) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListObjectVersionsInput(v *ListObjectVersionsInput, encoder *httpbinding.Encoder) error { @@ -5001,7 +5679,7 @@ func awsRestxml_serializeOpHttpBindingsListObjectVersionsInput(v *ListObjectVers encoder.SetQuery("encoding-type").String(string(v.EncodingType)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -5016,6 +5694,9 @@ func awsRestxml_serializeOpHttpBindingsListObjectVersionsInput(v *ListObjectVers if v.OptionalObjectAttributes != nil { locationName := "X-Amz-Optional-Object-Attributes" + if len(v.OptionalObjectAttributes) == 0 { + encoder.AddHeader(locationName).String("") + } for i := range v.OptionalObjectAttributes { if len(v.OptionalObjectAttributes[i]) > 0 { escaped := string(v.OptionalObjectAttributes[i]) @@ -5054,6 +5735,10 @@ func (*awsRestxml_serializeOpListParts) ID() string { func (m *awsRestxml_serializeOpListParts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5090,6 +5775,8 @@ func (m *awsRestxml_serializeOpListParts) HandleSerialize(ctx context.Context, i } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsListPartsInput(v *ListPartsInput, encoder *httpbinding.Encoder) error { @@ -5097,7 +5784,7 @@ func awsRestxml_serializeOpHttpBindingsListPartsInput(v *ListPartsInput, encoder return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -5124,17 +5811,17 @@ func awsRestxml_serializeOpHttpBindingsListPartsInput(v *ListPartsInput, encoder encoder.SetHeader(locationName).String(string(v.RequestPayer)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } @@ -5156,6 +5843,10 @@ func (*awsRestxml_serializeOpPutBucketAccelerateConfiguration) ID() string { func (m *awsRestxml_serializeOpPutBucketAccelerateConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5216,6 +5907,8 @@ func (m *awsRestxml_serializeOpPutBucketAccelerateConfiguration) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketAccelerateConfigurationInput(v *PutBucketAccelerateConfigurationInput, encoder *httpbinding.Encoder) error { @@ -5228,7 +5921,7 @@ func awsRestxml_serializeOpHttpBindingsPutBucketAccelerateConfigurationInput(v * encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -5246,6 +5939,10 @@ func (*awsRestxml_serializeOpPutBucketAcl) ID() string { func (m *awsRestxml_serializeOpPutBucketAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5306,6 +6003,8 @@ func (m *awsRestxml_serializeOpPutBucketAcl) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketAclInput(v *PutBucketAclInput, encoder *httpbinding.Encoder) error { @@ -5323,37 +6022,37 @@ func awsRestxml_serializeOpHttpBindingsPutBucketAclInput(v *PutBucketAclInput, e encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 { + if v.GrantFullControl != nil { locationName := "X-Amz-Grant-Full-Control" encoder.SetHeader(locationName).String(*v.GrantFullControl) } - if v.GrantRead != nil && len(*v.GrantRead) > 0 { + if v.GrantRead != nil { locationName := "X-Amz-Grant-Read" encoder.SetHeader(locationName).String(*v.GrantRead) } - if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 { + if v.GrantReadACP != nil { locationName := "X-Amz-Grant-Read-Acp" encoder.SetHeader(locationName).String(*v.GrantReadACP) } - if v.GrantWrite != nil && len(*v.GrantWrite) > 0 { + if v.GrantWrite != nil { locationName := "X-Amz-Grant-Write" encoder.SetHeader(locationName).String(*v.GrantWrite) } - if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 { + if v.GrantWriteACP != nil { locationName := "X-Amz-Grant-Write-Acp" encoder.SetHeader(locationName).String(*v.GrantWriteACP) } @@ -5371,6 +6070,10 @@ func (*awsRestxml_serializeOpPutBucketAnalyticsConfiguration) ID() string { func (m *awsRestxml_serializeOpPutBucketAnalyticsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5431,6 +6134,8 @@ func (m *awsRestxml_serializeOpPutBucketAnalyticsConfiguration) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketAnalyticsConfigurationInput(v *PutBucketAnalyticsConfigurationInput, encoder *httpbinding.Encoder) error { @@ -5438,7 +6143,7 @@ func awsRestxml_serializeOpHttpBindingsPutBucketAnalyticsConfigurationInput(v *P return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -5460,6 +6165,10 @@ func (*awsRestxml_serializeOpPutBucketCors) ID() string { func (m *awsRestxml_serializeOpPutBucketCors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5520,6 +6229,8 @@ func (m *awsRestxml_serializeOpPutBucketCors) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketCorsInput(v *PutBucketCorsInput, encoder *httpbinding.Encoder) error { @@ -5532,12 +6243,12 @@ func awsRestxml_serializeOpHttpBindingsPutBucketCorsInput(v *PutBucketCorsInput, encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -5555,6 +6266,10 @@ func (*awsRestxml_serializeOpPutBucketEncryption) ID() string { func (m *awsRestxml_serializeOpPutBucketEncryption) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5615,6 +6330,8 @@ func (m *awsRestxml_serializeOpPutBucketEncryption) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketEncryptionInput(v *PutBucketEncryptionInput, encoder *httpbinding.Encoder) error { @@ -5627,12 +6344,12 @@ func awsRestxml_serializeOpHttpBindingsPutBucketEncryptionInput(v *PutBucketEncr encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -5650,6 +6367,10 @@ func (*awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) ID() stri func (m *awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5710,6 +6431,8 @@ func (m *awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) HandleS } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketIntelligentTieringConfigurationInput(v *PutBucketIntelligentTieringConfigurationInput, encoder *httpbinding.Encoder) error { @@ -5734,6 +6457,10 @@ func (*awsRestxml_serializeOpPutBucketInventoryConfiguration) ID() string { func (m *awsRestxml_serializeOpPutBucketInventoryConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5794,6 +6521,8 @@ func (m *awsRestxml_serializeOpPutBucketInventoryConfiguration) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketInventoryConfigurationInput(v *PutBucketInventoryConfigurationInput, encoder *httpbinding.Encoder) error { @@ -5801,7 +6530,7 @@ func awsRestxml_serializeOpHttpBindingsPutBucketInventoryConfigurationInput(v *P return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -5823,6 +6552,10 @@ func (*awsRestxml_serializeOpPutBucketLifecycleConfiguration) ID() string { func (m *awsRestxml_serializeOpPutBucketLifecycleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5883,6 +6616,8 @@ func (m *awsRestxml_serializeOpPutBucketLifecycleConfiguration) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketLifecycleConfigurationInput(v *PutBucketLifecycleConfigurationInput, encoder *httpbinding.Encoder) error { @@ -5895,11 +6630,16 @@ func awsRestxml_serializeOpHttpBindingsPutBucketLifecycleConfigurationInput(v *P encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } + if len(v.TransitionDefaultMinimumObjectSize) > 0 { + locationName := "X-Amz-Transition-Default-Minimum-Object-Size" + encoder.SetHeader(locationName).String(string(v.TransitionDefaultMinimumObjectSize)) + } + return nil } @@ -5913,6 +6653,10 @@ func (*awsRestxml_serializeOpPutBucketLogging) ID() string { func (m *awsRestxml_serializeOpPutBucketLogging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5973,6 +6717,8 @@ func (m *awsRestxml_serializeOpPutBucketLogging) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketLoggingInput(v *PutBucketLoggingInput, encoder *httpbinding.Encoder) error { @@ -5985,12 +6731,12 @@ func awsRestxml_serializeOpHttpBindingsPutBucketLoggingInput(v *PutBucketLogging encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -6008,6 +6754,10 @@ func (*awsRestxml_serializeOpPutBucketMetricsConfiguration) ID() string { func (m *awsRestxml_serializeOpPutBucketMetricsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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 +6818,8 @@ func (m *awsRestxml_serializeOpPutBucketMetricsConfiguration) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketMetricsConfigurationInput(v *PutBucketMetricsConfigurationInput, encoder *httpbinding.Encoder) error { @@ -6075,7 +6827,7 @@ func awsRestxml_serializeOpHttpBindingsPutBucketMetricsConfigurationInput(v *Put return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -6097,6 +6849,10 @@ func (*awsRestxml_serializeOpPutBucketNotificationConfiguration) ID() string { func (m *awsRestxml_serializeOpPutBucketNotificationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6157,6 +6913,8 @@ func (m *awsRestxml_serializeOpPutBucketNotificationConfiguration) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketNotificationConfigurationInput(v *PutBucketNotificationConfigurationInput, encoder *httpbinding.Encoder) error { @@ -6164,7 +6922,7 @@ func awsRestxml_serializeOpHttpBindingsPutBucketNotificationConfigurationInput(v return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -6187,6 +6945,10 @@ func (*awsRestxml_serializeOpPutBucketOwnershipControls) ID() string { func (m *awsRestxml_serializeOpPutBucketOwnershipControls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6247,6 +7009,8 @@ func (m *awsRestxml_serializeOpPutBucketOwnershipControls) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketOwnershipControlsInput(v *PutBucketOwnershipControlsInput, encoder *httpbinding.Encoder) error { @@ -6254,12 +7018,12 @@ func awsRestxml_serializeOpHttpBindingsPutBucketOwnershipControlsInput(v *PutBuc return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -6277,6 +7041,10 @@ func (*awsRestxml_serializeOpPutBucketPolicy) ID() string { func (m *awsRestxml_serializeOpPutBucketPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6325,6 +7093,8 @@ func (m *awsRestxml_serializeOpPutBucketPolicy) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketPolicyInput(v *PutBucketPolicyInput, encoder *httpbinding.Encoder) error { @@ -6342,12 +7112,12 @@ func awsRestxml_serializeOpHttpBindingsPutBucketPolicyInput(v *PutBucketPolicyIn encoder.SetHeader(locationName).Boolean(*v.ConfirmRemoveSelfBucketAccess) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -6365,6 +7135,10 @@ func (*awsRestxml_serializeOpPutBucketReplication) ID() string { func (m *awsRestxml_serializeOpPutBucketReplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6425,6 +7199,8 @@ func (m *awsRestxml_serializeOpPutBucketReplication) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketReplicationInput(v *PutBucketReplicationInput, encoder *httpbinding.Encoder) error { @@ -6437,17 +7213,17 @@ func awsRestxml_serializeOpHttpBindingsPutBucketReplicationInput(v *PutBucketRep encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.Token != nil && len(*v.Token) > 0 { + if v.Token != nil { locationName := "X-Amz-Bucket-Object-Lock-Token" encoder.SetHeader(locationName).String(*v.Token) } @@ -6465,6 +7241,10 @@ func (*awsRestxml_serializeOpPutBucketRequestPayment) ID() string { func (m *awsRestxml_serializeOpPutBucketRequestPayment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6525,6 +7305,8 @@ func (m *awsRestxml_serializeOpPutBucketRequestPayment) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketRequestPaymentInput(v *PutBucketRequestPaymentInput, encoder *httpbinding.Encoder) error { @@ -6537,12 +7319,12 @@ func awsRestxml_serializeOpHttpBindingsPutBucketRequestPaymentInput(v *PutBucket encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -6560,6 +7342,10 @@ func (*awsRestxml_serializeOpPutBucketTagging) ID() string { func (m *awsRestxml_serializeOpPutBucketTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6620,6 +7406,8 @@ func (m *awsRestxml_serializeOpPutBucketTagging) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketTaggingInput(v *PutBucketTaggingInput, encoder *httpbinding.Encoder) error { @@ -6632,12 +7420,12 @@ func awsRestxml_serializeOpHttpBindingsPutBucketTaggingInput(v *PutBucketTagging encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -6655,6 +7443,10 @@ func (*awsRestxml_serializeOpPutBucketVersioning) ID() string { func (m *awsRestxml_serializeOpPutBucketVersioning) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6715,6 +7507,8 @@ func (m *awsRestxml_serializeOpPutBucketVersioning) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketVersioningInput(v *PutBucketVersioningInput, encoder *httpbinding.Encoder) error { @@ -6727,17 +7521,17 @@ func awsRestxml_serializeOpHttpBindingsPutBucketVersioningInput(v *PutBucketVers encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.MFA != nil && len(*v.MFA) > 0 { + if v.MFA != nil { locationName := "X-Amz-Mfa" encoder.SetHeader(locationName).String(*v.MFA) } @@ -6755,6 +7549,10 @@ func (*awsRestxml_serializeOpPutBucketWebsite) ID() string { func (m *awsRestxml_serializeOpPutBucketWebsite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6815,6 +7613,8 @@ func (m *awsRestxml_serializeOpPutBucketWebsite) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutBucketWebsiteInput(v *PutBucketWebsiteInput, encoder *httpbinding.Encoder) error { @@ -6827,12 +7627,12 @@ func awsRestxml_serializeOpHttpBindingsPutBucketWebsiteInput(v *PutBucketWebsite encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -6850,6 +7650,10 @@ func (*awsRestxml_serializeOpPutObject) ID() string { func (m *awsRestxml_serializeOpPutObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6898,6 +7702,8 @@ func (m *awsRestxml_serializeOpPutObject) HandleSerialize(ctx context.Context, i } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder *httpbinding.Encoder) error { @@ -6915,7 +7721,7 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder encoder.SetHeader(locationName).Boolean(*v.BucketKeyEnabled) } - if v.CacheControl != nil && len(*v.CacheControl) > 0 { + if v.CacheControl != nil { locationName := "Cache-Control" encoder.SetHeader(locationName).String(*v.CacheControl) } @@ -6925,37 +7731,37 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ChecksumCRC32 != nil && len(*v.ChecksumCRC32) > 0 { + if v.ChecksumCRC32 != nil { locationName := "X-Amz-Checksum-Crc32" encoder.SetHeader(locationName).String(*v.ChecksumCRC32) } - if v.ChecksumCRC32C != nil && len(*v.ChecksumCRC32C) > 0 { + if v.ChecksumCRC32C != nil { locationName := "X-Amz-Checksum-Crc32c" encoder.SetHeader(locationName).String(*v.ChecksumCRC32C) } - if v.ChecksumSHA1 != nil && len(*v.ChecksumSHA1) > 0 { + if v.ChecksumSHA1 != nil { locationName := "X-Amz-Checksum-Sha1" encoder.SetHeader(locationName).String(*v.ChecksumSHA1) } - if v.ChecksumSHA256 != nil && len(*v.ChecksumSHA256) > 0 { + if v.ChecksumSHA256 != nil { locationName := "X-Amz-Checksum-Sha256" encoder.SetHeader(locationName).String(*v.ChecksumSHA256) } - if v.ContentDisposition != nil && len(*v.ContentDisposition) > 0 { + if v.ContentDisposition != nil { locationName := "Content-Disposition" encoder.SetHeader(locationName).String(*v.ContentDisposition) } - if v.ContentEncoding != nil && len(*v.ContentEncoding) > 0 { + if v.ContentEncoding != nil { locationName := "Content-Encoding" encoder.SetHeader(locationName).String(*v.ContentEncoding) } - if v.ContentLanguage != nil && len(*v.ContentLanguage) > 0 { + if v.ContentLanguage != nil { locationName := "Content-Language" encoder.SetHeader(locationName).String(*v.ContentLanguage) } @@ -6965,17 +7771,17 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder encoder.SetHeader(locationName).Long(*v.ContentLength) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ContentType != nil && len(*v.ContentType) > 0 { + if v.ContentType != nil { locationName := "Content-Type" encoder.SetHeader(locationName).String(*v.ContentType) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -6985,27 +7791,32 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.Expires)) } - if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 { + if v.GrantFullControl != nil { locationName := "X-Amz-Grant-Full-Control" encoder.SetHeader(locationName).String(*v.GrantFullControl) } - if v.GrantRead != nil && len(*v.GrantRead) > 0 { + if v.GrantRead != nil { locationName := "X-Amz-Grant-Read" encoder.SetHeader(locationName).String(*v.GrantRead) } - if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 { + if v.GrantReadACP != nil { locationName := "X-Amz-Grant-Read-Acp" encoder.SetHeader(locationName).String(*v.GrantReadACP) } - if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 { + if v.GrantWriteACP != nil { locationName := "X-Amz-Grant-Write-Acp" encoder.SetHeader(locationName).String(*v.GrantWriteACP) } - if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 { + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.IfNoneMatch != nil { locationName := "If-None-Match" encoder.SetHeader(locationName).String(*v.IfNoneMatch) } @@ -7022,9 +7833,7 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder if v.Metadata != nil { hv := encoder.Headers("X-Amz-Meta-") for mapKey, mapVal := range v.Metadata { - if len(mapVal) > 0 { - hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal) - } + hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal) } } @@ -7053,27 +7862,27 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder encoder.SetHeader(locationName).String(string(v.ServerSideEncryption)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } - if v.SSEKMSEncryptionContext != nil && len(*v.SSEKMSEncryptionContext) > 0 { + if v.SSEKMSEncryptionContext != nil { locationName := "X-Amz-Server-Side-Encryption-Context" encoder.SetHeader(locationName).String(*v.SSEKMSEncryptionContext) } - if v.SSEKMSKeyId != nil && len(*v.SSEKMSKeyId) > 0 { + if v.SSEKMSKeyId != nil { locationName := "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id" encoder.SetHeader(locationName).String(*v.SSEKMSKeyId) } @@ -7083,16 +7892,21 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder encoder.SetHeader(locationName).String(string(v.StorageClass)) } - if v.Tagging != nil && len(*v.Tagging) > 0 { + if v.Tagging != nil { locationName := "X-Amz-Tagging" encoder.SetHeader(locationName).String(*v.Tagging) } - if v.WebsiteRedirectLocation != nil && len(*v.WebsiteRedirectLocation) > 0 { + if v.WebsiteRedirectLocation != nil { locationName := "X-Amz-Website-Redirect-Location" encoder.SetHeader(locationName).String(*v.WebsiteRedirectLocation) } + if v.WriteOffsetBytes != nil { + locationName := "X-Amz-Write-Offset-Bytes" + encoder.SetHeader(locationName).Long(*v.WriteOffsetBytes) + } + return nil } @@ -7106,6 +7920,10 @@ func (*awsRestxml_serializeOpPutObjectAcl) ID() string { func (m *awsRestxml_serializeOpPutObjectAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7166,6 +7984,8 @@ func (m *awsRestxml_serializeOpPutObjectAcl) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutObjectAclInput(v *PutObjectAclInput, encoder *httpbinding.Encoder) error { @@ -7183,37 +8003,37 @@ func awsRestxml_serializeOpHttpBindingsPutObjectAclInput(v *PutObjectAclInput, e encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 { + if v.GrantFullControl != nil { locationName := "X-Amz-Grant-Full-Control" encoder.SetHeader(locationName).String(*v.GrantFullControl) } - if v.GrantRead != nil && len(*v.GrantRead) > 0 { + if v.GrantRead != nil { locationName := "X-Amz-Grant-Read" encoder.SetHeader(locationName).String(*v.GrantRead) } - if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 { + if v.GrantReadACP != nil { locationName := "X-Amz-Grant-Read-Acp" encoder.SetHeader(locationName).String(*v.GrantReadACP) } - if v.GrantWrite != nil && len(*v.GrantWrite) > 0 { + if v.GrantWrite != nil { locationName := "X-Amz-Grant-Write" encoder.SetHeader(locationName).String(*v.GrantWrite) } - if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 { + if v.GrantWriteACP != nil { locationName := "X-Amz-Grant-Write-Acp" encoder.SetHeader(locationName).String(*v.GrantWriteACP) } @@ -7249,6 +8069,10 @@ func (*awsRestxml_serializeOpPutObjectLegalHold) ID() string { func (m *awsRestxml_serializeOpPutObjectLegalHold) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7309,6 +8133,8 @@ func (m *awsRestxml_serializeOpPutObjectLegalHold) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutObjectLegalHoldInput(v *PutObjectLegalHoldInput, encoder *httpbinding.Encoder) error { @@ -7321,12 +8147,12 @@ func awsRestxml_serializeOpHttpBindingsPutObjectLegalHoldInput(v *PutObjectLegal encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -7362,6 +8188,10 @@ func (*awsRestxml_serializeOpPutObjectLockConfiguration) ID() string { func (m *awsRestxml_serializeOpPutObjectLockConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7422,6 +8252,8 @@ func (m *awsRestxml_serializeOpPutObjectLockConfiguration) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutObjectLockConfigurationInput(v *PutObjectLockConfigurationInput, encoder *httpbinding.Encoder) error { @@ -7434,12 +8266,12 @@ func awsRestxml_serializeOpHttpBindingsPutObjectLockConfigurationInput(v *PutObj encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -7449,7 +8281,7 @@ func awsRestxml_serializeOpHttpBindingsPutObjectLockConfigurationInput(v *PutObj encoder.SetHeader(locationName).String(string(v.RequestPayer)) } - if v.Token != nil && len(*v.Token) > 0 { + if v.Token != nil { locationName := "X-Amz-Bucket-Object-Lock-Token" encoder.SetHeader(locationName).String(*v.Token) } @@ -7467,6 +8299,10 @@ func (*awsRestxml_serializeOpPutObjectRetention) ID() string { func (m *awsRestxml_serializeOpPutObjectRetention) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7527,6 +8363,8 @@ func (m *awsRestxml_serializeOpPutObjectRetention) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutObjectRetentionInput(v *PutObjectRetentionInput, encoder *httpbinding.Encoder) error { @@ -7544,12 +8382,12 @@ func awsRestxml_serializeOpHttpBindingsPutObjectRetentionInput(v *PutObjectReten encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -7585,6 +8423,10 @@ func (*awsRestxml_serializeOpPutObjectTagging) ID() string { func (m *awsRestxml_serializeOpPutObjectTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7645,6 +8487,8 @@ func (m *awsRestxml_serializeOpPutObjectTagging) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutObjectTaggingInput(v *PutObjectTaggingInput, encoder *httpbinding.Encoder) error { @@ -7657,12 +8501,12 @@ func awsRestxml_serializeOpHttpBindingsPutObjectTaggingInput(v *PutObjectTagging encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -7698,6 +8542,10 @@ func (*awsRestxml_serializeOpPutPublicAccessBlock) ID() string { func (m *awsRestxml_serializeOpPutPublicAccessBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7758,6 +8606,8 @@ func (m *awsRestxml_serializeOpPutPublicAccessBlock) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsPutPublicAccessBlockInput(v *PutPublicAccessBlockInput, encoder *httpbinding.Encoder) error { @@ -7770,12 +8620,12 @@ func awsRestxml_serializeOpHttpBindingsPutPublicAccessBlockInput(v *PutPublicAcc encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -7793,6 +8643,10 @@ func (*awsRestxml_serializeOpRestoreObject) ID() string { func (m *awsRestxml_serializeOpRestoreObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7853,6 +8707,8 @@ func (m *awsRestxml_serializeOpRestoreObject) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsRestoreObjectInput(v *RestoreObjectInput, encoder *httpbinding.Encoder) error { @@ -7865,7 +8721,7 @@ func awsRestxml_serializeOpHttpBindingsRestoreObjectInput(v *RestoreObjectInput, encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -7901,6 +8757,10 @@ func (*awsRestxml_serializeOpSelectObjectContent) ID() string { func (m *awsRestxml_serializeOpSelectObjectContent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7955,6 +8815,8 @@ func (m *awsRestxml_serializeOpSelectObjectContent) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsSelectObjectContentInput(v *SelectObjectContentInput, encoder *httpbinding.Encoder) error { @@ -7962,7 +8824,7 @@ func awsRestxml_serializeOpHttpBindingsSelectObjectContentInput(v *SelectObjectC return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -7976,17 +8838,17 @@ func awsRestxml_serializeOpHttpBindingsSelectObjectContentInput(v *SelectObjectC } } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } @@ -8083,6 +8945,10 @@ func (*awsRestxml_serializeOpUploadPart) ID() string { func (m *awsRestxml_serializeOpUploadPart) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8131,6 +8997,8 @@ func (m *awsRestxml_serializeOpUploadPart) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsUploadPartInput(v *UploadPartInput, encoder *httpbinding.Encoder) error { @@ -8143,22 +9011,22 @@ func awsRestxml_serializeOpHttpBindingsUploadPartInput(v *UploadPartInput, encod encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm)) } - if v.ChecksumCRC32 != nil && len(*v.ChecksumCRC32) > 0 { + if v.ChecksumCRC32 != nil { locationName := "X-Amz-Checksum-Crc32" encoder.SetHeader(locationName).String(*v.ChecksumCRC32) } - if v.ChecksumCRC32C != nil && len(*v.ChecksumCRC32C) > 0 { + if v.ChecksumCRC32C != nil { locationName := "X-Amz-Checksum-Crc32c" encoder.SetHeader(locationName).String(*v.ChecksumCRC32C) } - if v.ChecksumSHA1 != nil && len(*v.ChecksumSHA1) > 0 { + if v.ChecksumSHA1 != nil { locationName := "X-Amz-Checksum-Sha1" encoder.SetHeader(locationName).String(*v.ChecksumSHA1) } - if v.ChecksumSHA256 != nil && len(*v.ChecksumSHA256) > 0 { + if v.ChecksumSHA256 != nil { locationName := "X-Amz-Checksum-Sha256" encoder.SetHeader(locationName).String(*v.ChecksumSHA256) } @@ -8168,12 +9036,12 @@ func awsRestxml_serializeOpHttpBindingsUploadPartInput(v *UploadPartInput, encod encoder.SetHeader(locationName).Long(*v.ContentLength) } - if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 { + if v.ContentMD5 != nil { locationName := "Content-Md5" encoder.SetHeader(locationName).String(*v.ContentMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } @@ -8196,17 +9064,17 @@ func awsRestxml_serializeOpHttpBindingsUploadPartInput(v *UploadPartInput, encod encoder.SetHeader(locationName).String(string(v.RequestPayer)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } @@ -8228,6 +9096,10 @@ func (*awsRestxml_serializeOpUploadPartCopy) ID() string { func (m *awsRestxml_serializeOpUploadPartCopy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8264,6 +9136,8 @@ func (m *awsRestxml_serializeOpUploadPartCopy) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(v *UploadPartCopyInput, encoder *httpbinding.Encoder) error { @@ -8271,12 +9145,12 @@ func awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(v *UploadPartCopyInpu return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.CopySource != nil && len(*v.CopySource) > 0 { + if v.CopySource != nil { locationName := "X-Amz-Copy-Source" encoder.SetHeader(locationName).String(*v.CopySource) } - if v.CopySourceIfMatch != nil && len(*v.CopySourceIfMatch) > 0 { + if v.CopySourceIfMatch != nil { locationName := "X-Amz-Copy-Source-If-Match" encoder.SetHeader(locationName).String(*v.CopySourceIfMatch) } @@ -8286,7 +9160,7 @@ func awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(v *UploadPartCopyInpu encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.CopySourceIfModifiedSince)) } - if v.CopySourceIfNoneMatch != nil && len(*v.CopySourceIfNoneMatch) > 0 { + if v.CopySourceIfNoneMatch != nil { locationName := "X-Amz-Copy-Source-If-None-Match" encoder.SetHeader(locationName).String(*v.CopySourceIfNoneMatch) } @@ -8296,32 +9170,32 @@ func awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(v *UploadPartCopyInpu encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.CopySourceIfUnmodifiedSince)) } - if v.CopySourceRange != nil && len(*v.CopySourceRange) > 0 { + if v.CopySourceRange != nil { locationName := "X-Amz-Copy-Source-Range" encoder.SetHeader(locationName).String(*v.CopySourceRange) } - if v.CopySourceSSECustomerAlgorithm != nil && len(*v.CopySourceSSECustomerAlgorithm) > 0 { + if v.CopySourceSSECustomerAlgorithm != nil { locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerAlgorithm) } - if v.CopySourceSSECustomerKey != nil && len(*v.CopySourceSSECustomerKey) > 0 { + if v.CopySourceSSECustomerKey != nil { locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerKey) } - if v.CopySourceSSECustomerKeyMD5 != nil && len(*v.CopySourceSSECustomerKeyMD5) > 0 { + if v.CopySourceSSECustomerKeyMD5 != nil { locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerKeyMD5) } - if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 { + if v.ExpectedBucketOwner != nil { locationName := "X-Amz-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } - if v.ExpectedSourceBucketOwner != nil && len(*v.ExpectedSourceBucketOwner) > 0 { + if v.ExpectedSourceBucketOwner != nil { locationName := "X-Amz-Source-Expected-Bucket-Owner" encoder.SetHeader(locationName).String(*v.ExpectedSourceBucketOwner) } @@ -8344,17 +9218,17 @@ func awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(v *UploadPartCopyInpu encoder.SetHeader(locationName).String(string(v.RequestPayer)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 { + if v.SSECustomerKey != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key" encoder.SetHeader(locationName).String(*v.SSECustomerKey) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } @@ -8376,6 +9250,10 @@ func (*awsRestxml_serializeOpWriteGetObjectResponse) ID() string { func (m *awsRestxml_serializeOpWriteGetObjectResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8424,6 +9302,8 @@ func (m *awsRestxml_serializeOpWriteGetObjectResponse) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetObjectResponseInput, encoder *httpbinding.Encoder) error { @@ -8431,7 +9311,7 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AcceptRanges != nil && len(*v.AcceptRanges) > 0 { + if v.AcceptRanges != nil { locationName := "X-Amz-Fwd-Header-Accept-Ranges" encoder.SetHeader(locationName).String(*v.AcceptRanges) } @@ -8441,42 +9321,42 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb encoder.SetHeader(locationName).Boolean(*v.BucketKeyEnabled) } - if v.CacheControl != nil && len(*v.CacheControl) > 0 { + if v.CacheControl != nil { locationName := "X-Amz-Fwd-Header-Cache-Control" encoder.SetHeader(locationName).String(*v.CacheControl) } - if v.ChecksumCRC32 != nil && len(*v.ChecksumCRC32) > 0 { + if v.ChecksumCRC32 != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Checksum-Crc32" encoder.SetHeader(locationName).String(*v.ChecksumCRC32) } - if v.ChecksumCRC32C != nil && len(*v.ChecksumCRC32C) > 0 { + if v.ChecksumCRC32C != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Checksum-Crc32c" encoder.SetHeader(locationName).String(*v.ChecksumCRC32C) } - if v.ChecksumSHA1 != nil && len(*v.ChecksumSHA1) > 0 { + if v.ChecksumSHA1 != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Checksum-Sha1" encoder.SetHeader(locationName).String(*v.ChecksumSHA1) } - if v.ChecksumSHA256 != nil && len(*v.ChecksumSHA256) > 0 { + if v.ChecksumSHA256 != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Checksum-Sha256" encoder.SetHeader(locationName).String(*v.ChecksumSHA256) } - if v.ContentDisposition != nil && len(*v.ContentDisposition) > 0 { + if v.ContentDisposition != nil { locationName := "X-Amz-Fwd-Header-Content-Disposition" encoder.SetHeader(locationName).String(*v.ContentDisposition) } - if v.ContentEncoding != nil && len(*v.ContentEncoding) > 0 { + if v.ContentEncoding != nil { locationName := "X-Amz-Fwd-Header-Content-Encoding" encoder.SetHeader(locationName).String(*v.ContentEncoding) } - if v.ContentLanguage != nil && len(*v.ContentLanguage) > 0 { + if v.ContentLanguage != nil { locationName := "X-Amz-Fwd-Header-Content-Language" encoder.SetHeader(locationName).String(*v.ContentLanguage) } @@ -8486,12 +9366,12 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb encoder.SetHeader(locationName).Long(*v.ContentLength) } - if v.ContentRange != nil && len(*v.ContentRange) > 0 { + if v.ContentRange != nil { locationName := "X-Amz-Fwd-Header-Content-Range" encoder.SetHeader(locationName).String(*v.ContentRange) } - if v.ContentType != nil && len(*v.ContentType) > 0 { + if v.ContentType != nil { locationName := "X-Amz-Fwd-Header-Content-Type" encoder.SetHeader(locationName).String(*v.ContentType) } @@ -8501,22 +9381,22 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb encoder.SetHeader(locationName).Boolean(*v.DeleteMarker) } - if v.ErrorCode != nil && len(*v.ErrorCode) > 0 { + if v.ErrorCode != nil { locationName := "X-Amz-Fwd-Error-Code" encoder.SetHeader(locationName).String(*v.ErrorCode) } - if v.ErrorMessage != nil && len(*v.ErrorMessage) > 0 { + if v.ErrorMessage != nil { locationName := "X-Amz-Fwd-Error-Message" encoder.SetHeader(locationName).String(*v.ErrorMessage) } - if v.ETag != nil && len(*v.ETag) > 0 { + if v.ETag != nil { locationName := "X-Amz-Fwd-Header-Etag" encoder.SetHeader(locationName).String(*v.ETag) } - if v.Expiration != nil && len(*v.Expiration) > 0 { + if v.Expiration != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Expiration" encoder.SetHeader(locationName).String(*v.Expiration) } @@ -8534,9 +9414,7 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb if v.Metadata != nil { hv := encoder.Headers("X-Amz-Meta-") for mapKey, mapVal := range v.Metadata { - if len(mapVal) > 0 { - hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal) - } + hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal) } } @@ -8575,17 +9453,17 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb encoder.SetHeader(locationName).String(string(v.RequestCharged)) } - if v.RequestRoute != nil && len(*v.RequestRoute) > 0 { + if v.RequestRoute != nil { locationName := "X-Amz-Request-Route" encoder.SetHeader(locationName).String(*v.RequestRoute) } - if v.RequestToken != nil && len(*v.RequestToken) > 0 { + if v.RequestToken != nil { locationName := "X-Amz-Request-Token" encoder.SetHeader(locationName).String(*v.RequestToken) } - if v.Restore != nil && len(*v.Restore) > 0 { + if v.Restore != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Restore" encoder.SetHeader(locationName).String(*v.Restore) } @@ -8595,17 +9473,17 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb encoder.SetHeader(locationName).String(string(v.ServerSideEncryption)) } - if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 { + if v.SSECustomerAlgorithm != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Customer-Algorithm" encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm) } - if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 { + if v.SSECustomerKeyMD5 != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Customer-Key-Md5" encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5) } - if v.SSEKMSKeyId != nil && len(*v.SSEKMSKeyId) > 0 { + if v.SSEKMSKeyId != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id" encoder.SetHeader(locationName).String(*v.SSEKMSKeyId) } @@ -8625,7 +9503,7 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb encoder.SetHeader(locationName).Integer(*v.TagCount) } - if v.VersionId != nil && len(*v.VersionId) > 0 { + if v.VersionId != nil { locationName := "X-Amz-Fwd-Header-X-Amz-Version-Id" encoder.SetHeader(locationName).String(*v.VersionId) } @@ -10633,71 +11511,66 @@ func awsRestxml_serializeDocumentLifecycleRuleAndOperator(v *types.LifecycleRule return nil } -func awsRestxml_serializeDocumentLifecycleRuleFilter(v types.LifecycleRuleFilter, value smithyxml.Value) error { +func awsRestxml_serializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFilter, value smithyxml.Value) error { defer value.Close() - switch uv := v.(type) { - case *types.LifecycleRuleFilterMemberAnd: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + if v.And != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "And", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - if err := awsRestxml_serializeDocumentLifecycleRuleAndOperator(&uv.Value, av); err != nil { + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentLifecycleRuleAndOperator(v.And, el); err != nil { return err } - - case *types.LifecycleRuleFilterMemberObjectSizeGreaterThan: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + } + if v.ObjectSizeGreaterThan != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "ObjectSizeGreaterThan", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - av.Long(uv.Value) - - case *types.LifecycleRuleFilterMemberObjectSizeLessThan: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + el := value.MemberElement(root) + el.Long(*v.ObjectSizeGreaterThan) + } + if v.ObjectSizeLessThan != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "ObjectSizeLessThan", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - av.Long(uv.Value) - - case *types.LifecycleRuleFilterMemberPrefix: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + el := value.MemberElement(root) + el.Long(*v.ObjectSizeLessThan) + } + if v.Prefix != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "Prefix", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - av.String(uv.Value) - - case *types.LifecycleRuleFilterMemberTag: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + el := value.MemberElement(root) + el.String(*v.Prefix) + } + if v.Tag != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "Tag", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - if err := awsRestxml_serializeDocumentTag(&uv.Value, av); err != nil { + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTag(v.Tag, el); err != nil { return err } - - default: - return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) - } return nil } @@ -10824,6 +11697,24 @@ func awsRestxml_serializeDocumentMetadataEntry(v *types.MetadataEntry, value smi return nil } +func awsRestxml_serializeDocumentMetadataTableConfiguration(v *types.MetadataTableConfiguration, value smithyxml.Value) error { + defer value.Close() + if v.S3TablesDestination != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "S3TablesDestination", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentS3TablesDestination(v.S3TablesDestination, el); err != nil { + return err + } + } + return nil +} + func awsRestxml_serializeDocumentMetrics(v *types.Metrics, value smithyxml.Value) error { defer value.Close() if v.EventThreshold != nil { @@ -11137,6 +12028,17 @@ func awsRestxml_serializeDocumentNotificationConfigurationFilter(v *types.Notifi func awsRestxml_serializeDocumentObjectIdentifier(v *types.ObjectIdentifier, value smithyxml.Value) error { defer value.Close() + if v.ETag != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ETag", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ETag) + } if v.Key != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -11148,6 +12050,28 @@ func awsRestxml_serializeDocumentObjectIdentifier(v *types.ObjectIdentifier, val el := value.MemberElement(root) el.String(*v.Key) } + if v.LastModifiedTime != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "LastModifiedTime", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(smithytime.FormatHTTPDate(*v.LastModifiedTime)) + } + if v.Size != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Size", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.Size) + } if v.VersionId != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -11805,49 +12729,44 @@ func awsRestxml_serializeDocumentReplicationRuleAndOperator(v *types.Replication return nil } -func awsRestxml_serializeDocumentReplicationRuleFilter(v types.ReplicationRuleFilter, value smithyxml.Value) error { +func awsRestxml_serializeDocumentReplicationRuleFilter(v *types.ReplicationRuleFilter, value smithyxml.Value) error { defer value.Close() - switch uv := v.(type) { - case *types.ReplicationRuleFilterMemberAnd: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + if v.And != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "And", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - if err := awsRestxml_serializeDocumentReplicationRuleAndOperator(&uv.Value, av); err != nil { + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentReplicationRuleAndOperator(v.And, el); err != nil { return err } - - case *types.ReplicationRuleFilterMemberPrefix: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + } + if v.Prefix != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "Prefix", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - av.String(uv.Value) - - case *types.ReplicationRuleFilterMemberTag: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + el := value.MemberElement(root) + el.String(*v.Prefix) + } + if v.Tag != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "Tag", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - if err := awsRestxml_serializeDocumentTag(&uv.Value, av); err != nil { + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTag(v.Tag, el); err != nil { return err } - - default: - return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) - } return nil } @@ -12204,6 +13123,33 @@ func awsRestxml_serializeDocumentS3Location(v *types.S3Location, value smithyxml return nil } +func awsRestxml_serializeDocumentS3TablesDestination(v *types.S3TablesDestination, value smithyxml.Value) error { + defer value.Close() + if v.TableBucketArn != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TableBucketArn", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.TableBucketArn) + } + if v.TableName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TableName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.TableName) + } + return nil +} + func awsRestxml_serializeDocumentScanRange(v *types.ScanRange, value smithyxml.Value) error { defer value.Close() if v.End != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go index bcb956b261..c9b4350fd8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go @@ -274,6 +274,7 @@ type DataRedundancy string // Enum values for DataRedundancy const ( DataRedundancySingleAvailabilityZone DataRedundancy = "SingleAvailabilityZone" + DataRedundancySingleLocalZone DataRedundancy = "SingleLocalZone" ) // Values returns all known values for DataRedundancy. Note that this can be @@ -283,6 +284,7 @@ const ( func (DataRedundancy) Values() []DataRedundancy { return []DataRedundancy{ "SingleAvailabilityZone", + "SingleLocalZone", } } @@ -656,6 +658,7 @@ type LocationType string // Enum values for LocationType const ( LocationTypeAvailabilityZone LocationType = "AvailabilityZone" + LocationTypeLocalZone LocationType = "LocalZone" ) // Values returns all known values for LocationType. Note that this can be @@ -665,6 +668,7 @@ const ( func (LocationType) Values() []LocationType { return []LocationType{ "AvailabilityZone", + "LocalZone", } } @@ -1370,6 +1374,26 @@ func (Tier) Values() []Tier { } } +type TransitionDefaultMinimumObjectSize string + +// Enum values for TransitionDefaultMinimumObjectSize +const ( + TransitionDefaultMinimumObjectSizeVariesByStorageClass TransitionDefaultMinimumObjectSize = "varies_by_storage_class" + TransitionDefaultMinimumObjectSizeAllStorageClasses128k TransitionDefaultMinimumObjectSize = "all_storage_classes_128K" +) + +// Values returns all known values for TransitionDefaultMinimumObjectSize. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TransitionDefaultMinimumObjectSize) Values() []TransitionDefaultMinimumObjectSize { + return []TransitionDefaultMinimumObjectSize{ + "varies_by_storage_class", + "all_storage_classes_128K", + } +} + type TransitionStorageClass string // Enum values for TransitionStorageClass diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go index a01b922f73..1070573a5a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go @@ -64,6 +64,35 @@ func (e *BucketAlreadyOwnedByYou) ErrorCode() string { } func (e *BucketAlreadyOwnedByYou) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The existing object was created with a different encryption type. Subsequent +// +// write requests must include the appropriate encryption parameters in the request +// or while creating the session. +type EncryptionTypeMismatch struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *EncryptionTypeMismatch) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EncryptionTypeMismatch) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EncryptionTypeMismatch) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EncryptionTypeMismatch" + } + return *e.ErrorCodeOverride +} +func (e *EncryptionTypeMismatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Object is archived and inaccessible until restored. // // If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval @@ -103,6 +132,69 @@ func (e *InvalidObjectState) ErrorCode() string { } func (e *InvalidObjectState) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// You may receive this error in multiple cases. Depending on the reason for the +// error, you may receive one of the messages below: +// +// - Cannot specify both a write offset value and user-defined object metadata +// for existing objects. +// +// - Checksum Type mismatch occurred, expected checksum Type: sha1, actual +// checksum Type: crc32c. +// +// - Request body cannot be empty when 'write offset' is specified. +type InvalidRequest struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidRequest) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidRequest) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidRequest) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidRequest" + } + return *e.ErrorCodeOverride +} +func (e *InvalidRequest) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The write offset value that you specified does not match the current object +// +// size. +type InvalidWriteOffset struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidWriteOffset) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidWriteOffset) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidWriteOffset) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidWriteOffset" + } + return *e.ErrorCodeOverride +} +func (e *InvalidWriteOffset) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The specified bucket does not exist. type NoSuchBucket struct { Message *string @@ -259,3 +351,32 @@ func (e *ObjectNotInActiveTierError) ErrorCode() string { return *e.ErrorCodeOverride } func (e *ObjectNotInActiveTierError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have attempted to add more parts than the maximum of 10000 that are +// +// allowed for this object. You can use the CopyObject operation to copy this +// object to another and then add more data to the newly copied object. +type TooManyParts struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyParts) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyParts) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyParts) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyParts" + } + return *e.ErrorCodeOverride +} +func (e *TooManyParts) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go index aee73d7cf6..5cc2420c84 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go @@ -179,6 +179,11 @@ type AnalyticsS3BucketDestination struct { // In terms of implementation, a Bucket is a resource. type Bucket struct { + // BucketRegion indicates the Amazon Web Services region where the bucket is + // located. If the request contains at least one valid parameter, it is included in + // the response. + BucketRegion *string + // Date the bucket was created. This date can change when making changes to your // bucket, such as editing its bucket policy. CreationDate *time.Time @@ -197,7 +202,8 @@ type Bucket struct { // [Directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html type BucketInfo struct { - // The number of Availability Zone that's used for redundancy for the bucket. + // The number of Zone (Availability Zone or Local Zone) that's used for redundancy + // for the bucket. DataRedundancy DataRedundancy // The type of bucket. @@ -236,7 +242,7 @@ type BucketLoggingStatus struct { // Contains all the possible checksum or digest values for an object. type Checksum struct { - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -247,7 +253,7 @@ type Checksum struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -311,7 +317,7 @@ type CompletedMultipartUpload struct { // Details of the parts that were uploaded. type CompletedPart struct { - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -322,7 +328,7 @@ type CompletedPart struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -412,14 +418,14 @@ type ContinuationEvent struct { // Container for all response elements. type CopyObjectResult struct { - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. For more information, see [Checking object integrity]in the // Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. For more information, see [Checking object integrity]in the // Amazon S3 User Guide. // @@ -453,7 +459,7 @@ type CopyObjectResult struct { // Container for all response elements. type CopyPartResult struct { - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -464,7 +470,7 @@ type CopyPartResult struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -565,9 +571,15 @@ type CreateBucketConfiguration struct { // Specifies the location where the bucket will be created. // - // For directory buckets, the location type is Availability Zone. + // Directory buckets - The location type is Availability Zone or Local Zone. When + // the location type is Local Zone, your Local Zone must be in opt-in status. + // Otherwise, you get an HTTP 400 Bad Request error with the error code Access + // denied . To learn more about opt-in Local Zones, see [Opt-in Dedicated Local Zones]in the Amazon S3 User + // Guide. // // This functionality is only supported by directory buckets. + // + // [Opt-in Dedicated Local Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/opt-in-directory-bucket-lz.html Location *LocationInfo // Specifies the Region where the bucket will be created. You might choose a @@ -1684,6 +1696,87 @@ type Error struct { noSmithyDocumentSerde } +// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 +// +// Metadata was unable to create the table, this structure contains the error code +// and error message. +type ErrorDetails struct { + + // If the CreateBucketMetadataTableConfiguration request succeeds, but S3 + // Metadata was unable to create the table, this structure contains the error code. + // The possible error codes and error messages are as follows: + // + // - AccessDeniedCreatingResources - You don't have sufficient permissions to + // create the required resources. Make sure that you have + // s3tables:CreateNamespace , s3tables:CreateTable , s3tables:GetTable and + // s3tables:PutTablePolicy permissions, and then try again. To create a new + // metadata table, you must delete the metadata configuration for this bucket, and + // then create a new metadata configuration. + // + // - AccessDeniedWritingToTable - Unable to write to the metadata table because + // of missing resource permissions. To fix the resource policy, Amazon S3 needs to + // create a new metadata table. To create a new metadata table, you must delete the + // metadata configuration for this bucket, and then create a new metadata + // configuration. + // + // - DestinationTableNotFound - The destination table doesn't exist. To create a + // new metadata table, you must delete the metadata configuration for this bucket, + // and then create a new metadata configuration. + // + // - ServerInternalError - An internal error has occurred. To create a new + // metadata table, you must delete the metadata configuration for this bucket, and + // then create a new metadata configuration. + // + // - TableAlreadyExists - The table that you specified already exists in the + // table bucket's namespace. Specify a different table name. To create a new + // metadata table, you must delete the metadata configuration for this bucket, and + // then create a new metadata configuration. + // + // - TableBucketNotFound - The table bucket that you specified doesn't exist in + // this Amazon Web Services Region and account. Create or choose a different table + // bucket. To create a new metadata table, you must delete the metadata + // configuration for this bucket, and then create a new metadata configuration. + ErrorCode *string + + // If the CreateBucketMetadataTableConfiguration request succeeds, but S3 + // Metadata was unable to create the table, this structure contains the error + // message. The possible error codes and error messages are as follows: + // + // - AccessDeniedCreatingResources - You don't have sufficient permissions to + // create the required resources. Make sure that you have + // s3tables:CreateNamespace , s3tables:CreateTable , s3tables:GetTable and + // s3tables:PutTablePolicy permissions, and then try again. To create a new + // metadata table, you must delete the metadata configuration for this bucket, and + // then create a new metadata configuration. + // + // - AccessDeniedWritingToTable - Unable to write to the metadata table because + // of missing resource permissions. To fix the resource policy, Amazon S3 needs to + // create a new metadata table. To create a new metadata table, you must delete the + // metadata configuration for this bucket, and then create a new metadata + // configuration. + // + // - DestinationTableNotFound - The destination table doesn't exist. To create a + // new metadata table, you must delete the metadata configuration for this bucket, + // and then create a new metadata configuration. + // + // - ServerInternalError - An internal error has occurred. To create a new + // metadata table, you must delete the metadata configuration for this bucket, and + // then create a new metadata configuration. + // + // - TableAlreadyExists - The table that you specified already exists in the + // table bucket's namespace. Specify a different table name. To create a new + // metadata table, you must delete the metadata configuration for this bucket, and + // then create a new metadata configuration. + // + // - TableBucketNotFound - The table bucket that you specified doesn't exist in + // this Amazon Web Services Region and account. Create or choose a different table + // bucket. To create a new metadata table, you must delete the metadata + // configuration for this bucket, and then create a new metadata configuration. + ErrorMessage *string + + noSmithyDocumentSerde +} + // The error information. type ErrorDocument struct { @@ -1705,10 +1798,12 @@ type EventBridgeConfiguration struct { noSmithyDocumentSerde } -// Optional configuration to replicate existing source bucket objects. For more -// information, see [Replicating Existing Objects]in the Amazon S3 User Guide. +// Optional configuration to replicate existing source bucket objects. +// +// This parameter is no longer supported. To replicate existing objects, see [Replicating existing objects with S3 Batch Replication] in +// the Amazon S3 User Guide. // -// [Replicating Existing Objects]: https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication +// [Replicating existing objects with S3 Batch Replication]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-batch-replication-batch.html type ExistingObjectReplication struct { // Specifies whether Amazon S3 replicates existing source bucket objects. @@ -1744,6 +1839,36 @@ type FilterRule struct { noSmithyDocumentSerde } +// The metadata table configuration for a general purpose bucket. +type GetBucketMetadataTableConfigurationResult struct { + + // The metadata table configuration for a general purpose bucket. + // + // This member is required. + MetadataTableConfigurationResult *MetadataTableConfigurationResult + + // The status of the metadata table. The status values are: + // + // - CREATING - The metadata table is in the process of being created in the + // specified table bucket. + // + // - ACTIVE - The metadata table has been created successfully and records are + // being delivered to the table. + // + // - FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is + // unable to deliver records. See ErrorDetails for details. + // + // This member is required. + Status *string + + // If the CreateBucketMetadataTableConfiguration request succeeds, but S3 + // Metadata was unable to create the table, this structure contains the error code + // and error message. + Error *ErrorDetails + + noSmithyDocumentSerde +} + // A collection of parts associated with a multipart upload. type GetObjectAttributesParts struct { @@ -2161,6 +2286,9 @@ type LifecycleExpiration struct { // Indicates at what date the object is to be moved or deleted. The date value // must conform to the ISO 8601 format. The time is always midnight UTC. + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. Date *time.Time // Indicates the lifetime, in days, of the objects that are subject to the rule. @@ -2171,6 +2299,9 @@ type LifecycleExpiration struct { // versions. If set to true, the delete marker will be expired; if set to false the // policy takes no action. This cannot be specified with Days or Date in a // Lifecycle Expiration Policy. + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. ExpiredObjectDeleteMarker *bool noSmithyDocumentSerde @@ -2203,7 +2334,9 @@ type LifecycleRule struct { // The Filter is used to identify objects that a Lifecycle Rule applies to. A // Filter must have exactly one of Prefix , Tag , or And specified. Filter is // required if the LifecycleRule does not contain a Prefix element. - Filter LifecycleRuleFilter + // + // Tag filters are not supported for directory buckets. + Filter *LifecycleRuleFilter // Unique identifier for the rule. The value cannot be longer than 255 characters. ID *string @@ -2213,13 +2346,19 @@ type LifecycleRule struct { // configuration action on a bucket that has versioning enabled (or suspended) to // request that Amazon S3 delete noncurrent object versions at a specific period in // the object's lifetime. + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. NoncurrentVersionExpiration *NoncurrentVersionExpiration - // Specifies the transition rule for the lifecycle rule that describes when + // Specifies the transition rule for the lifecycle rule that describes when // noncurrent objects transition to a specific storage class. If your bucket is // versioning-enabled (or versioning is suspended), you can set this action to // request that Amazon S3 transition noncurrent object versions to a specific // storage class at a set period in the object's lifetime. + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. NoncurrentVersionTransitions []NoncurrentVersionTransition // Prefix identifying one or more objects to which the rule applies. This is no @@ -2234,6 +2373,9 @@ type LifecycleRule struct { Prefix *string // Specifies when an Amazon S3 object transitions to a specified storage class. + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. Transitions []Transition noSmithyDocumentSerde @@ -2264,74 +2406,40 @@ type LifecycleRuleAndOperator struct { // Filter can have exactly one of Prefix , Tag , ObjectSizeGreaterThan , // ObjectSizeLessThan , or And specified. If the Filter element is left empty, the // Lifecycle Rule applies to all objects in the bucket. -// -// The following types satisfy this interface: -// -// LifecycleRuleFilterMemberAnd -// LifecycleRuleFilterMemberObjectSizeGreaterThan -// LifecycleRuleFilterMemberObjectSizeLessThan -// LifecycleRuleFilterMemberPrefix -// LifecycleRuleFilterMemberTag -type LifecycleRuleFilter interface { - isLifecycleRuleFilter() -} - -// This is used in a Lifecycle Rule Filter to apply a logical AND to two or more -// predicates. The Lifecycle Rule will apply to any object matching all of the -// predicates configured inside the And operator. -type LifecycleRuleFilterMemberAnd struct { - Value LifecycleRuleAndOperator - - noSmithyDocumentSerde -} - -func (*LifecycleRuleFilterMemberAnd) isLifecycleRuleFilter() {} - -// Minimum object size to which the rule applies. -type LifecycleRuleFilterMemberObjectSizeGreaterThan struct { - Value int64 - - noSmithyDocumentSerde -} - -func (*LifecycleRuleFilterMemberObjectSizeGreaterThan) isLifecycleRuleFilter() {} +type LifecycleRuleFilter struct { -// Maximum object size to which the rule applies. -type LifecycleRuleFilterMemberObjectSizeLessThan struct { - Value int64 + // This is used in a Lifecycle Rule Filter to apply a logical AND to two or more + // predicates. The Lifecycle Rule will apply to any object matching all of the + // predicates configured inside the And operator. + And *LifecycleRuleAndOperator - noSmithyDocumentSerde -} - -func (*LifecycleRuleFilterMemberObjectSizeLessThan) isLifecycleRuleFilter() {} - -// Prefix identifying one or more objects to which the rule applies. -// -// Replacement must be made for object keys containing special characters (such as -// carriage returns) when using XML requests. For more information, see [XML related object key constraints]. -// -// [XML related object key constraints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints -type LifecycleRuleFilterMemberPrefix struct { - Value string + // Minimum object size to which the rule applies. + ObjectSizeGreaterThan *int64 - noSmithyDocumentSerde -} + // Maximum object size to which the rule applies. + ObjectSizeLessThan *int64 -func (*LifecycleRuleFilterMemberPrefix) isLifecycleRuleFilter() {} + // Prefix identifying one or more objects to which the rule applies. + // + // Replacement must be made for object keys containing special characters (such as + // carriage returns) when using XML requests. For more information, see [XML related object key constraints]. + // + // [XML related object key constraints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints + Prefix *string -// This tag must exist in the object's tag set in order for the rule to apply. -type LifecycleRuleFilterMemberTag struct { - Value Tag + // This tag must exist in the object's tag set in order for the rule to apply. + // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. + Tag *Tag noSmithyDocumentSerde } -func (*LifecycleRuleFilterMemberTag) isLifecycleRuleFilter() {} - // Specifies the location where the bucket will be created. // -// For directory buckets, the location type is Availability Zone. For more -// information about directory buckets, see [Directory buckets]in the Amazon S3 User Guide. +// For directory buckets, the location type is Availability Zone or Local Zone. +// For more information about directory buckets, see [Directory buckets]in the Amazon S3 User Guide. // // This functionality is only supported by directory buckets. // @@ -2340,9 +2448,9 @@ type LocationInfo struct { // The name of the location where the bucket will be created. // - // For directory buckets, the name of the location is the AZ ID of the - // Availability Zone where the bucket will be created. An example AZ ID value is - // usw2-az1 . + // For directory buckets, the name of the location is the Zone ID of the + // Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An + // example AZ ID value is usw2-az1 . Name *string // The type of location where the bucket will be created. @@ -2401,6 +2509,38 @@ type MetadataEntry struct { noSmithyDocumentSerde } +// The metadata table configuration for a general purpose bucket. +type MetadataTableConfiguration struct { + + // The destination information for the metadata table configuration. The + // destination table bucket must be in the same Region and Amazon Web Services + // account as the general purpose bucket. The specified metadata table name must be + // unique within the aws_s3_metadata namespace in the destination table bucket. + // + // This member is required. + S3TablesDestination *S3TablesDestination + + noSmithyDocumentSerde +} + +// The metadata table configuration for a general purpose bucket. The destination +// +// table bucket must be in the same Region and Amazon Web Services account as the +// general purpose bucket. The specified metadata table name must be unique within +// the aws_s3_metadata namespace in the destination table bucket. +type MetadataTableConfigurationResult struct { + + // The destination information for the metadata table configuration. The + // destination table bucket must be in the same Region and Amazon Web Services + // account as the general purpose bucket. The specified metadata table name must be + // unique within the aws_s3_metadata namespace in the destination table bucket. + // + // This member is required. + S3TablesDestinationResult *S3TablesDestinationResult + + noSmithyDocumentSerde +} + // A container specifying replication metrics-related settings enabling // // replication metrics and events. @@ -2551,6 +2691,9 @@ type MultipartUpload struct { // configuration action on a bucket that has versioning enabled (or suspended) to // request that Amazon S3 delete noncurrent object versions at a specific period in // the object's lifetime. +// +// This parameter applies to general purpose buckets only. It is not supported for +// directory bucket lifecycle configurations. type NoncurrentVersionExpiration struct { // Specifies how many noncurrent versions Amazon S3 will retain. You can specify @@ -2558,6 +2701,9 @@ type NoncurrentVersionExpiration struct { // additional noncurrent versions beyond the specified number to retain. For more // information about noncurrent versions, see [Lifecycle configuration elements]in the Amazon S3 User Guide. // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. + // // [Lifecycle configuration elements]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html NewerNoncurrentVersions *int32 @@ -2566,6 +2712,9 @@ type NoncurrentVersionExpiration struct { // For information about the noncurrent days calculations, see [How Amazon S3 Calculates When an Object Became Noncurrent]in the Amazon S3 // User Guide. // + // This parameter applies to general purpose buckets only. It is not supported for + // directory bucket lifecycle configurations. + // // [How Amazon S3 Calculates When an Object Became Noncurrent]: https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations NoncurrentDays *int32 @@ -2713,6 +2862,26 @@ type ObjectIdentifier struct { // This member is required. Key *string + // An entity tag (ETag) is an identifier assigned by a web server to a specific + // version of a resource found at a URL. This header field makes the request method + // conditional on ETags . + // + // Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings + // unique to the object. + ETag *string + + // If present, the objects are deleted only if its modification times matches the + // provided Timestamp . + // + // This functionality is only supported for directory buckets. + LastModifiedTime *time.Time + + // If present, the objects are deleted only if its size matches the provided size + // in bytes. + // + // This functionality is only supported for directory buckets. + Size *int64 + // Version ID for the specific version of the object to delete. // // This functionality is not supported for directory buckets. @@ -2775,13 +2944,13 @@ type ObjectPart struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -2974,13 +3143,13 @@ type Part struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -3120,7 +3289,7 @@ type PublicAccessBlockConfiguration struct { // Specifies whether Amazon S3 should restrict public bucket policies for this // bucket. Setting this element to TRUE restricts access to this bucket to only - // Amazon Web Servicesservice principals and authorized users within this account + // Amazon Web Services service principals and authorized users within this account // if the bucket has a public policy. // // Enabling this setting doesn't affect previously stored bucket policies, except @@ -3303,16 +3472,18 @@ type ReplicationRule struct { // [Backward Compatibility]: https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations DeleteMarkerReplication *DeleteMarkerReplication - // Optional configuration to replicate existing source bucket objects. For more - // information, see [Replicating Existing Objects]in the Amazon S3 User Guide. + // Optional configuration to replicate existing source bucket objects. + // + // This parameter is no longer supported. To replicate existing objects, see [Replicating existing objects with S3 Batch Replication] in + // the Amazon S3 User Guide. // - // [Replicating Existing Objects]: https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication + // [Replicating existing objects with S3 Batch Replication]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-batch-replication-batch.html ExistingObjectReplication *ExistingObjectReplication // A filter that identifies the subset of objects to which the replication rule // applies. A Filter must specify exactly one Prefix , Tag , or an And child // element. - Filter ReplicationRuleFilter + Filter *ReplicationRuleFilter // A unique identifier for the rule. The maximum value is 255 characters. ID *string @@ -3376,59 +3547,36 @@ type ReplicationRuleAndOperator struct { // A filter that identifies the subset of objects to which the replication rule // applies. A Filter must specify exactly one Prefix , Tag , or an And child // element. -// -// The following types satisfy this interface: -// -// ReplicationRuleFilterMemberAnd -// ReplicationRuleFilterMemberPrefix -// ReplicationRuleFilterMemberTag -type ReplicationRuleFilter interface { - isReplicationRuleFilter() -} - -// A container for specifying rule filters. The filters determine the subset of -// objects to which the rule applies. This element is required only if you specify -// more than one filter. For example: -// -// - If you specify both a Prefix and a Tag filter, wrap these filters in an And -// tag. -// -// - If you specify a filter based on multiple tags, wrap the Tag elements in an -// And tag. -type ReplicationRuleFilterMemberAnd struct { - Value ReplicationRuleAndOperator - - noSmithyDocumentSerde -} - -func (*ReplicationRuleFilterMemberAnd) isReplicationRuleFilter() {} +type ReplicationRuleFilter struct { -// An object key name prefix that identifies the subset of objects to which the -// rule applies. -// -// Replacement must be made for object keys containing special characters (such as -// carriage returns) when using XML requests. For more information, see [XML related object key constraints]. -// -// [XML related object key constraints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints -type ReplicationRuleFilterMemberPrefix struct { - Value string - - noSmithyDocumentSerde -} + // A container for specifying rule filters. The filters determine the subset of + // objects to which the rule applies. This element is required only if you specify + // more than one filter. For example: + // + // - If you specify both a Prefix and a Tag filter, wrap these filters in an And + // tag. + // + // - If you specify a filter based on multiple tags, wrap the Tag elements in an + // And tag. + And *ReplicationRuleAndOperator -func (*ReplicationRuleFilterMemberPrefix) isReplicationRuleFilter() {} + // An object key name prefix that identifies the subset of objects to which the + // rule applies. + // + // Replacement must be made for object keys containing special characters (such as + // carriage returns) when using XML requests. For more information, see [XML related object key constraints]. + // + // [XML related object key constraints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints + Prefix *string -// A container for specifying a tag key and value. -// -// The rule applies only to objects that have the tag in their tag set. -type ReplicationRuleFilterMemberTag struct { - Value Tag + // A container for specifying a tag key and value. + // + // The rule applies only to objects that have the tag in their tag set. + Tag *Tag noSmithyDocumentSerde } -func (*ReplicationRuleFilterMemberTag) isReplicationRuleFilter() {} - // A container specifying S3 Replication Time Control (S3 RTC) related // // information, including whether S3 RTC is enabled and the time when all objects @@ -3628,6 +3776,69 @@ type S3Location struct { noSmithyDocumentSerde } +// The destination information for the metadata table configuration. The +// +// destination table bucket must be in the same Region and Amazon Web Services +// account as the general purpose bucket. The specified metadata table name must be +// unique within the aws_s3_metadata namespace in the destination table bucket. +type S3TablesDestination struct { + + // The Amazon Resource Name (ARN) for the table bucket that's specified as the + // destination in the metadata table configuration. The destination table bucket + // must be in the same Region and Amazon Web Services account as the general + // purpose bucket. + // + // This member is required. + TableBucketArn *string + + // The name for the metadata table in your metadata table configuration. The + // specified metadata table name must be unique within the aws_s3_metadata + // namespace in the destination table bucket. + // + // This member is required. + TableName *string + + noSmithyDocumentSerde +} + +// The destination information for the metadata table configuration. The +// +// destination table bucket must be in the same Region and Amazon Web Services +// account as the general purpose bucket. The specified metadata table name must be +// unique within the aws_s3_metadata namespace in the destination table bucket. +type S3TablesDestinationResult struct { + + // The Amazon Resource Name (ARN) for the metadata table in the metadata table + // configuration. The specified metadata table name must be unique within the + // aws_s3_metadata namespace in the destination table bucket. + // + // This member is required. + TableArn *string + + // The Amazon Resource Name (ARN) for the table bucket that's specified as the + // destination in the metadata table configuration. The destination table bucket + // must be in the same Region and Amazon Web Services account as the general + // purpose bucket. + // + // This member is required. + TableBucketArn *string + + // The name for the metadata table in your metadata table configuration. The + // specified metadata table name must be unique within the aws_s3_metadata + // namespace in the destination table bucket. + // + // This member is required. + TableName *string + + // The table bucket namespace for the metadata table in your metadata table + // configuration. This value is always aws_s3_metadata . + // + // This member is required. + TableNamespace *string + + noSmithyDocumentSerde +} + // Specifies the byte range of the object to get the records from. A record is // processed when its first byte is contained by the range. This parameter is // optional, but when specified, it must not be empty. See RFC 2616, Section @@ -3750,29 +3961,42 @@ type SelectParameters struct { // Describes the default server-side encryption to apply to new objects in the // bucket. If a PUT Object request doesn't specify any server-side encryption, this -// default encryption will be applied. If you don't specify a customer managed key -// at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key -// in your Amazon Web Services account the first time that you add an object -// encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key for -// SSE-KMS. For more information, see [PUT Bucket encryption]in the Amazon S3 API Reference. +// default encryption will be applied. For more information, see [PutBucketEncryption]. // -// If you're specifying a customer managed KMS key, we recommend using a fully -// qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the -// key within the requester’s account. This behavior can result in data that's -// encrypted with a KMS key that belongs to the requester, and not the bucket -// owner. +// - General purpose buckets - If you don't specify a customer managed key at +// configuration, Amazon S3 automatically creates an Amazon Web Services KMS key ( +// aws/s3 ) in your Amazon Web Services account the first time that you add an +// object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS +// key for SSE-KMS. +// +// - Directory buckets - Your SSE-KMS configuration can only support 1 [customer managed key]per +// directory bucket for the lifetime of the bucket. The [Amazon Web Services managed key]( aws/s3 ) isn't +// supported. +// +// - Directory buckets - For directory buckets, there are only two supported +// options for server-side encryption: SSE-S3 and SSE-KMS. // -// [PUT Bucket encryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html +// [PutBucketEncryption]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html +// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk +// [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk type ServerSideEncryptionByDefault struct { // Server-side encryption algorithm to use for the default encryption. // + // For directory buckets, there are only two supported values for server-side + // encryption: AES256 and aws:kms . + // // This member is required. SSEAlgorithm ServerSideEncryption - // Amazon Web Services Key Management Service (KMS) customer Amazon Web Services - // KMS key ID to use for the default encryption. This parameter is allowed if and - // only if SSEAlgorithm is set to aws:kms or aws:kms:dsse . + // Amazon Web Services Key Management Service (KMS) customer managed key ID to use + // for the default encryption. + // + // - General purpose buckets - This parameter is allowed if and only if + // SSEAlgorithm is set to aws:kms or aws:kms:dsse . + // + // - Directory buckets - This parameter is allowed if and only if SSEAlgorithm is + // set to aws:kms . // // You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the // KMS key. @@ -3784,17 +4008,26 @@ type ServerSideEncryptionByDefault struct { // // - Key Alias: alias/alias-name // - // If you use a key ID, you can run into a LogDestination undeliverable error when - // creating a VPC flow log. - // // If you are using encryption with cross-account or Amazon Web Services service - // operations you must use a fully qualified KMS key ARN. For more information, see - // [Using encryption for cross-account operations]. + // operations, you must use a fully qualified KMS key ARN. For more information, + // see [Using encryption for cross-account operations]. + // + // - General purpose buckets - If you're specifying a customer managed KMS key, + // we recommend using a fully qualified KMS key ARN. If you use a KMS key alias + // instead, then KMS resolves the key within the requester’s account. This behavior + // can result in data that's encrypted with a KMS key that belongs to the + // requester, and not the bucket owner. Also, if you use a key ID, you can run into + // a LogDestination undeliverable error when creating a VPC flow log. + // + // - Directory buckets - When you specify an [KMS customer managed key]for encryption in your directory + // bucket, only use the key ID or key ARN. The key alias format of the KMS key + // isn't supported. // // Amazon S3 only supports symmetric encryption KMS keys. For more information, // see [Asymmetric keys in Amazon Web Services KMS]in the Amazon Web Services Key Management Service Developer Guide. // // [Using encryption for cross-account operations]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy + // [KMS customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk // [Asymmetric keys in Amazon Web Services KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html KMSMasterKeyID *string @@ -3815,11 +4048,17 @@ type ServerSideEncryptionConfiguration struct { // Specifies the default server-side encryption configuration. // -// If you're specifying a customer managed KMS key, we recommend using a fully -// qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the -// key within the requester’s account. This behavior can result in data that's -// encrypted with a KMS key that belongs to the requester, and not the bucket -// owner. +// - General purpose buckets - If you're specifying a customer managed KMS key, +// we recommend using a fully qualified KMS key ARN. If you use a KMS key alias +// instead, then KMS resolves the key within the requester’s account. This behavior +// can result in data that's encrypted with a KMS key that belongs to the +// requester, and not the bucket owner. +// +// - Directory buckets - When you specify an [KMS customer managed key]for encryption in your directory +// bucket, only use the key ID or key ARN. The key alias format of the KMS key +// isn't supported. +// +// [KMS customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk type ServerSideEncryptionRule struct { // Specifies the default server-side encryption to apply to new objects in the @@ -3830,11 +4069,23 @@ type ServerSideEncryptionRule struct { // Specifies whether Amazon S3 should use an S3 Bucket Key with server-side // encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects // are not affected. Setting the BucketKeyEnabled element to true causes Amazon S3 - // to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled. + // to use an S3 Bucket Key. + // + // - General purpose buckets - By default, S3 Bucket Key is not enabled. For + // more information, see [Amazon S3 Bucket Keys]in the Amazon S3 User Guide. // - // For more information, see [Amazon S3 Bucket Keys] in the Amazon S3 User Guide. + // - Directory buckets - S3 Bucket Keys are always enabled for GET and PUT + // operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't + // supported, when you copy SSE-KMS encrypted objects from general purpose buckets + // to directory buckets, from directory buckets to general purpose buckets, or + // between directory buckets, through [CopyObject], [UploadPartCopy], [the Copy operation in Batch Operations], or [the import jobs]. In this case, Amazon S3 makes a + // call to KMS every time a copy request is made for a KMS-encrypted object. // // [Amazon S3 Bucket Keys]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html + // [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html + // [the import jobs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job + // [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html + // [the Copy operation in Batch Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops BucketKeyEnabled *bool noSmithyDocumentSerde @@ -3843,7 +4094,8 @@ type ServerSideEncryptionRule struct { // The established temporary security credentials of the session. // // Directory buckets - These session credentials are only supported for the -// authentication and authorization of Zonal endpoint APIs on directory buckets. +// authentication and authorization of Zonal endpoint API operations on directory +// buckets. type SessionCredentials struct { // A unique identifier that's associated with a secret access key. The access key @@ -4180,7 +4432,5 @@ type UnknownUnionMember struct { } func (*UnknownUnionMember) isAnalyticsFilter() {} -func (*UnknownUnionMember) isLifecycleRuleFilter() {} func (*UnknownUnionMember) isMetricsFilter() {} -func (*UnknownUnionMember) isReplicationRuleFilter() {} func (*UnknownUnionMember) isSelectObjectContentEventStream() {} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/uri_context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/uri_context.go new file mode 100644 index 0000000000..0e664c59ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/uri_context.go @@ -0,0 +1,23 @@ +package s3 + +// This contains helper methods to set resolver URI into the context object. If they are ever used for +// something other than S3, they should be moved to internal/context/context.go + +import ( + "context" + + "github.com/aws/smithy-go/middleware" +) + +type s3resolvedURI struct{} + +// setS3ResolvedURI sets the URI as resolved by the EndpointResolverV2 +func setS3ResolvedURI(ctx context.Context, value string) context.Context { + return middleware.WithStackValue(ctx, s3resolvedURI{}, value) +} + +// getS3ResolvedURI gets the URI as resolved by EndpointResolverV2 +func getS3ResolvedURI(ctx context.Context) string { + v, _ := middleware.GetStackValue(ctx, s3resolvedURI{}).(string) + return v +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go index e954b302df..97a56bd313 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go @@ -90,6 +90,26 @@ func (m *validateOpCreateBucket) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpCreateBucketMetadataTableConfiguration struct { +} + +func (*validateOpCreateBucketMetadataTableConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateBucketMetadataTableConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateBucketMetadataTableConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateBucketMetadataTableConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateMultipartUpload struct { } @@ -270,6 +290,26 @@ func (m *validateOpDeleteBucketLifecycle) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeleteBucketMetadataTableConfiguration struct { +} + +func (*validateOpDeleteBucketMetadataTableConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteBucketMetadataTableConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteBucketMetadataTableConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteBucketMetadataTableConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteBucketMetricsConfiguration struct { } @@ -670,6 +710,26 @@ func (m *validateOpGetBucketLogging) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpGetBucketMetadataTableConfiguration struct { +} + +func (*validateOpGetBucketMetadataTableConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetBucketMetadataTableConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetBucketMetadataTableConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetBucketMetadataTableConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetBucketMetricsConfiguration struct { } @@ -1886,6 +1946,10 @@ func addOpCreateBucketValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateBucket{}, middleware.After) } +func addOpCreateBucketMetadataTableConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateBucketMetadataTableConfiguration{}, middleware.After) +} + func addOpCreateMultipartUploadValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMultipartUpload{}, middleware.After) } @@ -1922,6 +1986,10 @@ func addOpDeleteBucketLifecycleValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpDeleteBucketLifecycle{}, middleware.After) } +func addOpDeleteBucketMetadataTableConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteBucketMetadataTableConfiguration{}, middleware.After) +} + func addOpDeleteBucketMetricsConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteBucketMetricsConfiguration{}, middleware.After) } @@ -2002,6 +2070,10 @@ func addOpGetBucketLoggingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetBucketLogging{}, middleware.After) } +func addOpGetBucketMetadataTableConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetBucketMetadataTableConfiguration{}, middleware.After) +} + func addOpGetBucketMetricsConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetBucketMetricsConfiguration{}, middleware.After) } @@ -2912,22 +2984,20 @@ func validateLifecycleRuleAndOperator(v *types.LifecycleRuleAndOperator) error { } } -func validateLifecycleRuleFilter(v types.LifecycleRuleFilter) error { +func validateLifecycleRuleFilter(v *types.LifecycleRuleFilter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "LifecycleRuleFilter"} - switch uv := v.(type) { - case *types.LifecycleRuleFilterMemberAnd: - if err := validateLifecycleRuleAndOperator(&uv.Value); err != nil { - invalidParams.AddNested("[And]", err.(smithy.InvalidParamsError)) + if v.Tag != nil { + if err := validateTag(v.Tag); err != nil { + invalidParams.AddNested("Tag", err.(smithy.InvalidParamsError)) } - - case *types.LifecycleRuleFilterMemberTag: - if err := validateTag(&uv.Value); err != nil { - invalidParams.AddNested("[Tag]", err.(smithy.InvalidParamsError)) + } + if v.And != nil { + if err := validateLifecycleRuleAndOperator(v.And); err != nil { + invalidParams.AddNested("And", err.(smithy.InvalidParamsError)) } - } if invalidParams.Len() > 0 { return invalidParams @@ -2976,6 +3046,25 @@ func validateLoggingEnabled(v *types.LoggingEnabled) error { } } +func validateMetadataTableConfiguration(v *types.MetadataTableConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetadataTableConfiguration"} + if v.S3TablesDestination == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3TablesDestination")) + } else if v.S3TablesDestination != nil { + if err := validateS3TablesDestination(v.S3TablesDestination); err != nil { + invalidParams.AddNested("S3TablesDestination", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMetrics(v *types.Metrics) error { if v == nil { return nil @@ -3320,22 +3409,20 @@ func validateReplicationRuleAndOperator(v *types.ReplicationRuleAndOperator) err } } -func validateReplicationRuleFilter(v types.ReplicationRuleFilter) error { +func validateReplicationRuleFilter(v *types.ReplicationRuleFilter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ReplicationRuleFilter"} - switch uv := v.(type) { - case *types.ReplicationRuleFilterMemberAnd: - if err := validateReplicationRuleAndOperator(&uv.Value); err != nil { - invalidParams.AddNested("[And]", err.(smithy.InvalidParamsError)) + if v.Tag != nil { + if err := validateTag(v.Tag); err != nil { + invalidParams.AddNested("Tag", err.(smithy.InvalidParamsError)) } - - case *types.ReplicationRuleFilterMemberTag: - if err := validateTag(&uv.Value); err != nil { - invalidParams.AddNested("[Tag]", err.(smithy.InvalidParamsError)) + } + if v.And != nil { + if err := validateReplicationRuleAndOperator(v.And); err != nil { + invalidParams.AddNested("And", err.(smithy.InvalidParamsError)) } - } if invalidParams.Len() > 0 { return invalidParams @@ -3486,6 +3573,24 @@ func validateS3Location(v *types.S3Location) error { } } +func validateS3TablesDestination(v *types.S3TablesDestination) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3TablesDestination"} + if v.TableBucketArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableBucketArn")) + } + if v.TableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSelectParameters(v *types.SelectParameters) error { if v == nil { return nil @@ -3937,6 +4042,28 @@ func validateOpCreateBucketInput(v *CreateBucketInput) error { } } +func validateOpCreateBucketMetadataTableConfigurationInput(v *CreateBucketMetadataTableConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateBucketMetadataTableConfigurationInput"} + if v.Bucket == nil { + invalidParams.Add(smithy.NewErrParamRequired("Bucket")) + } + if v.MetadataTableConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetadataTableConfiguration")) + } else if v.MetadataTableConfiguration != nil { + if err := validateMetadataTableConfiguration(v.MetadataTableConfiguration); err != nil { + invalidParams.AddNested("MetadataTableConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateMultipartUploadInput(v *CreateMultipartUploadInput) error { if v == nil { return nil @@ -4084,6 +4211,21 @@ func validateOpDeleteBucketLifecycleInput(v *DeleteBucketLifecycleInput) error { } } +func validateOpDeleteBucketMetadataTableConfigurationInput(v *DeleteBucketMetadataTableConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketMetadataTableConfigurationInput"} + if v.Bucket == nil { + invalidParams.Add(smithy.NewErrParamRequired("Bucket")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteBucketMetricsConfigurationInput(v *DeleteBucketMetricsConfigurationInput) error { if v == nil { return nil @@ -4409,6 +4551,21 @@ func validateOpGetBucketLoggingInput(v *GetBucketLoggingInput) error { } } +func validateOpGetBucketMetadataTableConfigurationInput(v *GetBucketMetadataTableConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetBucketMetadataTableConfigurationInput"} + if v.Bucket == nil { + invalidParams.Add(smithy.NewErrParamRequired("Bucket")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetBucketMetricsConfigurationInput(v *GetBucketMetricsConfigurationInput) error { if v == nil { return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/CHANGELOG.md index 396196f3c4..16db72a938 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/CHANGELOG.md @@ -1,3 +1,58 @@ +# v1.33.7 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.6 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.5 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.33.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.4 (2024-10-03) + +* No change notes available for this release. + +# v1.32.3 (2024-09-27) + +* No change notes available for this release. + +# v1.32.2 (2024-09-25) + +* No change notes available for this release. + +# v1.32.1 (2024-09-23) + +* No change notes available for this release. + +# v1.32.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.31.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. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_client.go index 1b4574b1ab..d49955f0cb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_client.go @@ -5,6 +5,7 @@ package servicediscovery 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 = "ServiceDiscovery" const ServiceAPIVersion = "2017-03-14" +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/servicediscovery") + 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/servicediscovery") +} + // Client provides the API client to make operations call for AWS Cloud Map. type Client struct { options Options @@ -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/servicediscovery") + }) + 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 @@ -437,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) } @@ -487,6 +693,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/servicediscovery") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -565,6 +772,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) @@ -621,3 +840,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/servicediscovery/api_op_CreateHttpNamespace.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreateHttpNamespace.go index 9428eb0669..c78b89586d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreateHttpNamespace.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreateHttpNamespace.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateHttpNamespaceMiddlewares(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 } @@ -157,6 +160,18 @@ func (c *Client) addOperationCreateHttpNamespaceMiddlewares(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/servicediscovery/api_op_CreatePrivateDnsNamespace.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreatePrivateDnsNamespace.go index af81ee0a95..79d7a6f16e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreatePrivateDnsNamespace.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreatePrivateDnsNamespace.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreatePrivateDnsNamespaceMiddlewares(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 } @@ -169,6 +172,18 @@ func (c *Client) addOperationCreatePrivateDnsNamespaceMiddlewares(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/servicediscovery/api_op_CreatePublicDnsNamespace.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreatePublicDnsNamespace.go index 25e6619cf9..a9fdac4ab0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreatePublicDnsNamespace.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreatePublicDnsNamespace.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreatePublicDnsNamespaceMiddlewares(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 } @@ -168,6 +171,18 @@ func (c *Client) addOperationCreatePublicDnsNamespaceMiddlewares(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/servicediscovery/api_op_CreateService.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreateService.go index 25c6e59cc2..a3e28c455a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreateService.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_CreateService.go @@ -191,6 +191,9 @@ func (c *Client) addOperationCreateServiceMiddlewares(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 } @@ -233,6 +236,18 @@ func (c *Client) addOperationCreateServiceMiddlewares(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/servicediscovery/api_op_DeleteNamespace.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DeleteNamespace.go index de05613cf3..574e42e5e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DeleteNamespace.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DeleteNamespace.go @@ -94,6 +94,9 @@ func (c *Client) addOperationDeleteNamespaceMiddlewares(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 } @@ -133,6 +136,18 @@ func (c *Client) addOperationDeleteNamespaceMiddlewares(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/servicediscovery/api_op_DeleteService.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DeleteService.go index 1c48c687b5..e8bd1a5221 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DeleteService.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DeleteService.go @@ -87,6 +87,9 @@ func (c *Client) addOperationDeleteServiceMiddlewares(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 } @@ -126,6 +129,18 @@ func (c *Client) addOperationDeleteServiceMiddlewares(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/servicediscovery/api_op_DeregisterInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DeregisterInstance.go index fc7e8180ef..fe6fe76dca 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DeregisterInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DeregisterInstance.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeregisterInstanceMiddlewares(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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationDeregisterInstanceMiddlewares(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/servicediscovery/api_op_DiscoverInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DiscoverInstances.go index d1731d4898..c91d083560 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DiscoverInstances.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DiscoverInstances.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDiscoverInstancesMiddlewares(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 } @@ -183,6 +186,18 @@ func (c *Client) addOperationDiscoverInstancesMiddlewares(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/servicediscovery/api_op_DiscoverInstancesRevision.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DiscoverInstancesRevision.go index d552e6edaa..46048b410f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DiscoverInstancesRevision.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_DiscoverInstancesRevision.go @@ -98,6 +98,9 @@ func (c *Client) addOperationDiscoverInstancesRevisionMiddlewares(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 } @@ -140,6 +143,18 @@ func (c *Client) addOperationDiscoverInstancesRevisionMiddlewares(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/servicediscovery/api_op_GetInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetInstance.go index 937a066dd2..0da38689ce 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetInstance.go @@ -96,6 +96,9 @@ func (c *Client) addOperationGetInstanceMiddlewares(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 } @@ -135,6 +138,18 @@ func (c *Client) addOperationGetInstanceMiddlewares(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/servicediscovery/api_op_GetInstancesHealthStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetInstancesHealthStatus.go index a596d2621d..351ddcaa6e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetInstancesHealthStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetInstancesHealthStatus.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetInstancesHealthStatusMiddlewares(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) addOperationGetInstancesHealthStatusMiddlewares(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/servicediscovery/api_op_GetNamespace.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetNamespace.go index 4955b05bda..e5258fe79a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetNamespace.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetNamespace.go @@ -91,6 +91,9 @@ func (c *Client) addOperationGetNamespaceMiddlewares(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 } @@ -130,6 +133,18 @@ func (c *Client) addOperationGetNamespaceMiddlewares(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/servicediscovery/api_op_GetOperation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetOperation.go index 2509f23c09..e35b7c1d3e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetOperation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetOperation.go @@ -96,6 +96,9 @@ func (c *Client) addOperationGetOperationMiddlewares(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 } @@ -135,6 +138,18 @@ func (c *Client) addOperationGetOperationMiddlewares(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/servicediscovery/api_op_GetService.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetService.go index 9acf2ce559..48a507aa0c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetService.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_GetService.go @@ -91,6 +91,9 @@ func (c *Client) addOperationGetServiceMiddlewares(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 } @@ -130,6 +133,18 @@ func (c *Client) addOperationGetServiceMiddlewares(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/servicediscovery/api_op_ListInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListInstances.go index 19688e7d26..957c61637c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListInstances.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListInstances.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListInstancesMiddlewares(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 } @@ -149,6 +152,18 @@ func (c *Client) addOperationListInstancesMiddlewares(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/servicediscovery/api_op_ListNamespaces.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListNamespaces.go index 52a97f00f6..e242e13963 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListNamespaces.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListNamespaces.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListNamespacesMiddlewares(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) addOperationListNamespacesMiddlewares(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/servicediscovery/api_op_ListOperations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListOperations.go index c1e7e91b5e..ba755e22ff 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListOperations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListOperations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListOperationsMiddlewares(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) addOperationListOperationsMiddlewares(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/servicediscovery/api_op_ListServices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListServices.go index 779f3a5583..e4ff972cc0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListServices.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListServices.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListServicesMiddlewares(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 } @@ -161,6 +164,18 @@ func (c *Client) addOperationListServicesMiddlewares(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/servicediscovery/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListTagsForResource.go index 6f67b3f2c9..ef50ebd46a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListTagsForResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_ListTagsForResource.go @@ -92,6 +92,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 } @@ -131,6 +134,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/servicediscovery/api_op_RegisterInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_RegisterInstance.go index 2161ec274f..b9615000db 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_RegisterInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_RegisterInstance.go @@ -256,6 +256,9 @@ func (c *Client) addOperationRegisterInstanceMiddlewares(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 } @@ -298,6 +301,18 @@ func (c *Client) addOperationRegisterInstanceMiddlewares(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/servicediscovery/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_TagResource.go index 9f7c022fb2..650a3f685f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_TagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_TagResource.go @@ -95,6 +95,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 } @@ -134,6 +137,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/servicediscovery/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UntagResource.go index 6b2346da46..cb13a7b7e9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UntagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/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/servicediscovery/api_op_UpdateHttpNamespace.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdateHttpNamespace.go index e3c73dd50f..510cdde413 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdateHttpNamespace.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdateHttpNamespace.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdateHttpNamespaceMiddlewares(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 } @@ -147,6 +150,18 @@ func (c *Client) addOperationUpdateHttpNamespaceMiddlewares(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/servicediscovery/api_op_UpdateInstanceCustomHealthStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdateInstanceCustomHealthStatus.go index dede6b9644..ebe6e5bb3e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdateInstanceCustomHealthStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdateInstanceCustomHealthStatus.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateInstanceCustomHealthStatusMiddlewares(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) addOperationUpdateInstanceCustomHealthStatusMiddlewares(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/servicediscovery/api_op_UpdatePrivateDnsNamespace.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdatePrivateDnsNamespace.go index 8cc925a0a0..aa8746568c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdatePrivateDnsNamespace.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdatePrivateDnsNamespace.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdatePrivateDnsNamespaceMiddlewares(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 } @@ -147,6 +150,18 @@ func (c *Client) addOperationUpdatePrivateDnsNamespaceMiddlewares(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/servicediscovery/api_op_UpdatePublicDnsNamespace.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdatePublicDnsNamespace.go index 48a0581254..2c5a0ba929 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdatePublicDnsNamespace.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdatePublicDnsNamespace.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdatePublicDnsNamespaceMiddlewares(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 } @@ -147,6 +150,18 @@ func (c *Client) addOperationUpdatePublicDnsNamespaceMiddlewares(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/servicediscovery/api_op_UpdateService.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdateService.go index d735b79081..ef35b280ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdateService.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/api_op_UpdateService.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateServiceMiddlewares(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 } @@ -156,6 +159,18 @@ func (c *Client) addOperationUpdateServiceMiddlewares(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/servicediscovery/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/auth.go index 01b2d97e9b..3d1dddab0d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/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/servicediscovery/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/deserializers.go index 52a4620c76..4a010e86ca 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/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_deserializeOpCreateHttpNamespace) 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)} @@ -163,6 +168,10 @@ func (m *awsAwsjson11_deserializeOpCreatePrivateDnsNamespace) 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)} @@ -282,6 +291,10 @@ func (m *awsAwsjson11_deserializeOpCreatePublicDnsNamespace) 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)} @@ -401,6 +414,10 @@ func (m *awsAwsjson11_deserializeOpCreateService) 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)} @@ -520,6 +537,10 @@ func (m *awsAwsjson11_deserializeOpDeleteNamespace) 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)} @@ -636,6 +657,10 @@ func (m *awsAwsjson11_deserializeOpDeleteService) 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)} @@ -749,6 +774,10 @@ func (m *awsAwsjson11_deserializeOpDeregisterInstance) 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)} @@ -868,6 +897,10 @@ func (m *awsAwsjson11_deserializeOpDiscoverInstances) 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)} @@ -984,6 +1017,10 @@ func (m *awsAwsjson11_deserializeOpDiscoverInstancesRevision) 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)} @@ -1100,6 +1137,10 @@ func (m *awsAwsjson11_deserializeOpGetInstance) 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)} @@ -1213,6 +1254,10 @@ func (m *awsAwsjson11_deserializeOpGetInstancesHealthStatus) 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)} @@ -1326,6 +1371,10 @@ func (m *awsAwsjson11_deserializeOpGetNamespace) 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)} @@ -1436,6 +1485,10 @@ func (m *awsAwsjson11_deserializeOpGetOperation) 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)} @@ -1546,6 +1599,10 @@ func (m *awsAwsjson11_deserializeOpGetService) 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)} @@ -1656,6 +1713,10 @@ func (m *awsAwsjson11_deserializeOpListInstances) 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)} @@ -1766,6 +1827,10 @@ func (m *awsAwsjson11_deserializeOpListNamespaces) 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)} @@ -1873,6 +1938,10 @@ func (m *awsAwsjson11_deserializeOpListOperations) 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)} @@ -1980,6 +2049,10 @@ func (m *awsAwsjson11_deserializeOpListServices) 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)} @@ -2087,6 +2160,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)} @@ -2197,6 +2274,10 @@ func (m *awsAwsjson11_deserializeOpRegisterInstance) 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)} @@ -2316,6 +2397,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)} @@ -2429,6 +2514,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)} @@ -2539,6 +2628,10 @@ func (m *awsAwsjson11_deserializeOpUpdateHttpNamespace) 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)} @@ -2655,6 +2748,10 @@ func (m *awsAwsjson11_deserializeOpUpdateInstanceCustomHealthStatus) 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)} @@ -2749,6 +2846,10 @@ func (m *awsAwsjson11_deserializeOpUpdatePrivateDnsNamespace) 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)} @@ -2865,6 +2966,10 @@ func (m *awsAwsjson11_deserializeOpUpdatePublicDnsNamespace) 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)} @@ -2981,6 +3086,10 @@ func (m *awsAwsjson11_deserializeOpUpdateService) 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)} @@ -3627,7 +3736,7 @@ func awsAwsjson11_deserializeDocumentCustomHealthNotFound(v **types.CustomHealth for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -3862,7 +3971,7 @@ func awsAwsjson11_deserializeDocumentDuplicateRequest(v **types.DuplicateRequest sv.DuplicateOperationId = ptr.String(jtv) } - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -4244,7 +4353,7 @@ func awsAwsjson11_deserializeDocumentInstanceNotFound(v **types.InstanceNotFound for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -4363,7 +4472,7 @@ func awsAwsjson11_deserializeDocumentInvalidInput(v **types.InvalidInput, value for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -4531,7 +4640,7 @@ func awsAwsjson11_deserializeDocumentNamespaceAlreadyExists(v **types.NamespaceA sv.CreatorRequestId = ptr.String(jtv) } - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -4580,7 +4689,7 @@ func awsAwsjson11_deserializeDocumentNamespaceNotFound(v **types.NamespaceNotFou for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -4918,7 +5027,7 @@ func awsAwsjson11_deserializeDocumentOperationNotFound(v **types.OperationNotFou for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -5077,7 +5186,7 @@ func awsAwsjson11_deserializeDocumentRequestLimitExceeded(v **types.RequestLimit for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -5117,7 +5226,7 @@ func awsAwsjson11_deserializeDocumentResourceInUse(v **types.ResourceInUse, valu for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -5157,7 +5266,7 @@ func awsAwsjson11_deserializeDocumentResourceLimitExceeded(v **types.ResourceLim for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -5197,7 +5306,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 { @@ -5384,7 +5493,7 @@ func awsAwsjson11_deserializeDocumentServiceAlreadyExists(v **types.ServiceAlrea sv.CreatorRequestId = ptr.String(jtv) } - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -5433,7 +5542,7 @@ func awsAwsjson11_deserializeDocumentServiceNotFound(v **types.ServiceNotFound, for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -5754,7 +5863,7 @@ func awsAwsjson11_deserializeDocumentTooManyTagsException(v **types.TooManyTagsE 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/servicediscovery/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/endpoints.go index 8aef8231bd..e66bff715c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/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" @@ -540,6 +541,9 @@ 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) } @@ -554,11 +558,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 } @@ -580,5 +589,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/servicediscovery/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/go_module_metadata.go index fc9085a0ec..125e383a27 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/go_module_metadata.go @@ -3,4 +3,4 @@ package servicediscovery // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.31.8" +const goModuleVersion = "1.33.7" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/options.go index ec6b1919dc..cdb9792fee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/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" ) @@ -70,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 @@ -104,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/servicediscovery/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/serializers.go index f78db5091b..b4b14b97e1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/servicediscovery/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_serializeOpCreateHttpNamespace) ID() string { func (m *awsAwsjson11_serializeOpCreateHttpNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpCreateHttpNamespace) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -80,6 +87,10 @@ func (*awsAwsjson11_serializeOpCreatePrivateDnsNamespace) ID() string { func (m *awsAwsjson11_serializeOpCreatePrivateDnsNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpCreatePrivateDnsNamespace) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -135,6 +148,10 @@ func (*awsAwsjson11_serializeOpCreatePublicDnsNamespace) ID() string { func (m *awsAwsjson11_serializeOpCreatePublicDnsNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpCreatePublicDnsNamespace) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -190,6 +209,10 @@ func (*awsAwsjson11_serializeOpCreateService) ID() string { func (m *awsAwsjson11_serializeOpCreateService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpCreateService) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -245,6 +270,10 @@ func (*awsAwsjson11_serializeOpDeleteNamespace) ID() string { func (m *awsAwsjson11_serializeOpDeleteNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpDeleteNamespace) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -300,6 +331,10 @@ func (*awsAwsjson11_serializeOpDeleteService) ID() string { func (m *awsAwsjson11_serializeOpDeleteService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpDeleteService) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -355,6 +392,10 @@ func (*awsAwsjson11_serializeOpDeregisterInstance) ID() string { func (m *awsAwsjson11_serializeOpDeregisterInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpDeregisterInstance) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -410,6 +453,10 @@ func (*awsAwsjson11_serializeOpDiscoverInstances) ID() string { func (m *awsAwsjson11_serializeOpDiscoverInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpDiscoverInstances) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -465,6 +514,10 @@ func (*awsAwsjson11_serializeOpDiscoverInstancesRevision) ID() string { func (m *awsAwsjson11_serializeOpDiscoverInstancesRevision) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpDiscoverInstancesRevision) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -520,6 +575,10 @@ func (*awsAwsjson11_serializeOpGetInstance) ID() string { func (m *awsAwsjson11_serializeOpGetInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpGetInstance) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -575,6 +636,10 @@ func (*awsAwsjson11_serializeOpGetInstancesHealthStatus) ID() string { func (m *awsAwsjson11_serializeOpGetInstancesHealthStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpGetInstancesHealthStatus) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -630,6 +697,10 @@ func (*awsAwsjson11_serializeOpGetNamespace) ID() string { func (m *awsAwsjson11_serializeOpGetNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpGetNamespace) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -685,6 +758,10 @@ func (*awsAwsjson11_serializeOpGetOperation) ID() string { func (m *awsAwsjson11_serializeOpGetOperation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpGetOperation) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -740,6 +819,10 @@ func (*awsAwsjson11_serializeOpGetService) ID() string { func (m *awsAwsjson11_serializeOpGetService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpGetService) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -795,6 +880,10 @@ func (*awsAwsjson11_serializeOpListInstances) ID() string { func (m *awsAwsjson11_serializeOpListInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpListInstances) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -850,6 +941,10 @@ func (*awsAwsjson11_serializeOpListNamespaces) ID() string { func (m *awsAwsjson11_serializeOpListNamespaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpListNamespaces) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -905,6 +1002,10 @@ func (*awsAwsjson11_serializeOpListOperations) ID() string { func (m *awsAwsjson11_serializeOpListOperations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpListOperations) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -960,6 +1063,10 @@ func (*awsAwsjson11_serializeOpListServices) ID() string { func (m *awsAwsjson11_serializeOpListServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpListServices) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1015,6 +1124,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)} @@ -1057,6 +1170,8 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1070,6 +1185,10 @@ func (*awsAwsjson11_serializeOpRegisterInstance) ID() string { func (m *awsAwsjson11_serializeOpRegisterInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpRegisterInstance) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1125,6 +1246,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)} @@ -1167,6 +1292,8 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex } 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_serializeOpUpdateHttpNamespace) ID() string { func (m *awsAwsjson11_serializeOpUpdateHttpNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer 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_serializeOpUpdateHttpNamespace) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1290,6 +1429,10 @@ func (*awsAwsjson11_serializeOpUpdateInstanceCustomHealthStatus) ID() string { func (m *awsAwsjson11_serializeOpUpdateInstanceCustomHealthStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1332,6 +1475,8 @@ func (m *awsAwsjson11_serializeOpUpdateInstanceCustomHealthStatus) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1345,6 +1490,10 @@ func (*awsAwsjson11_serializeOpUpdatePrivateDnsNamespace) ID() string { func (m *awsAwsjson11_serializeOpUpdatePrivateDnsNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1387,6 +1536,8 @@ func (m *awsAwsjson11_serializeOpUpdatePrivateDnsNamespace) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1400,6 +1551,10 @@ func (*awsAwsjson11_serializeOpUpdatePublicDnsNamespace) ID() string { func (m *awsAwsjson11_serializeOpUpdatePublicDnsNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1442,6 +1597,8 @@ func (m *awsAwsjson11_serializeOpUpdatePublicDnsNamespace) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1455,6 +1612,10 @@ func (*awsAwsjson11_serializeOpUpdateService) ID() string { func (m *awsAwsjson11_serializeOpUpdateService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1497,6 +1658,8 @@ func (m *awsAwsjson11_serializeOpUpdateService) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentAttributes(v map[string]string, value smithyjson.Value) error { 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 f1d857d72a..33cd7d199c 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,49 @@ +# v1.24.7 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.6 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.5 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# 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. 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 274b15275b..644ee1e058 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 @@ -186,10 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveMeterProvider(&options) - resolveTracerProvider(&options) + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -274,7 +274,9 @@ func (c *Client) invokeOperation( defer endTimer() defer span.End() - handler := smithyhttp.NewClientHandler(options.HTTPClient) + 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 { 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 5f0cce2bf1..ec23c36f5b 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 @@ -889,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 { @@ -929,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 { @@ -1123,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 { @@ -1163,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/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go index ca844187a3..9b98f93ed2 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.23.1" +const goModuleVersion = "1.24.7" 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 4dacb14b68..a7a5b57de0 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 @@ -71,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) } @@ -146,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) } @@ -225,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) } @@ -300,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 ccf9af9989..4077446972 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,45 @@ +# v1.28.6 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.5 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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. 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 16c908212e..0b05bf6c73 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 @@ -186,10 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveMeterProvider(&options) - resolveTracerProvider(&options) + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -274,7 +274,9 @@ func (c *Client) invokeOperation( defer endTimer() defer span.End() - handler := smithyhttp.NewClientHandler(options.HTTPClient) + 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 { 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 011b8284ca..cab972aa98 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.27.1" +const goModuleVersion = "1.28.6" 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 7dad3312a8..289a8d07c0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,49 @@ +# v1.33.2 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.1 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.0 (2024-11-14) + +* **Feature**: This release introduces the new API 'AssumeRoot', which returns short-term credentials that you can use to perform privileged tasks. + +# v1.32.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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. 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 4425ba95c4..4e678ce2ae 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 @@ -190,10 +190,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveMeterProvider(&options) - resolveTracerProvider(&options) + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -278,7 +278,9 @@ func (c *Client) invokeOperation( defer endTimer() defer span.End() - handler := smithyhttp.NewClientHandler(options.HTTPClient) + 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 { 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 be03f017d4..8838f4fb8a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go @@ -16,7 +16,7 @@ import ( // Amazon Web Services resources. These temporary credentials consist of an access // key ID, a secret access key, and a security token. Typically, you use AssumeRole // within your account or for cross-account access. For a comparison of AssumeRole -// with other API operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the +// with other API operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the // IAM User Guide. // // # Permissions @@ -26,16 +26,16 @@ import ( // cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken // API operations. // -// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a -// single JSON policy document to use as an inline session policy. You can also -// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed -// session policies. The plaintext that you use for both inline and managed session -// policies can't exceed 2,048 characters. Passing policies to this operation -// returns new temporary credentials. The resulting session's permissions are the -// intersection of the role's identity-based policy and the session policies. You -// can use the role's temporary credentials in subsequent Amazon Web Services API -// calls to access resources in the account that owns the role. You cannot use -// session policies to grant more permissions than those allowed by the +// (Optional) You can pass inline or managed session policies to this operation. +// You can pass a single JSON policy document to use as an inline session policy. +// You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use +// as managed session policies. The plaintext that you use for both inline and +// managed session policies can't exceed 2,048 characters. Passing policies to this +// operation returns new temporary credentials. The resulting session's permissions +// are the intersection of the role's identity-based policy and the session +// policies. You can use the role's temporary credentials in subsequent Amazon Web +// Services API calls to access resources in the account that owns the role. You +// cannot use session policies to grant more permissions than those allowed by the // identity-based policy of the role that is being assumed. For more information, // see [Session Policies]in the IAM User Guide. // @@ -104,10 +104,9 @@ import ( // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html // [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison -// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [IAM Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html // [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html func (c *Client) AssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*Options)) (*AssumeRoleOutput, error) { if params == nil { @@ -141,10 +140,18 @@ type AssumeRoleInput struct { // the temporary security credentials will expose the role session name to the // external account in their CloudTrail logs. // + // For security purposes, administrators can view this field in [CloudTrail logs] to help identify + // who performed an action in Amazon Web Services. Your administrator might require + // that you specify your user name as the session name when you assume the role. + // For more information, see [sts:RoleSessionName]sts:RoleSessionName . + // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can also // include underscores or any of the following characters: =,.@- // + // [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds + // [sts:RoleSessionName]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname + // // This member is required. RoleSessionName *string @@ -163,7 +170,7 @@ type AssumeRoleInput struct { // 43200 seconds (12 hours), depending on the maximum session duration setting for // your role. However, if you assume a role using role chaining and provide a // DurationSeconds parameter value greater than one hour, the operation fails. To - // learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. + // learn how to view the maximum value for your role, see [Update the maximum session duration for a role]. // // By default, the value is set to 3600 seconds. // @@ -173,7 +180,7 @@ type AssumeRoleInput struct { // parameter that specifies the maximum length of the console session. For more // information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide. // - // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session + // [Update the maximum session duration for a role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration // [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html DurationSeconds *int32 @@ -218,7 +225,10 @@ type AssumeRoleInput struct { // by percentage how close the policies and tags for your request are to the upper // size limit. // + // For more information about role session permissions, see [Session policies]. + // // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -273,10 +283,10 @@ type AssumeRoleInput struct { SerialNumber *string // The source identity specified by the principal that is calling the AssumeRole - // operation. + // operation. The source identity value persists across [chained role]sessions. // // You can require users to specify a source identity when they assume a role. You - // do this by using the sts:SourceIdentity condition key in a role trust policy. + // do this by using the [sts:SourceIdentity]sts:SourceIdentity condition key in a role trust policy. // You can use source identity information in CloudTrail logs to determine who took // actions with a role. You can use the aws:SourceIdentity condition key to // further control access to Amazon Web Services resources based on the value of @@ -289,7 +299,9 @@ type AssumeRoleInput struct { // value that begins with the text aws: . This prefix is reserved for Amazon Web // Services internal use. // + // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html + // [sts:SourceIdentity]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity SourceIdentity *string // A list of session tags that you want to pass. Each session tag consists of a @@ -342,8 +354,8 @@ type AssumeRoleInput struct { // a tag key as transitive, the corresponding key and value passes to subsequent // sessions in a role chain. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. // - // This parameter is optional. When you set session tags as transitive, the - // session policy and session tags packed binary limit is not affected. + // This parameter is optional. The transitive status of a session tag does not + // impact its packed binary size. // // If you choose not to specify a transitive tag key, then no tags are passed from // this session to any subsequent sessions. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go index b8b0c095f7..d0e117ac92 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go @@ -16,7 +16,7 @@ import ( // mechanism for tying an enterprise identity store or directory to role-based // Amazon Web Services access without user-specific credentials or configuration. // For a comparison of AssumeRoleWithSAML with the other API operations that -// produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. // // The temporary security credentials returned by this operation consist of an // access key ID, a secret access key, and a security token. Applications can use @@ -130,10 +130,10 @@ import ( // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session // [Creating a Role for SAML 2.0 Federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison // [Creating SAML Identity Providers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html // [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html // [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html // [Configuring a Relying Party and Claims]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html // [Role chaining]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining @@ -219,6 +219,8 @@ type AssumeRoleWithSAMLInput struct { // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // + // For more information about role session permissions, see [Session policies]. + // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has a // separate limit. Your request can fail for this limit even if your plaintext @@ -227,6 +229,7 @@ type AssumeRoleWithSAMLInput struct { // size limit. // // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -304,7 +307,8 @@ type AssumeRoleWithSAMLOutput struct { // allowed space. PackedPolicySize *int32 - // The value in the SourceIdentity attribute in the SAML assertion. + // The value in the SourceIdentity attribute in the SAML assertion. The source + // identity value persists across [chained role]sessions. // // You can require users to set a source identity value when they assume a role. // You do this by using the sts:SourceIdentity condition key in a role trust @@ -321,7 +325,7 @@ type AssumeRoleWithSAMLOutput struct { // of upper- and lower-case alphanumeric characters with no spaces. You can also // include underscores or any of the following characters: =,.@- // - // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining + // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html SourceIdentity *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go index ffe2479f63..803cded5a4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -31,7 +31,7 @@ import ( // Services credentials. Instead, the identity of the caller is validated by using // a token from the web identity provider. For a comparison of // AssumeRoleWithWebIdentity with the other API operations that produce temporary -// credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. // // The temporary security credentials returned by this API consist of an access // key ID, a secret access key, and a security token. Applications can use these @@ -45,7 +45,7 @@ import ( // DurationSeconds parameter to specify the duration of your session. You can // provide a value from 900 seconds (15 minutes) up to the maximum session duration // setting for the role. This setting can have a value from 1 hour to 12 hours. To -// learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. +// learn how to view the maximum value for your role, see [Update the maximum session duration for a role]in the IAM User Guide. // The maximum session duration limit applies when you use the AssumeRole* API // operations or the assume-role* CLI commands. However the limit does not apply // when you use those operations to create a console URL. For more information, see @@ -111,34 +111,23 @@ import ( // that you avoid using any personally identifiable information (PII) in this // field. For example, you could instead use a GUID or a pairwise identifier, as [suggested in the OIDC specification]. // -// For more information about how to use web identity federation and the +// For more information about how to use OIDC federation and the // AssumeRoleWithWebIdentity API, see the following resources: // // [Using Web Identity Federation API Operations for Mobile Apps] // - and [Federation Through a Web-based Identity Provider]. // -// [Web Identity Federation Playground] -// - . Walk through the process of authenticating through Login with Amazon, -// Facebook, or Google, getting temporary security credentials, and then using -// those credentials to make a request to Amazon Web Services. -// // [Amazon Web Services SDK for iOS Developer Guide] // - and [Amazon Web Services SDK for Android Developer Guide]. These toolkits contain sample apps that show how to invoke the // identity providers. The toolkits then show how to use the information from these // providers to get and use temporary security credentials. // -// [Web Identity Federation with Mobile Applications] -// - . This article discusses web identity federation and shows an example of -// how to use web identity federation to get access to content in Amazon S3. -// // [Amazon Web Services SDK for iOS Developer Guide]: http://aws.amazon.com/sdkforios/ -// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session -// [Web Identity Federation Playground]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/ // [Amazon Web Services SDK for Android Developer Guide]: http://aws.amazon.com/sdkforandroid/ // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison // [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html // [Subject]: http://openid.net/specs/openid-connect-core-1_0.html#Claims // [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html // [Amazon Cognito identity pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html @@ -148,7 +137,7 @@ import ( // [Amazon Cognito federated identities]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html // [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html // [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining -// [Web Identity Federation with Mobile Applications]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications +// [Update the maximum session duration for a role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration // [Using Web Identity Federation API Operations for Mobile Apps]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html // [suggested in the OIDC specification]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes func (c *Client) AssumeRoleWithWebIdentity(ctx context.Context, params *AssumeRoleWithWebIdentityInput, optFns ...func(*Options)) (*AssumeRoleWithWebIdentityOutput, error) { @@ -170,6 +159,17 @@ type AssumeRoleWithWebIdentityInput struct { // The Amazon Resource Name (ARN) of the role that the caller is assuming. // + // Additional considerations apply to Amazon Cognito identity pools that assume [cross-account IAM roles]. + // The trust policies of these roles must accept the cognito-identity.amazonaws.com + // service principal and must contain the cognito-identity.amazonaws.com:aud + // condition key to restrict role assumption to users from your intended identity + // pools. A policy that trusts Amazon Cognito identity pools without this condition + // creates a risk that a user from an unintended identity pool can assume the role. + // For more information, see [Trust policies for IAM roles in Basic (Classic) authentication]in the Amazon Cognito Developer Guide. + // + // [cross-account IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html + // [Trust policies for IAM roles in Basic (Classic) authentication]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies + // // This member is required. RoleArn *string @@ -179,17 +179,26 @@ type AssumeRoleWithWebIdentityInput struct { // associated with that user. This session name is included as part of the ARN and // assumed role ID in the AssumedRoleUser response element. // + // For security purposes, administrators can view this field in [CloudTrail logs] to help identify + // who performed an action in Amazon Web Services. Your administrator might require + // that you specify your user name as the session name when you assume the role. + // For more information, see [sts:RoleSessionName]sts:RoleSessionName . + // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can also // include underscores or any of the following characters: =,.@- // + // [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds + // [sts:RoleSessionName]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname + // // This member is required. RoleSessionName *string // The OAuth 2.0 access token or OpenID Connect ID token that is provided by the // identity provider. Your application must get this token by authenticating the // user who is using your application with a web identity provider before the - // application makes an AssumeRoleWithWebIdentity call. Only tokens with RSA + // application makes an AssumeRoleWithWebIdentity call. Timestamps in the token + // must be formatted as either an integer or a long integer. Only tokens with RSA // algorithms (RS256) are supported. // // This member is required. @@ -232,6 +241,8 @@ type AssumeRoleWithWebIdentityInput struct { // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // + // For more information about role session permissions, see [Session policies]. + // // An Amazon Web Services conversion compresses the passed inline session policy, // managed policy ARNs, and session tags into a packed binary format that has a // separate limit. Your request can fail for this limit even if your plaintext @@ -240,6 +251,7 @@ type AssumeRoleWithWebIdentityInput struct { // size limit. // // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -337,7 +349,7 @@ type AssumeRoleWithWebIdentityOutput struct { // of upper- and lower-case alphanumeric characters with no spaces. You can also // include underscores or any of the following characters: =,.@- // - // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining + // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html // [Using Tokens with User Pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html SourceIdentity *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go new file mode 100644 index 0000000000..537ab87527 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sts + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/sts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a set of short term credentials you can use to perform privileged tasks +// in a member account. +// +// Before you can launch a privileged session, you must have enabled centralized +// root access in your organization. For steps to enable this feature, see [Centralize root access for member accounts]in the +// IAM User Guide. +// +// The global endpoint is not supported for AssumeRoot. You must send this request +// to a Regional STS endpoint. For more information, see [Endpoints]. +// +// You can track AssumeRoot in CloudTrail logs to determine what actions were +// performed in a session. For more information, see [Track privileged tasks in CloudTrail]in the IAM User Guide. +// +// [Endpoints]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints +// [Track privileged tasks in CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html +// [Centralize root access for member accounts]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html +func (c *Client) AssumeRoot(ctx context.Context, params *AssumeRootInput, optFns ...func(*Options)) (*AssumeRootOutput, error) { + if params == nil { + params = &AssumeRootInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssumeRoot", params, optFns, c.addOperationAssumeRootMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssumeRootOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssumeRootInput struct { + + // The member account principal ARN or account ID. + // + // This member is required. + TargetPrincipal *string + + // The identity based policy that scopes the session to the privileged tasks that + // can be performed. You can use one of following Amazon Web Services managed + // policies to scope root session actions. You can add additional customer managed + // policies to further limit the permissions for the root session. + // + // [IAMAuditRootUserCredentials] + // + // [IAMCreateRootUserPassword] + // + // [IAMDeleteRootUserCredentials] + // + // [S3UnlockBucketPolicy] + // + // [SQSUnlockQueuePolicy] + // + // [IAMDeleteRootUserCredentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials + // [IAMCreateRootUserPassword]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword + // [IAMAuditRootUserCredentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials + // [S3UnlockBucketPolicy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy + // [SQSUnlockQueuePolicy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy + // + // This member is required. + TaskPolicyArn *types.PolicyDescriptorType + + // The duration, in seconds, of the privileged session. The value can range from 0 + // seconds up to the maximum session duration of 900 seconds (15 minutes). If you + // specify a value higher than this setting, the operation fails. + // + // By default, the value is set to 900 seconds. + DurationSeconds *int32 + + noSmithyDocumentSerde +} + +type AssumeRootOutput struct { + + // The temporary security credentials, which include an access key ID, a secret + // access key, and a security token. + // + // The size of the security token that STS API operations return is not fixed. We + // strongly recommend that you make no assumptions about the maximum size. + Credentials *types.Credentials + + // The source identity specified by the principal that is calling the AssumeRoot + // operation. + // + // You can use the aws:SourceIdentity condition key to control access based on the + // value of source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles] + // in the IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can also + // include underscores or any of the following characters: =,.@- + // + // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html + SourceIdentity *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoot{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRoot{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoot"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpAssumeRootValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoot(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssumeRoot(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssumeRoot", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go index 96f59ec63d..e2ecc792ac 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go @@ -20,7 +20,7 @@ import ( // credentials of an IAM user. As a result, this call is appropriate in contexts // where those credentials can be safeguarded, usually in a server-based // application. For a comparison of GetFederationToken with the other API -// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. // // Although it is possible to call GetFederationToken using the security // credentials of an Amazon Web Services account root user rather than an IAM user @@ -104,9 +104,9 @@ import ( // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html // [GetFederationToken—Federation Through a Custom Identity Broker]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison // [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html // [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTokenInput, optFns ...func(*Options)) (*GetFederationTokenOutput, error) { if params == nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go index 0ed9ecbc74..fdc451117b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go @@ -22,7 +22,7 @@ import ( // the call returns, IAM users can then make programmatic calls to API operations // that require MFA authentication. An incorrect MFA code causes the API to return // an access denied error. For a comparison of GetSessionToken with the other API -// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide. +// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. // // No permissions are required for users to perform this operation. The purpose of // the sts:GetSessionToken operation is to authenticate the user using MFA. You @@ -63,10 +63,10 @@ import ( // credentials, see [Temporary Credentials for Users in Untrusted Environments]in the IAM User Guide. // // [Permissions for GetSessionToken]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html -// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison // [Temporary Credentials for Users in Untrusted Environments]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken // [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials // [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html func (c *Client) GetSessionToken(ctx context.Context, params *GetSessionTokenInput, optFns ...func(*Options)) (*GetSessionTokenOutput, error) { if params == nil { params = &GetSessionTokenInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go index cf0cc54e2a..59349890f6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go @@ -410,6 +410,121 @@ func awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response *smithyhtt } } +type awsAwsquery_deserializeOpAssumeRoot struct { +} + +func (*awsAwsquery_deserializeOpAssumeRoot) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpAssumeRoot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoot(response, &metadata) + } + output := &AssumeRootOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("AssumeRootResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentAssumeRootOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorAssumeRoot(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ExpiredTokenException", errorCode): + return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody) + + case strings.EqualFold("RegionDisabledException", errorCode): + return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpDecodeAuthorizationMessage struct { } @@ -2268,6 +2383,61 @@ func awsAwsquery_deserializeOpDocumentAssumeRoleWithWebIdentityOutput(v **Assume return nil } +func awsAwsquery_deserializeOpDocumentAssumeRootOutput(v **AssumeRootOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *AssumeRootOutput + if *v == nil { + sv = &AssumeRootOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Credentials", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("SourceIdentity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SourceIdentity = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentDecodeAuthorizationMessageOutput(v **DecodeAuthorizationMessageOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json index 6b6e839e6c..70a88452ee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json @@ -13,6 +13,7 @@ "api_op_AssumeRole.go", "api_op_AssumeRoleWithSAML.go", "api_op_AssumeRoleWithWebIdentity.go", + "api_op_AssumeRoot.go", "api_op_DecodeAuthorizationMessage.go", "api_op_GetAccessKeyInfo.go", "api_op_GetCallerIdentity.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index 1699b98e2f..f2a7e2ce7d 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.31.1" +const goModuleVersion = "1.33.2" 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 1bcbc82842..96b222136b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go @@ -226,6 +226,76 @@ func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpAssumeRoot struct { +} + +func (*awsAwsquery_serializeOpAssumeRoot) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpAssumeRoot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssumeRootInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("AssumeRoot") + body.Key("Version").String("2011-06-15") + + if err := awsAwsquery_serializeOpDocumentAssumeRootInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpDecodeAuthorizationMessage struct { } @@ -821,6 +891,30 @@ func awsAwsquery_serializeOpDocumentAssumeRoleWithWebIdentityInput(v *AssumeRole return nil } +func awsAwsquery_serializeOpDocumentAssumeRootInput(v *AssumeRootInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DurationSeconds != nil { + objectKey := object.Key("DurationSeconds") + objectKey.Integer(*v.DurationSeconds) + } + + if v.TargetPrincipal != nil { + objectKey := object.Key("TargetPrincipal") + objectKey.String(*v.TargetPrincipal) + } + + if v.TaskPolicyArn != nil { + objectKey := object.Key("TaskPolicyArn") + if err := awsAwsquery_serializeDocumentPolicyDescriptorType(v.TaskPolicyArn, objectKey); err != nil { + return err + } + } + + return nil +} + func awsAwsquery_serializeOpDocumentDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput, value query.Value) error { object := value.Object() _ = object diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go index 9573a4b646..041629bba2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go @@ -95,8 +95,8 @@ func (e *IDPRejectedClaimException) ErrorCode() string { func (e *IDPRejectedClaimException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The error returned if the message passed to DecodeAuthorizationMessage was -// invalid. This can happen if the token contains invalid characters, such as -// linebreaks. +// invalid. This can happen if the token contains invalid characters, such as line +// breaks, or if the message has expired. type InvalidAuthorizationMessageException struct { Message *string @@ -218,10 +218,10 @@ func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM -// console to activate STS in that region. For more information, see [Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region]in the IAM +// console to activate STS in that region. For more information, see [Activating and Deactivating STS in an Amazon Web Services Region]in the IAM // User Guide. // -// [Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html +// [Activating and Deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html type RegionDisabledException struct { Message *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go index 3e4bad2a92..1026e22118 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go @@ -70,6 +70,26 @@ func (m *validateOpAssumeRoleWithWebIdentity) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpAssumeRoot struct { +} + +func (*validateOpAssumeRoot) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssumeRoot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssumeRootInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssumeRootInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDecodeAuthorizationMessage struct { } @@ -142,6 +162,10 @@ func addOpAssumeRoleWithWebIdentityValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpAssumeRoleWithWebIdentity{}, middleware.After) } +func addOpAssumeRootValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssumeRoot{}, middleware.After) +} + func addOpDecodeAuthorizationMessageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDecodeAuthorizationMessage{}, middleware.After) } @@ -254,6 +278,24 @@ func validateOpAssumeRoleWithWebIdentityInput(v *AssumeRoleWithWebIdentityInput) } } +func validateOpAssumeRootInput(v *AssumeRootInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssumeRootInput"} + if v.TargetPrincipal == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetPrincipal")) + } + if v.TaskPolicyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskPolicyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput) error { if v == nil { return nil diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 28d3ccb90f..56b19e3a1c 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,27 @@ +# 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 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 e78926c9a5..9ae308540c 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 24162a6f5b..212eae4fab 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.21.0" +const goModuleVersion = "1.22.1" 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 c43c346b6f..0fceae81db 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/client.go +++ b/vendor/github.com/aws/smithy-go/transport/http/client.go @@ -6,6 +6,7 @@ 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" ) @@ -28,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 @@ -46,6 +64,11 @@ func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( 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) @@ -66,7 +89,7 @@ func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( span.SetProperty("http.request_content_length", length) } - resp, err := c.client.Do(builtRequest) + resp, err := client.Do(builtRequest) if resp == nil { // Ensure a http response value is always present to prevent unexpected // panics. 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 0000000000..ab1101394c --- /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/bmatcuk/doublestar/v4/README.md b/vendor/github.com/bmatcuk/doublestar/v4/README.md index 70117eff20..21929a9545 100644 --- a/vendor/github.com/bmatcuk/doublestar/v4/README.md +++ b/vendor/github.com/bmatcuk/doublestar/v4/README.md @@ -89,6 +89,19 @@ Note: users should _not_ count on the returned error, `doublestar.ErrBadPattern`, being equal to `path.ErrBadPattern`. +### MatchUnvalidated + +```go +func MatchUnvalidated(pattern, name string) bool +``` + +MatchUnvalidated can provide a small performance improvement if you don't care +about whether or not the pattern is valid (perhaps because you already ran +`ValidatePattern`). Note that there's really only one case where this +performance improvement is realized: when pattern matching reaches the end of +`name` before reaching the end of `pattern`, such as `Match("a/b/c", "a")`. + + ### PathMatch ```go @@ -105,6 +118,20 @@ that both `pattern` and `name` are using the system's path separator. If you can't be sure of that, use `filepath.ToSlash()` on both `pattern` and `name`, and then use the `Match()` function instead. + +### PathMatchUnvalidated + +```go +func PathMatchUnvalidated(pattern, name string) bool +``` + +PathMatchUnvalidated can provide a small performance improvement if you don't +care about whether or not the pattern is valid (perhaps because you already ran +`ValidatePattern`). Note that there's really only one case where this +performance improvement is realized: when pattern matching reaches the end of +`name` before reaching the end of `pattern`, such as `Match("a/b/c", "a")`. + + ### GlobOption Options that may be passed to `Glob`, `GlobWalk`, or `FilepathGlob`. Any number @@ -387,6 +414,8 @@ ever since. In that time, it has grown into one of the most popular globbing libraries in the Go ecosystem. So, if **doublestar** is a useful library in your project, consider [sponsoring] my work! I'd really appreciate it! +[![MASV](../sponsors/MASV.png?raw=true)](https://massive.io/) + Thanks for sponsoring me! ## License diff --git a/vendor/github.com/bmatcuk/doublestar/v4/match.go b/vendor/github.com/bmatcuk/doublestar/v4/match.go index 4232c79f3f..c0f20afa43 100644 --- a/vendor/github.com/bmatcuk/doublestar/v4/match.go +++ b/vendor/github.com/bmatcuk/doublestar/v4/match.go @@ -53,6 +53,17 @@ func Match(pattern, name string) (bool, error) { return matchWithSeparator(pattern, name, '/', true) } +// MatchUnvalidated can provide a small performance improvement if you don't +// care about whether or not the pattern is valid (perhaps because you already +// ran `ValidatePattern`). Note that there's really only one case where this +// performance improvement is realized: when pattern matching reaches the end +// of `name` before reaching the end of `pattern`, such as `Match("a/b/c", +// "a")`. +func MatchUnvalidated(pattern, name string) bool { + matched, _ := matchWithSeparator(pattern, name, '/', false) + return matched +} + // PathMatch returns true if `name` matches the file name `pattern`. The // difference between Match and PathMatch is that PathMatch will automatically // use your system's path separator to split `name` and `pattern`. On systems @@ -67,6 +78,17 @@ func PathMatch(pattern, name string) (bool, error) { return matchWithSeparator(pattern, name, filepath.Separator, true) } +// PathMatchUnvalidated can provide a small performance improvement if you +// don't care about whether or not the pattern is valid (perhaps because you +// already ran `ValidatePattern`). Note that there's really only one case where +// this performance improvement is realized: when pattern matching reaches the +// end of `name` before reaching the end of `pattern`, such as `Match("a/b/c", +// "a")`. +func PathMatchUnvalidated(pattern, name string) bool { + matched, _ := matchWithSeparator(pattern, name, filepath.Separator, false) + return matched +} + func matchWithSeparator(pattern, name string, separator rune, validate bool) (matched bool, err error) { return doMatchWithSeparator(pattern, name, separator, validate, -1, -1, -1, -1, 0, 0) } diff --git a/vendor/github.com/bmatcuk/doublestar/v4/utils.go b/vendor/github.com/bmatcuk/doublestar/v4/utils.go index 0ab1dc98f7..6b8df9a389 100644 --- a/vendor/github.com/bmatcuk/doublestar/v4/utils.go +++ b/vendor/github.com/bmatcuk/doublestar/v4/utils.go @@ -84,6 +84,16 @@ func SplitPattern(p string) (base, pattern string) { // filepath.ErrBadPattern. // func FilepathGlob(pattern string, opts ...GlobOption) (matches []string, err error) { + if pattern == "" { + // special case to match filepath.Glob behavior + g := newGlob(opts...) + if g.failOnIOErrors { + // match doublestar.Glob behavior here + return nil, os.ErrInvalid + } + return nil, nil + } + pattern = filepath.Clean(pattern) pattern = filepath.ToSlash(pattern) base, f := SplitPattern(pattern) diff --git a/vendor/github.com/docker/docker/api/common.go b/vendor/github.com/docker/docker/api/common.go index f831735f84..93d64cd8d5 100644 --- a/vendor/github.com/docker/docker/api/common.go +++ b/vendor/github.com/docker/docker/api/common.go @@ -3,7 +3,7 @@ package api // import "github.com/docker/docker/api" // Common constants for daemon and client. const ( // DefaultVersion of the current REST API. - DefaultVersion = "1.46" + DefaultVersion = "1.47" // MinSupportedAPIVersion is the minimum API version that can be supported // by the API server, specified as "major.minor". Note that the daemon diff --git a/vendor/github.com/docker/docker/api/swagger.yaml b/vendor/github.com/docker/docker/api/swagger.yaml index 4a1b7087d8..7164e1eba5 100644 --- a/vendor/github.com/docker/docker/api/swagger.yaml +++ b/vendor/github.com/docker/docker/api/swagger.yaml @@ -19,10 +19,10 @@ produces: consumes: - "application/json" - "text/plain" -basePath: "/v1.46" +basePath: "/v1.47" info: title: "Docker Engine API" - version: "1.46" + version: "1.47" x-logo: url: "https://docs.docker.com/assets/images/logo-docker-main.png" description: | @@ -55,8 +55,8 @@ info: the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. - If you omit the version-prefix, the current version of the API (v1.46) is used. - For example, calling `/info` is the same as calling `/v1.46/info`. Using the + If you omit the version-prefix, the current version of the API (v1.47) is used. + For example, calling `/info` is the same as calling `/v1.47/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, @@ -393,7 +393,7 @@ definitions: Make the mount non-recursively read-only, but still leave the mount recursive (unless NonRecursive is set to `true` in conjunction). - Addded in v1.44, before that version all read-only mounts were + Added in v1.44, before that version all read-only mounts were non-recursive by default. To match the previous behaviour this will default to `true` for clients on versions prior to v1.44. type: "boolean" @@ -1384,7 +1384,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always empty. It must not be used, and will be removed in API v1.47. + > always empty. It must not be used, and will be removed in API v1.48. type: "string" example: "" Domainname: @@ -1394,7 +1394,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always empty. It must not be used, and will be removed in API v1.47. + > always empty. It must not be used, and will be removed in API v1.48. type: "string" example: "" User: @@ -1408,7 +1408,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always false. It must not be used, and will be removed in API v1.47. + > always false. It must not be used, and will be removed in API v1.48. type: "boolean" default: false example: false @@ -1419,7 +1419,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always false. It must not be used, and will be removed in API v1.47. + > always false. It must not be used, and will be removed in API v1.48. type: "boolean" default: false example: false @@ -1430,7 +1430,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always false. It must not be used, and will be removed in API v1.47. + > always false. It must not be used, and will be removed in API v1.48. type: "boolean" default: false example: false @@ -1457,7 +1457,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always false. It must not be used, and will be removed in API v1.47. + > always false. It must not be used, and will be removed in API v1.48. type: "boolean" default: false example: false @@ -1468,7 +1468,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always false. It must not be used, and will be removed in API v1.47. + > always false. It must not be used, and will be removed in API v1.48. type: "boolean" default: false example: false @@ -1479,7 +1479,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always false. It must not be used, and will be removed in API v1.47. + > always false. It must not be used, and will be removed in API v1.48. type: "boolean" default: false example: false @@ -1516,7 +1516,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always empty. It must not be used, and will be removed in API v1.47. + > always empty. It must not be used, and will be removed in API v1.48. type: "string" default: "" example: "" @@ -1555,7 +1555,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always omitted. It must not be used, and will be removed in API v1.47. + > always omitted. It must not be used, and will be removed in API v1.48. type: "boolean" default: false example: false @@ -1567,7 +1567,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always omitted. It must not be used, and will be removed in API v1.47. + > always omitted. It must not be used, and will be removed in API v1.48. type: "string" default: "" example: "" @@ -1601,7 +1601,7 @@ definitions:


> **Deprecated**: this field is not part of the image specification and is - > always omitted. It must not be used, and will be removed in API v1.47. + > always omitted. It must not be used, and will be removed in API v1.48. type: "integer" default: 10 x-nullable: true @@ -2216,7 +2216,7 @@ definitions: Created: description: | Date and time at which the image was created as a Unix timestamp - (number of seconds sinds EPOCH). + (number of seconds since EPOCH). type: "integer" x-nullable: false example: "1644009612" @@ -2265,6 +2265,19 @@ definitions: x-nullable: false type: "integer" example: 2 + Manifests: + description: | + Manifests is a list of manifests available in this image. + It provides a more detailed view of the platform-specific image manifests + or other image-attached data like build attestations. + + WARNING: This is experimental and may change at any time without any backward + compatibility. + type: "array" + x-nullable: false + x-omitempty: true + items: + $ref: "#/definitions/ImageManifestSummary" AuthConfig: type: "object" @@ -2500,7 +2513,7 @@ definitions: example: false Attachable: description: | - Wheter a global / swarm scope network is manually attachable by regular + Whether a global / swarm scope network is manually attachable by regular containers from workers in swarm mode. type: "boolean" default: false @@ -3723,7 +3736,7 @@ definitions: example: "json-file" Options: description: | - Driver-specific options for the selectd log driver, specified + Driver-specific options for the selected log driver, specified as key/value pairs. type: "object" additionalProperties: @@ -5318,7 +5331,7 @@ definitions: description: | The default (and highest) API version that is supported by the daemon type: "string" - example: "1.46" + example: "1.47" MinAPIVersion: description: | The minimum API version that is supported by the daemon @@ -5334,7 +5347,7 @@ definitions: The version Go used to compile the daemon, and the version of the Go runtime in use. type: "string" - example: "go1.21.13" + example: "go1.22.7" Os: description: | The operating system that the daemon is running on ("linux" or "windows") @@ -6644,6 +6657,120 @@ definitions: additionalProperties: type: "string" + ImageManifestSummary: + x-go-name: "ManifestSummary" + description: | + ImageManifestSummary represents a summary of an image manifest. + type: "object" + required: ["ID", "Descriptor", "Available", "Size", "Kind"] + properties: + ID: + description: | + ID is the content-addressable ID of an image and is the same as the + digest of the image manifest. + type: "string" + example: "sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f" + Descriptor: + $ref: "#/definitions/OCIDescriptor" + Available: + description: Indicates whether all the child content (image config, layers) is fully available locally. + type: "boolean" + example: true + Size: + type: "object" + x-nullable: false + required: ["Content", "Total"] + properties: + Total: + type: "integer" + format: "int64" + example: 8213251 + description: | + Total is the total size (in bytes) of all the locally present + data (both distributable and non-distributable) that's related to + this manifest and its children. + This equal to the sum of [Content] size AND all the sizes in the + [Size] struct present in the Kind-specific data struct. + For example, for an image kind (Kind == "image") + this would include the size of the image content and unpacked + image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). + Content: + description: | + Content is the size (in bytes) of all the locally present + content in the content store (e.g. image config, layers) + referenced by this manifest and its children. + This only includes blobs in the content store. + type: "integer" + format: "int64" + example: 3987495 + Kind: + type: "string" + example: "image" + enum: + - "image" + - "attestation" + - "unknown" + description: | + The kind of the manifest. + + kind | description + -------------|----------------------------------------------------------- + image | Image manifest that can be used to start a container. + attestation | Attestation manifest produced by the Buildkit builder for a specific image manifest. + ImageData: + description: | + The image data for the image manifest. + This field is only populated when Kind is "image". + type: "object" + x-nullable: true + x-omitempty: true + required: ["Platform", "Containers", "Size", "UnpackedSize"] + properties: + Platform: + $ref: "#/definitions/OCIPlatform" + description: | + OCI platform of the image. This will be the platform specified in the + manifest descriptor from the index/manifest list. + If it's not available, it will be obtained from the image config. + Containers: + description: | + The IDs of the containers that are using this image. + type: "array" + items: + type: "string" + example: ["ede54ee1fda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c7430", "abadbce344c096744d8d6071a90d474d28af8f1034b5ea9fb03c3f4bfc6d005e"] + Size: + type: "object" + x-nullable: false + required: ["Unpacked"] + properties: + Unpacked: + type: "integer" + format: "int64" + example: 3987495 + description: | + Unpacked is the size (in bytes) of the locally unpacked + (uncompressed) image content that's directly usable by the containers + running this image. + It's independent of the distributable content - e.g. + the image might still have an unpacked data that's still used by + some container even when the distributable/compressed content is + already gone. + AttestationData: + description: | + The image data for the attestation manifest. + This field is only populated when Kind is "attestation". + type: "object" + x-nullable: true + x-omitempty: true + required: ["For"] + properties: + For: + description: | + The digest of the image manifest that this attestation is for. + type: "string" + example: "sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f" + paths: /containers/json: get: @@ -7585,7 +7712,7 @@ paths: * Memory usage % = `(used_memory / available_memory) * 100.0` * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` - * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` + * number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` operationId: "ContainerStats" produces: ["application/json"] @@ -8622,6 +8749,11 @@ paths: description: "Show digest information as a `RepoDigests` field on each image." type: "boolean" default: false + - name: "manifests" + in: "query" + description: "Include `Manifests` in the image summary." + type: "boolean" + default: false tags: ["Image"] /build: post: @@ -9094,12 +9226,23 @@ paths: parameters: - name: "name" in: "path" - description: "Image name or ID." + description: | + Name of the image to push. For example, `registry.example.com/myimage`. + The image must be present in the local image store with the same name. + + The name should be provided without tag; if a tag is provided, it + is ignored. For example, `registry.example.com/myimage:latest` is + considered equivalent to `registry.example.com/myimage`. + + Use the `tag` parameter to specify the tag to push. type: "string" required: true - name: "tag" in: "query" - description: "The tag to associate with the image on the registry." + description: | + Tag of the image to push. For example, `latest`. If no tag is provided, + all tags of the given image that are present in the local image store + are pushed. type: "string" - name: "X-Registry-Auth" in: "header" diff --git a/vendor/github.com/docker/docker/api/types/container/hostconfig.go b/vendor/github.com/docker/docker/api/types/container/hostconfig.go index 727da8839c..03648fb7b5 100644 --- a/vendor/github.com/docker/docker/api/types/container/hostconfig.go +++ b/vendor/github.com/docker/docker/api/types/container/hostconfig.go @@ -1,6 +1,7 @@ package container // import "github.com/docker/docker/api/types/container" import ( + "errors" "fmt" "strings" @@ -325,12 +326,12 @@ func ValidateRestartPolicy(policy RestartPolicy) error { if policy.MaximumRetryCount < 0 { msg += " and cannot be negative" } - return &errInvalidParameter{fmt.Errorf(msg)} + return &errInvalidParameter{errors.New(msg)} } return nil case RestartPolicyOnFailure: if policy.MaximumRetryCount < 0 { - return &errInvalidParameter{fmt.Errorf("invalid restart policy: maximum retry count cannot be negative")} + return &errInvalidParameter{errors.New("invalid restart policy: maximum retry count cannot be negative")} } return nil case "": diff --git a/vendor/github.com/docker/docker/api/types/filters/parse.go b/vendor/github.com/docker/docker/api/types/filters/parse.go index 0c39ab5f18..0914b2a441 100644 --- a/vendor/github.com/docker/docker/api/types/filters/parse.go +++ b/vendor/github.com/docker/docker/api/types/filters/parse.go @@ -196,7 +196,7 @@ func (args Args) Match(field, source string) bool { } // GetBoolOrDefault returns a boolean value of the key if the key is present -// and is intepretable as a boolean value. Otherwise the default value is returned. +// and is interpretable as a boolean value. Otherwise the default value is returned. // Error is not nil only if the filter values are not valid boolean or are conflicting. func (args Args) GetBoolOrDefault(key string, defaultValue bool) (bool, error) { fieldValues, ok := args.fields[key] diff --git a/vendor/github.com/docker/docker/api/types/image/manifest.go b/vendor/github.com/docker/docker/api/types/image/manifest.go new file mode 100644 index 0000000000..db8a00830e --- /dev/null +++ b/vendor/github.com/docker/docker/api/types/image/manifest.go @@ -0,0 +1,99 @@ +package image + +import ( + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +type ManifestKind string + +const ( + ManifestKindImage ManifestKind = "image" + ManifestKindAttestation ManifestKind = "attestation" + ManifestKindUnknown ManifestKind = "unknown" +) + +type ManifestSummary struct { + // ID is the content-addressable ID of an image and is the same as the + // digest of the image manifest. + // + // Required: true + ID string `json:"ID"` + + // Descriptor is the OCI descriptor of the image. + // + // Required: true + Descriptor ocispec.Descriptor `json:"Descriptor"` + + // Indicates whether all the child content (image config, layers) is + // fully available locally + // + // Required: true + Available bool `json:"Available"` + + // Size is the size information of the content related to this manifest. + // Note: These sizes only take the locally available content into account. + // + // Required: true + Size struct { + // Content is the size (in bytes) of all the locally present + // content in the content store (e.g. image config, layers) + // referenced by this manifest and its children. + // This only includes blobs in the content store. + Content int64 `json:"Content"` + + // Total is the total size (in bytes) of all the locally present + // data (both distributable and non-distributable) that's related to + // this manifest and its children. + // This equal to the sum of [Content] size AND all the sizes in the + // [Size] struct present in the Kind-specific data struct. + // For example, for an image kind (Kind == ManifestKindImage), + // this would include the size of the image content and unpacked + // image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). + Total int64 `json:"Total"` + } `json:"Size"` + + // Kind is the kind of the image manifest. + // + // Required: true + Kind ManifestKind `json:"Kind"` + + // Fields below are specific to the kind of the image manifest. + + // Present only if Kind == ManifestKindImage. + ImageData *ImageProperties `json:"ImageData,omitempty"` + + // Present only if Kind == ManifestKindAttestation. + AttestationData *AttestationProperties `json:"AttestationData,omitempty"` +} + +type ImageProperties struct { + // Platform is the OCI platform object describing the platform of the image. + // + // Required: true + Platform ocispec.Platform `json:"Platform"` + + Size struct { + // Unpacked is the size (in bytes) of the locally unpacked + // (uncompressed) image content that's directly usable by the containers + // running this image. + // It's independent of the distributable content - e.g. + // the image might still have an unpacked data that's still used by + // some container even when the distributable/compressed content is + // already gone. + // + // Required: true + Unpacked int64 `json:"Unpacked"` + } + + // Containers is an array containing the IDs of the containers that are + // using this image. + // + // Required: true + Containers []string `json:"Containers"` +} + +type AttestationProperties struct { + // For is the digest of the image manifest that this attestation is for. + For digest.Digest `json:"For"` +} diff --git a/vendor/github.com/docker/docker/api/types/image/opts.go b/vendor/github.com/docker/docker/api/types/image/opts.go index 8e32c9af86..923ebe5a06 100644 --- a/vendor/github.com/docker/docker/api/types/image/opts.go +++ b/vendor/github.com/docker/docker/api/types/image/opts.go @@ -76,6 +76,9 @@ type ListOptions struct { // ContainerCount indicates whether container count should be computed. ContainerCount bool + + // Manifests indicates whether the image manifests should be returned. + Manifests bool } // RemoveOptions holds parameters to remove images. diff --git a/vendor/github.com/docker/docker/api/types/image/summary.go b/vendor/github.com/docker/docker/api/types/image/summary.go index f1e3e2ef01..e87e216a28 100644 --- a/vendor/github.com/docker/docker/api/types/image/summary.go +++ b/vendor/github.com/docker/docker/api/types/image/summary.go @@ -1,10 +1,5 @@ package image -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// Summary summary -// swagger:model Summary type Summary struct { // Number of containers using this image. Includes both stopped and running @@ -17,7 +12,7 @@ type Summary struct { Containers int64 `json:"Containers"` // Date and time at which the image was created as a Unix timestamp - // (number of seconds sinds EPOCH). + // (number of seconds since EPOCH). // // Required: true Created int64 `json:"Created"` @@ -47,6 +42,14 @@ type Summary struct { // Required: true ParentID string `json:"ParentId"` + // Manifests is a list of image manifests available in this image. It + // provides a more detailed view of the platform-specific image manifests or + // other image-attached data like build attestations. + // + // WARNING: This is experimental and may change at any time without any backward + // compatibility. + Manifests []ManifestSummary `json:"Manifests,omitempty"` + // List of content-addressable digests of locally available image manifests // that the image is referenced from. Multiple manifests can refer to the // same image. diff --git a/vendor/github.com/docker/docker/api/types/registry/authconfig.go b/vendor/github.com/docker/docker/api/types/registry/authconfig.go index 97a924e374..8e383f6e60 100644 --- a/vendor/github.com/docker/docker/api/types/registry/authconfig.go +++ b/vendor/github.com/docker/docker/api/types/registry/authconfig.go @@ -34,10 +34,9 @@ type AuthConfig struct { } // EncodeAuthConfig serializes the auth configuration as a base64url encoded -// RFC4648, section 5) JSON string for sending through the X-Registry-Auth header. +// ([RFC4648, section 5]) JSON string for sending through the X-Registry-Auth header. // -// For details on base64url encoding, see: -// - RFC4648, section 5: https://tools.ietf.org/html/rfc4648#section-5 +// [RFC4648, section 5]: https://tools.ietf.org/html/rfc4648#section-5 func EncodeAuthConfig(authConfig AuthConfig) (string, error) { buf, err := json.Marshal(authConfig) if err != nil { @@ -46,15 +45,14 @@ func EncodeAuthConfig(authConfig AuthConfig) (string, error) { return base64.URLEncoding.EncodeToString(buf), nil } -// DecodeAuthConfig decodes base64url encoded (RFC4648, section 5) JSON +// DecodeAuthConfig decodes base64url encoded ([RFC4648, section 5]) JSON // authentication information as sent through the X-Registry-Auth header. // -// This function always returns an AuthConfig, even if an error occurs. It is up +// This function always returns an [AuthConfig], even if an error occurs. It is up // to the caller to decide if authentication is required, and if the error can // be ignored. // -// For details on base64url encoding, see: -// - RFC4648, section 5: https://tools.ietf.org/html/rfc4648#section-5 +// [RFC4648, section 5]: https://tools.ietf.org/html/rfc4648#section-5 func DecodeAuthConfig(authEncoded string) (*AuthConfig, error) { if authEncoded == "" { return &AuthConfig{}, nil @@ -69,7 +67,7 @@ func DecodeAuthConfig(authEncoded string) (*AuthConfig, error) { // clients and API versions. Current clients and API versions expect authentication // to be provided through the X-Registry-Auth header. // -// Like DecodeAuthConfig, this function always returns an AuthConfig, even if an +// Like [DecodeAuthConfig], this function always returns an [AuthConfig], even if an // error occurs. It is up to the caller to decide if authentication is required, // and if the error can be ignored. func DecodeAuthConfigBody(rdr io.ReadCloser) (*AuthConfig, error) { diff --git a/vendor/github.com/docker/docker/api/types/swarm/swarm.go b/vendor/github.com/docker/docker/api/types/swarm/swarm.go index 3eae4b9b29..1b4be6fffb 100644 --- a/vendor/github.com/docker/docker/api/types/swarm/swarm.go +++ b/vendor/github.com/docker/docker/api/types/swarm/swarm.go @@ -122,7 +122,7 @@ type CAConfig struct { SigningCAKey string `json:",omitempty"` // If this value changes, and there is no specified signing cert and key, - // then the swarm is forced to generate a new root certificate ane key. + // then the swarm is forced to generate a new root certificate and key. ForceRotate uint64 `json:",omitempty"` } diff --git a/vendor/github.com/docker/docker/api/types/volume/cluster_volume.go b/vendor/github.com/docker/docker/api/types/volume/cluster_volume.go index bbd9ff0b8f..618a481620 100644 --- a/vendor/github.com/docker/docker/api/types/volume/cluster_volume.go +++ b/vendor/github.com/docker/docker/api/types/volume/cluster_volume.go @@ -414,7 +414,7 @@ type Info struct { // the Volume has not been successfully created yet. VolumeID string `json:",omitempty"` - // AccessibleTopolgoy is the topology this volume is actually accessible + // AccessibleTopology is the topology this volume is actually accessible // from. AccessibleTopology []Topology `json:",omitempty"` } diff --git a/vendor/github.com/docker/docker/client/image_list.go b/vendor/github.com/docker/docker/client/image_list.go index a9cc1e21e5..bef679431d 100644 --- a/vendor/github.com/docker/docker/client/image_list.go +++ b/vendor/github.com/docker/docker/client/image_list.go @@ -11,6 +11,11 @@ import ( ) // ImageList returns a list of images in the docker host. +// +// Experimental: Setting the [options.Manifest] will populate +// [image.Summary.Manifests] with information about image manifests. +// This is experimental and might change in the future without any backward +// compatibility. func (cli *Client) ImageList(ctx context.Context, options image.ListOptions) ([]image.Summary, error) { var images []image.Summary @@ -47,6 +52,9 @@ func (cli *Client) ImageList(ctx context.Context, options image.ListOptions) ([] if options.SharedSize && versions.GreaterThanOrEqualTo(cli.version, "1.42") { query.Set("shared-size", "1") } + if options.Manifests && versions.GreaterThanOrEqualTo(cli.version, "1.47") { + query.Set("manifests", "1") + } serverResp, err := cli.get(ctx, "/images/json", query, nil) defer ensureReaderClosed(serverResp) diff --git a/vendor/github.com/ebitengine/purego/.gitignore b/vendor/github.com/ebitengine/purego/.gitignore new file mode 100644 index 0000000000..b25c15b81f --- /dev/null +++ b/vendor/github.com/ebitengine/purego/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/vendor/github.com/ebitengine/purego/LICENSE b/vendor/github.com/ebitengine/purego/LICENSE new file mode 100644 index 0000000000..8dada3edaf --- /dev/null +++ b/vendor/github.com/ebitengine/purego/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/ebitengine/purego/README.md b/vendor/github.com/ebitengine/purego/README.md new file mode 100644 index 0000000000..f1ff9053ac --- /dev/null +++ b/vendor/github.com/ebitengine/purego/README.md @@ -0,0 +1,97 @@ +# purego +[![Go Reference](https://pkg.go.dev/badge/github.com/ebitengine/purego?GOOS=darwin.svg)](https://pkg.go.dev/github.com/ebitengine/purego?GOOS=darwin) + +A library for calling C functions from Go without Cgo. + +> This is beta software so expect bugs and potentially API breaking changes +> but each release will be tagged to avoid breaking people's code. +> Bug reports are encouraged. + +## Motivation + +The [Ebitengine](https://github.com/hajimehoshi/ebiten) game engine was ported to use only Go on Windows. This enabled +cross-compiling to Windows from any other operating system simply by setting `GOOS=windows`. The purego project was +born to bring that same vision to the other platforms supported by Ebitengine. + +## Benefits + +- **Simple Cross-Compilation**: No C means you can build for other platforms easily without a C compiler. +- **Faster Compilation**: Efficiently cache your entirely Go builds. +- **Smaller Binaries**: Using Cgo generates a C wrapper function for each C function called. Purego doesn't! +- **Dynamic Linking**: Load symbols at runtime and use it as a plugin system. +- **Foreign Function Interface**: Call into other languages that are compiled into shared objects. +- **Cgo Fallback**: Works even with CGO_ENABLED=1 so incremental porting is possible. +This also means unsupported GOARCHs (freebsd/riscv64, linux/mips, etc.) will still work +except for float arguments and return values. + +## Supported Platforms + +- **FreeBSD**: amd64, arm64 +- **Linux**: amd64, arm64 +- **macOS / iOS**: amd64, arm64 +- **Windows**: 386*, amd64, arm*, arm64 + +`*` These architectures only support SyscallN and NewCallback + +## Example + +The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can +be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports Windows and FreeBSD. + +```go +package main + +import ( + "fmt" + "runtime" + + "github.com/ebitengine/purego" +) + +func getSystemLibrary() string { + switch runtime.GOOS { + case "darwin": + return "/usr/lib/libSystem.B.dylib" + case "linux": + return "libc.so.6" + default: + panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS)) + } +} + +func main() { + libc, err := purego.Dlopen(getSystemLibrary(), purego.RTLD_NOW|purego.RTLD_GLOBAL) + if err != nil { + panic(err) + } + var puts func(string) + purego.RegisterLibFunc(&puts, libc, "puts") + puts("Calling C from Go without Cgo!") +} +``` + +Then to run: `CGO_ENABLED=0 go run main.go` + +## Questions + +If you have questions about how to incorporate purego in your project or want to discuss +how it works join the [Discord](https://discord.gg/HzGZVD6BkY)! + +### External Code + +Purego uses code that originates from the Go runtime. These files are under the BSD-3 +License that can be found [in the Go Source](https://github.com/golang/go/blob/master/LICENSE). +This is a list of the copied files: + +* `abi_*.h` from package `runtime/cgo` +* `zcallback_darwin_*.s` from package `runtime` +* `internal/fakecgo/abi_*.h` from package `runtime/cgo` +* `internal/fakecgo/asm_GOARCH.s` from package `runtime/cgo` +* `internal/fakecgo/callbacks.go` from package `runtime/cgo` +* `internal/fakecgo/go_GOOS_GOARCH.go` from package `runtime/cgo` +* `internal/fakecgo/iscgo.go` from package `runtime/cgo` +* `internal/fakecgo/setenv.go` from package `runtime/cgo` +* `internal/fakecgo/freebsd.go` from package `runtime/cgo` + +The files `abi_*.h` and `internal/fakecgo/abi_*.h` are the same because Bazel does not support cross-package use of +`#include` so we need each one once per package. (cf. [issue](https://github.com/bazelbuild/rules_go/issues/3636)) diff --git a/vendor/github.com/ebitengine/purego/abi_amd64.h b/vendor/github.com/ebitengine/purego/abi_amd64.h new file mode 100644 index 0000000000..9949435fe9 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/abi_amd64.h @@ -0,0 +1,99 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Macros for transitioning from the host ABI to Go ABI0. +// +// These save the frame pointer, so in general, functions that use +// these should have zero frame size to suppress the automatic frame +// pointer, though it's harmless to not do this. + +#ifdef GOOS_windows + +// REGS_HOST_TO_ABI0_STACK is the stack bytes used by +// PUSH_REGS_HOST_TO_ABI0. +#define REGS_HOST_TO_ABI0_STACK (28*8 + 8) + +// PUSH_REGS_HOST_TO_ABI0 prepares for transitioning from +// the host ABI to Go ABI0 code. It saves all registers that are +// callee-save in the host ABI and caller-save in Go ABI0 and prepares +// for entry to Go. +// +// Save DI SI BP BX R12 R13 R14 R15 X6-X15 registers and the DF flag. +// Clear the DF flag for the Go ABI. +// MXCSR matches the Go ABI, so we don't have to set that, +// and Go doesn't modify it, so we don't have to save it. +#define PUSH_REGS_HOST_TO_ABI0() \ + PUSHFQ \ + CLD \ + ADJSP $(REGS_HOST_TO_ABI0_STACK - 8) \ + MOVQ DI, (0*0)(SP) \ + MOVQ SI, (1*8)(SP) \ + MOVQ BP, (2*8)(SP) \ + MOVQ BX, (3*8)(SP) \ + MOVQ R12, (4*8)(SP) \ + MOVQ R13, (5*8)(SP) \ + MOVQ R14, (6*8)(SP) \ + MOVQ R15, (7*8)(SP) \ + MOVUPS X6, (8*8)(SP) \ + MOVUPS X7, (10*8)(SP) \ + MOVUPS X8, (12*8)(SP) \ + MOVUPS X9, (14*8)(SP) \ + MOVUPS X10, (16*8)(SP) \ + MOVUPS X11, (18*8)(SP) \ + MOVUPS X12, (20*8)(SP) \ + MOVUPS X13, (22*8)(SP) \ + MOVUPS X14, (24*8)(SP) \ + MOVUPS X15, (26*8)(SP) + +#define POP_REGS_HOST_TO_ABI0() \ + MOVQ (0*0)(SP), DI \ + MOVQ (1*8)(SP), SI \ + MOVQ (2*8)(SP), BP \ + MOVQ (3*8)(SP), BX \ + MOVQ (4*8)(SP), R12 \ + MOVQ (5*8)(SP), R13 \ + MOVQ (6*8)(SP), R14 \ + MOVQ (7*8)(SP), R15 \ + MOVUPS (8*8)(SP), X6 \ + MOVUPS (10*8)(SP), X7 \ + MOVUPS (12*8)(SP), X8 \ + MOVUPS (14*8)(SP), X9 \ + MOVUPS (16*8)(SP), X10 \ + MOVUPS (18*8)(SP), X11 \ + MOVUPS (20*8)(SP), X12 \ + MOVUPS (22*8)(SP), X13 \ + MOVUPS (24*8)(SP), X14 \ + MOVUPS (26*8)(SP), X15 \ + ADJSP $-(REGS_HOST_TO_ABI0_STACK - 8) \ + POPFQ + +#else +// SysV ABI + +#define REGS_HOST_TO_ABI0_STACK (6*8) + +// SysV MXCSR matches the Go ABI, so we don't have to set that, +// and Go doesn't modify it, so we don't have to save it. +// Both SysV and Go require DF to be cleared, so that's already clear. +// The SysV and Go frame pointer conventions are compatible. +#define PUSH_REGS_HOST_TO_ABI0() \ + ADJSP $(REGS_HOST_TO_ABI0_STACK) \ + MOVQ BP, (5*8)(SP) \ + LEAQ (5*8)(SP), BP \ + MOVQ BX, (0*8)(SP) \ + MOVQ R12, (1*8)(SP) \ + MOVQ R13, (2*8)(SP) \ + MOVQ R14, (3*8)(SP) \ + MOVQ R15, (4*8)(SP) + +#define POP_REGS_HOST_TO_ABI0() \ + MOVQ (0*8)(SP), BX \ + MOVQ (1*8)(SP), R12 \ + MOVQ (2*8)(SP), R13 \ + MOVQ (3*8)(SP), R14 \ + MOVQ (4*8)(SP), R15 \ + MOVQ (5*8)(SP), BP \ + ADJSP $-(REGS_HOST_TO_ABI0_STACK) + +#endif diff --git a/vendor/github.com/ebitengine/purego/abi_arm64.h b/vendor/github.com/ebitengine/purego/abi_arm64.h new file mode 100644 index 0000000000..5d5061ec1d --- /dev/null +++ b/vendor/github.com/ebitengine/purego/abi_arm64.h @@ -0,0 +1,39 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Macros for transitioning from the host ABI to Go ABI0. +// +// These macros save and restore the callee-saved registers +// from the stack, but they don't adjust stack pointer, so +// the user should prepare stack space in advance. +// SAVE_R19_TO_R28(offset) saves R19 ~ R28 to the stack space +// of ((offset)+0*8)(RSP) ~ ((offset)+9*8)(RSP). +// +// SAVE_F8_TO_F15(offset) saves F8 ~ F15 to the stack space +// of ((offset)+0*8)(RSP) ~ ((offset)+7*8)(RSP). +// +// R29 is not saved because Go will save and restore it. + +#define SAVE_R19_TO_R28(offset) \ + STP (R19, R20), ((offset)+0*8)(RSP) \ + STP (R21, R22), ((offset)+2*8)(RSP) \ + STP (R23, R24), ((offset)+4*8)(RSP) \ + STP (R25, R26), ((offset)+6*8)(RSP) \ + STP (R27, g), ((offset)+8*8)(RSP) +#define RESTORE_R19_TO_R28(offset) \ + LDP ((offset)+0*8)(RSP), (R19, R20) \ + LDP ((offset)+2*8)(RSP), (R21, R22) \ + LDP ((offset)+4*8)(RSP), (R23, R24) \ + LDP ((offset)+6*8)(RSP), (R25, R26) \ + LDP ((offset)+8*8)(RSP), (R27, g) /* R28 */ +#define SAVE_F8_TO_F15(offset) \ + FSTPD (F8, F9), ((offset)+0*8)(RSP) \ + FSTPD (F10, F11), ((offset)+2*8)(RSP) \ + FSTPD (F12, F13), ((offset)+4*8)(RSP) \ + FSTPD (F14, F15), ((offset)+6*8)(RSP) +#define RESTORE_F8_TO_F15(offset) \ + FLDPD ((offset)+0*8)(RSP), (F8, F9) \ + FLDPD ((offset)+2*8)(RSP), (F10, F11) \ + FLDPD ((offset)+4*8)(RSP), (F12, F13) \ + FLDPD ((offset)+6*8)(RSP), (F14, F15) diff --git a/vendor/github.com/ebitengine/purego/cgo.go b/vendor/github.com/ebitengine/purego/cgo.go new file mode 100644 index 0000000000..7d5abef349 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/cgo.go @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build cgo && (darwin || freebsd || linux) + +package purego + +// if CGO_ENABLED=1 import the Cgo runtime to ensure that it is set up properly. +// This is required since some frameworks need TLS setup the C way which Go doesn't do. +// We currently don't support ios in fakecgo mode so force Cgo or fail +// Even if CGO_ENABLED=1 the Cgo runtime is not imported unless `import "C"` is used. +// which will import this package automatically. Normally this isn't an issue since it +// usually isn't possible to call into C without using that import. However, with purego +// it is since we don't use `import "C"`! +import ( + _ "runtime/cgo" + + _ "github.com/ebitengine/purego/internal/cgo" +) diff --git a/vendor/github.com/ebitengine/purego/dlerror.go b/vendor/github.com/ebitengine/purego/dlerror.go new file mode 100644 index 0000000000..95cdfe16f2 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/dlerror.go @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Ebitengine Authors + +//go:build darwin || freebsd || linux + +package purego + +// Dlerror represents an error value returned from Dlopen, Dlsym, or Dlclose. +// +// This type is not available on Windows as there is no counterpart to it on Windows. +type Dlerror struct { + s string +} + +func (e Dlerror) Error() string { + return e.s +} diff --git a/vendor/github.com/ebitengine/purego/dlfcn.go b/vendor/github.com/ebitengine/purego/dlfcn.go new file mode 100644 index 0000000000..f70a24584d --- /dev/null +++ b/vendor/github.com/ebitengine/purego/dlfcn.go @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build (darwin || freebsd || linux) && !android && !faketime + +package purego + +import ( + "unsafe" +) + +// Unix Specification for dlfcn.h: https://pubs.opengroup.org/onlinepubs/7908799/xsh/dlfcn.h.html + +var ( + fnDlopen func(path string, mode int) uintptr + fnDlsym func(handle uintptr, name string) uintptr + fnDlerror func() string + fnDlclose func(handle uintptr) bool +) + +func init() { + RegisterFunc(&fnDlopen, dlopenABI0) + RegisterFunc(&fnDlsym, dlsymABI0) + RegisterFunc(&fnDlerror, dlerrorABI0) + RegisterFunc(&fnDlclose, dlcloseABI0) +} + +// Dlopen examines the dynamic library or bundle file specified by path. If the file is compatible +// with the current process and has not already been loaded into the +// current process, it is loaded and linked. After being linked, if it contains +// any initializer functions, they are called, before Dlopen +// returns. It returns a handle that can be used with Dlsym and Dlclose. +// A second call to Dlopen with the same path will return the same handle, but the internal +// reference count for the handle will be incremented. Therefore, all +// Dlopen calls should be balanced with a Dlclose call. +// +// This function is not available on Windows. +// Use [golang.org/x/sys/windows.LoadLibrary], [golang.org/x/sys/windows.LoadLibraryEx], +// [golang.org/x/sys/windows.NewLazyDLL], or [golang.org/x/sys/windows.NewLazySystemDLL] for Windows instead. +func Dlopen(path string, mode int) (uintptr, error) { + u := fnDlopen(path, mode) + if u == 0 { + return 0, Dlerror{fnDlerror()} + } + return u, nil +} + +// Dlsym takes a "handle" of a dynamic library returned by Dlopen and the symbol name. +// It returns the address where that symbol is loaded into memory. If the symbol is not found, +// in the specified library or any of the libraries that were automatically loaded by Dlopen +// when that library was loaded, Dlsym returns zero. +// +// This function is not available on Windows. +// Use [golang.org/x/sys/windows.GetProcAddress] for Windows instead. +func Dlsym(handle uintptr, name string) (uintptr, error) { + u := fnDlsym(handle, name) + if u == 0 { + return 0, Dlerror{fnDlerror()} + } + return u, nil +} + +// Dlclose decrements the reference count on the dynamic library handle. +// If the reference count drops to zero and no other loaded libraries +// use symbols in it, then the dynamic library is unloaded. +// +// This function is not available on Windows. +// Use [golang.org/x/sys/windows.FreeLibrary] for Windows instead. +func Dlclose(handle uintptr) error { + if fnDlclose(handle) { + return Dlerror{fnDlerror()} + } + return nil +} + +func loadSymbol(handle uintptr, name string) (uintptr, error) { + return Dlsym(handle, name) +} + +// these functions exist in dlfcn_stubs.s and are calling C functions linked to in dlfcn_GOOS.go +// the indirection is necessary because a function is actually a pointer to the pointer to the code. +// sadly, I do not know of anyway to remove the assembly stubs entirely because //go:linkname doesn't +// appear to work if you link directly to the C function on darwin arm64. + +//go:linkname dlopen dlopen +var dlopen uintptr +var dlopenABI0 = uintptr(unsafe.Pointer(&dlopen)) + +//go:linkname dlsym dlsym +var dlsym uintptr +var dlsymABI0 = uintptr(unsafe.Pointer(&dlsym)) + +//go:linkname dlclose dlclose +var dlclose uintptr +var dlcloseABI0 = uintptr(unsafe.Pointer(&dlclose)) + +//go:linkname dlerror dlerror +var dlerror uintptr +var dlerrorABI0 = uintptr(unsafe.Pointer(&dlerror)) diff --git a/vendor/github.com/ebitengine/purego/dlfcn_android.go b/vendor/github.com/ebitengine/purego/dlfcn_android.go new file mode 100644 index 0000000000..0d5341764e --- /dev/null +++ b/vendor/github.com/ebitengine/purego/dlfcn_android.go @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Ebitengine Authors + +package purego + +import "github.com/ebitengine/purego/internal/cgo" + +// Source for constants: https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/dlfcn.h + +const ( + is64bit = 1 << (^uintptr(0) >> 63) / 2 + is32bit = 1 - is64bit + RTLD_DEFAULT = is32bit * 0xffffffff + RTLD_LAZY = 0x00000001 + RTLD_NOW = is64bit * 0x00000002 + RTLD_LOCAL = 0x00000000 + RTLD_GLOBAL = is64bit*0x00100 | is32bit*0x00000002 +) + +func Dlopen(path string, mode int) (uintptr, error) { + return cgo.Dlopen(path, mode) +} + +func Dlsym(handle uintptr, name string) (uintptr, error) { + return cgo.Dlsym(handle, name) +} + +func Dlclose(handle uintptr) error { + return cgo.Dlclose(handle) +} + +func loadSymbol(handle uintptr, name string) (uintptr, error) { + return Dlsym(handle, name) +} diff --git a/vendor/github.com/ebitengine/purego/dlfcn_darwin.go b/vendor/github.com/ebitengine/purego/dlfcn_darwin.go new file mode 100644 index 0000000000..5f876278a3 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/dlfcn_darwin.go @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +package purego + +// Source for constants: https://opensource.apple.com/source/dyld/dyld-360.14/include/dlfcn.h.auto.html + +const ( + RTLD_DEFAULT = 1<<64 - 2 // Pseudo-handle for dlsym so search for any loaded symbol + RTLD_LAZY = 0x1 // Relocations are performed at an implementation-dependent time. + RTLD_NOW = 0x2 // Relocations are performed when the object is loaded. + RTLD_LOCAL = 0x4 // All symbols are not made available for relocation processing by other modules. + RTLD_GLOBAL = 0x8 // All symbols are available for relocation processing of other modules. +) + +//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib" + +//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib" diff --git a/vendor/github.com/ebitengine/purego/dlfcn_freebsd.go b/vendor/github.com/ebitengine/purego/dlfcn_freebsd.go new file mode 100644 index 0000000000..6b371620d9 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/dlfcn_freebsd.go @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +package purego + +// Constants as defined in https://github.com/freebsd/freebsd-src/blob/main/include/dlfcn.h +const ( + intSize = 32 << (^uint(0) >> 63) // 32 or 64 + RTLD_DEFAULT = 1< C) +// +// string <=> char* +// bool <=> _Bool +// uintptr <=> uintptr_t +// uint <=> uint32_t or uint64_t +// uint8 <=> uint8_t +// uint16 <=> uint16_t +// uint32 <=> uint32_t +// uint64 <=> uint64_t +// int <=> int32_t or int64_t +// int8 <=> int8_t +// int16 <=> int16_t +// int32 <=> int32_t +// int64 <=> int64_t +// float32 <=> float +// float64 <=> double +// struct <=> struct (WIP - darwin only) +// func <=> C function +// unsafe.Pointer, *T <=> void* +// []T => void* +// +// There is a special case when the last argument of fptr is a variadic interface (or []interface} +// it will be expanded into a call to the C function as if it had the arguments in that slice. +// This means that using arg ...interface{} is like a cast to the function with the arguments inside arg. +// This is not the same as C variadic. +// +// # Memory +// +// In general it is not possible for purego to guarantee the lifetimes of objects returned or received from +// calling functions using RegisterFunc. For arguments to a C function it is important that the C function doesn't +// hold onto a reference to Go memory. This is the same as the [Cgo rules]. +// +// However, there are some special cases. When passing a string as an argument if the string does not end in a null +// terminated byte (\x00) then the string will be copied into memory maintained by purego. The memory is only valid for +// that specific call. Therefore, if the C code keeps a reference to that string it may become invalid at some +// undefined time. However, if the string does already contain a null-terminated byte then no copy is done. +// It is then the responsibility of the caller to ensure the string stays alive as long as it's needed in C memory. +// This can be done using runtime.KeepAlive or allocating the string in C memory using malloc. When a C function +// returns a null-terminated pointer to char a Go string can be used. Purego will allocate a new string in Go memory +// and copy the data over. This string will be garbage collected whenever Go decides it's no longer referenced. +// This C created string will not be freed by purego. If the pointer to char is not null-terminated or must continue +// to point to C memory (because it's a buffer for example) then use a pointer to byte and then convert that to a slice +// using unsafe.Slice. Doing this means that it becomes the responsibility of the caller to care about the lifetime +// of the pointer +// +// # Structs +// +// Purego can handle the most common structs that have fields of builtin types like int8, uint16, float32, etc. However, +// it does not support aligning fields properly. It is therefore the responsibility of the caller to ensure +// that all padding is added to the Go struct to match the C one. See `BoolStructFn` in struct_test.go for an example. +// +// # Example +// +// All functions below call this C function: +// +// char *foo(char *str); +// +// // Let purego convert types +// var foo func(s string) string +// goString := foo("copied") +// // Go will garbage collect this string +// +// // Manually, handle allocations +// var foo2 func(b string) *byte +// mustFree := foo2("not copied\x00") +// defer free(mustFree) +// +// [Cgo rules]: https://pkg.go.dev/cmd/cgo#hdr-Go_references_to_C +func RegisterFunc(fptr interface{}, cfn uintptr) { + fn := reflect.ValueOf(fptr).Elem() + ty := fn.Type() + if ty.Kind() != reflect.Func { + panic("purego: fptr must be a function pointer") + } + if ty.NumOut() > 1 { + panic("purego: function can only return zero or one values") + } + if cfn == 0 { + panic("purego: cfn is nil") + } + if ty.NumOut() == 1 && (ty.Out(0).Kind() == reflect.Float32 || ty.Out(0).Kind() == reflect.Float64) && + runtime.GOARCH != "arm64" && runtime.GOARCH != "amd64" { + panic("purego: float returns are not supported") + } + { + // this code checks how many registers and stack this function will use + // to avoid crashing with too many arguments + var ints int + var floats int + var stack int + for i := 0; i < ty.NumIn(); i++ { + arg := ty.In(i) + switch arg.Kind() { + case reflect.Func: + // This only does preliminary testing to ensure the CDecl argument + // is the first argument. Full testing is done when the callback is actually + // created in NewCallback. + for j := 0; j < arg.NumIn(); j++ { + in := arg.In(j) + if !in.AssignableTo(reflect.TypeOf(CDecl{})) { + continue + } + if j != 0 { + panic("purego: CDecl must be the first argument") + } + } + case reflect.String, reflect.Uintptr, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Ptr, reflect.UnsafePointer, + reflect.Slice, reflect.Bool: + if ints < numOfIntegerRegisters() { + ints++ + } else { + stack++ + } + case reflect.Float32, reflect.Float64: + const is32bit = unsafe.Sizeof(uintptr(0)) == 4 + if is32bit { + panic("purego: floats only supported on 64bit platforms") + } + if floats < numOfFloats { + floats++ + } else { + stack++ + } + case reflect.Struct: + if runtime.GOOS != "darwin" || (runtime.GOARCH != "amd64" && runtime.GOARCH != "arm64") { + panic("purego: struct arguments are only supported on darwin amd64 & arm64") + } + if arg.Size() == 0 { + continue + } + addInt := func(u uintptr) { + ints++ + } + addFloat := func(u uintptr) { + floats++ + } + addStack := func(u uintptr) { + stack++ + } + _ = addStruct(reflect.New(arg).Elem(), &ints, &floats, &stack, addInt, addFloat, addStack, nil) + default: + panic("purego: unsupported kind " + arg.Kind().String()) + } + } + if ty.NumOut() == 1 && ty.Out(0).Kind() == reflect.Struct { + if runtime.GOOS != "darwin" { + panic("purego: struct return values only supported on darwin arm64 & amd64") + } + outType := ty.Out(0) + checkStructFieldsSupported(outType) + if runtime.GOARCH == "amd64" && outType.Size() > maxRegAllocStructSize { + // on amd64 if struct is bigger than 16 bytes allocate the return struct + // and pass it in as a hidden first argument. + ints++ + } + } + sizeOfStack := maxArgs - numOfIntegerRegisters() + if stack > sizeOfStack { + panic("purego: too many arguments") + } + } + v := reflect.MakeFunc(ty, func(args []reflect.Value) (results []reflect.Value) { + if len(args) > 0 { + if variadic, ok := args[len(args)-1].Interface().([]interface{}); ok { + // subtract one from args bc the last argument in args is []interface{} + // which we are currently expanding + tmp := make([]reflect.Value, len(args)-1+len(variadic)) + n := copy(tmp, args[:len(args)-1]) + for i, v := range variadic { + tmp[n+i] = reflect.ValueOf(v) + } + args = tmp + } + } + var sysargs [maxArgs]uintptr + stack := sysargs[numOfIntegerRegisters():] + var floats [numOfFloats]uintptr + var numInts int + var numFloats int + var numStack int + var addStack, addInt, addFloat func(x uintptr) + if runtime.GOARCH == "arm64" || runtime.GOOS != "windows" { + // Windows arm64 uses the same calling convention as macOS and Linux + addStack = func(x uintptr) { + stack[numStack] = x + numStack++ + } + addInt = func(x uintptr) { + if numInts >= numOfIntegerRegisters() { + addStack(x) + } else { + sysargs[numInts] = x + numInts++ + } + } + addFloat = func(x uintptr) { + if numFloats < len(floats) { + floats[numFloats] = x + numFloats++ + } else { + addStack(x) + } + } + } else { + // On Windows amd64 the arguments are passed in the numbered registered. + // So the first int is in the first integer register and the first float + // is in the second floating register if there is already a first int. + // This is in contrast to how macOS and Linux pass arguments which + // tries to use as many registers as possible in the calling convention. + addStack = func(x uintptr) { + sysargs[numStack] = x + numStack++ + } + addInt = addStack + addFloat = addStack + } + + var keepAlive []interface{} + defer func() { + runtime.KeepAlive(keepAlive) + runtime.KeepAlive(args) + }() + var syscall syscall15Args + if ty.NumOut() == 1 && ty.Out(0).Kind() == reflect.Struct { + outType := ty.Out(0) + if runtime.GOARCH == "amd64" && outType.Size() > maxRegAllocStructSize { + val := reflect.New(outType) + keepAlive = append(keepAlive, val) + addInt(val.Pointer()) + } else if runtime.GOARCH == "arm64" && outType.Size() > maxRegAllocStructSize { + isAllFloats, numFields := isAllSameFloat(outType) + if !isAllFloats || numFields > 4 { + val := reflect.New(outType) + keepAlive = append(keepAlive, val) + syscall.arm64_r8 = val.Pointer() + } + } + } + for _, v := range args { + switch v.Kind() { + case reflect.String: + ptr := strings.CString(v.String()) + keepAlive = append(keepAlive, ptr) + addInt(uintptr(unsafe.Pointer(ptr))) + case reflect.Uintptr, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + addInt(uintptr(v.Uint())) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + addInt(uintptr(v.Int())) + case reflect.Ptr, reflect.UnsafePointer, reflect.Slice: + // There is no need to keepAlive this pointer separately because it is kept alive in the args variable + addInt(v.Pointer()) + case reflect.Func: + addInt(NewCallback(v.Interface())) + case reflect.Bool: + if v.Bool() { + addInt(1) + } else { + addInt(0) + } + case reflect.Float32: + addFloat(uintptr(math.Float32bits(float32(v.Float())))) + case reflect.Float64: + addFloat(uintptr(math.Float64bits(v.Float()))) + case reflect.Struct: + keepAlive = addStruct(v, &numInts, &numFloats, &numStack, addInt, addFloat, addStack, keepAlive) + default: + panic("purego: unsupported kind: " + v.Kind().String()) + } + } + if runtime.GOARCH == "arm64" || runtime.GOOS != "windows" { + // Use the normal arm64 calling convention even on Windows + syscall = syscall15Args{ + cfn, + sysargs[0], sysargs[1], sysargs[2], sysargs[3], sysargs[4], sysargs[5], + sysargs[6], sysargs[7], sysargs[8], sysargs[9], sysargs[10], sysargs[11], + sysargs[12], sysargs[13], sysargs[14], + floats[0], floats[1], floats[2], floats[3], floats[4], floats[5], floats[6], floats[7], + syscall.arm64_r8, + } + runtime_cgocall(syscall15XABI0, unsafe.Pointer(&syscall)) + } else { + // This is a fallback for Windows amd64, 386, and arm. Note this may not support floats + syscall.a1, syscall.a2, _ = syscall_syscall15X(cfn, sysargs[0], sysargs[1], sysargs[2], sysargs[3], sysargs[4], + sysargs[5], sysargs[6], sysargs[7], sysargs[8], sysargs[9], sysargs[10], sysargs[11], + sysargs[12], sysargs[13], sysargs[14]) + syscall.f1 = syscall.a2 // on amd64 a2 stores the float return. On 32bit platforms floats aren't support + } + if ty.NumOut() == 0 { + return nil + } + outType := ty.Out(0) + v := reflect.New(outType).Elem() + switch outType.Kind() { + case reflect.Uintptr, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + v.SetUint(uint64(syscall.a1)) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + v.SetInt(int64(syscall.a1)) + case reflect.Bool: + v.SetBool(byte(syscall.a1) != 0) + case reflect.UnsafePointer: + // We take the address and then dereference it to trick go vet from creating a possible miss-use of unsafe.Pointer + v.SetPointer(*(*unsafe.Pointer)(unsafe.Pointer(&syscall.a1))) + case reflect.Ptr: + v = reflect.NewAt(outType, unsafe.Pointer(&syscall.a1)).Elem() + case reflect.Func: + // wrap this C function in a nicely typed Go function + v = reflect.New(outType) + RegisterFunc(v.Interface(), syscall.a1) + case reflect.String: + v.SetString(strings.GoString(syscall.a1)) + case reflect.Float32: + // NOTE: syscall.r2 is only the floating return value on 64bit platforms. + // On 32bit platforms syscall.r2 is the upper part of a 64bit return. + v.SetFloat(float64(math.Float32frombits(uint32(syscall.f1)))) + case reflect.Float64: + // NOTE: syscall.r2 is only the floating return value on 64bit platforms. + // On 32bit platforms syscall.r2 is the upper part of a 64bit return. + v.SetFloat(math.Float64frombits(uint64(syscall.f1))) + case reflect.Struct: + v = getStruct(outType, syscall) + default: + panic("purego: unsupported return kind: " + outType.Kind().String()) + } + return []reflect.Value{v} + }) + fn.Set(v) +} + +// maxRegAllocStructSize is the biggest a struct can be while still fitting in registers. +// if it is bigger than this than enough space must be allocated on the heap and then passed into +// the function as the first parameter on amd64 or in R8 on arm64. +// +// If you change this make sure to update it in objc_runtime_darwin.go +const maxRegAllocStructSize = 16 + +func isAllSameFloat(ty reflect.Type) (allFloats bool, numFields int) { + allFloats = true + root := ty.Field(0).Type + for root.Kind() == reflect.Struct { + root = root.Field(0).Type + } + first := root.Kind() + if first != reflect.Float32 && first != reflect.Float64 { + allFloats = false + } + for i := 0; i < ty.NumField(); i++ { + f := ty.Field(i).Type + if f.Kind() == reflect.Struct { + var structNumFields int + allFloats, structNumFields = isAllSameFloat(f) + numFields += structNumFields + continue + } + numFields++ + if f.Kind() != first { + allFloats = false + } + } + return allFloats, numFields +} + +func checkStructFieldsSupported(ty reflect.Type) { + for i := 0; i < ty.NumField(); i++ { + f := ty.Field(i).Type + if f.Kind() == reflect.Array { + f = f.Elem() + } else if f.Kind() == reflect.Struct { + checkStructFieldsSupported(f) + continue + } + switch f.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Uintptr, reflect.Ptr, reflect.UnsafePointer, reflect.Float64, reflect.Float32: + default: + panic(fmt.Sprintf("purego: struct field type %s is not supported", f)) + } + } +} + +func roundUpTo8(val uintptr) uintptr { + return (val + 7) &^ 7 +} + +func numOfIntegerRegisters() int { + switch runtime.GOARCH { + case "arm64": + return 8 + case "amd64": + return 6 + default: + // since this platform isn't supported and can therefore only access + // integer registers it is fine to return the maxArgs + return maxArgs + } +} diff --git a/vendor/github.com/ebitengine/purego/go_runtime.go b/vendor/github.com/ebitengine/purego/go_runtime.go new file mode 100644 index 0000000000..13671ff23f --- /dev/null +++ b/vendor/github.com/ebitengine/purego/go_runtime.go @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build darwin || freebsd || linux || windows + +package purego + +import ( + "unsafe" +) + +//go:linkname runtime_cgocall runtime.cgocall +func runtime_cgocall(fn uintptr, arg unsafe.Pointer) int32 // from runtime/sys_libc.go diff --git a/vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go b/vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go new file mode 100644 index 0000000000..b09ecac1cf --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Ebitengine Authors + +//go:build freebsd || linux + +package cgo + +/* + #cgo LDFLAGS: -ldl + +#include +#include +*/ +import "C" + +import ( + "errors" + "unsafe" +) + +func Dlopen(filename string, flag int) (uintptr, error) { + cfilename := C.CString(filename) + defer C.free(unsafe.Pointer(cfilename)) + handle := C.dlopen(cfilename, C.int(flag)) + if handle == nil { + return 0, errors.New(C.GoString(C.dlerror())) + } + return uintptr(handle), nil +} + +func Dlsym(handle uintptr, symbol string) (uintptr, error) { + csymbol := C.CString(symbol) + defer C.free(unsafe.Pointer(csymbol)) + symbolAddr := C.dlsym(*(*unsafe.Pointer)(unsafe.Pointer(&handle)), csymbol) + if symbolAddr == nil { + return 0, errors.New(C.GoString(C.dlerror())) + } + return uintptr(symbolAddr), nil +} + +func Dlclose(handle uintptr) error { + result := C.dlclose(*(*unsafe.Pointer)(unsafe.Pointer(&handle))) + if result != 0 { + return errors.New(C.GoString(C.dlerror())) + } + return nil +} + +// all that is needed is to assign each dl function because then its +// symbol will then be made available to the linker and linked to inside dlfcn.go +var ( + _ = C.dlopen + _ = C.dlsym + _ = C.dlerror + _ = C.dlclose +) diff --git a/vendor/github.com/ebitengine/purego/internal/cgo/empty.go b/vendor/github.com/ebitengine/purego/internal/cgo/empty.go new file mode 100644 index 0000000000..1d7cffe2a7 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/cgo/empty.go @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Ebitengine Authors + +package cgo + +// Empty so that importing this package doesn't cause issue for certain platforms. diff --git a/vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go b/vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go new file mode 100644 index 0000000000..37ff24d5c1 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build freebsd || (linux && !(arm64 || amd64)) + +package cgo + +// this file is placed inside internal/cgo and not package purego +// because Cgo and assembly files can't be in the same package. + +/* + #cgo LDFLAGS: -ldl + +#include +#include +#include +#include + +typedef struct syscall15Args { + uintptr_t fn; + uintptr_t a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15; + uintptr_t f1, f2, f3, f4, f5, f6, f7, f8; + uintptr_t err; +} syscall15Args; + +void syscall15(struct syscall15Args *args) { + assert((args->f1|args->f2|args->f3|args->f4|args->f5|args->f6|args->f7|args->f8) == 0); + uintptr_t (*func_name)(uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, + uintptr_t a7, uintptr_t a8, uintptr_t a9, uintptr_t a10, uintptr_t a11, uintptr_t a12, + uintptr_t a13, uintptr_t a14, uintptr_t a15); + *(void**)(&func_name) = (void*)(args->fn); + uintptr_t r1 = func_name(args->a1,args->a2,args->a3,args->a4,args->a5,args->a6,args->a7,args->a8,args->a9, + args->a10,args->a11,args->a12,args->a13,args->a14,args->a15); + args->a1 = r1; + args->err = errno; +} + +*/ +import "C" +import "unsafe" + +// assign purego.syscall15XABI0 to the C version of this function. +var Syscall15XABI0 = unsafe.Pointer(C.syscall15) + +//go:nosplit +func Syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) { + args := C.syscall15Args{ + C.uintptr_t(fn), C.uintptr_t(a1), C.uintptr_t(a2), C.uintptr_t(a3), + C.uintptr_t(a4), C.uintptr_t(a5), C.uintptr_t(a6), + C.uintptr_t(a7), C.uintptr_t(a8), C.uintptr_t(a9), C.uintptr_t(a10), C.uintptr_t(a11), C.uintptr_t(a12), + C.uintptr_t(a13), C.uintptr_t(a14), C.uintptr_t(a15), 0, 0, 0, 0, 0, 0, 0, 0, 0, + } + C.syscall15(&args) + return uintptr(args.a1), 0, uintptr(args.err) +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h b/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h new file mode 100644 index 0000000000..9949435fe9 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h @@ -0,0 +1,99 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Macros for transitioning from the host ABI to Go ABI0. +// +// These save the frame pointer, so in general, functions that use +// these should have zero frame size to suppress the automatic frame +// pointer, though it's harmless to not do this. + +#ifdef GOOS_windows + +// REGS_HOST_TO_ABI0_STACK is the stack bytes used by +// PUSH_REGS_HOST_TO_ABI0. +#define REGS_HOST_TO_ABI0_STACK (28*8 + 8) + +// PUSH_REGS_HOST_TO_ABI0 prepares for transitioning from +// the host ABI to Go ABI0 code. It saves all registers that are +// callee-save in the host ABI and caller-save in Go ABI0 and prepares +// for entry to Go. +// +// Save DI SI BP BX R12 R13 R14 R15 X6-X15 registers and the DF flag. +// Clear the DF flag for the Go ABI. +// MXCSR matches the Go ABI, so we don't have to set that, +// and Go doesn't modify it, so we don't have to save it. +#define PUSH_REGS_HOST_TO_ABI0() \ + PUSHFQ \ + CLD \ + ADJSP $(REGS_HOST_TO_ABI0_STACK - 8) \ + MOVQ DI, (0*0)(SP) \ + MOVQ SI, (1*8)(SP) \ + MOVQ BP, (2*8)(SP) \ + MOVQ BX, (3*8)(SP) \ + MOVQ R12, (4*8)(SP) \ + MOVQ R13, (5*8)(SP) \ + MOVQ R14, (6*8)(SP) \ + MOVQ R15, (7*8)(SP) \ + MOVUPS X6, (8*8)(SP) \ + MOVUPS X7, (10*8)(SP) \ + MOVUPS X8, (12*8)(SP) \ + MOVUPS X9, (14*8)(SP) \ + MOVUPS X10, (16*8)(SP) \ + MOVUPS X11, (18*8)(SP) \ + MOVUPS X12, (20*8)(SP) \ + MOVUPS X13, (22*8)(SP) \ + MOVUPS X14, (24*8)(SP) \ + MOVUPS X15, (26*8)(SP) + +#define POP_REGS_HOST_TO_ABI0() \ + MOVQ (0*0)(SP), DI \ + MOVQ (1*8)(SP), SI \ + MOVQ (2*8)(SP), BP \ + MOVQ (3*8)(SP), BX \ + MOVQ (4*8)(SP), R12 \ + MOVQ (5*8)(SP), R13 \ + MOVQ (6*8)(SP), R14 \ + MOVQ (7*8)(SP), R15 \ + MOVUPS (8*8)(SP), X6 \ + MOVUPS (10*8)(SP), X7 \ + MOVUPS (12*8)(SP), X8 \ + MOVUPS (14*8)(SP), X9 \ + MOVUPS (16*8)(SP), X10 \ + MOVUPS (18*8)(SP), X11 \ + MOVUPS (20*8)(SP), X12 \ + MOVUPS (22*8)(SP), X13 \ + MOVUPS (24*8)(SP), X14 \ + MOVUPS (26*8)(SP), X15 \ + ADJSP $-(REGS_HOST_TO_ABI0_STACK - 8) \ + POPFQ + +#else +// SysV ABI + +#define REGS_HOST_TO_ABI0_STACK (6*8) + +// SysV MXCSR matches the Go ABI, so we don't have to set that, +// and Go doesn't modify it, so we don't have to save it. +// Both SysV and Go require DF to be cleared, so that's already clear. +// The SysV and Go frame pointer conventions are compatible. +#define PUSH_REGS_HOST_TO_ABI0() \ + ADJSP $(REGS_HOST_TO_ABI0_STACK) \ + MOVQ BP, (5*8)(SP) \ + LEAQ (5*8)(SP), BP \ + MOVQ BX, (0*8)(SP) \ + MOVQ R12, (1*8)(SP) \ + MOVQ R13, (2*8)(SP) \ + MOVQ R14, (3*8)(SP) \ + MOVQ R15, (4*8)(SP) + +#define POP_REGS_HOST_TO_ABI0() \ + MOVQ (0*8)(SP), BX \ + MOVQ (1*8)(SP), R12 \ + MOVQ (2*8)(SP), R13 \ + MOVQ (3*8)(SP), R14 \ + MOVQ (4*8)(SP), R15 \ + MOVQ (5*8)(SP), BP \ + ADJSP $-(REGS_HOST_TO_ABI0_STACK) + +#endif diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h b/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h new file mode 100644 index 0000000000..5d5061ec1d --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h @@ -0,0 +1,39 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Macros for transitioning from the host ABI to Go ABI0. +// +// These macros save and restore the callee-saved registers +// from the stack, but they don't adjust stack pointer, so +// the user should prepare stack space in advance. +// SAVE_R19_TO_R28(offset) saves R19 ~ R28 to the stack space +// of ((offset)+0*8)(RSP) ~ ((offset)+9*8)(RSP). +// +// SAVE_F8_TO_F15(offset) saves F8 ~ F15 to the stack space +// of ((offset)+0*8)(RSP) ~ ((offset)+7*8)(RSP). +// +// R29 is not saved because Go will save and restore it. + +#define SAVE_R19_TO_R28(offset) \ + STP (R19, R20), ((offset)+0*8)(RSP) \ + STP (R21, R22), ((offset)+2*8)(RSP) \ + STP (R23, R24), ((offset)+4*8)(RSP) \ + STP (R25, R26), ((offset)+6*8)(RSP) \ + STP (R27, g), ((offset)+8*8)(RSP) +#define RESTORE_R19_TO_R28(offset) \ + LDP ((offset)+0*8)(RSP), (R19, R20) \ + LDP ((offset)+2*8)(RSP), (R21, R22) \ + LDP ((offset)+4*8)(RSP), (R23, R24) \ + LDP ((offset)+6*8)(RSP), (R25, R26) \ + LDP ((offset)+8*8)(RSP), (R27, g) /* R28 */ +#define SAVE_F8_TO_F15(offset) \ + FSTPD (F8, F9), ((offset)+0*8)(RSP) \ + FSTPD (F10, F11), ((offset)+2*8)(RSP) \ + FSTPD (F12, F13), ((offset)+4*8)(RSP) \ + FSTPD (F14, F15), ((offset)+6*8)(RSP) +#define RESTORE_F8_TO_F15(offset) \ + FLDPD ((offset)+0*8)(RSP), (F8, F9) \ + FLDPD ((offset)+2*8)(RSP), (F10, F11) \ + FLDPD ((offset)+4*8)(RSP), (F12, F13) \ + FLDPD ((offset)+6*8)(RSP), (F14, F15) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s new file mode 100644 index 0000000000..2b7eb57f8a --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s @@ -0,0 +1,39 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" +#include "abi_amd64.h" + +// Called by C code generated by cmd/cgo. +// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr) +// Saves C callee-saved registers and calls cgocallback with three arguments. +// fn is the PC of a func(a unsafe.Pointer) function. +// This signature is known to SWIG, so we can't change it. +TEXT crosscall2(SB), NOSPLIT, $0-0 + PUSH_REGS_HOST_TO_ABI0() + + // Make room for arguments to cgocallback. + ADJSP $0x18 + +#ifndef GOOS_windows + MOVQ DI, 0x0(SP) // fn + MOVQ SI, 0x8(SP) // arg + + // Skip n in DX. + MOVQ CX, 0x10(SP) // ctxt + +#else + MOVQ CX, 0x0(SP) // fn + MOVQ DX, 0x8(SP) // arg + + // Skip n in R8. + MOVQ R9, 0x10(SP) // ctxt + +#endif + + CALL runtime·cgocallback(SB) + + ADJSP $-0x18 + POP_REGS_HOST_TO_ABI0() + RET diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s new file mode 100644 index 0000000000..50e5261d92 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s @@ -0,0 +1,36 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" +#include "abi_arm64.h" + +// Called by C code generated by cmd/cgo. +// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr) +// Saves C callee-saved registers and calls cgocallback with three arguments. +// fn is the PC of a func(a unsafe.Pointer) function. +TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0 +/* + * We still need to save all callee save register as before, and then + * push 3 args for fn (R0, R1, R3), skipping R2. + * Also note that at procedure entry in gc world, 8(RSP) will be the + * first arg. + */ + SUB $(8*24), RSP + STP (R0, R1), (8*1)(RSP) + MOVD R3, (8*3)(RSP) + + SAVE_R19_TO_R28(8*4) + SAVE_F8_TO_F15(8*14) + STP (R29, R30), (8*22)(RSP) + + // Initialize Go ABI environment + BL runtime·load_g(SB) + BL runtime·cgocallback(SB) + + RESTORE_R19_TO_R28(8*4) + RESTORE_F8_TO_F15(8*14) + LDP (8*22)(RSP), (R29, R30) + + ADD $(8*24), RSP + RET diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go new file mode 100644 index 0000000000..f29e690cc1 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go @@ -0,0 +1,93 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cgo && (darwin || freebsd || linux) + +package fakecgo + +import ( + _ "unsafe" +) + +// TODO: decide if we need _runtime_cgo_panic_internal + +//go:linkname x_cgo_init_trampoline x_cgo_init_trampoline +//go:linkname _cgo_init _cgo_init +var x_cgo_init_trampoline byte +var _cgo_init = &x_cgo_init_trampoline + +// Creates a new system thread without updating any Go state. +// +// This method is invoked during shared library loading to create a new OS +// thread to perform the runtime initialization. This method is similar to +// _cgo_sys_thread_start except that it doesn't update any Go state. + +//go:linkname x_cgo_thread_start_trampoline x_cgo_thread_start_trampoline +//go:linkname _cgo_thread_start _cgo_thread_start +var x_cgo_thread_start_trampoline byte +var _cgo_thread_start = &x_cgo_thread_start_trampoline + +// Notifies that the runtime has been initialized. +// +// We currently block at every CGO entry point (via _cgo_wait_runtime_init_done) +// to ensure that the runtime has been initialized before the CGO call is +// executed. This is necessary for shared libraries where we kickoff runtime +// initialization in a separate thread and return without waiting for this +// thread to complete the init. + +//go:linkname x_cgo_notify_runtime_init_done_trampoline x_cgo_notify_runtime_init_done_trampoline +//go:linkname _cgo_notify_runtime_init_done _cgo_notify_runtime_init_done +var x_cgo_notify_runtime_init_done_trampoline byte +var _cgo_notify_runtime_init_done = &x_cgo_notify_runtime_init_done_trampoline + +// Indicates whether a dummy thread key has been created or not. +// +// When calling go exported function from C, we register a destructor +// callback, for a dummy thread key, by using pthread_key_create. + +//go:linkname _cgo_pthread_key_created _cgo_pthread_key_created +var x_cgo_pthread_key_created uintptr +var _cgo_pthread_key_created = &x_cgo_pthread_key_created + +// Set the x_crosscall2_ptr C function pointer variable point to crosscall2. +// It's for the runtime package to call at init time. +func set_crosscall2() { + // nothing needs to be done here for fakecgo + // because it's possible to just call cgocallback directly +} + +//go:linkname _set_crosscall2 runtime.set_crosscall2 +var _set_crosscall2 = set_crosscall2 + +// Store the g into the thread-specific value. +// So that pthread_key_destructor will dropm when the thread is exiting. + +//go:linkname x_cgo_bindm_trampoline x_cgo_bindm_trampoline +//go:linkname _cgo_bindm _cgo_bindm +var x_cgo_bindm_trampoline byte +var _cgo_bindm = &x_cgo_bindm_trampoline + +// TODO: decide if we need x_cgo_set_context_function +// TODO: decide if we need _cgo_yield + +var ( + // In Go 1.20 the race detector was rewritten to pure Go + // on darwin. This means that when CGO_ENABLED=0 is set + // fakecgo is built with race detector code. This is not + // good since this code is pretending to be C. The go:norace + // pragma is not enough, since it only applies to the native + // ABIInternal function. The ABIO wrapper (which is necessary, + // since all references to text symbols from assembly will use it) + // does not inherit the go:norace pragma, so it will still be + // instrumented by the race detector. + // + // To circumvent this issue, using closure calls in the + // assembly, which forces the compiler to use the ABIInternal + // native implementation (which has go:norace) instead. + threadentry_call = threadentry + x_cgo_init_call = x_cgo_init + x_cgo_setenv_call = x_cgo_setenv + x_cgo_unsetenv_call = x_cgo_unsetenv + x_cgo_thread_start_call = x_cgo_thread_start +) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go new file mode 100644 index 0000000000..be82f7dfca --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || freebsd || linux) + +// Package fakecgo implements the Cgo runtime (runtime/cgo) entirely in Go. +// This allows code that calls into C to function properly when CGO_ENABLED=0. +// +// # Goals +// +// fakecgo attempts to replicate the same naming structure as in the runtime. +// For example, functions that have the prefix "gcc_*" are named "go_*". +// This makes it easier to port other GOOSs and GOARCHs as well as to keep +// it in sync with runtime/cgo. +// +// # Support +// +// Currently, fakecgo only supports macOS on amd64 & arm64. It also cannot +// be used with -buildmode=c-archive because that requires special initialization +// that fakecgo does not implement at the moment. +// +// # Usage +// +// Using fakecgo is easy just import _ "github.com/ebitengine/purego" and then +// set the environment variable CGO_ENABLED=0. +// The recommended usage for fakecgo is to prefer using runtime/cgo if possible +// but if cross-compiling or fast build times are important fakecgo is available. +// Purego will pick which ever Cgo runtime is available and prefer the one that +// comes with Go (runtime/cgo). +package fakecgo + +//go:generate go run gen.go diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go new file mode 100644 index 0000000000..bb73a709e6 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go @@ -0,0 +1,27 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build freebsd && !cgo + +package fakecgo + +import _ "unsafe" // for go:linkname + +// Supply environ and __progname, because we don't +// link against the standard FreeBSD crt0.o and the +// libc dynamic library needs them. + +// Note: when building with cross-compiling or CGO_ENABLED=0, add +// the following argument to `go` so that these symbols are defined by +// making fakecgo the Cgo. +// -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" + +//go:linkname _environ environ +//go:linkname _progname __progname + +//go:cgo_export_dynamic environ +//go:cgo_export_dynamic __progname + +var _environ uintptr +var _progname uintptr diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_amd64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_amd64.go new file mode 100644 index 0000000000..39f5ff1f06 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_amd64.go @@ -0,0 +1,73 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cgo + +package fakecgo + +import "unsafe" + +//go:nosplit +//go:norace +func _cgo_sys_thread_start(ts *ThreadStart) { + var attr pthread_attr_t + var ign, oset sigset_t + var p pthread_t + var size size_t + var err int + + sigfillset(&ign) + pthread_sigmask(SIG_SETMASK, &ign, &oset) + + size = pthread_get_stacksize_np(pthread_self()) + pthread_attr_init(&attr) + pthread_attr_setstacksize(&attr, size) + // Leave stacklo=0 and set stackhi=size; mstart will do the rest. + ts.g.stackhi = uintptr(size) + + err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) + + pthread_sigmask(SIG_SETMASK, &oset, nil) + + if err != 0 { + print("fakecgo: pthread_create failed: ") + println(err) + abort() + } +} + +// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function +// +//go:linkname x_threadentry_trampoline threadentry_trampoline +var x_threadentry_trampoline byte +var threadentry_trampolineABI0 = &x_threadentry_trampoline + +//go:nosplit +//go:norace +func threadentry(v unsafe.Pointer) unsafe.Pointer { + ts := *(*ThreadStart)(v) + free(v) + + setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) + + // faking funcs in go is a bit a... involved - but the following works :) + fn := uintptr(unsafe.Pointer(&ts.fn)) + (*(*func())(unsafe.Pointer(&fn)))() + + return nil +} + +// here we will store a pointer to the provided setg func +var setg_func uintptr + +//go:nosplit +//go:norace +func x_cgo_init(g *G, setg uintptr) { + var size size_t + + setg_func = setg + + size = pthread_get_stacksize_np(pthread_self()) + g.stacklo = uintptr(unsafe.Add(unsafe.Pointer(&size), -size+4096)) +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_arm64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_arm64.go new file mode 100644 index 0000000000..d0868f0f79 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_arm64.go @@ -0,0 +1,88 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cgo + +package fakecgo + +import "unsafe" + +//go:nosplit +//go:norace +func _cgo_sys_thread_start(ts *ThreadStart) { + var attr pthread_attr_t + var ign, oset sigset_t + var p pthread_t + var size size_t + var err int + + sigfillset(&ign) + pthread_sigmask(SIG_SETMASK, &ign, &oset) + + size = pthread_get_stacksize_np(pthread_self()) + pthread_attr_init(&attr) + pthread_attr_setstacksize(&attr, size) + // Leave stacklo=0 and set stackhi=size; mstart will do the rest. + ts.g.stackhi = uintptr(size) + + err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) + + pthread_sigmask(SIG_SETMASK, &oset, nil) + + if err != 0 { + print("fakecgo: pthread_create failed: ") + println(err) + abort() + } +} + +// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function +// +//go:linkname x_threadentry_trampoline threadentry_trampoline +var x_threadentry_trampoline byte +var threadentry_trampolineABI0 = &x_threadentry_trampoline + +//go:nosplit +//go:norace +func threadentry(v unsafe.Pointer) unsafe.Pointer { + ts := *(*ThreadStart)(v) + free(v) + + // TODO: support ios + //#if TARGET_OS_IPHONE + // darwin_arm_init_thread_exception_port(); + //#endif + setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) + + // faking funcs in go is a bit a... involved - but the following works :) + fn := uintptr(unsafe.Pointer(&ts.fn)) + (*(*func())(unsafe.Pointer(&fn)))() + + return nil +} + +// here we will store a pointer to the provided setg func +var setg_func uintptr + +// x_cgo_init(G *g, void (*setg)(void*)) (runtime/cgo/gcc_linux_amd64.c) +// This get's called during startup, adjusts stacklo, and provides a pointer to setg_gcc for us +// Additionally, if we set _cgo_init to non-null, go won't do it's own TLS setup +// This function can't be go:systemstack since go is not in a state where the systemcheck would work. +// +//go:nosplit +//go:norace +func x_cgo_init(g *G, setg uintptr) { + var size size_t + + setg_func = setg + size = pthread_get_stacksize_np(pthread_self()) + g.stacklo = uintptr(unsafe.Add(unsafe.Pointer(&size), -size+4096)) + + //TODO: support ios + //#if TARGET_OS_IPHONE + // darwin_arm_init_mach_exception_handler(); + // darwin_arm_init_thread_exception_port(); + // init_working_dir(); + //#endif +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_amd64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_amd64.go new file mode 100644 index 0000000000..c9ff7156a8 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_amd64.go @@ -0,0 +1,95 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cgo + +package fakecgo + +import "unsafe" + +//go:nosplit +func _cgo_sys_thread_start(ts *ThreadStart) { + var attr pthread_attr_t + var ign, oset sigset_t + var p pthread_t + var size size_t + var err int + + //fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug + sigfillset(&ign) + pthread_sigmask(SIG_SETMASK, &ign, &oset) + + pthread_attr_init(&attr) + pthread_attr_getstacksize(&attr, &size) + // Leave stacklo=0 and set stackhi=size; mstart will do the rest. + ts.g.stackhi = uintptr(size) + + err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) + + pthread_sigmask(SIG_SETMASK, &oset, nil) + + if err != 0 { + print("fakecgo: pthread_create failed: ") + println(err) + abort() + } +} + +// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function +// +//go:linkname x_threadentry_trampoline threadentry_trampoline +var x_threadentry_trampoline byte +var threadentry_trampolineABI0 = &x_threadentry_trampoline + +//go:nosplit +func threadentry(v unsafe.Pointer) unsafe.Pointer { + ts := *(*ThreadStart)(v) + free(v) + + setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) + + // faking funcs in go is a bit a... involved - but the following works :) + fn := uintptr(unsafe.Pointer(&ts.fn)) + (*(*func())(unsafe.Pointer(&fn)))() + + return nil +} + +// here we will store a pointer to the provided setg func +var setg_func uintptr + +//go:nosplit +func x_cgo_init(g *G, setg uintptr) { + var size size_t + var attr *pthread_attr_t + + /* The memory sanitizer distributed with versions of clang + before 3.8 has a bug: if you call mmap before malloc, mmap + may return an address that is later overwritten by the msan + library. Avoid this problem by forcing a call to malloc + here, before we ever call malloc. + + This is only required for the memory sanitizer, so it's + unfortunate that we always run it. It should be possible + to remove this when we no longer care about versions of + clang before 3.8. The test for this is + misc/cgo/testsanitizers. + + GCC works hard to eliminate a seemingly unnecessary call to + malloc, so we actually use the memory we allocate. */ + + setg_func = setg + attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr))) + if attr == nil { + println("fakecgo: malloc failed") + abort() + } + pthread_attr_init(attr) + pthread_attr_getstacksize(attr, &size) + // runtime/cgo uses __builtin_frame_address(0) instead of `uintptr(unsafe.Pointer(&size))` + // but this should be OK since we are taking the address of the first variable in this function. + g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096 + pthread_attr_destroy(attr) + free(unsafe.Pointer(attr)) +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_arm64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_arm64.go new file mode 100644 index 0000000000..e3a060b935 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_arm64.go @@ -0,0 +1,98 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cgo + +package fakecgo + +import "unsafe" + +//go:nosplit +func _cgo_sys_thread_start(ts *ThreadStart) { + var attr pthread_attr_t + var ign, oset sigset_t + var p pthread_t + var size size_t + var err int + + // fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug + sigfillset(&ign) + pthread_sigmask(SIG_SETMASK, &ign, &oset) + + pthread_attr_init(&attr) + pthread_attr_getstacksize(&attr, &size) + // Leave stacklo=0 and set stackhi=size; mstart will do the rest. + ts.g.stackhi = uintptr(size) + + err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) + + pthread_sigmask(SIG_SETMASK, &oset, nil) + + if err != 0 { + print("fakecgo: pthread_create failed: ") + println(err) + abort() + } +} + +// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function +// +//go:linkname x_threadentry_trampoline threadentry_trampoline +var x_threadentry_trampoline byte +var threadentry_trampolineABI0 = &x_threadentry_trampoline + +//go:nosplit +func threadentry(v unsafe.Pointer) unsafe.Pointer { + ts := *(*ThreadStart)(v) + free(v) + + setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) + + // faking funcs in go is a bit a... involved - but the following works :) + fn := uintptr(unsafe.Pointer(&ts.fn)) + (*(*func())(unsafe.Pointer(&fn)))() + + return nil +} + +// here we will store a pointer to the provided setg func +var setg_func uintptr + +// x_cgo_init(G *g, void (*setg)(void*)) (runtime/cgo/gcc_linux_amd64.c) +// This get's called during startup, adjusts stacklo, and provides a pointer to setg_gcc for us +// Additionally, if we set _cgo_init to non-null, go won't do it's own TLS setup +// This function can't be go:systemstack since go is not in a state where the systemcheck would work. +// +//go:nosplit +func x_cgo_init(g *G, setg uintptr) { + var size size_t + var attr *pthread_attr_t + + /* The memory sanitizer distributed with versions of clang + before 3.8 has a bug: if you call mmap before malloc, mmap + may return an address that is later overwritten by the msan + library. Avoid this problem by forcing a call to malloc + here, before we ever call malloc. + + This is only required for the memory sanitizer, so it's + unfortunate that we always run it. It should be possible + to remove this when we no longer care about versions of + clang before 3.8. The test for this is + misc/cgo/testsanitizers. + + GCC works hard to eliminate a seemingly unnecessary call to + malloc, so we actually use the memory we allocate. */ + + setg_func = setg + attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr))) + if attr == nil { + println("fakecgo: malloc failed") + abort() + } + pthread_attr_init(attr) + pthread_attr_getstacksize(attr, &size) + g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096 + pthread_attr_destroy(attr) + free(unsafe.Pointer(attr)) +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go new file mode 100644 index 0000000000..e5cb46be45 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || freebsd || linux) + +package fakecgo + +import ( + "syscall" + "unsafe" +) + +var ( + pthread_g pthread_key_t + + runtime_init_cond = PTHREAD_COND_INITIALIZER + runtime_init_mu = PTHREAD_MUTEX_INITIALIZER + runtime_init_done int +) + +//go:nosplit +func x_cgo_notify_runtime_init_done() { + pthread_mutex_lock(&runtime_init_mu) + runtime_init_done = 1 + pthread_cond_broadcast(&runtime_init_cond) + pthread_mutex_unlock(&runtime_init_mu) +} + +// Store the g into a thread-specific value associated with the pthread key pthread_g. +// And pthread_key_destructor will dropm when the thread is exiting. +func x_cgo_bindm(g unsafe.Pointer) { + // We assume this will always succeed, otherwise, there might be extra M leaking, + // when a C thread exits after a cgo call. + // We only invoke this function once per thread in runtime.needAndBindM, + // and the next calls just reuse the bound m. + pthread_setspecific(pthread_g, g) +} + +// _cgo_try_pthread_create retries pthread_create if it fails with +// EAGAIN. +// +//go:nosplit +//go:norace +func _cgo_try_pthread_create(thread *pthread_t, attr *pthread_attr_t, pfn unsafe.Pointer, arg *ThreadStart) int { + var ts syscall.Timespec + // tries needs to be the same type as syscall.Timespec.Nsec + // but the fields are int32 on 32bit and int64 on 64bit. + // tries is assigned to syscall.Timespec.Nsec in order to match its type. + tries := ts.Nsec + var err int + + for tries = 0; tries < 20; tries++ { + err = int(pthread_create(thread, attr, pfn, unsafe.Pointer(arg))) + if err == 0 { + pthread_detach(*thread) + return 0 + } + if err != int(syscall.EAGAIN) { + return err + } + ts.Sec = 0 + ts.Nsec = (tries + 1) * 1000 * 1000 // Milliseconds. + nanosleep(&ts, nil) + } + return int(syscall.EAGAIN) +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_amd64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_amd64.go new file mode 100644 index 0000000000..c9ff7156a8 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_amd64.go @@ -0,0 +1,95 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cgo + +package fakecgo + +import "unsafe" + +//go:nosplit +func _cgo_sys_thread_start(ts *ThreadStart) { + var attr pthread_attr_t + var ign, oset sigset_t + var p pthread_t + var size size_t + var err int + + //fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug + sigfillset(&ign) + pthread_sigmask(SIG_SETMASK, &ign, &oset) + + pthread_attr_init(&attr) + pthread_attr_getstacksize(&attr, &size) + // Leave stacklo=0 and set stackhi=size; mstart will do the rest. + ts.g.stackhi = uintptr(size) + + err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) + + pthread_sigmask(SIG_SETMASK, &oset, nil) + + if err != 0 { + print("fakecgo: pthread_create failed: ") + println(err) + abort() + } +} + +// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function +// +//go:linkname x_threadentry_trampoline threadentry_trampoline +var x_threadentry_trampoline byte +var threadentry_trampolineABI0 = &x_threadentry_trampoline + +//go:nosplit +func threadentry(v unsafe.Pointer) unsafe.Pointer { + ts := *(*ThreadStart)(v) + free(v) + + setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) + + // faking funcs in go is a bit a... involved - but the following works :) + fn := uintptr(unsafe.Pointer(&ts.fn)) + (*(*func())(unsafe.Pointer(&fn)))() + + return nil +} + +// here we will store a pointer to the provided setg func +var setg_func uintptr + +//go:nosplit +func x_cgo_init(g *G, setg uintptr) { + var size size_t + var attr *pthread_attr_t + + /* The memory sanitizer distributed with versions of clang + before 3.8 has a bug: if you call mmap before malloc, mmap + may return an address that is later overwritten by the msan + library. Avoid this problem by forcing a call to malloc + here, before we ever call malloc. + + This is only required for the memory sanitizer, so it's + unfortunate that we always run it. It should be possible + to remove this when we no longer care about versions of + clang before 3.8. The test for this is + misc/cgo/testsanitizers. + + GCC works hard to eliminate a seemingly unnecessary call to + malloc, so we actually use the memory we allocate. */ + + setg_func = setg + attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr))) + if attr == nil { + println("fakecgo: malloc failed") + abort() + } + pthread_attr_init(attr) + pthread_attr_getstacksize(attr, &size) + // runtime/cgo uses __builtin_frame_address(0) instead of `uintptr(unsafe.Pointer(&size))` + // but this should be OK since we are taking the address of the first variable in this function. + g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096 + pthread_attr_destroy(attr) + free(unsafe.Pointer(attr)) +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_arm64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_arm64.go new file mode 100644 index 0000000000..a3b1cca59a --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_arm64.go @@ -0,0 +1,98 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cgo + +package fakecgo + +import "unsafe" + +//go:nosplit +func _cgo_sys_thread_start(ts *ThreadStart) { + var attr pthread_attr_t + var ign, oset sigset_t + var p pthread_t + var size size_t + var err int + + //fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug + sigfillset(&ign) + pthread_sigmask(SIG_SETMASK, &ign, &oset) + + pthread_attr_init(&attr) + pthread_attr_getstacksize(&attr, &size) + // Leave stacklo=0 and set stackhi=size; mstart will do the rest. + ts.g.stackhi = uintptr(size) + + err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) + + pthread_sigmask(SIG_SETMASK, &oset, nil) + + if err != 0 { + print("fakecgo: pthread_create failed: ") + println(err) + abort() + } +} + +// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function +// +//go:linkname x_threadentry_trampoline threadentry_trampoline +var x_threadentry_trampoline byte +var threadentry_trampolineABI0 = &x_threadentry_trampoline + +//go:nosplit +func threadentry(v unsafe.Pointer) unsafe.Pointer { + ts := *(*ThreadStart)(v) + free(v) + + setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) + + // faking funcs in go is a bit a... involved - but the following works :) + fn := uintptr(unsafe.Pointer(&ts.fn)) + (*(*func())(unsafe.Pointer(&fn)))() + + return nil +} + +// here we will store a pointer to the provided setg func +var setg_func uintptr + +// x_cgo_init(G *g, void (*setg)(void*)) (runtime/cgo/gcc_linux_amd64.c) +// This get's called during startup, adjusts stacklo, and provides a pointer to setg_gcc for us +// Additionally, if we set _cgo_init to non-null, go won't do it's own TLS setup +// This function can't be go:systemstack since go is not in a state where the systemcheck would work. +// +//go:nosplit +func x_cgo_init(g *G, setg uintptr) { + var size size_t + var attr *pthread_attr_t + + /* The memory sanitizer distributed with versions of clang + before 3.8 has a bug: if you call mmap before malloc, mmap + may return an address that is later overwritten by the msan + library. Avoid this problem by forcing a call to malloc + here, before we ever call malloc. + + This is only required for the memory sanitizer, so it's + unfortunate that we always run it. It should be possible + to remove this when we no longer care about versions of + clang before 3.8. The test for this is + misc/cgo/testsanitizers. + + GCC works hard to eliminate a seemingly unnecessary call to + malloc, so we actually use the memory we allocate. */ + + setg_func = setg + attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr))) + if attr == nil { + println("fakecgo: malloc failed") + abort() + } + pthread_attr_init(attr) + pthread_attr_getstacksize(attr, &size) + g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096 + pthread_attr_destroy(attr) + free(unsafe.Pointer(attr)) +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go new file mode 100644 index 0000000000..e42d84f0b7 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || freebsd || linux) + +package fakecgo + +//go:nosplit +//go:norace +func x_cgo_setenv(arg *[2]*byte) { + setenv(arg[0], arg[1], 1) +} + +//go:nosplit +//go:norace +func x_cgo_unsetenv(arg *[1]*byte) { + unsetenv(arg[0]) +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go new file mode 100644 index 0000000000..0ac10d1f15 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || freebsd || linux) + +package fakecgo + +import "unsafe" + +// _cgo_thread_start is split into three parts in cgo since only one part is system dependent (keep it here for easier handling) + +// _cgo_thread_start(ThreadStart *arg) (runtime/cgo/gcc_util.c) +// This get's called instead of the go code for creating new threads +// -> pthread_* stuff is used, so threads are setup correctly for C +// If this is missing, TLS is only setup correctly on thread 1! +// This function should be go:systemstack instead of go:nosplit (but that requires runtime) +// +//go:nosplit +//go:norace +func x_cgo_thread_start(arg *ThreadStart) { + var ts *ThreadStart + // Make our own copy that can persist after we return. + // _cgo_tsan_acquire(); + ts = (*ThreadStart)(malloc(unsafe.Sizeof(*ts))) + // _cgo_tsan_release(); + if ts == nil { + println("fakecgo: out of memory in thread_start") + abort() + } + // *ts = *arg would cause a writebarrier so copy using slices + s1 := unsafe.Slice((*uintptr)(unsafe.Pointer(ts)), unsafe.Sizeof(*ts)/8) + s2 := unsafe.Slice((*uintptr)(unsafe.Pointer(arg)), unsafe.Sizeof(*arg)/8) + for i := range s2 { + s1[i] = s2[i] + } + _cgo_sys_thread_start(ts) // OS-dependent half +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go new file mode 100644 index 0000000000..28af41cc64 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go @@ -0,0 +1,19 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cgo && (darwin || freebsd || linux) + +// The runtime package contains an uninitialized definition +// for runtime·iscgo. Override it to tell the runtime we're here. +// There are various function pointers that should be set too, +// but those depend on dynamic linker magic to get initialized +// correctly, and sometimes they break. This variable is a +// backup: it depends only on old C style static linking rules. + +package fakecgo + +import _ "unsafe" // for go:linkname + +//go:linkname _iscgo runtime.iscgo +var _iscgo bool = true diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go new file mode 100644 index 0000000000..74626c64a0 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || freebsd || linux) + +package fakecgo + +type ( + size_t uintptr + sigset_t [128]byte + pthread_attr_t [64]byte + pthread_t int + pthread_key_t uint64 +) + +// for pthread_sigmask: + +type sighow int32 + +const ( + SIG_BLOCK sighow = 0 + SIG_UNBLOCK sighow = 1 + SIG_SETMASK sighow = 2 +) + +type G struct { + stacklo uintptr + stackhi uintptr +} + +type ThreadStart struct { + g *G + tls *uintptr + fn uintptr +} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go new file mode 100644 index 0000000000..af148333f6 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo + +package fakecgo + +type ( + pthread_mutex_t struct { + sig int64 + opaque [56]byte + } + pthread_cond_t struct { + sig int64 + opaque [40]byte + } +) + +var ( + PTHREAD_COND_INITIALIZER = pthread_cond_t{sig: 0x3CB0B1BB} + PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t{sig: 0x32AAABA7} +) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go new file mode 100644 index 0000000000..ca1f722c93 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo + +package fakecgo + +type ( + pthread_cond_t uintptr + pthread_mutex_t uintptr +) + +var ( + PTHREAD_COND_INITIALIZER = pthread_cond_t(0) + PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t(0) +) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go new file mode 100644 index 0000000000..c4b6e9ea5a --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo + +package fakecgo + +type ( + pthread_cond_t [48]byte + pthread_mutex_t [48]byte +) + +var ( + PTHREAD_COND_INITIALIZER = pthread_cond_t{} + PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t{} +) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go new file mode 100644 index 0000000000..f30af0e151 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go @@ -0,0 +1,19 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cgo && (darwin || freebsd || linux) + +package fakecgo + +import _ "unsafe" // for go:linkname + +//go:linkname x_cgo_setenv_trampoline x_cgo_setenv_trampoline +//go:linkname _cgo_setenv runtime._cgo_setenv +var x_cgo_setenv_trampoline byte +var _cgo_setenv = &x_cgo_setenv_trampoline + +//go:linkname x_cgo_unsetenv_trampoline x_cgo_unsetenv_trampoline +//go:linkname _cgo_unsetenv runtime._cgo_unsetenv +var x_cgo_unsetenv_trampoline byte +var _cgo_unsetenv = &x_cgo_unsetenv_trampoline diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go new file mode 100644 index 0000000000..3d19fd822a --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go @@ -0,0 +1,181 @@ +// Code generated by 'go generate' with gen.go. DO NOT EDIT. + +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || freebsd || linux) + +package fakecgo + +import ( + "syscall" + "unsafe" +) + +// setg_trampoline calls setg with the G provided +func setg_trampoline(setg uintptr, G uintptr) + +// call5 takes fn the C function and 5 arguments and calls the function with those arguments +func call5(fn, a1, a2, a3, a4, a5 uintptr) uintptr + +func malloc(size uintptr) unsafe.Pointer { + ret := call5(mallocABI0, uintptr(size), 0, 0, 0, 0) + // this indirection is to avoid go vet complaining about possible misuse of unsafe.Pointer + return *(*unsafe.Pointer)(unsafe.Pointer(&ret)) +} + +func free(ptr unsafe.Pointer) { + call5(freeABI0, uintptr(ptr), 0, 0, 0, 0) +} + +func setenv(name *byte, value *byte, overwrite int32) int32 { + return int32(call5(setenvABI0, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), uintptr(overwrite), 0, 0)) +} + +func unsetenv(name *byte) int32 { + return int32(call5(unsetenvABI0, uintptr(unsafe.Pointer(name)), 0, 0, 0, 0)) +} + +func sigfillset(set *sigset_t) int32 { + return int32(call5(sigfillsetABI0, uintptr(unsafe.Pointer(set)), 0, 0, 0, 0)) +} + +func nanosleep(ts *syscall.Timespec, rem *syscall.Timespec) int32 { + return int32(call5(nanosleepABI0, uintptr(unsafe.Pointer(ts)), uintptr(unsafe.Pointer(rem)), 0, 0, 0)) +} + +func abort() { + call5(abortABI0, 0, 0, 0, 0, 0) +} + +func pthread_attr_init(attr *pthread_attr_t) int32 { + return int32(call5(pthread_attr_initABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0)) +} + +func pthread_create(thread *pthread_t, attr *pthread_attr_t, start unsafe.Pointer, arg unsafe.Pointer) int32 { + return int32(call5(pthread_createABI0, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(start), uintptr(arg), 0)) +} + +func pthread_detach(thread pthread_t) int32 { + return int32(call5(pthread_detachABI0, uintptr(thread), 0, 0, 0, 0)) +} + +func pthread_sigmask(how sighow, ign *sigset_t, oset *sigset_t) int32 { + return int32(call5(pthread_sigmaskABI0, uintptr(how), uintptr(unsafe.Pointer(ign)), uintptr(unsafe.Pointer(oset)), 0, 0)) +} + +func pthread_self() pthread_t { + return pthread_t(call5(pthread_selfABI0, 0, 0, 0, 0, 0)) +} + +func pthread_get_stacksize_np(thread pthread_t) size_t { + return size_t(call5(pthread_get_stacksize_npABI0, uintptr(thread), 0, 0, 0, 0)) +} + +func pthread_attr_getstacksize(attr *pthread_attr_t, stacksize *size_t) int32 { + return int32(call5(pthread_attr_getstacksizeABI0, uintptr(unsafe.Pointer(attr)), uintptr(unsafe.Pointer(stacksize)), 0, 0, 0)) +} + +func pthread_attr_setstacksize(attr *pthread_attr_t, size size_t) int32 { + return int32(call5(pthread_attr_setstacksizeABI0, uintptr(unsafe.Pointer(attr)), uintptr(size), 0, 0, 0)) +} + +func pthread_attr_destroy(attr *pthread_attr_t) int32 { + return int32(call5(pthread_attr_destroyABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0)) +} + +func pthread_mutex_lock(mutex *pthread_mutex_t) int32 { + return int32(call5(pthread_mutex_lockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) +} + +func pthread_mutex_unlock(mutex *pthread_mutex_t) int32 { + return int32(call5(pthread_mutex_unlockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) +} + +func pthread_cond_broadcast(cond *pthread_cond_t) int32 { + return int32(call5(pthread_cond_broadcastABI0, uintptr(unsafe.Pointer(cond)), 0, 0, 0, 0)) +} + +func pthread_setspecific(key pthread_key_t, value unsafe.Pointer) int32 { + return int32(call5(pthread_setspecificABI0, uintptr(key), uintptr(value), 0, 0, 0)) +} + +//go:linkname _malloc _malloc +var _malloc uintptr +var mallocABI0 = uintptr(unsafe.Pointer(&_malloc)) + +//go:linkname _free _free +var _free uintptr +var freeABI0 = uintptr(unsafe.Pointer(&_free)) + +//go:linkname _setenv _setenv +var _setenv uintptr +var setenvABI0 = uintptr(unsafe.Pointer(&_setenv)) + +//go:linkname _unsetenv _unsetenv +var _unsetenv uintptr +var unsetenvABI0 = uintptr(unsafe.Pointer(&_unsetenv)) + +//go:linkname _sigfillset _sigfillset +var _sigfillset uintptr +var sigfillsetABI0 = uintptr(unsafe.Pointer(&_sigfillset)) + +//go:linkname _nanosleep _nanosleep +var _nanosleep uintptr +var nanosleepABI0 = uintptr(unsafe.Pointer(&_nanosleep)) + +//go:linkname _abort _abort +var _abort uintptr +var abortABI0 = uintptr(unsafe.Pointer(&_abort)) + +//go:linkname _pthread_attr_init _pthread_attr_init +var _pthread_attr_init uintptr +var pthread_attr_initABI0 = uintptr(unsafe.Pointer(&_pthread_attr_init)) + +//go:linkname _pthread_create _pthread_create +var _pthread_create uintptr +var pthread_createABI0 = uintptr(unsafe.Pointer(&_pthread_create)) + +//go:linkname _pthread_detach _pthread_detach +var _pthread_detach uintptr +var pthread_detachABI0 = uintptr(unsafe.Pointer(&_pthread_detach)) + +//go:linkname _pthread_sigmask _pthread_sigmask +var _pthread_sigmask uintptr +var pthread_sigmaskABI0 = uintptr(unsafe.Pointer(&_pthread_sigmask)) + +//go:linkname _pthread_self _pthread_self +var _pthread_self uintptr +var pthread_selfABI0 = uintptr(unsafe.Pointer(&_pthread_self)) + +//go:linkname _pthread_get_stacksize_np _pthread_get_stacksize_np +var _pthread_get_stacksize_np uintptr +var pthread_get_stacksize_npABI0 = uintptr(unsafe.Pointer(&_pthread_get_stacksize_np)) + +//go:linkname _pthread_attr_getstacksize _pthread_attr_getstacksize +var _pthread_attr_getstacksize uintptr +var pthread_attr_getstacksizeABI0 = uintptr(unsafe.Pointer(&_pthread_attr_getstacksize)) + +//go:linkname _pthread_attr_setstacksize _pthread_attr_setstacksize +var _pthread_attr_setstacksize uintptr +var pthread_attr_setstacksizeABI0 = uintptr(unsafe.Pointer(&_pthread_attr_setstacksize)) + +//go:linkname _pthread_attr_destroy _pthread_attr_destroy +var _pthread_attr_destroy uintptr +var pthread_attr_destroyABI0 = uintptr(unsafe.Pointer(&_pthread_attr_destroy)) + +//go:linkname _pthread_mutex_lock _pthread_mutex_lock +var _pthread_mutex_lock uintptr +var pthread_mutex_lockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_lock)) + +//go:linkname _pthread_mutex_unlock _pthread_mutex_unlock +var _pthread_mutex_unlock uintptr +var pthread_mutex_unlockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_unlock)) + +//go:linkname _pthread_cond_broadcast _pthread_cond_broadcast +var _pthread_cond_broadcast uintptr +var pthread_cond_broadcastABI0 = uintptr(unsafe.Pointer(&_pthread_cond_broadcast)) + +//go:linkname _pthread_setspecific _pthread_setspecific +var _pthread_setspecific uintptr +var pthread_setspecificABI0 = uintptr(unsafe.Pointer(&_pthread_setspecific)) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_darwin.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_darwin.go new file mode 100644 index 0000000000..54aaa46285 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_darwin.go @@ -0,0 +1,29 @@ +// Code generated by 'go generate' with gen.go. DO NOT EDIT. + +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo + +package fakecgo + +//go:cgo_import_dynamic purego_malloc malloc "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_free free "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_setenv setenv "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_unsetenv unsetenv "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_sigfillset sigfillset "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_nanosleep nanosleep "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_abort abort "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_attr_init pthread_attr_init "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_create pthread_create "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_detach pthread_detach "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_sigmask pthread_sigmask "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_self pthread_self "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_get_stacksize_np pthread_get_stacksize_np "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_attr_getstacksize pthread_attr_getstacksize "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_attr_setstacksize pthread_attr_setstacksize "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_attr_destroy pthread_attr_destroy "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_mutex_lock pthread_mutex_lock "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_mutex_unlock pthread_mutex_unlock "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_cond_broadcast pthread_cond_broadcast "/usr/lib/libSystem.B.dylib" +//go:cgo_import_dynamic purego_pthread_setspecific pthread_setspecific "/usr/lib/libSystem.B.dylib" diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_freebsd.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_freebsd.go new file mode 100644 index 0000000000..8153811979 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_freebsd.go @@ -0,0 +1,29 @@ +// Code generated by 'go generate' with gen.go. DO NOT EDIT. + +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo + +package fakecgo + +//go:cgo_import_dynamic purego_malloc malloc "libc.so.7" +//go:cgo_import_dynamic purego_free free "libc.so.7" +//go:cgo_import_dynamic purego_setenv setenv "libc.so.7" +//go:cgo_import_dynamic purego_unsetenv unsetenv "libc.so.7" +//go:cgo_import_dynamic purego_sigfillset sigfillset "libc.so.7" +//go:cgo_import_dynamic purego_nanosleep nanosleep "libc.so.7" +//go:cgo_import_dynamic purego_abort abort "libc.so.7" +//go:cgo_import_dynamic purego_pthread_attr_init pthread_attr_init "libpthread.so" +//go:cgo_import_dynamic purego_pthread_create pthread_create "libpthread.so" +//go:cgo_import_dynamic purego_pthread_detach pthread_detach "libpthread.so" +//go:cgo_import_dynamic purego_pthread_sigmask pthread_sigmask "libpthread.so" +//go:cgo_import_dynamic purego_pthread_self pthread_self "libpthread.so" +//go:cgo_import_dynamic purego_pthread_get_stacksize_np pthread_get_stacksize_np "libpthread.so" +//go:cgo_import_dynamic purego_pthread_attr_getstacksize pthread_attr_getstacksize "libpthread.so" +//go:cgo_import_dynamic purego_pthread_attr_setstacksize pthread_attr_setstacksize "libpthread.so" +//go:cgo_import_dynamic purego_pthread_attr_destroy pthread_attr_destroy "libpthread.so" +//go:cgo_import_dynamic purego_pthread_mutex_lock pthread_mutex_lock "libpthread.so" +//go:cgo_import_dynamic purego_pthread_mutex_unlock pthread_mutex_unlock "libpthread.so" +//go:cgo_import_dynamic purego_pthread_cond_broadcast pthread_cond_broadcast "libpthread.so" +//go:cgo_import_dynamic purego_pthread_setspecific pthread_setspecific "libpthread.so" diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_linux.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_linux.go new file mode 100644 index 0000000000..180057d015 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_linux.go @@ -0,0 +1,29 @@ +// Code generated by 'go generate' with gen.go. DO NOT EDIT. + +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo + +package fakecgo + +//go:cgo_import_dynamic purego_malloc malloc "libc.so.6" +//go:cgo_import_dynamic purego_free free "libc.so.6" +//go:cgo_import_dynamic purego_setenv setenv "libc.so.6" +//go:cgo_import_dynamic purego_unsetenv unsetenv "libc.so.6" +//go:cgo_import_dynamic purego_sigfillset sigfillset "libc.so.6" +//go:cgo_import_dynamic purego_nanosleep nanosleep "libc.so.6" +//go:cgo_import_dynamic purego_abort abort "libc.so.6" +//go:cgo_import_dynamic purego_pthread_attr_init pthread_attr_init "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_create pthread_create "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_detach pthread_detach "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_sigmask pthread_sigmask "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_self pthread_self "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_get_stacksize_np pthread_get_stacksize_np "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_attr_getstacksize pthread_attr_getstacksize "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_attr_setstacksize pthread_attr_setstacksize "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_attr_destroy pthread_attr_destroy "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_mutex_lock pthread_mutex_lock "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_mutex_unlock pthread_mutex_unlock "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_cond_broadcast pthread_cond_broadcast "libpthread.so.0" +//go:cgo_import_dynamic purego_pthread_setspecific pthread_setspecific "libpthread.so.0" diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s new file mode 100644 index 0000000000..c9a3cc09eb --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || linux || freebsd) + +/* +trampoline for emulating required C functions for cgo in go (see cgo.go) +(we convert cdecl calling convention to go and vice-versa) + +Since we're called from go and call into C we can cheat a bit with the calling conventions: + - in go all the registers are caller saved + - in C we have a couple of callee saved registers + +=> we can use BX, R12, R13, R14, R15 instead of the stack + +C Calling convention cdecl used here (we only need integer args): +1. arg: DI +2. arg: SI +3. arg: DX +4. arg: CX +5. arg: R8 +6. arg: R9 +We don't need floats with these functions -> AX=0 +return value will be in AX +*/ +#include "textflag.h" +#include "go_asm.h" + +// these trampolines map the gcc ABI to Go ABI and then calls into the Go equivalent functions. + +TEXT x_cgo_init_trampoline(SB), NOSPLIT, $16 + MOVQ DI, AX + MOVQ SI, BX + MOVQ ·x_cgo_init_call(SB), DX + MOVQ (DX), CX + CALL CX + RET + +TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $8 + MOVQ DI, AX + MOVQ ·x_cgo_thread_start_call(SB), DX + MOVQ (DX), CX + CALL CX + RET + +TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $8 + MOVQ DI, AX + MOVQ ·x_cgo_setenv_call(SB), DX + MOVQ (DX), CX + CALL CX + RET + +TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $8 + MOVQ DI, AX + MOVQ ·x_cgo_unsetenv_call(SB), DX + MOVQ (DX), CX + CALL CX + RET + +TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0 + CALL ·x_cgo_notify_runtime_init_done(SB) + RET + +TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0 + CALL ·x_cgo_bindm(SB) + RET + +// func setg_trampoline(setg uintptr, g uintptr) +TEXT ·setg_trampoline(SB), NOSPLIT, $0-16 + MOVQ G+8(FP), DI + MOVQ setg+0(FP), BX + XORL AX, AX + CALL BX + RET + +TEXT threadentry_trampoline(SB), NOSPLIT, $16 + MOVQ DI, AX + MOVQ ·threadentry_call(SB), DX + MOVQ (DX), CX + CALL CX + RET + +TEXT ·call5(SB), NOSPLIT, $0-56 + MOVQ fn+0(FP), BX + MOVQ a1+8(FP), DI + MOVQ a2+16(FP), SI + MOVQ a3+24(FP), DX + MOVQ a4+32(FP), CX + MOVQ a5+40(FP), R8 + + XORL AX, AX // no floats + + PUSHQ BP // save BP + MOVQ SP, BP // save SP inside BP bc BP is callee-saved + SUBQ $16, SP // allocate space for alignment + ANDQ $-16, SP // align on 16 bytes for SSE + + CALL BX + + MOVQ BP, SP // get SP back + POPQ BP // restore BP + + MOVQ AX, ret+48(FP) + RET diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s new file mode 100644 index 0000000000..9dbdbc0139 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || freebsd || linux) + +#include "textflag.h" +#include "go_asm.h" + +// these trampolines map the gcc ABI to Go ABI and then calls into the Go equivalent functions. + +TEXT x_cgo_init_trampoline(SB), NOSPLIT, $0-0 + MOVD R0, 8(RSP) + MOVD R1, 16(RSP) + MOVD ·x_cgo_init_call(SB), R26 + MOVD (R26), R2 + CALL (R2) + RET + +TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $0-0 + MOVD R0, 8(RSP) + MOVD ·x_cgo_thread_start_call(SB), R26 + MOVD (R26), R2 + CALL (R2) + RET + +TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $0-0 + MOVD R0, 8(RSP) + MOVD ·x_cgo_setenv_call(SB), R26 + MOVD (R26), R2 + CALL (R2) + RET + +TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $0-0 + MOVD R0, 8(RSP) + MOVD ·x_cgo_unsetenv_call(SB), R26 + MOVD (R26), R2 + CALL (R2) + RET + +TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0-0 + CALL ·x_cgo_notify_runtime_init_done(SB) + RET + +TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0 + CALL ·x_cgo_bindm(SB) + RET + +// func setg_trampoline(setg uintptr, g uintptr) +TEXT ·setg_trampoline(SB), NOSPLIT, $0-16 + MOVD G+8(FP), R0 + MOVD setg+0(FP), R1 + CALL R1 + RET + +TEXT threadentry_trampoline(SB), NOSPLIT, $0-0 + MOVD R0, 8(RSP) + MOVD ·threadentry_call(SB), R26 + MOVD (R26), R2 + CALL (R2) + MOVD $0, R0 // TODO: get the return value from threadentry + RET + +TEXT ·call5(SB), NOSPLIT, $0-0 + MOVD fn+0(FP), R6 + MOVD a1+8(FP), R0 + MOVD a2+16(FP), R1 + MOVD a3+24(FP), R2 + MOVD a4+32(FP), R3 + MOVD a5+40(FP), R4 + CALL R6 + MOVD R0, ret+48(FP) + RET diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_stubs.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_stubs.s new file mode 100644 index 0000000000..a65b2012c1 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_stubs.s @@ -0,0 +1,90 @@ +// Code generated by 'go generate' with gen.go. DO NOT EDIT. + +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || freebsd || linux) + +#include "textflag.h" + +// these stubs are here because it is not possible to go:linkname directly the C functions on darwin arm64 + +TEXT _malloc(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_malloc(SB) + RET + +TEXT _free(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_free(SB) + RET + +TEXT _setenv(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_setenv(SB) + RET + +TEXT _unsetenv(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_unsetenv(SB) + RET + +TEXT _sigfillset(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_sigfillset(SB) + RET + +TEXT _nanosleep(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_nanosleep(SB) + RET + +TEXT _abort(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_abort(SB) + RET + +TEXT _pthread_attr_init(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_attr_init(SB) + RET + +TEXT _pthread_create(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_create(SB) + RET + +TEXT _pthread_detach(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_detach(SB) + RET + +TEXT _pthread_sigmask(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_sigmask(SB) + RET + +TEXT _pthread_self(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_self(SB) + RET + +TEXT _pthread_get_stacksize_np(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_get_stacksize_np(SB) + RET + +TEXT _pthread_attr_getstacksize(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_attr_getstacksize(SB) + RET + +TEXT _pthread_attr_setstacksize(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_attr_setstacksize(SB) + RET + +TEXT _pthread_attr_destroy(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_attr_destroy(SB) + RET + +TEXT _pthread_mutex_lock(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_mutex_lock(SB) + RET + +TEXT _pthread_mutex_unlock(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_mutex_unlock(SB) + RET + +TEXT _pthread_cond_broadcast(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_cond_broadcast(SB) + RET + +TEXT _pthread_setspecific(SB), NOSPLIT|NOFRAME, $0-0 + JMP purego_pthread_setspecific(SB) + RET diff --git a/vendor/github.com/ebitengine/purego/internal/strings/strings.go b/vendor/github.com/ebitengine/purego/internal/strings/strings.go new file mode 100644 index 0000000000..5b0d252255 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/internal/strings/strings.go @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +package strings + +import ( + "unsafe" +) + +// hasSuffix tests whether the string s ends with suffix. +func hasSuffix(s, suffix string) bool { + return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix +} + +// CString converts a go string to *byte that can be passed to C code. +func CString(name string) *byte { + if hasSuffix(name, "\x00") { + return &(*(*[]byte)(unsafe.Pointer(&name)))[0] + } + b := make([]byte, len(name)+1) + copy(b, name) + return &b[0] +} + +// GoString copies a null-terminated char* to a Go string. +func GoString(c uintptr) string { + // We take the address and then dereference it to trick go vet from creating a possible misuse of unsafe.Pointer + ptr := *(*unsafe.Pointer)(unsafe.Pointer(&c)) + if ptr == nil { + return "" + } + var length int + for { + if *(*byte)(unsafe.Add(ptr, uintptr(length))) == '\x00' { + break + } + length++ + } + return string(unsafe.Slice((*byte)(ptr), length)) +} diff --git a/vendor/github.com/ebitengine/purego/is_ios.go b/vendor/github.com/ebitengine/purego/is_ios.go new file mode 100644 index 0000000000..ed31da9782 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/is_ios.go @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo + +package purego + +// if you are getting this error it means that you have +// CGO_ENABLED=0 while trying to build for ios. +// purego does not support this mode yet. +// the fix is to set CGO_ENABLED=1 which will require +// a C compiler. +var _ = _PUREGO_REQUIRES_CGO_ON_IOS diff --git a/vendor/github.com/ebitengine/purego/nocgo.go b/vendor/github.com/ebitengine/purego/nocgo.go new file mode 100644 index 0000000000..5b989ea814 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/nocgo.go @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build !cgo && (darwin || freebsd || linux) + +package purego + +// if CGO_ENABLED=0 import fakecgo to setup the Cgo runtime correctly. +// This is required since some frameworks need TLS setup the C way which Go doesn't do. +// We currently don't support ios in fakecgo mode so force Cgo or fail +// +// The way that the Cgo runtime (runtime/cgo) works is by setting some variables found +// in runtime with non-null GCC compiled functions. The variables that are replaced are +// var ( +// iscgo bool // in runtime/cgo.go +// _cgo_init unsafe.Pointer // in runtime/cgo.go +// _cgo_thread_start unsafe.Pointer // in runtime/cgo.go +// _cgo_notify_runtime_init_done unsafe.Pointer // in runtime/cgo.go +// _cgo_setenv unsafe.Pointer // in runtime/env_posix.go +// _cgo_unsetenv unsafe.Pointer // in runtime/env_posix.go +// ) +// importing fakecgo will set these (using //go:linkname) with functions written +// entirely in Go (except for some assembly trampolines to change GCC ABI to Go ABI). +// Doing so makes it possible to build applications that call into C without CGO_ENABLED=1. +import _ "github.com/ebitengine/purego/internal/fakecgo" diff --git a/vendor/github.com/ebitengine/purego/struct_amd64.go b/vendor/github.com/ebitengine/purego/struct_amd64.go new file mode 100644 index 0000000000..f3514c984e --- /dev/null +++ b/vendor/github.com/ebitengine/purego/struct_amd64.go @@ -0,0 +1,260 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Ebitengine Authors + +package purego + +import ( + "math" + "reflect" + "unsafe" +) + +func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) { + outSize := outType.Size() + switch { + case outSize == 0: + return reflect.New(outType).Elem() + case outSize <= 8: + if isAllFloats(outType) { + // 2 float32s or 1 float64s are return in the float register + return reflect.NewAt(outType, unsafe.Pointer(&struct{ a uintptr }{syscall.f1})).Elem() + } + // up to 8 bytes is returned in RAX + return reflect.NewAt(outType, unsafe.Pointer(&struct{ a uintptr }{syscall.a1})).Elem() + case outSize <= 16: + r1, r2 := syscall.a1, syscall.a2 + if isAllFloats(outType) { + r1 = syscall.f1 + r2 = syscall.f2 + } else { + // check first 8 bytes if it's floats + hasFirstFloat := false + f1 := outType.Field(0).Type + if f1.Kind() == reflect.Float64 || f1.Kind() == reflect.Float32 && outType.Field(1).Type.Kind() == reflect.Float32 { + r1 = syscall.f1 + hasFirstFloat = true + } + + // find index of the field that starts the second 8 bytes + var i int + for i = 0; i < outType.NumField(); i++ { + if outType.Field(i).Offset == 8 { + break + } + } + + // check last 8 bytes if they are floats + f1 = outType.Field(i).Type + if f1.Kind() == reflect.Float64 || f1.Kind() == reflect.Float32 && i+1 == outType.NumField() { + r2 = syscall.f1 + } else if hasFirstFloat { + // if the first field was a float then that means the second integer field + // comes from the first integer register + r2 = syscall.a1 + } + } + return reflect.NewAt(outType, unsafe.Pointer(&struct{ a, b uintptr }{r1, r2})).Elem() + default: + // create struct from the Go pointer created above + // weird pointer dereference to circumvent go vet + return reflect.NewAt(outType, *(*unsafe.Pointer)(unsafe.Pointer(&syscall.a1))).Elem() + } +} + +func isAllFloats(ty reflect.Type) bool { + for i := 0; i < ty.NumField(); i++ { + f := ty.Field(i) + switch f.Type.Kind() { + case reflect.Float64, reflect.Float32: + default: + return false + } + } + return true +} + +// https://refspecs.linuxbase.org/elf/x86_64-abi-0.99.pdf +// https://gitlab.com/x86-psABIs/x86-64-ABI +// Class determines where the 8 byte value goes. +// Higher value classes win over lower value classes +const ( + _NO_CLASS = 0b0000 + _SSE = 0b0001 + _X87 = 0b0011 // long double not used in Go + _INTEGER = 0b0111 + _MEMORY = 0b1111 +) + +func addStruct(v reflect.Value, numInts, numFloats, numStack *int, addInt, addFloat, addStack func(uintptr), keepAlive []interface{}) []interface{} { + if v.Type().Size() == 0 { + return keepAlive + } + + // if greater than 64 bytes place on stack + if v.Type().Size() > 8*8 { + placeStack(v, addStack) + return keepAlive + } + var ( + savedNumFloats = *numFloats + savedNumInts = *numInts + savedNumStack = *numStack + ) + placeOnStack := postMerger(v.Type()) || !tryPlaceRegister(v, addFloat, addInt) + if placeOnStack { + // reset any values placed in registers + *numFloats = savedNumFloats + *numInts = savedNumInts + *numStack = savedNumStack + placeStack(v, addStack) + } + return keepAlive +} + +func postMerger(t reflect.Type) (passInMemory bool) { + // (c) If the size of the aggregate exceeds two eightbytes and the first eight- byte isn’t SSE or any other + // eightbyte isn’t SSEUP, the whole argument is passed in memory. + if t.Kind() != reflect.Struct { + return false + } + if t.Size() <= 2*8 { + return false + } + return true // Go does not have an SSE/SEEUP type so this is always true +} + +func tryPlaceRegister(v reflect.Value, addFloat func(uintptr), addInt func(uintptr)) (ok bool) { + ok = true + var val uint64 + var shift byte // # of bits to shift + var flushed bool + class := _NO_CLASS + flushIfNeeded := func() { + if flushed { + return + } + flushed = true + if class == _SSE { + addFloat(uintptr(val)) + } else { + addInt(uintptr(val)) + } + val = 0 + shift = 0 + class = _NO_CLASS + } + var place func(v reflect.Value) + place = func(v reflect.Value) { + var numFields int + if v.Kind() == reflect.Struct { + numFields = v.Type().NumField() + } else { + numFields = v.Type().Len() + } + + for i := 0; i < numFields; i++ { + flushed = false + var f reflect.Value + if v.Kind() == reflect.Struct { + f = v.Field(i) + } else { + f = v.Index(i) + } + switch f.Kind() { + case reflect.Struct: + place(f) + case reflect.Bool: + if f.Bool() { + val |= 1 + } + shift += 8 + class |= _INTEGER + case reflect.Pointer: + ok = false + return + case reflect.Int8: + val |= uint64(f.Int()&0xFF) << shift + shift += 8 + class |= _INTEGER + case reflect.Int16: + val |= uint64(f.Int()&0xFFFF) << shift + shift += 16 + class |= _INTEGER + case reflect.Int32: + val |= uint64(f.Int()&0xFFFF_FFFF) << shift + shift += 32 + class |= _INTEGER + case reflect.Int64, reflect.Int: + val = uint64(f.Int()) + shift = 64 + class = _INTEGER + case reflect.Uint8: + val |= f.Uint() << shift + shift += 8 + class |= _INTEGER + case reflect.Uint16: + val |= f.Uint() << shift + shift += 16 + class |= _INTEGER + case reflect.Uint32: + val |= f.Uint() << shift + shift += 32 + class |= _INTEGER + case reflect.Uint64, reflect.Uint: + val = f.Uint() + shift = 64 + class = _INTEGER + case reflect.Float32: + val |= uint64(math.Float32bits(float32(f.Float()))) << shift + shift += 32 + class |= _SSE + case reflect.Float64: + if v.Type().Size() > 16 { + ok = false + return + } + val = uint64(math.Float64bits(f.Float())) + shift = 64 + class = _SSE + case reflect.Array: + place(f) + default: + panic("purego: unsupported kind " + f.Kind().String()) + } + + if shift == 64 { + flushIfNeeded() + } else if shift > 64 { + // Should never happen, but may if we forget to reset shift after flush (or forget to flush), + // better fall apart here, than corrupt arguments. + panic("purego: tryPlaceRegisters shift > 64") + } + } + } + + place(v) + flushIfNeeded() + return ok +} + +func placeStack(v reflect.Value, addStack func(uintptr)) { + for i := 0; i < v.Type().NumField(); i++ { + f := v.Field(i) + switch f.Kind() { + case reflect.Pointer: + addStack(f.Pointer()) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + addStack(uintptr(f.Int())) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + addStack(uintptr(f.Uint())) + case reflect.Float32: + addStack(uintptr(math.Float32bits(float32(f.Float())))) + case reflect.Float64: + addStack(uintptr(math.Float64bits(f.Float()))) + case reflect.Struct: + placeStack(f, addStack) + default: + panic("purego: unsupported kind " + f.Kind().String()) + } + } +} diff --git a/vendor/github.com/ebitengine/purego/struct_arm64.go b/vendor/github.com/ebitengine/purego/struct_arm64.go new file mode 100644 index 0000000000..11c36bd6e4 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/struct_arm64.go @@ -0,0 +1,274 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Ebitengine Authors + +package purego + +import ( + "math" + "reflect" + "unsafe" +) + +func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) { + outSize := outType.Size() + switch { + case outSize == 0: + return reflect.New(outType).Elem() + case outSize <= 8: + r1 := syscall.a1 + if isAllFloats, numFields := isAllSameFloat(outType); isAllFloats { + r1 = syscall.f1 + if numFields == 2 { + r1 = syscall.f2<<32 | syscall.f1 + } + } + return reflect.NewAt(outType, unsafe.Pointer(&struct{ a uintptr }{r1})).Elem() + case outSize <= 16: + r1, r2 := syscall.a1, syscall.a2 + if isAllFloats, numFields := isAllSameFloat(outType); isAllFloats { + switch numFields { + case 4: + r1 = syscall.f2<<32 | syscall.f1 + r2 = syscall.f4<<32 | syscall.f3 + case 3: + r1 = syscall.f2<<32 | syscall.f1 + r2 = syscall.f3 + case 2: + r1 = syscall.f1 + r2 = syscall.f2 + default: + panic("unreachable") + } + } + return reflect.NewAt(outType, unsafe.Pointer(&struct{ a, b uintptr }{r1, r2})).Elem() + default: + if isAllFloats, numFields := isAllSameFloat(outType); isAllFloats && numFields <= 4 { + switch numFields { + case 4: + return reflect.NewAt(outType, unsafe.Pointer(&struct{ a, b, c, d uintptr }{syscall.f1, syscall.f2, syscall.f3, syscall.f4})).Elem() + case 3: + return reflect.NewAt(outType, unsafe.Pointer(&struct{ a, b, c uintptr }{syscall.f1, syscall.f2, syscall.f3})).Elem() + default: + panic("unreachable") + } + } + // create struct from the Go pointer created in arm64_r8 + // weird pointer dereference to circumvent go vet + return reflect.NewAt(outType, *(*unsafe.Pointer)(unsafe.Pointer(&syscall.arm64_r8))).Elem() + } +} + +// https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst +const ( + _NO_CLASS = 0b00 + _FLOAT = 0b01 + _INT = 0b11 +) + +func addStruct(v reflect.Value, numInts, numFloats, numStack *int, addInt, addFloat, addStack func(uintptr), keepAlive []interface{}) []interface{} { + if v.Type().Size() == 0 { + return keepAlive + } + + if hva, hfa, size := isHVA(v.Type()), isHFA(v.Type()), v.Type().Size(); hva || hfa || size <= 16 { + // if this doesn't fit entirely in registers then + // each element goes onto the stack + if hfa && *numFloats+v.NumField() > numOfFloats { + *numFloats = numOfFloats + } else if hva && *numInts+v.NumField() > numOfIntegerRegisters() { + *numInts = numOfIntegerRegisters() + } + + placeRegisters(v, addFloat, addInt) + } else { + keepAlive = placeStack(v, keepAlive, addInt) + } + return keepAlive // the struct was allocated so don't panic +} + +func placeRegisters(v reflect.Value, addFloat func(uintptr), addInt func(uintptr)) { + var val uint64 + var shift byte + var flushed bool + class := _NO_CLASS + var place func(v reflect.Value) + place = func(v reflect.Value) { + var numFields int + if v.Kind() == reflect.Struct { + numFields = v.Type().NumField() + } else { + numFields = v.Type().Len() + } + for k := 0; k < numFields; k++ { + flushed = false + var f reflect.Value + if v.Kind() == reflect.Struct { + f = v.Field(k) + } else { + f = v.Index(k) + } + if shift >= 64 { + shift = 0 + flushed = true + if class == _FLOAT { + addFloat(uintptr(val)) + } else { + addInt(uintptr(val)) + } + } + switch f.Type().Kind() { + case reflect.Struct: + place(f) + case reflect.Bool: + if f.Bool() { + val |= 1 + } + shift += 8 + class |= _INT + case reflect.Uint8: + val |= f.Uint() << shift + shift += 8 + class |= _INT + case reflect.Uint16: + val |= f.Uint() << shift + shift += 16 + class |= _INT + case reflect.Uint32: + val |= f.Uint() << shift + shift += 32 + class |= _INT + case reflect.Uint64: + addInt(uintptr(f.Uint())) + shift = 0 + flushed = true + case reflect.Int8: + val |= uint64(f.Int()&0xFF) << shift + shift += 8 + class |= _INT + case reflect.Int16: + val |= uint64(f.Int()&0xFFFF) << shift + shift += 16 + class |= _INT + case reflect.Int32: + val |= uint64(f.Int()&0xFFFF_FFFF) << shift + shift += 32 + class |= _INT + case reflect.Int64: + addInt(uintptr(f.Int())) + shift = 0 + flushed = true + case reflect.Float32: + if class == _FLOAT { + addFloat(uintptr(val)) + val = 0 + shift = 0 + } + val |= uint64(math.Float32bits(float32(f.Float()))) << shift + shift += 32 + class |= _FLOAT + case reflect.Float64: + addFloat(uintptr(math.Float64bits(float64(f.Float())))) + shift = 0 + flushed = true + case reflect.Array: + place(f) + default: + panic("purego: unsupported kind " + f.Kind().String()) + } + } + } + place(v) + if !flushed { + if class == _FLOAT { + addFloat(uintptr(val)) + } else { + addInt(uintptr(val)) + } + } +} + +func placeStack(v reflect.Value, keepAlive []interface{}, addInt func(uintptr)) []interface{} { + // Struct is too big to be placed in registers. + // Copy to heap and place the pointer in register + ptrStruct := reflect.New(v.Type()) + ptrStruct.Elem().Set(v) + ptr := ptrStruct.Elem().Addr().UnsafePointer() + keepAlive = append(keepAlive, ptr) + addInt(uintptr(ptr)) + return keepAlive +} + +// isHFA reports a Homogeneous Floating-point Aggregate (HFA) which is a Fundamental Data Type that is a +// Floating-Point type and at most four uniquely addressable members (5.9.5.1 in [Arm64 Calling Convention]). +// This type of struct will be placed more compactly than the individual fields. +// +// [Arm64 Calling Convention]: https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst +func isHFA(t reflect.Type) bool { + // round up struct size to nearest 8 see section B.4 + structSize := roundUpTo8(t.Size()) + if structSize == 0 || t.NumField() > 4 { + return false + } + first := t.Field(0) + switch first.Type.Kind() { + case reflect.Float32, reflect.Float64: + firstKind := first.Type.Kind() + for i := 0; i < t.NumField(); i++ { + if t.Field(i).Type.Kind() != firstKind { + return false + } + } + return true + case reflect.Array: + switch first.Type.Elem().Kind() { + case reflect.Float32, reflect.Float64: + return true + default: + return false + } + case reflect.Struct: + for i := 0; i < first.Type.NumField(); i++ { + if !isHFA(first.Type) { + return false + } + } + return true + default: + return false + } +} + +// isHVA reports a Homogeneous Aggregate with a Fundamental Data Type that is a Short-Vector type +// and at most four uniquely addressable members (5.9.5.2 in [Arm64 Calling Convention]). +// A short vector is a machine type that is composed of repeated instances of one fundamental integral or +// floating-point type. It may be 8 or 16 bytes in total size (5.4 in [Arm64 Calling Convention]). +// This type of struct will be placed more compactly than the individual fields. +// +// [Arm64 Calling Convention]: https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst +func isHVA(t reflect.Type) bool { + // round up struct size to nearest 8 see section B.4 + structSize := roundUpTo8(t.Size()) + if structSize == 0 || (structSize != 8 && structSize != 16) { + return false + } + first := t.Field(0) + switch first.Type.Kind() { + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Int8, reflect.Int16, reflect.Int32: + firstKind := first.Type.Kind() + for i := 0; i < t.NumField(); i++ { + if t.Field(i).Type.Kind() != firstKind { + return false + } + } + return true + case reflect.Array: + switch first.Type.Elem().Kind() { + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Int8, reflect.Int16, reflect.Int32: + return true + default: + return false + } + default: + return false + } +} diff --git a/vendor/github.com/ebitengine/purego/struct_other.go b/vendor/github.com/ebitengine/purego/struct_other.go new file mode 100644 index 0000000000..9d42adac89 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/struct_other.go @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Ebitengine Authors + +//go:build !amd64 && !arm64 + +package purego + +import "reflect" + +func addStruct(v reflect.Value, numInts, numFloats, numStack *int, addInt, addFloat, addStack func(uintptr), keepAlive []interface{}) []interface{} { + panic("purego: struct arguments are not supported") +} + +func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) { + panic("purego: struct returns are not supported") +} diff --git a/vendor/github.com/ebitengine/purego/sys_amd64.s b/vendor/github.com/ebitengine/purego/sys_amd64.s new file mode 100644 index 0000000000..cabde1a584 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/sys_amd64.s @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build darwin || freebsd || linux + +#include "textflag.h" +#include "abi_amd64.h" +#include "go_asm.h" +#include "funcdata.h" + +#define STACK_SIZE 80 +#define PTR_ADDRESS (STACK_SIZE - 8) + +// syscall15X calls a function in libc on behalf of the syscall package. +// syscall15X takes a pointer to a struct like: +// struct { +// fn uintptr +// a1 uintptr +// a2 uintptr +// a3 uintptr +// a4 uintptr +// a5 uintptr +// a6 uintptr +// a7 uintptr +// a8 uintptr +// a9 uintptr +// a10 uintptr +// a11 uintptr +// a12 uintptr +// a13 uintptr +// a14 uintptr +// a15 uintptr +// r1 uintptr +// r2 uintptr +// err uintptr +// } +// syscall15X must be called on the g0 stack with the +// C calling convention (use libcCall). +GLOBL ·syscall15XABI0(SB), NOPTR|RODATA, $8 +DATA ·syscall15XABI0(SB)/8, $syscall15X(SB) +TEXT syscall15X(SB), NOSPLIT|NOFRAME, $0 + PUSHQ BP + MOVQ SP, BP + SUBQ $STACK_SIZE, SP + MOVQ DI, PTR_ADDRESS(BP) // save the pointer + MOVQ DI, R11 + + MOVQ syscall15Args_f1(R11), X0 // f1 + MOVQ syscall15Args_f2(R11), X1 // f2 + MOVQ syscall15Args_f3(R11), X2 // f3 + MOVQ syscall15Args_f4(R11), X3 // f4 + MOVQ syscall15Args_f5(R11), X4 // f5 + MOVQ syscall15Args_f6(R11), X5 // f6 + MOVQ syscall15Args_f7(R11), X6 // f7 + MOVQ syscall15Args_f8(R11), X7 // f8 + + MOVQ syscall15Args_a1(R11), DI // a1 + MOVQ syscall15Args_a2(R11), SI // a2 + MOVQ syscall15Args_a3(R11), DX // a3 + MOVQ syscall15Args_a4(R11), CX // a4 + MOVQ syscall15Args_a5(R11), R8 // a5 + MOVQ syscall15Args_a6(R11), R9 // a6 + + // push the remaining paramters onto the stack + MOVQ syscall15Args_a7(R11), R12 + MOVQ R12, 0(SP) // push a7 + MOVQ syscall15Args_a8(R11), R12 + MOVQ R12, 8(SP) // push a8 + MOVQ syscall15Args_a9(R11), R12 + MOVQ R12, 16(SP) // push a9 + MOVQ syscall15Args_a10(R11), R12 + MOVQ R12, 24(SP) // push a10 + MOVQ syscall15Args_a11(R11), R12 + MOVQ R12, 32(SP) // push a11 + MOVQ syscall15Args_a12(R11), R12 + MOVQ R12, 40(SP) // push a12 + MOVQ syscall15Args_a13(R11), R12 + MOVQ R12, 48(SP) // push a13 + MOVQ syscall15Args_a14(R11), R12 + MOVQ R12, 56(SP) // push a14 + MOVQ syscall15Args_a15(R11), R12 + MOVQ R12, 64(SP) // push a15 + XORL AX, AX // vararg: say "no float args" + + MOVQ syscall15Args_fn(R11), R10 // fn + CALL R10 + + MOVQ PTR_ADDRESS(BP), DI // get the pointer back + MOVQ AX, syscall15Args_a1(DI) // r1 + MOVQ DX, syscall15Args_a2(DI) // r3 + MOVQ X0, syscall15Args_f1(DI) // f1 + MOVQ X1, syscall15Args_f2(DI) // f2 + + XORL AX, AX // no error (it's ignored anyway) + ADDQ $STACK_SIZE, SP + MOVQ BP, SP + POPQ BP + RET + +TEXT callbackasm1(SB), NOSPLIT|NOFRAME, $0 + MOVQ 0(SP), AX // save the return address to calculate the cb index + MOVQ 8(SP), R10 // get the return SP so that we can align register args with stack args + ADDQ $8, SP // remove return address from stack, we are not returning to callbackasm, but to its caller. + + // make space for first six int and 8 float arguments below the frame + ADJSP $14*8, SP + MOVSD X0, (1*8)(SP) + MOVSD X1, (2*8)(SP) + MOVSD X2, (3*8)(SP) + MOVSD X3, (4*8)(SP) + MOVSD X4, (5*8)(SP) + MOVSD X5, (6*8)(SP) + MOVSD X6, (7*8)(SP) + MOVSD X7, (8*8)(SP) + MOVQ DI, (9*8)(SP) + MOVQ SI, (10*8)(SP) + MOVQ DX, (11*8)(SP) + MOVQ CX, (12*8)(SP) + MOVQ R8, (13*8)(SP) + MOVQ R9, (14*8)(SP) + LEAQ 8(SP), R8 // R8 = address of args vector + + PUSHQ R10 // push the stack pointer below registers + + // Switch from the host ABI to the Go ABI. + PUSH_REGS_HOST_TO_ABI0() + + // determine index into runtime·cbs table + MOVQ $callbackasm(SB), DX + SUBQ DX, AX + MOVQ $0, DX + MOVQ $5, CX // divide by 5 because each call instruction in ·callbacks is 5 bytes long + DIVL CX + SUBQ $1, AX // subtract 1 because return PC is to the next slot + + // Create a struct callbackArgs on our stack to be passed as + // the "frame" to cgocallback and on to callbackWrap. + // $24 to make enough room for the arguments to runtime.cgocallback + SUBQ $(24+callbackArgs__size), SP + MOVQ AX, (24+callbackArgs_index)(SP) // callback index + MOVQ R8, (24+callbackArgs_args)(SP) // address of args vector + MOVQ $0, (24+callbackArgs_result)(SP) // result + LEAQ 24(SP), AX // take the address of callbackArgs + + // Call cgocallback, which will call callbackWrap(frame). + MOVQ ·callbackWrap_call(SB), DI // Get the ABIInternal function pointer + MOVQ (DI), DI // without by using a closure. + MOVQ AX, SI // frame (address of callbackArgs) + MOVQ $0, CX // context + + CALL crosscall2(SB) // runtime.cgocallback(fn, frame, ctxt uintptr) + + // Get callback result. + MOVQ (24+callbackArgs_result)(SP), AX + ADDQ $(24+callbackArgs__size), SP // remove callbackArgs struct + + POP_REGS_HOST_TO_ABI0() + + POPQ R10 // get the SP back + ADJSP $-14*8, SP // remove arguments + + MOVQ R10, 0(SP) + + RET diff --git a/vendor/github.com/ebitengine/purego/sys_arm64.s b/vendor/github.com/ebitengine/purego/sys_arm64.s new file mode 100644 index 0000000000..a68fdb99ba --- /dev/null +++ b/vendor/github.com/ebitengine/purego/sys_arm64.s @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build darwin || freebsd || linux || windows + +#include "textflag.h" +#include "go_asm.h" +#include "funcdata.h" + +#define STACK_SIZE 64 +#define PTR_ADDRESS (STACK_SIZE - 8) + +// syscall15X calls a function in libc on behalf of the syscall package. +// syscall15X takes a pointer to a struct like: +// struct { +// fn uintptr +// a1 uintptr +// a2 uintptr +// a3 uintptr +// a4 uintptr +// a5 uintptr +// a6 uintptr +// a7 uintptr +// a8 uintptr +// a9 uintptr +// a10 uintptr +// a11 uintptr +// a12 uintptr +// a13 uintptr +// a14 uintptr +// a15 uintptr +// r1 uintptr +// r2 uintptr +// err uintptr +// } +// syscall15X must be called on the g0 stack with the +// C calling convention (use libcCall). +GLOBL ·syscall15XABI0(SB), NOPTR|RODATA, $8 +DATA ·syscall15XABI0(SB)/8, $syscall15X(SB) +TEXT syscall15X(SB), NOSPLIT, $0 + SUB $STACK_SIZE, RSP // push structure pointer + MOVD R0, PTR_ADDRESS(RSP) + MOVD R0, R9 + + FMOVD syscall15Args_f1(R9), F0 // f1 + FMOVD syscall15Args_f2(R9), F1 // f2 + FMOVD syscall15Args_f3(R9), F2 // f3 + FMOVD syscall15Args_f4(R9), F3 // f4 + FMOVD syscall15Args_f5(R9), F4 // f5 + FMOVD syscall15Args_f6(R9), F5 // f6 + FMOVD syscall15Args_f7(R9), F6 // f7 + FMOVD syscall15Args_f8(R9), F7 // f8 + + MOVD syscall15Args_a1(R9), R0 // a1 + MOVD syscall15Args_a2(R9), R1 // a2 + MOVD syscall15Args_a3(R9), R2 // a3 + MOVD syscall15Args_a4(R9), R3 // a4 + MOVD syscall15Args_a5(R9), R4 // a5 + MOVD syscall15Args_a6(R9), R5 // a6 + MOVD syscall15Args_a7(R9), R6 // a7 + MOVD syscall15Args_a8(R9), R7 // a8 + MOVD syscall15Args_arm64_r8(R9), R8 // r8 + + MOVD syscall15Args_a9(R9), R10 + MOVD R10, 0(RSP) // push a9 onto stack + MOVD syscall15Args_a10(R9), R10 + MOVD R10, 8(RSP) // push a10 onto stack + MOVD syscall15Args_a11(R9), R10 + MOVD R10, 16(RSP) // push a11 onto stack + MOVD syscall15Args_a12(R9), R10 + MOVD R10, 24(RSP) // push a12 onto stack + MOVD syscall15Args_a13(R9), R10 + MOVD R10, 32(RSP) // push a13 onto stack + MOVD syscall15Args_a14(R9), R10 + MOVD R10, 40(RSP) // push a14 onto stack + MOVD syscall15Args_a15(R9), R10 + MOVD R10, 48(RSP) // push a15 onto stack + + MOVD syscall15Args_fn(R9), R10 // fn + BL (R10) + + MOVD PTR_ADDRESS(RSP), R2 // pop structure pointer + ADD $STACK_SIZE, RSP + + MOVD R0, syscall15Args_a1(R2) // save r1 + MOVD R1, syscall15Args_a2(R2) // save r3 + FMOVD F0, syscall15Args_f1(R2) // save f0 + FMOVD F1, syscall15Args_f2(R2) // save f1 + FMOVD F2, syscall15Args_f3(R2) // save f2 + FMOVD F3, syscall15Args_f4(R2) // save f3 + + RET diff --git a/vendor/github.com/ebitengine/purego/sys_unix_arm64.s b/vendor/github.com/ebitengine/purego/sys_unix_arm64.s new file mode 100644 index 0000000000..6da06b4d18 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/sys_unix_arm64.s @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Ebitengine Authors + +//go:build darwin || freebsd || linux + +#include "textflag.h" +#include "go_asm.h" +#include "funcdata.h" +#include "abi_arm64.h" + +TEXT callbackasm1(SB), NOSPLIT|NOFRAME, $0 + NO_LOCAL_POINTERS + + // On entry, the trampoline in zcallback_darwin_arm64.s left + // the callback index in R12 (which is volatile in the C ABI). + + // Save callback register arguments R0-R7 and F0-F7. + // We do this at the top of the frame so they're contiguous with stack arguments. + SUB $(16*8), RSP, R14 + FSTPD (F0, F1), (0*8)(R14) + FSTPD (F2, F3), (2*8)(R14) + FSTPD (F4, F5), (4*8)(R14) + FSTPD (F6, F7), (6*8)(R14) + STP (R0, R1), (8*8)(R14) + STP (R2, R3), (10*8)(R14) + STP (R4, R5), (12*8)(R14) + STP (R6, R7), (14*8)(R14) + + // Adjust SP by frame size. + SUB $(26*8), RSP + + // It is important to save R27 because the go assembler + // uses it for move instructions for a variable. + // This line: + // MOVD ·callbackWrap_call(SB), R0 + // Creates the instructions: + // ADRP 14335(PC), R27 + // MOVD 388(27), R0 + // R27 is a callee saved register so we are responsible + // for ensuring its value doesn't change. So save it and + // restore it at the end of this function. + // R30 is the link register. crosscall2 doesn't save it + // so it's saved here. + STP (R27, R30), 0(RSP) + + // Create a struct callbackArgs on our stack. + MOVD $(callbackArgs__size)(RSP), R13 + MOVD R12, callbackArgs_index(R13) // callback index + MOVD R14, callbackArgs_args(R13) // address of args vector + MOVD ZR, callbackArgs_result(R13) // result + + // Move parameters into registers + // Get the ABIInternal function pointer + // without by using a closure. + MOVD ·callbackWrap_call(SB), R0 + MOVD (R0), R0 // fn unsafe.Pointer + MOVD R13, R1 // frame (&callbackArgs{...}) + MOVD $0, R3 // ctxt uintptr + + BL crosscall2(SB) + + // Get callback result. + MOVD $(callbackArgs__size)(RSP), R13 + MOVD callbackArgs_result(R13), R0 + + // Restore LR and R27 + LDP 0(RSP), (R27, R30) + ADD $(26*8), RSP + + RET diff --git a/vendor/github.com/ebitengine/purego/syscall.go b/vendor/github.com/ebitengine/purego/syscall.go new file mode 100644 index 0000000000..c30688dda1 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/syscall.go @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build darwin || freebsd || linux || windows + +package purego + +// CDecl marks a function as being called using the __cdecl calling convention as defined in +// the [MSDocs] when passed to NewCallback. It must be the first argument to the function. +// This is only useful on 386 Windows, but it is safe to use on other platforms. +// +// [MSDocs]: https://learn.microsoft.com/en-us/cpp/cpp/cdecl?view=msvc-170 +type CDecl struct{} + +const ( + maxArgs = 15 + numOfFloats = 8 // arm64 and amd64 both have 8 float registers +) + +type syscall15Args struct { + fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr + f1, f2, f3, f4, f5, f6, f7, f8 uintptr + arm64_r8 uintptr +} + +// SyscallN takes fn, a C function pointer and a list of arguments as uintptr. +// There is an internal maximum number of arguments that SyscallN can take. It panics +// when the maximum is exceeded. It returns the result and the libc error code if there is one. +// +// NOTE: SyscallN does not properly call functions that have both integer and float parameters. +// See discussion comment https://github.com/ebiten/purego/pull/1#issuecomment-1128057607 +// for an explanation of why that is. +// +// On amd64, if there are more than 8 floats the 9th and so on will be placed incorrectly on the +// stack. +// +// The pragma go:nosplit is not needed at this function declaration because it uses go:uintptrescapes +// which forces all the objects that the uintptrs point to onto the heap where a stack split won't affect +// their memory location. +// +//go:uintptrescapes +func SyscallN(fn uintptr, args ...uintptr) (r1, r2, err uintptr) { + if fn == 0 { + panic("purego: fn is nil") + } + if len(args) > maxArgs { + panic("purego: too many arguments to SyscallN") + } + // add padding so there is no out-of-bounds slicing + var tmp [maxArgs]uintptr + copy(tmp[:], args) + return syscall_syscall15X(fn, tmp[0], tmp[1], tmp[2], tmp[3], tmp[4], tmp[5], tmp[6], tmp[7], tmp[8], tmp[9], tmp[10], tmp[11], tmp[12], tmp[13], tmp[14]) +} diff --git a/vendor/github.com/ebitengine/purego/syscall_cgo_linux.go b/vendor/github.com/ebitengine/purego/syscall_cgo_linux.go new file mode 100644 index 0000000000..36ee14e3b7 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/syscall_cgo_linux.go @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build cgo && !(amd64 || arm64) + +package purego + +import ( + "github.com/ebitengine/purego/internal/cgo" +) + +var syscall15XABI0 = uintptr(cgo.Syscall15XABI0) + +//go:nosplit +func syscall_syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) { + return cgo.Syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) +} + +func NewCallback(_ interface{}) uintptr { + panic("purego: NewCallback on Linux is only supported on amd64/arm64") +} diff --git a/vendor/github.com/ebitengine/purego/syscall_sysv.go b/vendor/github.com/ebitengine/purego/syscall_sysv.go new file mode 100644 index 0000000000..cce171c8f6 --- /dev/null +++ b/vendor/github.com/ebitengine/purego/syscall_sysv.go @@ -0,0 +1,223 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +//go:build darwin || freebsd || (linux && (amd64 || arm64)) + +package purego + +import ( + "reflect" + "runtime" + "sync" + "unsafe" +) + +var syscall15XABI0 uintptr + +//go:nosplit +func syscall_syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) { + args := syscall15Args{ + fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, + a1, a2, a3, a4, a5, a6, a7, a8, + 0, + } + runtime_cgocall(syscall15XABI0, unsafe.Pointer(&args)) + return args.a1, args.a2, 0 +} + +// NewCallback converts a Go function to a function pointer conforming to the C calling convention. +// This is useful when interoperating with C code requiring callbacks. The argument is expected to be a +// function with zero or one uintptr-sized result. The function must not have arguments with size larger than the size +// of uintptr. Only a limited number of callbacks may be created in a single Go process, and any memory allocated +// for these callbacks is never released. At least 2000 callbacks can always be created. Although this function +// provides similar functionality to windows.NewCallback it is distinct. +func NewCallback(fn interface{}) uintptr { + ty := reflect.TypeOf(fn) + for i := 0; i < ty.NumIn(); i++ { + in := ty.In(i) + if !in.AssignableTo(reflect.TypeOf(CDecl{})) { + continue + } + if i != 0 { + panic("purego: CDecl must be the first argument") + } + } + return compileCallback(fn) +} + +// maxCb is the maximum number of callbacks +// only increase this if you have added more to the callbackasm function +const maxCB = 2000 + +var cbs struct { + lock sync.Mutex + numFn int // the number of functions currently in cbs.funcs + funcs [maxCB]reflect.Value // the saved callbacks +} + +type callbackArgs struct { + index uintptr + // args points to the argument block. + // + // The structure of the arguments goes + // float registers followed by the + // integer registers followed by the stack. + // + // This variable is treated as a continuous + // block of memory containing all of the arguments + // for this callback. + args unsafe.Pointer + // Below are out-args from callbackWrap + result uintptr +} + +func compileCallback(fn interface{}) uintptr { + val := reflect.ValueOf(fn) + if val.Kind() != reflect.Func { + panic("purego: the type must be a function but was not") + } + if val.IsNil() { + panic("purego: function must not be nil") + } + ty := val.Type() + for i := 0; i < ty.NumIn(); i++ { + in := ty.In(i) + switch in.Kind() { + case reflect.Struct: + if i == 0 && in.AssignableTo(reflect.TypeOf(CDecl{})) { + continue + } + fallthrough + case reflect.Interface, reflect.Func, reflect.Slice, + reflect.Chan, reflect.Complex64, reflect.Complex128, + reflect.String, reflect.Map, reflect.Invalid: + panic("purego: unsupported argument type: " + in.Kind().String()) + } + } +output: + switch { + case ty.NumOut() == 1: + switch ty.Out(0).Kind() { + case reflect.Pointer, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, + reflect.Bool, reflect.UnsafePointer: + break output + } + panic("purego: unsupported return type: " + ty.String()) + case ty.NumOut() > 1: + panic("purego: callbacks can only have one return") + } + cbs.lock.Lock() + defer cbs.lock.Unlock() + if cbs.numFn >= maxCB { + panic("purego: the maximum number of callbacks has been reached") + } + cbs.funcs[cbs.numFn] = val + cbs.numFn++ + return callbackasmAddr(cbs.numFn - 1) +} + +const ptrSize = unsafe.Sizeof((*int)(nil)) + +const callbackMaxFrame = 64 * ptrSize + +// callbackasm is implemented in zcallback_GOOS_GOARCH.s +// +//go:linkname __callbackasm callbackasm +var __callbackasm byte +var callbackasmABI0 = uintptr(unsafe.Pointer(&__callbackasm)) + +// callbackWrap_call allows the calling of the ABIInternal wrapper +// which is required for runtime.cgocallback without the +// tag which is only allowed in the runtime. +// This closure is used inside sys_darwin_GOARCH.s +var callbackWrap_call = callbackWrap + +// callbackWrap is called by assembly code which determines which Go function to call. +// This function takes the arguments and passes them to the Go function and returns the result. +func callbackWrap(a *callbackArgs) { + cbs.lock.Lock() + fn := cbs.funcs[a.index] + cbs.lock.Unlock() + fnType := fn.Type() + args := make([]reflect.Value, fnType.NumIn()) + frame := (*[callbackMaxFrame]uintptr)(a.args) + var floatsN int // floatsN represents the number of float arguments processed + var intsN int // intsN represents the number of integer arguments processed + // stack points to the index into frame of the current stack element. + // The stack begins after the float and integer registers. + stack := numOfIntegerRegisters() + numOfFloats + for i := range args { + var pos int + switch fnType.In(i).Kind() { + case reflect.Float32, reflect.Float64: + if floatsN >= numOfFloats { + pos = stack + stack++ + } else { + pos = floatsN + } + floatsN++ + case reflect.Struct: + // This is the CDecl field + args[i] = reflect.Zero(fnType.In(i)) + continue + default: + + if intsN >= numOfIntegerRegisters() { + pos = stack + stack++ + } else { + // the integers begin after the floats in frame + pos = intsN + numOfFloats + } + intsN++ + } + args[i] = reflect.NewAt(fnType.In(i), unsafe.Pointer(&frame[pos])).Elem() + } + ret := fn.Call(args) + if len(ret) > 0 { + switch k := ret[0].Kind(); k { + case reflect.Uint, reflect.Uint64, reflect.Uint32, reflect.Uint16, reflect.Uint8, reflect.Uintptr: + a.result = uintptr(ret[0].Uint()) + case reflect.Int, reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8: + a.result = uintptr(ret[0].Int()) + case reflect.Bool: + if ret[0].Bool() { + a.result = 1 + } else { + a.result = 0 + } + case reflect.Pointer: + a.result = ret[0].Pointer() + case reflect.UnsafePointer: + a.result = ret[0].Pointer() + default: + panic("purego: unsupported kind: " + k.String()) + } + } +} + +// callbackasmAddr returns address of runtime.callbackasm +// function adjusted by i. +// On x86 and amd64, runtime.callbackasm is a series of CALL instructions, +// and we want callback to arrive at +// correspondent call instruction instead of start of +// runtime.callbackasm. +// On ARM, runtime.callbackasm is a series of mov and branch instructions. +// R12 is loaded with the callback index. Each entry is two instructions, +// hence 8 bytes. +func callbackasmAddr(i int) uintptr { + var entrySize int + switch runtime.GOARCH { + default: + panic("purego: unsupported architecture") + case "386", "amd64": + entrySize = 5 + case "arm", "arm64": + // On ARM and ARM64, each entry is a MOV instruction + // followed by a branch instruction + entrySize = 8 + } + return callbackasmABI0 + uintptr(i*entrySize) +} diff --git a/vendor/github.com/ebitengine/purego/syscall_windows.go b/vendor/github.com/ebitengine/purego/syscall_windows.go new file mode 100644 index 0000000000..5fbfcabfdc --- /dev/null +++ b/vendor/github.com/ebitengine/purego/syscall_windows.go @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Ebitengine Authors + +package purego + +import ( + "reflect" + "syscall" +) + +var syscall15XABI0 uintptr + +func syscall_syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) { + r1, r2, errno := syscall.Syscall15(fn, 15, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) + return r1, r2, uintptr(errno) +} + +// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention. +// This is useful when interoperating with Windows code requiring callbacks. The argument is expected to be a +// function with one uintptr-sized result. The function must not have arguments with size larger than the +// size of uintptr. Only a limited number of callbacks may be created in a single Go process, and any memory +// allocated for these callbacks is never released. Between NewCallback and NewCallbackCDecl, at least 1024 +// callbacks can always be created. Although this function is similiar to the darwin version it may act +// differently. +func NewCallback(fn interface{}) uintptr { + isCDecl := false + ty := reflect.TypeOf(fn) + for i := 0; i < ty.NumIn(); i++ { + in := ty.In(i) + if !in.AssignableTo(reflect.TypeOf(CDecl{})) { + continue + } + if i != 0 { + panic("purego: CDecl must be the first argument") + } + isCDecl = true + } + if isCDecl { + return syscall.NewCallbackCDecl(fn) + } + return syscall.NewCallback(fn) +} + +func loadSymbol(handle uintptr, name string) (uintptr, error) { + return syscall.GetProcAddress(syscall.Handle(handle), name) +} diff --git a/vendor/github.com/ebitengine/purego/zcallback_amd64.s b/vendor/github.com/ebitengine/purego/zcallback_amd64.s new file mode 100644 index 0000000000..6a778bfcad --- /dev/null +++ b/vendor/github.com/ebitengine/purego/zcallback_amd64.s @@ -0,0 +1,2014 @@ +// Code generated by wincallback.go using 'go generate'. DO NOT EDIT. + +//go:build darwin || freebsd || linux + +// runtime·callbackasm is called by external code to +// execute Go implemented callback function. It is not +// called from the start, instead runtime·compilecallback +// always returns address into runtime·callbackasm offset +// appropriately so different callbacks start with different +// CALL instruction in runtime·callbackasm. This determines +// which Go callback function is executed later on. +#include "textflag.h" + +TEXT callbackasm(SB), NOSPLIT|NOFRAME, $0 + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) + CALL callbackasm1(SB) diff --git a/vendor/github.com/ebitengine/purego/zcallback_arm64.s b/vendor/github.com/ebitengine/purego/zcallback_arm64.s new file mode 100644 index 0000000000..c079b8038e --- /dev/null +++ b/vendor/github.com/ebitengine/purego/zcallback_arm64.s @@ -0,0 +1,4014 @@ +// Code generated by wincallback.go using 'go generate'. DO NOT EDIT. + +//go:build darwin || freebsd || linux + +// External code calls into callbackasm at an offset corresponding +// to the callback index. Callbackasm is a table of MOV and B instructions. +// The MOV instruction loads R12 with the callback index, and the +// B instruction branches to callbackasm1. +// callbackasm1 takes the callback index from R12 and +// indexes into an array that stores information about each callback. +// It then calls the Go implementation for that callback. +#include "textflag.h" + +TEXT callbackasm(SB), NOSPLIT|NOFRAME, $0 + MOVD $0, R12 + B callbackasm1(SB) + MOVD $1, R12 + B callbackasm1(SB) + MOVD $2, R12 + B callbackasm1(SB) + MOVD $3, R12 + B callbackasm1(SB) + MOVD $4, R12 + B callbackasm1(SB) + MOVD $5, R12 + B callbackasm1(SB) + MOVD $6, R12 + B callbackasm1(SB) + MOVD $7, R12 + B callbackasm1(SB) + MOVD $8, R12 + B callbackasm1(SB) + MOVD $9, R12 + B callbackasm1(SB) + MOVD $10, R12 + B callbackasm1(SB) + MOVD $11, R12 + B callbackasm1(SB) + MOVD $12, R12 + B callbackasm1(SB) + MOVD $13, R12 + B callbackasm1(SB) + MOVD $14, R12 + B callbackasm1(SB) + MOVD $15, R12 + B callbackasm1(SB) + MOVD $16, R12 + B callbackasm1(SB) + MOVD $17, R12 + B callbackasm1(SB) + MOVD $18, R12 + B callbackasm1(SB) + MOVD $19, R12 + B callbackasm1(SB) + MOVD $20, R12 + B callbackasm1(SB) + MOVD $21, R12 + B callbackasm1(SB) + MOVD $22, R12 + B callbackasm1(SB) + MOVD $23, R12 + B callbackasm1(SB) + MOVD $24, R12 + B callbackasm1(SB) + MOVD $25, R12 + B callbackasm1(SB) + MOVD $26, R12 + B callbackasm1(SB) + MOVD $27, R12 + B callbackasm1(SB) + MOVD $28, R12 + B callbackasm1(SB) + MOVD $29, R12 + B callbackasm1(SB) + MOVD $30, R12 + B callbackasm1(SB) + MOVD $31, R12 + B callbackasm1(SB) + MOVD $32, R12 + B callbackasm1(SB) + MOVD $33, R12 + B callbackasm1(SB) + MOVD $34, R12 + B callbackasm1(SB) + MOVD $35, R12 + B callbackasm1(SB) + MOVD $36, R12 + B callbackasm1(SB) + MOVD $37, R12 + B callbackasm1(SB) + MOVD $38, R12 + B callbackasm1(SB) + MOVD $39, R12 + B callbackasm1(SB) + MOVD $40, R12 + B callbackasm1(SB) + MOVD $41, R12 + B callbackasm1(SB) + MOVD $42, R12 + B callbackasm1(SB) + MOVD $43, R12 + B callbackasm1(SB) + MOVD $44, R12 + B callbackasm1(SB) + MOVD $45, R12 + B callbackasm1(SB) + MOVD $46, R12 + B callbackasm1(SB) + MOVD $47, R12 + B callbackasm1(SB) + MOVD $48, R12 + B callbackasm1(SB) + MOVD $49, R12 + B callbackasm1(SB) + MOVD $50, R12 + B callbackasm1(SB) + MOVD $51, R12 + B callbackasm1(SB) + MOVD $52, R12 + B callbackasm1(SB) + MOVD $53, R12 + B callbackasm1(SB) + MOVD $54, R12 + B callbackasm1(SB) + MOVD $55, R12 + B callbackasm1(SB) + MOVD $56, R12 + B callbackasm1(SB) + MOVD $57, R12 + B callbackasm1(SB) + MOVD $58, R12 + B callbackasm1(SB) + MOVD $59, R12 + B callbackasm1(SB) + MOVD $60, R12 + B callbackasm1(SB) + MOVD $61, R12 + B callbackasm1(SB) + MOVD $62, R12 + B callbackasm1(SB) + MOVD $63, R12 + B callbackasm1(SB) + MOVD $64, R12 + B callbackasm1(SB) + MOVD $65, R12 + B callbackasm1(SB) + MOVD $66, R12 + B callbackasm1(SB) + MOVD $67, R12 + B callbackasm1(SB) + MOVD $68, R12 + B callbackasm1(SB) + MOVD $69, R12 + B callbackasm1(SB) + MOVD $70, R12 + B callbackasm1(SB) + MOVD $71, R12 + B callbackasm1(SB) + MOVD $72, R12 + B callbackasm1(SB) + MOVD $73, R12 + B callbackasm1(SB) + MOVD $74, R12 + B callbackasm1(SB) + MOVD $75, R12 + B callbackasm1(SB) + MOVD $76, R12 + B callbackasm1(SB) + MOVD $77, R12 + B callbackasm1(SB) + MOVD $78, R12 + B callbackasm1(SB) + MOVD $79, R12 + B callbackasm1(SB) + MOVD $80, R12 + B callbackasm1(SB) + MOVD $81, R12 + B callbackasm1(SB) + MOVD $82, R12 + B callbackasm1(SB) + MOVD $83, R12 + B callbackasm1(SB) + MOVD $84, R12 + B callbackasm1(SB) + MOVD $85, R12 + B callbackasm1(SB) + MOVD $86, R12 + B callbackasm1(SB) + MOVD $87, R12 + B callbackasm1(SB) + MOVD $88, R12 + B callbackasm1(SB) + MOVD $89, R12 + B callbackasm1(SB) + MOVD $90, R12 + B callbackasm1(SB) + MOVD $91, R12 + B callbackasm1(SB) + MOVD $92, R12 + B callbackasm1(SB) + MOVD $93, R12 + B callbackasm1(SB) + MOVD $94, R12 + B callbackasm1(SB) + MOVD $95, R12 + B callbackasm1(SB) + MOVD $96, R12 + B callbackasm1(SB) + MOVD $97, R12 + B callbackasm1(SB) + MOVD $98, R12 + B callbackasm1(SB) + MOVD $99, R12 + B callbackasm1(SB) + MOVD $100, R12 + B callbackasm1(SB) + MOVD $101, R12 + B callbackasm1(SB) + MOVD $102, R12 + B callbackasm1(SB) + MOVD $103, R12 + B callbackasm1(SB) + MOVD $104, R12 + B callbackasm1(SB) + MOVD $105, R12 + B callbackasm1(SB) + MOVD $106, R12 + B callbackasm1(SB) + MOVD $107, R12 + B callbackasm1(SB) + MOVD $108, R12 + B callbackasm1(SB) + MOVD $109, R12 + B callbackasm1(SB) + MOVD $110, R12 + B callbackasm1(SB) + MOVD $111, R12 + B callbackasm1(SB) + MOVD $112, R12 + B callbackasm1(SB) + MOVD $113, R12 + B callbackasm1(SB) + MOVD $114, R12 + B callbackasm1(SB) + MOVD $115, R12 + B callbackasm1(SB) + MOVD $116, R12 + B callbackasm1(SB) + MOVD $117, R12 + B callbackasm1(SB) + MOVD $118, R12 + B callbackasm1(SB) + MOVD $119, R12 + B callbackasm1(SB) + MOVD $120, R12 + B callbackasm1(SB) + MOVD $121, R12 + B callbackasm1(SB) + MOVD $122, R12 + B callbackasm1(SB) + MOVD $123, R12 + B callbackasm1(SB) + MOVD $124, R12 + B callbackasm1(SB) + MOVD $125, R12 + B callbackasm1(SB) + MOVD $126, R12 + B callbackasm1(SB) + MOVD $127, R12 + B callbackasm1(SB) + MOVD $128, R12 + B callbackasm1(SB) + MOVD $129, R12 + B callbackasm1(SB) + MOVD $130, R12 + B callbackasm1(SB) + MOVD $131, R12 + B callbackasm1(SB) + MOVD $132, R12 + B callbackasm1(SB) + MOVD $133, R12 + B callbackasm1(SB) + MOVD $134, R12 + B callbackasm1(SB) + MOVD $135, R12 + B callbackasm1(SB) + MOVD $136, R12 + B callbackasm1(SB) + MOVD $137, R12 + B callbackasm1(SB) + MOVD $138, R12 + B callbackasm1(SB) + MOVD $139, R12 + B callbackasm1(SB) + MOVD $140, R12 + B callbackasm1(SB) + MOVD $141, R12 + B callbackasm1(SB) + MOVD $142, R12 + B callbackasm1(SB) + MOVD $143, R12 + B callbackasm1(SB) + MOVD $144, R12 + B callbackasm1(SB) + MOVD $145, R12 + B callbackasm1(SB) + MOVD $146, R12 + B callbackasm1(SB) + MOVD $147, R12 + B callbackasm1(SB) + MOVD $148, R12 + B callbackasm1(SB) + MOVD $149, R12 + B callbackasm1(SB) + MOVD $150, R12 + B callbackasm1(SB) + MOVD $151, R12 + B callbackasm1(SB) + MOVD $152, R12 + B callbackasm1(SB) + MOVD $153, R12 + B callbackasm1(SB) + MOVD $154, R12 + B callbackasm1(SB) + MOVD $155, R12 + B callbackasm1(SB) + MOVD $156, R12 + B callbackasm1(SB) + MOVD $157, R12 + B callbackasm1(SB) + MOVD $158, R12 + B callbackasm1(SB) + MOVD $159, R12 + B callbackasm1(SB) + MOVD $160, R12 + B callbackasm1(SB) + MOVD $161, R12 + B callbackasm1(SB) + MOVD $162, R12 + B callbackasm1(SB) + MOVD $163, R12 + B callbackasm1(SB) + MOVD $164, R12 + B callbackasm1(SB) + MOVD $165, R12 + B callbackasm1(SB) + MOVD $166, R12 + B callbackasm1(SB) + MOVD $167, R12 + B callbackasm1(SB) + MOVD $168, R12 + B callbackasm1(SB) + MOVD $169, R12 + B callbackasm1(SB) + MOVD $170, R12 + B callbackasm1(SB) + MOVD $171, R12 + B callbackasm1(SB) + MOVD $172, R12 + B callbackasm1(SB) + MOVD $173, R12 + B callbackasm1(SB) + MOVD $174, R12 + B callbackasm1(SB) + MOVD $175, R12 + B callbackasm1(SB) + MOVD $176, R12 + B callbackasm1(SB) + MOVD $177, R12 + B callbackasm1(SB) + MOVD $178, R12 + B callbackasm1(SB) + MOVD $179, R12 + B callbackasm1(SB) + MOVD $180, R12 + B callbackasm1(SB) + MOVD $181, R12 + B callbackasm1(SB) + MOVD $182, R12 + B callbackasm1(SB) + MOVD $183, R12 + B callbackasm1(SB) + MOVD $184, R12 + B callbackasm1(SB) + MOVD $185, R12 + B callbackasm1(SB) + MOVD $186, R12 + B callbackasm1(SB) + MOVD $187, R12 + B callbackasm1(SB) + MOVD $188, R12 + B callbackasm1(SB) + MOVD $189, R12 + B callbackasm1(SB) + MOVD $190, R12 + B callbackasm1(SB) + MOVD $191, R12 + B callbackasm1(SB) + MOVD $192, R12 + B callbackasm1(SB) + MOVD $193, R12 + B callbackasm1(SB) + MOVD $194, R12 + B callbackasm1(SB) + MOVD $195, R12 + B callbackasm1(SB) + MOVD $196, R12 + B callbackasm1(SB) + MOVD $197, R12 + B callbackasm1(SB) + MOVD $198, R12 + B callbackasm1(SB) + MOVD $199, R12 + B callbackasm1(SB) + MOVD $200, R12 + B callbackasm1(SB) + MOVD $201, R12 + B callbackasm1(SB) + MOVD $202, R12 + B callbackasm1(SB) + MOVD $203, R12 + B callbackasm1(SB) + MOVD $204, R12 + B callbackasm1(SB) + MOVD $205, R12 + B callbackasm1(SB) + MOVD $206, R12 + B callbackasm1(SB) + MOVD $207, R12 + B callbackasm1(SB) + MOVD $208, R12 + B callbackasm1(SB) + MOVD $209, R12 + B callbackasm1(SB) + MOVD $210, R12 + B callbackasm1(SB) + MOVD $211, R12 + B callbackasm1(SB) + MOVD $212, R12 + B callbackasm1(SB) + MOVD $213, R12 + B callbackasm1(SB) + MOVD $214, R12 + B callbackasm1(SB) + MOVD $215, R12 + B callbackasm1(SB) + MOVD $216, R12 + B callbackasm1(SB) + MOVD $217, R12 + B callbackasm1(SB) + MOVD $218, R12 + B callbackasm1(SB) + MOVD $219, R12 + B callbackasm1(SB) + MOVD $220, R12 + B callbackasm1(SB) + MOVD $221, R12 + B callbackasm1(SB) + MOVD $222, R12 + B callbackasm1(SB) + MOVD $223, R12 + B callbackasm1(SB) + MOVD $224, R12 + B callbackasm1(SB) + MOVD $225, R12 + B callbackasm1(SB) + MOVD $226, R12 + B callbackasm1(SB) + MOVD $227, R12 + B callbackasm1(SB) + MOVD $228, R12 + B callbackasm1(SB) + MOVD $229, R12 + B callbackasm1(SB) + MOVD $230, R12 + B callbackasm1(SB) + MOVD $231, R12 + B callbackasm1(SB) + MOVD $232, R12 + B callbackasm1(SB) + MOVD $233, R12 + B callbackasm1(SB) + MOVD $234, R12 + B callbackasm1(SB) + MOVD $235, R12 + B callbackasm1(SB) + MOVD $236, R12 + B callbackasm1(SB) + MOVD $237, R12 + B callbackasm1(SB) + MOVD $238, R12 + B callbackasm1(SB) + MOVD $239, R12 + B callbackasm1(SB) + MOVD $240, R12 + B callbackasm1(SB) + MOVD $241, R12 + B callbackasm1(SB) + MOVD $242, R12 + B callbackasm1(SB) + MOVD $243, R12 + B callbackasm1(SB) + MOVD $244, R12 + B callbackasm1(SB) + MOVD $245, R12 + B callbackasm1(SB) + MOVD $246, R12 + B callbackasm1(SB) + MOVD $247, R12 + B callbackasm1(SB) + MOVD $248, R12 + B callbackasm1(SB) + MOVD $249, R12 + B callbackasm1(SB) + MOVD $250, R12 + B callbackasm1(SB) + MOVD $251, R12 + B callbackasm1(SB) + MOVD $252, R12 + B callbackasm1(SB) + MOVD $253, R12 + B callbackasm1(SB) + MOVD $254, R12 + B callbackasm1(SB) + MOVD $255, R12 + B callbackasm1(SB) + MOVD $256, R12 + B callbackasm1(SB) + MOVD $257, R12 + B callbackasm1(SB) + MOVD $258, R12 + B callbackasm1(SB) + MOVD $259, R12 + B callbackasm1(SB) + MOVD $260, R12 + B callbackasm1(SB) + MOVD $261, R12 + B callbackasm1(SB) + MOVD $262, R12 + B callbackasm1(SB) + MOVD $263, R12 + B callbackasm1(SB) + MOVD $264, R12 + B callbackasm1(SB) + MOVD $265, R12 + B callbackasm1(SB) + MOVD $266, R12 + B callbackasm1(SB) + MOVD $267, R12 + B callbackasm1(SB) + MOVD $268, R12 + B callbackasm1(SB) + MOVD $269, R12 + B callbackasm1(SB) + MOVD $270, R12 + B callbackasm1(SB) + MOVD $271, R12 + B callbackasm1(SB) + MOVD $272, R12 + B callbackasm1(SB) + MOVD $273, R12 + B callbackasm1(SB) + MOVD $274, R12 + B callbackasm1(SB) + MOVD $275, R12 + B callbackasm1(SB) + MOVD $276, R12 + B callbackasm1(SB) + MOVD $277, R12 + B callbackasm1(SB) + MOVD $278, R12 + B callbackasm1(SB) + MOVD $279, R12 + B callbackasm1(SB) + MOVD $280, R12 + B callbackasm1(SB) + MOVD $281, R12 + B callbackasm1(SB) + MOVD $282, R12 + B callbackasm1(SB) + MOVD $283, R12 + B callbackasm1(SB) + MOVD $284, R12 + B callbackasm1(SB) + MOVD $285, R12 + B callbackasm1(SB) + MOVD $286, R12 + B callbackasm1(SB) + MOVD $287, R12 + B callbackasm1(SB) + MOVD $288, R12 + B callbackasm1(SB) + MOVD $289, R12 + B callbackasm1(SB) + MOVD $290, R12 + B callbackasm1(SB) + MOVD $291, R12 + B callbackasm1(SB) + MOVD $292, R12 + B callbackasm1(SB) + MOVD $293, R12 + B callbackasm1(SB) + MOVD $294, R12 + B callbackasm1(SB) + MOVD $295, R12 + B callbackasm1(SB) + MOVD $296, R12 + B callbackasm1(SB) + MOVD $297, R12 + B callbackasm1(SB) + MOVD $298, R12 + B callbackasm1(SB) + MOVD $299, R12 + B callbackasm1(SB) + MOVD $300, R12 + B callbackasm1(SB) + MOVD $301, R12 + B callbackasm1(SB) + MOVD $302, R12 + B callbackasm1(SB) + MOVD $303, R12 + B callbackasm1(SB) + MOVD $304, R12 + B callbackasm1(SB) + MOVD $305, R12 + B callbackasm1(SB) + MOVD $306, R12 + B callbackasm1(SB) + MOVD $307, R12 + B callbackasm1(SB) + MOVD $308, R12 + B callbackasm1(SB) + MOVD $309, R12 + B callbackasm1(SB) + MOVD $310, R12 + B callbackasm1(SB) + MOVD $311, R12 + B callbackasm1(SB) + MOVD $312, R12 + B callbackasm1(SB) + MOVD $313, R12 + B callbackasm1(SB) + MOVD $314, R12 + B callbackasm1(SB) + MOVD $315, R12 + B callbackasm1(SB) + MOVD $316, R12 + B callbackasm1(SB) + MOVD $317, R12 + B callbackasm1(SB) + MOVD $318, R12 + B callbackasm1(SB) + MOVD $319, R12 + B callbackasm1(SB) + MOVD $320, R12 + B callbackasm1(SB) + MOVD $321, R12 + B callbackasm1(SB) + MOVD $322, R12 + B callbackasm1(SB) + MOVD $323, R12 + B callbackasm1(SB) + MOVD $324, R12 + B callbackasm1(SB) + MOVD $325, R12 + B callbackasm1(SB) + MOVD $326, R12 + B callbackasm1(SB) + MOVD $327, R12 + B callbackasm1(SB) + MOVD $328, R12 + B callbackasm1(SB) + MOVD $329, R12 + B callbackasm1(SB) + MOVD $330, R12 + B callbackasm1(SB) + MOVD $331, R12 + B callbackasm1(SB) + MOVD $332, R12 + B callbackasm1(SB) + MOVD $333, R12 + B callbackasm1(SB) + MOVD $334, R12 + B callbackasm1(SB) + MOVD $335, R12 + B callbackasm1(SB) + MOVD $336, R12 + B callbackasm1(SB) + MOVD $337, R12 + B callbackasm1(SB) + MOVD $338, R12 + B callbackasm1(SB) + MOVD $339, R12 + B callbackasm1(SB) + MOVD $340, R12 + B callbackasm1(SB) + MOVD $341, R12 + B callbackasm1(SB) + MOVD $342, R12 + B callbackasm1(SB) + MOVD $343, R12 + B callbackasm1(SB) + MOVD $344, R12 + B callbackasm1(SB) + MOVD $345, R12 + B callbackasm1(SB) + MOVD $346, R12 + B callbackasm1(SB) + MOVD $347, R12 + B callbackasm1(SB) + MOVD $348, R12 + B callbackasm1(SB) + MOVD $349, R12 + B callbackasm1(SB) + MOVD $350, R12 + B callbackasm1(SB) + MOVD $351, R12 + B callbackasm1(SB) + MOVD $352, R12 + B callbackasm1(SB) + MOVD $353, R12 + B callbackasm1(SB) + MOVD $354, R12 + B callbackasm1(SB) + MOVD $355, R12 + B callbackasm1(SB) + MOVD $356, R12 + B callbackasm1(SB) + MOVD $357, R12 + B callbackasm1(SB) + MOVD $358, R12 + B callbackasm1(SB) + MOVD $359, R12 + B callbackasm1(SB) + MOVD $360, R12 + B callbackasm1(SB) + MOVD $361, R12 + B callbackasm1(SB) + MOVD $362, R12 + B callbackasm1(SB) + MOVD $363, R12 + B callbackasm1(SB) + MOVD $364, R12 + B callbackasm1(SB) + MOVD $365, R12 + B callbackasm1(SB) + MOVD $366, R12 + B callbackasm1(SB) + MOVD $367, R12 + B callbackasm1(SB) + MOVD $368, R12 + B callbackasm1(SB) + MOVD $369, R12 + B callbackasm1(SB) + MOVD $370, R12 + B callbackasm1(SB) + MOVD $371, R12 + B callbackasm1(SB) + MOVD $372, R12 + B callbackasm1(SB) + MOVD $373, R12 + B callbackasm1(SB) + MOVD $374, R12 + B callbackasm1(SB) + MOVD $375, R12 + B callbackasm1(SB) + MOVD $376, R12 + B callbackasm1(SB) + MOVD $377, R12 + B callbackasm1(SB) + MOVD $378, R12 + B callbackasm1(SB) + MOVD $379, R12 + B callbackasm1(SB) + MOVD $380, R12 + B callbackasm1(SB) + MOVD $381, R12 + B callbackasm1(SB) + MOVD $382, R12 + B callbackasm1(SB) + MOVD $383, R12 + B callbackasm1(SB) + MOVD $384, R12 + B callbackasm1(SB) + MOVD $385, R12 + B callbackasm1(SB) + MOVD $386, R12 + B callbackasm1(SB) + MOVD $387, R12 + B callbackasm1(SB) + MOVD $388, R12 + B callbackasm1(SB) + MOVD $389, R12 + B callbackasm1(SB) + MOVD $390, R12 + B callbackasm1(SB) + MOVD $391, R12 + B callbackasm1(SB) + MOVD $392, R12 + B callbackasm1(SB) + MOVD $393, R12 + B callbackasm1(SB) + MOVD $394, R12 + B callbackasm1(SB) + MOVD $395, R12 + B callbackasm1(SB) + MOVD $396, R12 + B callbackasm1(SB) + MOVD $397, R12 + B callbackasm1(SB) + MOVD $398, R12 + B callbackasm1(SB) + MOVD $399, R12 + B callbackasm1(SB) + MOVD $400, R12 + B callbackasm1(SB) + MOVD $401, R12 + B callbackasm1(SB) + MOVD $402, R12 + B callbackasm1(SB) + MOVD $403, R12 + B callbackasm1(SB) + MOVD $404, R12 + B callbackasm1(SB) + MOVD $405, R12 + B callbackasm1(SB) + MOVD $406, R12 + B callbackasm1(SB) + MOVD $407, R12 + B callbackasm1(SB) + MOVD $408, R12 + B callbackasm1(SB) + MOVD $409, R12 + B callbackasm1(SB) + MOVD $410, R12 + B callbackasm1(SB) + MOVD $411, R12 + B callbackasm1(SB) + MOVD $412, R12 + B callbackasm1(SB) + MOVD $413, R12 + B callbackasm1(SB) + MOVD $414, R12 + B callbackasm1(SB) + MOVD $415, R12 + B callbackasm1(SB) + MOVD $416, R12 + B callbackasm1(SB) + MOVD $417, R12 + B callbackasm1(SB) + MOVD $418, R12 + B callbackasm1(SB) + MOVD $419, R12 + B callbackasm1(SB) + MOVD $420, R12 + B callbackasm1(SB) + MOVD $421, R12 + B callbackasm1(SB) + MOVD $422, R12 + B callbackasm1(SB) + MOVD $423, R12 + B callbackasm1(SB) + MOVD $424, R12 + B callbackasm1(SB) + MOVD $425, R12 + B callbackasm1(SB) + MOVD $426, R12 + B callbackasm1(SB) + MOVD $427, R12 + B callbackasm1(SB) + MOVD $428, R12 + B callbackasm1(SB) + MOVD $429, R12 + B callbackasm1(SB) + MOVD $430, R12 + B callbackasm1(SB) + MOVD $431, R12 + B callbackasm1(SB) + MOVD $432, R12 + B callbackasm1(SB) + MOVD $433, R12 + B callbackasm1(SB) + MOVD $434, R12 + B callbackasm1(SB) + MOVD $435, R12 + B callbackasm1(SB) + MOVD $436, R12 + B callbackasm1(SB) + MOVD $437, R12 + B callbackasm1(SB) + MOVD $438, R12 + B callbackasm1(SB) + MOVD $439, R12 + B callbackasm1(SB) + MOVD $440, R12 + B callbackasm1(SB) + MOVD $441, R12 + B callbackasm1(SB) + MOVD $442, R12 + B callbackasm1(SB) + MOVD $443, R12 + B callbackasm1(SB) + MOVD $444, R12 + B callbackasm1(SB) + MOVD $445, R12 + B callbackasm1(SB) + MOVD $446, R12 + B callbackasm1(SB) + MOVD $447, R12 + B callbackasm1(SB) + MOVD $448, R12 + B callbackasm1(SB) + MOVD $449, R12 + B callbackasm1(SB) + MOVD $450, R12 + B callbackasm1(SB) + MOVD $451, R12 + B callbackasm1(SB) + MOVD $452, R12 + B callbackasm1(SB) + MOVD $453, R12 + B callbackasm1(SB) + MOVD $454, R12 + B callbackasm1(SB) + MOVD $455, R12 + B callbackasm1(SB) + MOVD $456, R12 + B callbackasm1(SB) + MOVD $457, R12 + B callbackasm1(SB) + MOVD $458, R12 + B callbackasm1(SB) + MOVD $459, R12 + B callbackasm1(SB) + MOVD $460, R12 + B callbackasm1(SB) + MOVD $461, R12 + B callbackasm1(SB) + MOVD $462, R12 + B callbackasm1(SB) + MOVD $463, R12 + B callbackasm1(SB) + MOVD $464, R12 + B callbackasm1(SB) + MOVD $465, R12 + B callbackasm1(SB) + MOVD $466, R12 + B callbackasm1(SB) + MOVD $467, R12 + B callbackasm1(SB) + MOVD $468, R12 + B callbackasm1(SB) + MOVD $469, R12 + B callbackasm1(SB) + MOVD $470, R12 + B callbackasm1(SB) + MOVD $471, R12 + B callbackasm1(SB) + MOVD $472, R12 + B callbackasm1(SB) + MOVD $473, R12 + B callbackasm1(SB) + MOVD $474, R12 + B callbackasm1(SB) + MOVD $475, R12 + B callbackasm1(SB) + MOVD $476, R12 + B callbackasm1(SB) + MOVD $477, R12 + B callbackasm1(SB) + MOVD $478, R12 + B callbackasm1(SB) + MOVD $479, R12 + B callbackasm1(SB) + MOVD $480, R12 + B callbackasm1(SB) + MOVD $481, R12 + B callbackasm1(SB) + MOVD $482, R12 + B callbackasm1(SB) + MOVD $483, R12 + B callbackasm1(SB) + MOVD $484, R12 + B callbackasm1(SB) + MOVD $485, R12 + B callbackasm1(SB) + MOVD $486, R12 + B callbackasm1(SB) + MOVD $487, R12 + B callbackasm1(SB) + MOVD $488, R12 + B callbackasm1(SB) + MOVD $489, R12 + B callbackasm1(SB) + MOVD $490, R12 + B callbackasm1(SB) + MOVD $491, R12 + B callbackasm1(SB) + MOVD $492, R12 + B callbackasm1(SB) + MOVD $493, R12 + B callbackasm1(SB) + MOVD $494, R12 + B callbackasm1(SB) + MOVD $495, R12 + B callbackasm1(SB) + MOVD $496, R12 + B callbackasm1(SB) + MOVD $497, R12 + B callbackasm1(SB) + MOVD $498, R12 + B callbackasm1(SB) + MOVD $499, R12 + B callbackasm1(SB) + MOVD $500, R12 + B callbackasm1(SB) + MOVD $501, R12 + B callbackasm1(SB) + MOVD $502, R12 + B callbackasm1(SB) + MOVD $503, R12 + B callbackasm1(SB) + MOVD $504, R12 + B callbackasm1(SB) + MOVD $505, R12 + B callbackasm1(SB) + MOVD $506, R12 + B callbackasm1(SB) + MOVD $507, R12 + B callbackasm1(SB) + MOVD $508, R12 + B callbackasm1(SB) + MOVD $509, R12 + B callbackasm1(SB) + MOVD $510, R12 + B callbackasm1(SB) + MOVD $511, R12 + B callbackasm1(SB) + MOVD $512, R12 + B callbackasm1(SB) + MOVD $513, R12 + B callbackasm1(SB) + MOVD $514, R12 + B callbackasm1(SB) + MOVD $515, R12 + B callbackasm1(SB) + MOVD $516, R12 + B callbackasm1(SB) + MOVD $517, R12 + B callbackasm1(SB) + MOVD $518, R12 + B callbackasm1(SB) + MOVD $519, R12 + B callbackasm1(SB) + MOVD $520, R12 + B callbackasm1(SB) + MOVD $521, R12 + B callbackasm1(SB) + MOVD $522, R12 + B callbackasm1(SB) + MOVD $523, R12 + B callbackasm1(SB) + MOVD $524, R12 + B callbackasm1(SB) + MOVD $525, R12 + B callbackasm1(SB) + MOVD $526, R12 + B callbackasm1(SB) + MOVD $527, R12 + B callbackasm1(SB) + MOVD $528, R12 + B callbackasm1(SB) + MOVD $529, R12 + B callbackasm1(SB) + MOVD $530, R12 + B callbackasm1(SB) + MOVD $531, R12 + B callbackasm1(SB) + MOVD $532, R12 + B callbackasm1(SB) + MOVD $533, R12 + B callbackasm1(SB) + MOVD $534, R12 + B callbackasm1(SB) + MOVD $535, R12 + B callbackasm1(SB) + MOVD $536, R12 + B callbackasm1(SB) + MOVD $537, R12 + B callbackasm1(SB) + MOVD $538, R12 + B callbackasm1(SB) + MOVD $539, R12 + B callbackasm1(SB) + MOVD $540, R12 + B callbackasm1(SB) + MOVD $541, R12 + B callbackasm1(SB) + MOVD $542, R12 + B callbackasm1(SB) + MOVD $543, R12 + B callbackasm1(SB) + MOVD $544, R12 + B callbackasm1(SB) + MOVD $545, R12 + B callbackasm1(SB) + MOVD $546, R12 + B callbackasm1(SB) + MOVD $547, R12 + B callbackasm1(SB) + MOVD $548, R12 + B callbackasm1(SB) + MOVD $549, R12 + B callbackasm1(SB) + MOVD $550, R12 + B callbackasm1(SB) + MOVD $551, R12 + B callbackasm1(SB) + MOVD $552, R12 + B callbackasm1(SB) + MOVD $553, R12 + B callbackasm1(SB) + MOVD $554, R12 + B callbackasm1(SB) + MOVD $555, R12 + B callbackasm1(SB) + MOVD $556, R12 + B callbackasm1(SB) + MOVD $557, R12 + B callbackasm1(SB) + MOVD $558, R12 + B callbackasm1(SB) + MOVD $559, R12 + B callbackasm1(SB) + MOVD $560, R12 + B callbackasm1(SB) + MOVD $561, R12 + B callbackasm1(SB) + MOVD $562, R12 + B callbackasm1(SB) + MOVD $563, R12 + B callbackasm1(SB) + MOVD $564, R12 + B callbackasm1(SB) + MOVD $565, R12 + B callbackasm1(SB) + MOVD $566, R12 + B callbackasm1(SB) + MOVD $567, R12 + B callbackasm1(SB) + MOVD $568, R12 + B callbackasm1(SB) + MOVD $569, R12 + B callbackasm1(SB) + MOVD $570, R12 + B callbackasm1(SB) + MOVD $571, R12 + B callbackasm1(SB) + MOVD $572, R12 + B callbackasm1(SB) + MOVD $573, R12 + B callbackasm1(SB) + MOVD $574, R12 + B callbackasm1(SB) + MOVD $575, R12 + B callbackasm1(SB) + MOVD $576, R12 + B callbackasm1(SB) + MOVD $577, R12 + B callbackasm1(SB) + MOVD $578, R12 + B callbackasm1(SB) + MOVD $579, R12 + B callbackasm1(SB) + MOVD $580, R12 + B callbackasm1(SB) + MOVD $581, R12 + B callbackasm1(SB) + MOVD $582, R12 + B callbackasm1(SB) + MOVD $583, R12 + B callbackasm1(SB) + MOVD $584, R12 + B callbackasm1(SB) + MOVD $585, R12 + B callbackasm1(SB) + MOVD $586, R12 + B callbackasm1(SB) + MOVD $587, R12 + B callbackasm1(SB) + MOVD $588, R12 + B callbackasm1(SB) + MOVD $589, R12 + B callbackasm1(SB) + MOVD $590, R12 + B callbackasm1(SB) + MOVD $591, R12 + B callbackasm1(SB) + MOVD $592, R12 + B callbackasm1(SB) + MOVD $593, R12 + B callbackasm1(SB) + MOVD $594, R12 + B callbackasm1(SB) + MOVD $595, R12 + B callbackasm1(SB) + MOVD $596, R12 + B callbackasm1(SB) + MOVD $597, R12 + B callbackasm1(SB) + MOVD $598, R12 + B callbackasm1(SB) + MOVD $599, R12 + B callbackasm1(SB) + MOVD $600, R12 + B callbackasm1(SB) + MOVD $601, R12 + B callbackasm1(SB) + MOVD $602, R12 + B callbackasm1(SB) + MOVD $603, R12 + B callbackasm1(SB) + MOVD $604, R12 + B callbackasm1(SB) + MOVD $605, R12 + B callbackasm1(SB) + MOVD $606, R12 + B callbackasm1(SB) + MOVD $607, R12 + B callbackasm1(SB) + MOVD $608, R12 + B callbackasm1(SB) + MOVD $609, R12 + B callbackasm1(SB) + MOVD $610, R12 + B callbackasm1(SB) + MOVD $611, R12 + B callbackasm1(SB) + MOVD $612, R12 + B callbackasm1(SB) + MOVD $613, R12 + B callbackasm1(SB) + MOVD $614, R12 + B callbackasm1(SB) + MOVD $615, R12 + B callbackasm1(SB) + MOVD $616, R12 + B callbackasm1(SB) + MOVD $617, R12 + B callbackasm1(SB) + MOVD $618, R12 + B callbackasm1(SB) + MOVD $619, R12 + B callbackasm1(SB) + MOVD $620, R12 + B callbackasm1(SB) + MOVD $621, R12 + B callbackasm1(SB) + MOVD $622, R12 + B callbackasm1(SB) + MOVD $623, R12 + B callbackasm1(SB) + MOVD $624, R12 + B callbackasm1(SB) + MOVD $625, R12 + B callbackasm1(SB) + MOVD $626, R12 + B callbackasm1(SB) + MOVD $627, R12 + B callbackasm1(SB) + MOVD $628, R12 + B callbackasm1(SB) + MOVD $629, R12 + B callbackasm1(SB) + MOVD $630, R12 + B callbackasm1(SB) + MOVD $631, R12 + B callbackasm1(SB) + MOVD $632, R12 + B callbackasm1(SB) + MOVD $633, R12 + B callbackasm1(SB) + MOVD $634, R12 + B callbackasm1(SB) + MOVD $635, R12 + B callbackasm1(SB) + MOVD $636, R12 + B callbackasm1(SB) + MOVD $637, R12 + B callbackasm1(SB) + MOVD $638, R12 + B callbackasm1(SB) + MOVD $639, R12 + B callbackasm1(SB) + MOVD $640, R12 + B callbackasm1(SB) + MOVD $641, R12 + B callbackasm1(SB) + MOVD $642, R12 + B callbackasm1(SB) + MOVD $643, R12 + B callbackasm1(SB) + MOVD $644, R12 + B callbackasm1(SB) + MOVD $645, R12 + B callbackasm1(SB) + MOVD $646, R12 + B callbackasm1(SB) + MOVD $647, R12 + B callbackasm1(SB) + MOVD $648, R12 + B callbackasm1(SB) + MOVD $649, R12 + B callbackasm1(SB) + MOVD $650, R12 + B callbackasm1(SB) + MOVD $651, R12 + B callbackasm1(SB) + MOVD $652, R12 + B callbackasm1(SB) + MOVD $653, R12 + B callbackasm1(SB) + MOVD $654, R12 + B callbackasm1(SB) + MOVD $655, R12 + B callbackasm1(SB) + MOVD $656, R12 + B callbackasm1(SB) + MOVD $657, R12 + B callbackasm1(SB) + MOVD $658, R12 + B callbackasm1(SB) + MOVD $659, R12 + B callbackasm1(SB) + MOVD $660, R12 + B callbackasm1(SB) + MOVD $661, R12 + B callbackasm1(SB) + MOVD $662, R12 + B callbackasm1(SB) + MOVD $663, R12 + B callbackasm1(SB) + MOVD $664, R12 + B callbackasm1(SB) + MOVD $665, R12 + B callbackasm1(SB) + MOVD $666, R12 + B callbackasm1(SB) + MOVD $667, R12 + B callbackasm1(SB) + MOVD $668, R12 + B callbackasm1(SB) + MOVD $669, R12 + B callbackasm1(SB) + MOVD $670, R12 + B callbackasm1(SB) + MOVD $671, R12 + B callbackasm1(SB) + MOVD $672, R12 + B callbackasm1(SB) + MOVD $673, R12 + B callbackasm1(SB) + MOVD $674, R12 + B callbackasm1(SB) + MOVD $675, R12 + B callbackasm1(SB) + MOVD $676, R12 + B callbackasm1(SB) + MOVD $677, R12 + B callbackasm1(SB) + MOVD $678, R12 + B callbackasm1(SB) + MOVD $679, R12 + B callbackasm1(SB) + MOVD $680, R12 + B callbackasm1(SB) + MOVD $681, R12 + B callbackasm1(SB) + MOVD $682, R12 + B callbackasm1(SB) + MOVD $683, R12 + B callbackasm1(SB) + MOVD $684, R12 + B callbackasm1(SB) + MOVD $685, R12 + B callbackasm1(SB) + MOVD $686, R12 + B callbackasm1(SB) + MOVD $687, R12 + B callbackasm1(SB) + MOVD $688, R12 + B callbackasm1(SB) + MOVD $689, R12 + B callbackasm1(SB) + MOVD $690, R12 + B callbackasm1(SB) + MOVD $691, R12 + B callbackasm1(SB) + MOVD $692, R12 + B callbackasm1(SB) + MOVD $693, R12 + B callbackasm1(SB) + MOVD $694, R12 + B callbackasm1(SB) + MOVD $695, R12 + B callbackasm1(SB) + MOVD $696, R12 + B callbackasm1(SB) + MOVD $697, R12 + B callbackasm1(SB) + MOVD $698, R12 + B callbackasm1(SB) + MOVD $699, R12 + B callbackasm1(SB) + MOVD $700, R12 + B callbackasm1(SB) + MOVD $701, R12 + B callbackasm1(SB) + MOVD $702, R12 + B callbackasm1(SB) + MOVD $703, R12 + B callbackasm1(SB) + MOVD $704, R12 + B callbackasm1(SB) + MOVD $705, R12 + B callbackasm1(SB) + MOVD $706, R12 + B callbackasm1(SB) + MOVD $707, R12 + B callbackasm1(SB) + MOVD $708, R12 + B callbackasm1(SB) + MOVD $709, R12 + B callbackasm1(SB) + MOVD $710, R12 + B callbackasm1(SB) + MOVD $711, R12 + B callbackasm1(SB) + MOVD $712, R12 + B callbackasm1(SB) + MOVD $713, R12 + B callbackasm1(SB) + MOVD $714, R12 + B callbackasm1(SB) + MOVD $715, R12 + B callbackasm1(SB) + MOVD $716, R12 + B callbackasm1(SB) + MOVD $717, R12 + B callbackasm1(SB) + MOVD $718, R12 + B callbackasm1(SB) + MOVD $719, R12 + B callbackasm1(SB) + MOVD $720, R12 + B callbackasm1(SB) + MOVD $721, R12 + B callbackasm1(SB) + MOVD $722, R12 + B callbackasm1(SB) + MOVD $723, R12 + B callbackasm1(SB) + MOVD $724, R12 + B callbackasm1(SB) + MOVD $725, R12 + B callbackasm1(SB) + MOVD $726, R12 + B callbackasm1(SB) + MOVD $727, R12 + B callbackasm1(SB) + MOVD $728, R12 + B callbackasm1(SB) + MOVD $729, R12 + B callbackasm1(SB) + MOVD $730, R12 + B callbackasm1(SB) + MOVD $731, R12 + B callbackasm1(SB) + MOVD $732, R12 + B callbackasm1(SB) + MOVD $733, R12 + B callbackasm1(SB) + MOVD $734, R12 + B callbackasm1(SB) + MOVD $735, R12 + B callbackasm1(SB) + MOVD $736, R12 + B callbackasm1(SB) + MOVD $737, R12 + B callbackasm1(SB) + MOVD $738, R12 + B callbackasm1(SB) + MOVD $739, R12 + B callbackasm1(SB) + MOVD $740, R12 + B callbackasm1(SB) + MOVD $741, R12 + B callbackasm1(SB) + MOVD $742, R12 + B callbackasm1(SB) + MOVD $743, R12 + B callbackasm1(SB) + MOVD $744, R12 + B callbackasm1(SB) + MOVD $745, R12 + B callbackasm1(SB) + MOVD $746, R12 + B callbackasm1(SB) + MOVD $747, R12 + B callbackasm1(SB) + MOVD $748, R12 + B callbackasm1(SB) + MOVD $749, R12 + B callbackasm1(SB) + MOVD $750, R12 + B callbackasm1(SB) + MOVD $751, R12 + B callbackasm1(SB) + MOVD $752, R12 + B callbackasm1(SB) + MOVD $753, R12 + B callbackasm1(SB) + MOVD $754, R12 + B callbackasm1(SB) + MOVD $755, R12 + B callbackasm1(SB) + MOVD $756, R12 + B callbackasm1(SB) + MOVD $757, R12 + B callbackasm1(SB) + MOVD $758, R12 + B callbackasm1(SB) + MOVD $759, R12 + B callbackasm1(SB) + MOVD $760, R12 + B callbackasm1(SB) + MOVD $761, R12 + B callbackasm1(SB) + MOVD $762, R12 + B callbackasm1(SB) + MOVD $763, R12 + B callbackasm1(SB) + MOVD $764, R12 + B callbackasm1(SB) + MOVD $765, R12 + B callbackasm1(SB) + MOVD $766, R12 + B callbackasm1(SB) + MOVD $767, R12 + B callbackasm1(SB) + MOVD $768, R12 + B callbackasm1(SB) + MOVD $769, R12 + B callbackasm1(SB) + MOVD $770, R12 + B callbackasm1(SB) + MOVD $771, R12 + B callbackasm1(SB) + MOVD $772, R12 + B callbackasm1(SB) + MOVD $773, R12 + B callbackasm1(SB) + MOVD $774, R12 + B callbackasm1(SB) + MOVD $775, R12 + B callbackasm1(SB) + MOVD $776, R12 + B callbackasm1(SB) + MOVD $777, R12 + B callbackasm1(SB) + MOVD $778, R12 + B callbackasm1(SB) + MOVD $779, R12 + B callbackasm1(SB) + MOVD $780, R12 + B callbackasm1(SB) + MOVD $781, R12 + B callbackasm1(SB) + MOVD $782, R12 + B callbackasm1(SB) + MOVD $783, R12 + B callbackasm1(SB) + MOVD $784, R12 + B callbackasm1(SB) + MOVD $785, R12 + B callbackasm1(SB) + MOVD $786, R12 + B callbackasm1(SB) + MOVD $787, R12 + B callbackasm1(SB) + MOVD $788, R12 + B callbackasm1(SB) + MOVD $789, R12 + B callbackasm1(SB) + MOVD $790, R12 + B callbackasm1(SB) + MOVD $791, R12 + B callbackasm1(SB) + MOVD $792, R12 + B callbackasm1(SB) + MOVD $793, R12 + B callbackasm1(SB) + MOVD $794, R12 + B callbackasm1(SB) + MOVD $795, R12 + B callbackasm1(SB) + MOVD $796, R12 + B callbackasm1(SB) + MOVD $797, R12 + B callbackasm1(SB) + MOVD $798, R12 + B callbackasm1(SB) + MOVD $799, R12 + B callbackasm1(SB) + MOVD $800, R12 + B callbackasm1(SB) + MOVD $801, R12 + B callbackasm1(SB) + MOVD $802, R12 + B callbackasm1(SB) + MOVD $803, R12 + B callbackasm1(SB) + MOVD $804, R12 + B callbackasm1(SB) + MOVD $805, R12 + B callbackasm1(SB) + MOVD $806, R12 + B callbackasm1(SB) + MOVD $807, R12 + B callbackasm1(SB) + MOVD $808, R12 + B callbackasm1(SB) + MOVD $809, R12 + B callbackasm1(SB) + MOVD $810, R12 + B callbackasm1(SB) + MOVD $811, R12 + B callbackasm1(SB) + MOVD $812, R12 + B callbackasm1(SB) + MOVD $813, R12 + B callbackasm1(SB) + MOVD $814, R12 + B callbackasm1(SB) + MOVD $815, R12 + B callbackasm1(SB) + MOVD $816, R12 + B callbackasm1(SB) + MOVD $817, R12 + B callbackasm1(SB) + MOVD $818, R12 + B callbackasm1(SB) + MOVD $819, R12 + B callbackasm1(SB) + MOVD $820, R12 + B callbackasm1(SB) + MOVD $821, R12 + B callbackasm1(SB) + MOVD $822, R12 + B callbackasm1(SB) + MOVD $823, R12 + B callbackasm1(SB) + MOVD $824, R12 + B callbackasm1(SB) + MOVD $825, R12 + B callbackasm1(SB) + MOVD $826, R12 + B callbackasm1(SB) + MOVD $827, R12 + B callbackasm1(SB) + MOVD $828, R12 + B callbackasm1(SB) + MOVD $829, R12 + B callbackasm1(SB) + MOVD $830, R12 + B callbackasm1(SB) + MOVD $831, R12 + B callbackasm1(SB) + MOVD $832, R12 + B callbackasm1(SB) + MOVD $833, R12 + B callbackasm1(SB) + MOVD $834, R12 + B callbackasm1(SB) + MOVD $835, R12 + B callbackasm1(SB) + MOVD $836, R12 + B callbackasm1(SB) + MOVD $837, R12 + B callbackasm1(SB) + MOVD $838, R12 + B callbackasm1(SB) + MOVD $839, R12 + B callbackasm1(SB) + MOVD $840, R12 + B callbackasm1(SB) + MOVD $841, R12 + B callbackasm1(SB) + MOVD $842, R12 + B callbackasm1(SB) + MOVD $843, R12 + B callbackasm1(SB) + MOVD $844, R12 + B callbackasm1(SB) + MOVD $845, R12 + B callbackasm1(SB) + MOVD $846, R12 + B callbackasm1(SB) + MOVD $847, R12 + B callbackasm1(SB) + MOVD $848, R12 + B callbackasm1(SB) + MOVD $849, R12 + B callbackasm1(SB) + MOVD $850, R12 + B callbackasm1(SB) + MOVD $851, R12 + B callbackasm1(SB) + MOVD $852, R12 + B callbackasm1(SB) + MOVD $853, R12 + B callbackasm1(SB) + MOVD $854, R12 + B callbackasm1(SB) + MOVD $855, R12 + B callbackasm1(SB) + MOVD $856, R12 + B callbackasm1(SB) + MOVD $857, R12 + B callbackasm1(SB) + MOVD $858, R12 + B callbackasm1(SB) + MOVD $859, R12 + B callbackasm1(SB) + MOVD $860, R12 + B callbackasm1(SB) + MOVD $861, R12 + B callbackasm1(SB) + MOVD $862, R12 + B callbackasm1(SB) + MOVD $863, R12 + B callbackasm1(SB) + MOVD $864, R12 + B callbackasm1(SB) + MOVD $865, R12 + B callbackasm1(SB) + MOVD $866, R12 + B callbackasm1(SB) + MOVD $867, R12 + B callbackasm1(SB) + MOVD $868, R12 + B callbackasm1(SB) + MOVD $869, R12 + B callbackasm1(SB) + MOVD $870, R12 + B callbackasm1(SB) + MOVD $871, R12 + B callbackasm1(SB) + MOVD $872, R12 + B callbackasm1(SB) + MOVD $873, R12 + B callbackasm1(SB) + MOVD $874, R12 + B callbackasm1(SB) + MOVD $875, R12 + B callbackasm1(SB) + MOVD $876, R12 + B callbackasm1(SB) + MOVD $877, R12 + B callbackasm1(SB) + MOVD $878, R12 + B callbackasm1(SB) + MOVD $879, R12 + B callbackasm1(SB) + MOVD $880, R12 + B callbackasm1(SB) + MOVD $881, R12 + B callbackasm1(SB) + MOVD $882, R12 + B callbackasm1(SB) + MOVD $883, R12 + B callbackasm1(SB) + MOVD $884, R12 + B callbackasm1(SB) + MOVD $885, R12 + B callbackasm1(SB) + MOVD $886, R12 + B callbackasm1(SB) + MOVD $887, R12 + B callbackasm1(SB) + MOVD $888, R12 + B callbackasm1(SB) + MOVD $889, R12 + B callbackasm1(SB) + MOVD $890, R12 + B callbackasm1(SB) + MOVD $891, R12 + B callbackasm1(SB) + MOVD $892, R12 + B callbackasm1(SB) + MOVD $893, R12 + B callbackasm1(SB) + MOVD $894, R12 + B callbackasm1(SB) + MOVD $895, R12 + B callbackasm1(SB) + MOVD $896, R12 + B callbackasm1(SB) + MOVD $897, R12 + B callbackasm1(SB) + MOVD $898, R12 + B callbackasm1(SB) + MOVD $899, R12 + B callbackasm1(SB) + MOVD $900, R12 + B callbackasm1(SB) + MOVD $901, R12 + B callbackasm1(SB) + MOVD $902, R12 + B callbackasm1(SB) + MOVD $903, R12 + B callbackasm1(SB) + MOVD $904, R12 + B callbackasm1(SB) + MOVD $905, R12 + B callbackasm1(SB) + MOVD $906, R12 + B callbackasm1(SB) + MOVD $907, R12 + B callbackasm1(SB) + MOVD $908, R12 + B callbackasm1(SB) + MOVD $909, R12 + B callbackasm1(SB) + MOVD $910, R12 + B callbackasm1(SB) + MOVD $911, R12 + B callbackasm1(SB) + MOVD $912, R12 + B callbackasm1(SB) + MOVD $913, R12 + B callbackasm1(SB) + MOVD $914, R12 + B callbackasm1(SB) + MOVD $915, R12 + B callbackasm1(SB) + MOVD $916, R12 + B callbackasm1(SB) + MOVD $917, R12 + B callbackasm1(SB) + MOVD $918, R12 + B callbackasm1(SB) + MOVD $919, R12 + B callbackasm1(SB) + MOVD $920, R12 + B callbackasm1(SB) + MOVD $921, R12 + B callbackasm1(SB) + MOVD $922, R12 + B callbackasm1(SB) + MOVD $923, R12 + B callbackasm1(SB) + MOVD $924, R12 + B callbackasm1(SB) + MOVD $925, R12 + B callbackasm1(SB) + MOVD $926, R12 + B callbackasm1(SB) + MOVD $927, R12 + B callbackasm1(SB) + MOVD $928, R12 + B callbackasm1(SB) + MOVD $929, R12 + B callbackasm1(SB) + MOVD $930, R12 + B callbackasm1(SB) + MOVD $931, R12 + B callbackasm1(SB) + MOVD $932, R12 + B callbackasm1(SB) + MOVD $933, R12 + B callbackasm1(SB) + MOVD $934, R12 + B callbackasm1(SB) + MOVD $935, R12 + B callbackasm1(SB) + MOVD $936, R12 + B callbackasm1(SB) + MOVD $937, R12 + B callbackasm1(SB) + MOVD $938, R12 + B callbackasm1(SB) + MOVD $939, R12 + B callbackasm1(SB) + MOVD $940, R12 + B callbackasm1(SB) + MOVD $941, R12 + B callbackasm1(SB) + MOVD $942, R12 + B callbackasm1(SB) + MOVD $943, R12 + B callbackasm1(SB) + MOVD $944, R12 + B callbackasm1(SB) + MOVD $945, R12 + B callbackasm1(SB) + MOVD $946, R12 + B callbackasm1(SB) + MOVD $947, R12 + B callbackasm1(SB) + MOVD $948, R12 + B callbackasm1(SB) + MOVD $949, R12 + B callbackasm1(SB) + MOVD $950, R12 + B callbackasm1(SB) + MOVD $951, R12 + B callbackasm1(SB) + MOVD $952, R12 + B callbackasm1(SB) + MOVD $953, R12 + B callbackasm1(SB) + MOVD $954, R12 + B callbackasm1(SB) + MOVD $955, R12 + B callbackasm1(SB) + MOVD $956, R12 + B callbackasm1(SB) + MOVD $957, R12 + B callbackasm1(SB) + MOVD $958, R12 + B callbackasm1(SB) + MOVD $959, R12 + B callbackasm1(SB) + MOVD $960, R12 + B callbackasm1(SB) + MOVD $961, R12 + B callbackasm1(SB) + MOVD $962, R12 + B callbackasm1(SB) + MOVD $963, R12 + B callbackasm1(SB) + MOVD $964, R12 + B callbackasm1(SB) + MOVD $965, R12 + B callbackasm1(SB) + MOVD $966, R12 + B callbackasm1(SB) + MOVD $967, R12 + B callbackasm1(SB) + MOVD $968, R12 + B callbackasm1(SB) + MOVD $969, R12 + B callbackasm1(SB) + MOVD $970, R12 + B callbackasm1(SB) + MOVD $971, R12 + B callbackasm1(SB) + MOVD $972, R12 + B callbackasm1(SB) + MOVD $973, R12 + B callbackasm1(SB) + MOVD $974, R12 + B callbackasm1(SB) + MOVD $975, R12 + B callbackasm1(SB) + MOVD $976, R12 + B callbackasm1(SB) + MOVD $977, R12 + B callbackasm1(SB) + MOVD $978, R12 + B callbackasm1(SB) + MOVD $979, R12 + B callbackasm1(SB) + MOVD $980, R12 + B callbackasm1(SB) + MOVD $981, R12 + B callbackasm1(SB) + MOVD $982, R12 + B callbackasm1(SB) + MOVD $983, R12 + B callbackasm1(SB) + MOVD $984, R12 + B callbackasm1(SB) + MOVD $985, R12 + B callbackasm1(SB) + MOVD $986, R12 + B callbackasm1(SB) + MOVD $987, R12 + B callbackasm1(SB) + MOVD $988, R12 + B callbackasm1(SB) + MOVD $989, R12 + B callbackasm1(SB) + MOVD $990, R12 + B callbackasm1(SB) + MOVD $991, R12 + B callbackasm1(SB) + MOVD $992, R12 + B callbackasm1(SB) + MOVD $993, R12 + B callbackasm1(SB) + MOVD $994, R12 + B callbackasm1(SB) + MOVD $995, R12 + B callbackasm1(SB) + MOVD $996, R12 + B callbackasm1(SB) + MOVD $997, R12 + B callbackasm1(SB) + MOVD $998, R12 + B callbackasm1(SB) + MOVD $999, R12 + B callbackasm1(SB) + MOVD $1000, R12 + B callbackasm1(SB) + MOVD $1001, R12 + B callbackasm1(SB) + MOVD $1002, R12 + B callbackasm1(SB) + MOVD $1003, R12 + B callbackasm1(SB) + MOVD $1004, R12 + B callbackasm1(SB) + MOVD $1005, R12 + B callbackasm1(SB) + MOVD $1006, R12 + B callbackasm1(SB) + MOVD $1007, R12 + B callbackasm1(SB) + MOVD $1008, R12 + B callbackasm1(SB) + MOVD $1009, R12 + B callbackasm1(SB) + MOVD $1010, R12 + B callbackasm1(SB) + MOVD $1011, R12 + B callbackasm1(SB) + MOVD $1012, R12 + B callbackasm1(SB) + MOVD $1013, R12 + B callbackasm1(SB) + MOVD $1014, R12 + B callbackasm1(SB) + MOVD $1015, R12 + B callbackasm1(SB) + MOVD $1016, R12 + B callbackasm1(SB) + MOVD $1017, R12 + B callbackasm1(SB) + MOVD $1018, R12 + B callbackasm1(SB) + MOVD $1019, R12 + B callbackasm1(SB) + MOVD $1020, R12 + B callbackasm1(SB) + MOVD $1021, R12 + B callbackasm1(SB) + MOVD $1022, R12 + B callbackasm1(SB) + MOVD $1023, R12 + B callbackasm1(SB) + MOVD $1024, R12 + B callbackasm1(SB) + MOVD $1025, R12 + B callbackasm1(SB) + MOVD $1026, R12 + B callbackasm1(SB) + MOVD $1027, R12 + B callbackasm1(SB) + MOVD $1028, R12 + B callbackasm1(SB) + MOVD $1029, R12 + B callbackasm1(SB) + MOVD $1030, R12 + B callbackasm1(SB) + MOVD $1031, R12 + B callbackasm1(SB) + MOVD $1032, R12 + B callbackasm1(SB) + MOVD $1033, R12 + B callbackasm1(SB) + MOVD $1034, R12 + B callbackasm1(SB) + MOVD $1035, R12 + B callbackasm1(SB) + MOVD $1036, R12 + B callbackasm1(SB) + MOVD $1037, R12 + B callbackasm1(SB) + MOVD $1038, R12 + B callbackasm1(SB) + MOVD $1039, R12 + B callbackasm1(SB) + MOVD $1040, R12 + B callbackasm1(SB) + MOVD $1041, R12 + B callbackasm1(SB) + MOVD $1042, R12 + B callbackasm1(SB) + MOVD $1043, R12 + B callbackasm1(SB) + MOVD $1044, R12 + B callbackasm1(SB) + MOVD $1045, R12 + B callbackasm1(SB) + MOVD $1046, R12 + B callbackasm1(SB) + MOVD $1047, R12 + B callbackasm1(SB) + MOVD $1048, R12 + B callbackasm1(SB) + MOVD $1049, R12 + B callbackasm1(SB) + MOVD $1050, R12 + B callbackasm1(SB) + MOVD $1051, R12 + B callbackasm1(SB) + MOVD $1052, R12 + B callbackasm1(SB) + MOVD $1053, R12 + B callbackasm1(SB) + MOVD $1054, R12 + B callbackasm1(SB) + MOVD $1055, R12 + B callbackasm1(SB) + MOVD $1056, R12 + B callbackasm1(SB) + MOVD $1057, R12 + B callbackasm1(SB) + MOVD $1058, R12 + B callbackasm1(SB) + MOVD $1059, R12 + B callbackasm1(SB) + MOVD $1060, R12 + B callbackasm1(SB) + MOVD $1061, R12 + B callbackasm1(SB) + MOVD $1062, R12 + B callbackasm1(SB) + MOVD $1063, R12 + B callbackasm1(SB) + MOVD $1064, R12 + B callbackasm1(SB) + MOVD $1065, R12 + B callbackasm1(SB) + MOVD $1066, R12 + B callbackasm1(SB) + MOVD $1067, R12 + B callbackasm1(SB) + MOVD $1068, R12 + B callbackasm1(SB) + MOVD $1069, R12 + B callbackasm1(SB) + MOVD $1070, R12 + B callbackasm1(SB) + MOVD $1071, R12 + B callbackasm1(SB) + MOVD $1072, R12 + B callbackasm1(SB) + MOVD $1073, R12 + B callbackasm1(SB) + MOVD $1074, R12 + B callbackasm1(SB) + MOVD $1075, R12 + B callbackasm1(SB) + MOVD $1076, R12 + B callbackasm1(SB) + MOVD $1077, R12 + B callbackasm1(SB) + MOVD $1078, R12 + B callbackasm1(SB) + MOVD $1079, R12 + B callbackasm1(SB) + MOVD $1080, R12 + B callbackasm1(SB) + MOVD $1081, R12 + B callbackasm1(SB) + MOVD $1082, R12 + B callbackasm1(SB) + MOVD $1083, R12 + B callbackasm1(SB) + MOVD $1084, R12 + B callbackasm1(SB) + MOVD $1085, R12 + B callbackasm1(SB) + MOVD $1086, R12 + B callbackasm1(SB) + MOVD $1087, R12 + B callbackasm1(SB) + MOVD $1088, R12 + B callbackasm1(SB) + MOVD $1089, R12 + B callbackasm1(SB) + MOVD $1090, R12 + B callbackasm1(SB) + MOVD $1091, R12 + B callbackasm1(SB) + MOVD $1092, R12 + B callbackasm1(SB) + MOVD $1093, R12 + B callbackasm1(SB) + MOVD $1094, R12 + B callbackasm1(SB) + MOVD $1095, R12 + B callbackasm1(SB) + MOVD $1096, R12 + B callbackasm1(SB) + MOVD $1097, R12 + B callbackasm1(SB) + MOVD $1098, R12 + B callbackasm1(SB) + MOVD $1099, R12 + B callbackasm1(SB) + MOVD $1100, R12 + B callbackasm1(SB) + MOVD $1101, R12 + B callbackasm1(SB) + MOVD $1102, R12 + B callbackasm1(SB) + MOVD $1103, R12 + B callbackasm1(SB) + MOVD $1104, R12 + B callbackasm1(SB) + MOVD $1105, R12 + B callbackasm1(SB) + MOVD $1106, R12 + B callbackasm1(SB) + MOVD $1107, R12 + B callbackasm1(SB) + MOVD $1108, R12 + B callbackasm1(SB) + MOVD $1109, R12 + B callbackasm1(SB) + MOVD $1110, R12 + B callbackasm1(SB) + MOVD $1111, R12 + B callbackasm1(SB) + MOVD $1112, R12 + B callbackasm1(SB) + MOVD $1113, R12 + B callbackasm1(SB) + MOVD $1114, R12 + B callbackasm1(SB) + MOVD $1115, R12 + B callbackasm1(SB) + MOVD $1116, R12 + B callbackasm1(SB) + MOVD $1117, R12 + B callbackasm1(SB) + MOVD $1118, R12 + B callbackasm1(SB) + MOVD $1119, R12 + B callbackasm1(SB) + MOVD $1120, R12 + B callbackasm1(SB) + MOVD $1121, R12 + B callbackasm1(SB) + MOVD $1122, R12 + B callbackasm1(SB) + MOVD $1123, R12 + B callbackasm1(SB) + MOVD $1124, R12 + B callbackasm1(SB) + MOVD $1125, R12 + B callbackasm1(SB) + MOVD $1126, R12 + B callbackasm1(SB) + MOVD $1127, R12 + B callbackasm1(SB) + MOVD $1128, R12 + B callbackasm1(SB) + MOVD $1129, R12 + B callbackasm1(SB) + MOVD $1130, R12 + B callbackasm1(SB) + MOVD $1131, R12 + B callbackasm1(SB) + MOVD $1132, R12 + B callbackasm1(SB) + MOVD $1133, R12 + B callbackasm1(SB) + MOVD $1134, R12 + B callbackasm1(SB) + MOVD $1135, R12 + B callbackasm1(SB) + MOVD $1136, R12 + B callbackasm1(SB) + MOVD $1137, R12 + B callbackasm1(SB) + MOVD $1138, R12 + B callbackasm1(SB) + MOVD $1139, R12 + B callbackasm1(SB) + MOVD $1140, R12 + B callbackasm1(SB) + MOVD $1141, R12 + B callbackasm1(SB) + MOVD $1142, R12 + B callbackasm1(SB) + MOVD $1143, R12 + B callbackasm1(SB) + MOVD $1144, R12 + B callbackasm1(SB) + MOVD $1145, R12 + B callbackasm1(SB) + MOVD $1146, R12 + B callbackasm1(SB) + MOVD $1147, R12 + B callbackasm1(SB) + MOVD $1148, R12 + B callbackasm1(SB) + MOVD $1149, R12 + B callbackasm1(SB) + MOVD $1150, R12 + B callbackasm1(SB) + MOVD $1151, R12 + B callbackasm1(SB) + MOVD $1152, R12 + B callbackasm1(SB) + MOVD $1153, R12 + B callbackasm1(SB) + MOVD $1154, R12 + B callbackasm1(SB) + MOVD $1155, R12 + B callbackasm1(SB) + MOVD $1156, R12 + B callbackasm1(SB) + MOVD $1157, R12 + B callbackasm1(SB) + MOVD $1158, R12 + B callbackasm1(SB) + MOVD $1159, R12 + B callbackasm1(SB) + MOVD $1160, R12 + B callbackasm1(SB) + MOVD $1161, R12 + B callbackasm1(SB) + MOVD $1162, R12 + B callbackasm1(SB) + MOVD $1163, R12 + B callbackasm1(SB) + MOVD $1164, R12 + B callbackasm1(SB) + MOVD $1165, R12 + B callbackasm1(SB) + MOVD $1166, R12 + B callbackasm1(SB) + MOVD $1167, R12 + B callbackasm1(SB) + MOVD $1168, R12 + B callbackasm1(SB) + MOVD $1169, R12 + B callbackasm1(SB) + MOVD $1170, R12 + B callbackasm1(SB) + MOVD $1171, R12 + B callbackasm1(SB) + MOVD $1172, R12 + B callbackasm1(SB) + MOVD $1173, R12 + B callbackasm1(SB) + MOVD $1174, R12 + B callbackasm1(SB) + MOVD $1175, R12 + B callbackasm1(SB) + MOVD $1176, R12 + B callbackasm1(SB) + MOVD $1177, R12 + B callbackasm1(SB) + MOVD $1178, R12 + B callbackasm1(SB) + MOVD $1179, R12 + B callbackasm1(SB) + MOVD $1180, R12 + B callbackasm1(SB) + MOVD $1181, R12 + B callbackasm1(SB) + MOVD $1182, R12 + B callbackasm1(SB) + MOVD $1183, R12 + B callbackasm1(SB) + MOVD $1184, R12 + B callbackasm1(SB) + MOVD $1185, R12 + B callbackasm1(SB) + MOVD $1186, R12 + B callbackasm1(SB) + MOVD $1187, R12 + B callbackasm1(SB) + MOVD $1188, R12 + B callbackasm1(SB) + MOVD $1189, R12 + B callbackasm1(SB) + MOVD $1190, R12 + B callbackasm1(SB) + MOVD $1191, R12 + B callbackasm1(SB) + MOVD $1192, R12 + B callbackasm1(SB) + MOVD $1193, R12 + B callbackasm1(SB) + MOVD $1194, R12 + B callbackasm1(SB) + MOVD $1195, R12 + B callbackasm1(SB) + MOVD $1196, R12 + B callbackasm1(SB) + MOVD $1197, R12 + B callbackasm1(SB) + MOVD $1198, R12 + B callbackasm1(SB) + MOVD $1199, R12 + B callbackasm1(SB) + MOVD $1200, R12 + B callbackasm1(SB) + MOVD $1201, R12 + B callbackasm1(SB) + MOVD $1202, R12 + B callbackasm1(SB) + MOVD $1203, R12 + B callbackasm1(SB) + MOVD $1204, R12 + B callbackasm1(SB) + MOVD $1205, R12 + B callbackasm1(SB) + MOVD $1206, R12 + B callbackasm1(SB) + MOVD $1207, R12 + B callbackasm1(SB) + MOVD $1208, R12 + B callbackasm1(SB) + MOVD $1209, R12 + B callbackasm1(SB) + MOVD $1210, R12 + B callbackasm1(SB) + MOVD $1211, R12 + B callbackasm1(SB) + MOVD $1212, R12 + B callbackasm1(SB) + MOVD $1213, R12 + B callbackasm1(SB) + MOVD $1214, R12 + B callbackasm1(SB) + MOVD $1215, R12 + B callbackasm1(SB) + MOVD $1216, R12 + B callbackasm1(SB) + MOVD $1217, R12 + B callbackasm1(SB) + MOVD $1218, R12 + B callbackasm1(SB) + MOVD $1219, R12 + B callbackasm1(SB) + MOVD $1220, R12 + B callbackasm1(SB) + MOVD $1221, R12 + B callbackasm1(SB) + MOVD $1222, R12 + B callbackasm1(SB) + MOVD $1223, R12 + B callbackasm1(SB) + MOVD $1224, R12 + B callbackasm1(SB) + MOVD $1225, R12 + B callbackasm1(SB) + MOVD $1226, R12 + B callbackasm1(SB) + MOVD $1227, R12 + B callbackasm1(SB) + MOVD $1228, R12 + B callbackasm1(SB) + MOVD $1229, R12 + B callbackasm1(SB) + MOVD $1230, R12 + B callbackasm1(SB) + MOVD $1231, R12 + B callbackasm1(SB) + MOVD $1232, R12 + B callbackasm1(SB) + MOVD $1233, R12 + B callbackasm1(SB) + MOVD $1234, R12 + B callbackasm1(SB) + MOVD $1235, R12 + B callbackasm1(SB) + MOVD $1236, R12 + B callbackasm1(SB) + MOVD $1237, R12 + B callbackasm1(SB) + MOVD $1238, R12 + B callbackasm1(SB) + MOVD $1239, R12 + B callbackasm1(SB) + MOVD $1240, R12 + B callbackasm1(SB) + MOVD $1241, R12 + B callbackasm1(SB) + MOVD $1242, R12 + B callbackasm1(SB) + MOVD $1243, R12 + B callbackasm1(SB) + MOVD $1244, R12 + B callbackasm1(SB) + MOVD $1245, R12 + B callbackasm1(SB) + MOVD $1246, R12 + B callbackasm1(SB) + MOVD $1247, R12 + B callbackasm1(SB) + MOVD $1248, R12 + B callbackasm1(SB) + MOVD $1249, R12 + B callbackasm1(SB) + MOVD $1250, R12 + B callbackasm1(SB) + MOVD $1251, R12 + B callbackasm1(SB) + MOVD $1252, R12 + B callbackasm1(SB) + MOVD $1253, R12 + B callbackasm1(SB) + MOVD $1254, R12 + B callbackasm1(SB) + MOVD $1255, R12 + B callbackasm1(SB) + MOVD $1256, R12 + B callbackasm1(SB) + MOVD $1257, R12 + B callbackasm1(SB) + MOVD $1258, R12 + B callbackasm1(SB) + MOVD $1259, R12 + B callbackasm1(SB) + MOVD $1260, R12 + B callbackasm1(SB) + MOVD $1261, R12 + B callbackasm1(SB) + MOVD $1262, R12 + B callbackasm1(SB) + MOVD $1263, R12 + B callbackasm1(SB) + MOVD $1264, R12 + B callbackasm1(SB) + MOVD $1265, R12 + B callbackasm1(SB) + MOVD $1266, R12 + B callbackasm1(SB) + MOVD $1267, R12 + B callbackasm1(SB) + MOVD $1268, R12 + B callbackasm1(SB) + MOVD $1269, R12 + B callbackasm1(SB) + MOVD $1270, R12 + B callbackasm1(SB) + MOVD $1271, R12 + B callbackasm1(SB) + MOVD $1272, R12 + B callbackasm1(SB) + MOVD $1273, R12 + B callbackasm1(SB) + MOVD $1274, R12 + B callbackasm1(SB) + MOVD $1275, R12 + B callbackasm1(SB) + MOVD $1276, R12 + B callbackasm1(SB) + MOVD $1277, R12 + B callbackasm1(SB) + MOVD $1278, R12 + B callbackasm1(SB) + MOVD $1279, R12 + B callbackasm1(SB) + MOVD $1280, R12 + B callbackasm1(SB) + MOVD $1281, R12 + B callbackasm1(SB) + MOVD $1282, R12 + B callbackasm1(SB) + MOVD $1283, R12 + B callbackasm1(SB) + MOVD $1284, R12 + B callbackasm1(SB) + MOVD $1285, R12 + B callbackasm1(SB) + MOVD $1286, R12 + B callbackasm1(SB) + MOVD $1287, R12 + B callbackasm1(SB) + MOVD $1288, R12 + B callbackasm1(SB) + MOVD $1289, R12 + B callbackasm1(SB) + MOVD $1290, R12 + B callbackasm1(SB) + MOVD $1291, R12 + B callbackasm1(SB) + MOVD $1292, R12 + B callbackasm1(SB) + MOVD $1293, R12 + B callbackasm1(SB) + MOVD $1294, R12 + B callbackasm1(SB) + MOVD $1295, R12 + B callbackasm1(SB) + MOVD $1296, R12 + B callbackasm1(SB) + MOVD $1297, R12 + B callbackasm1(SB) + MOVD $1298, R12 + B callbackasm1(SB) + MOVD $1299, R12 + B callbackasm1(SB) + MOVD $1300, R12 + B callbackasm1(SB) + MOVD $1301, R12 + B callbackasm1(SB) + MOVD $1302, R12 + B callbackasm1(SB) + MOVD $1303, R12 + B callbackasm1(SB) + MOVD $1304, R12 + B callbackasm1(SB) + MOVD $1305, R12 + B callbackasm1(SB) + MOVD $1306, R12 + B callbackasm1(SB) + MOVD $1307, R12 + B callbackasm1(SB) + MOVD $1308, R12 + B callbackasm1(SB) + MOVD $1309, R12 + B callbackasm1(SB) + MOVD $1310, R12 + B callbackasm1(SB) + MOVD $1311, R12 + B callbackasm1(SB) + MOVD $1312, R12 + B callbackasm1(SB) + MOVD $1313, R12 + B callbackasm1(SB) + MOVD $1314, R12 + B callbackasm1(SB) + MOVD $1315, R12 + B callbackasm1(SB) + MOVD $1316, R12 + B callbackasm1(SB) + MOVD $1317, R12 + B callbackasm1(SB) + MOVD $1318, R12 + B callbackasm1(SB) + MOVD $1319, R12 + B callbackasm1(SB) + MOVD $1320, R12 + B callbackasm1(SB) + MOVD $1321, R12 + B callbackasm1(SB) + MOVD $1322, R12 + B callbackasm1(SB) + MOVD $1323, R12 + B callbackasm1(SB) + MOVD $1324, R12 + B callbackasm1(SB) + MOVD $1325, R12 + B callbackasm1(SB) + MOVD $1326, R12 + B callbackasm1(SB) + MOVD $1327, R12 + B callbackasm1(SB) + MOVD $1328, R12 + B callbackasm1(SB) + MOVD $1329, R12 + B callbackasm1(SB) + MOVD $1330, R12 + B callbackasm1(SB) + MOVD $1331, R12 + B callbackasm1(SB) + MOVD $1332, R12 + B callbackasm1(SB) + MOVD $1333, R12 + B callbackasm1(SB) + MOVD $1334, R12 + B callbackasm1(SB) + MOVD $1335, R12 + B callbackasm1(SB) + MOVD $1336, R12 + B callbackasm1(SB) + MOVD $1337, R12 + B callbackasm1(SB) + MOVD $1338, R12 + B callbackasm1(SB) + MOVD $1339, R12 + B callbackasm1(SB) + MOVD $1340, R12 + B callbackasm1(SB) + MOVD $1341, R12 + B callbackasm1(SB) + MOVD $1342, R12 + B callbackasm1(SB) + MOVD $1343, R12 + B callbackasm1(SB) + MOVD $1344, R12 + B callbackasm1(SB) + MOVD $1345, R12 + B callbackasm1(SB) + MOVD $1346, R12 + B callbackasm1(SB) + MOVD $1347, R12 + B callbackasm1(SB) + MOVD $1348, R12 + B callbackasm1(SB) + MOVD $1349, R12 + B callbackasm1(SB) + MOVD $1350, R12 + B callbackasm1(SB) + MOVD $1351, R12 + B callbackasm1(SB) + MOVD $1352, R12 + B callbackasm1(SB) + MOVD $1353, R12 + B callbackasm1(SB) + MOVD $1354, R12 + B callbackasm1(SB) + MOVD $1355, R12 + B callbackasm1(SB) + MOVD $1356, R12 + B callbackasm1(SB) + MOVD $1357, R12 + B callbackasm1(SB) + MOVD $1358, R12 + B callbackasm1(SB) + MOVD $1359, R12 + B callbackasm1(SB) + MOVD $1360, R12 + B callbackasm1(SB) + MOVD $1361, R12 + B callbackasm1(SB) + MOVD $1362, R12 + B callbackasm1(SB) + MOVD $1363, R12 + B callbackasm1(SB) + MOVD $1364, R12 + B callbackasm1(SB) + MOVD $1365, R12 + B callbackasm1(SB) + MOVD $1366, R12 + B callbackasm1(SB) + MOVD $1367, R12 + B callbackasm1(SB) + MOVD $1368, R12 + B callbackasm1(SB) + MOVD $1369, R12 + B callbackasm1(SB) + MOVD $1370, R12 + B callbackasm1(SB) + MOVD $1371, R12 + B callbackasm1(SB) + MOVD $1372, R12 + B callbackasm1(SB) + MOVD $1373, R12 + B callbackasm1(SB) + MOVD $1374, R12 + B callbackasm1(SB) + MOVD $1375, R12 + B callbackasm1(SB) + MOVD $1376, R12 + B callbackasm1(SB) + MOVD $1377, R12 + B callbackasm1(SB) + MOVD $1378, R12 + B callbackasm1(SB) + MOVD $1379, R12 + B callbackasm1(SB) + MOVD $1380, R12 + B callbackasm1(SB) + MOVD $1381, R12 + B callbackasm1(SB) + MOVD $1382, R12 + B callbackasm1(SB) + MOVD $1383, R12 + B callbackasm1(SB) + MOVD $1384, R12 + B callbackasm1(SB) + MOVD $1385, R12 + B callbackasm1(SB) + MOVD $1386, R12 + B callbackasm1(SB) + MOVD $1387, R12 + B callbackasm1(SB) + MOVD $1388, R12 + B callbackasm1(SB) + MOVD $1389, R12 + B callbackasm1(SB) + MOVD $1390, R12 + B callbackasm1(SB) + MOVD $1391, R12 + B callbackasm1(SB) + MOVD $1392, R12 + B callbackasm1(SB) + MOVD $1393, R12 + B callbackasm1(SB) + MOVD $1394, R12 + B callbackasm1(SB) + MOVD $1395, R12 + B callbackasm1(SB) + MOVD $1396, R12 + B callbackasm1(SB) + MOVD $1397, R12 + B callbackasm1(SB) + MOVD $1398, R12 + B callbackasm1(SB) + MOVD $1399, R12 + B callbackasm1(SB) + MOVD $1400, R12 + B callbackasm1(SB) + MOVD $1401, R12 + B callbackasm1(SB) + MOVD $1402, R12 + B callbackasm1(SB) + MOVD $1403, R12 + B callbackasm1(SB) + MOVD $1404, R12 + B callbackasm1(SB) + MOVD $1405, R12 + B callbackasm1(SB) + MOVD $1406, R12 + B callbackasm1(SB) + MOVD $1407, R12 + B callbackasm1(SB) + MOVD $1408, R12 + B callbackasm1(SB) + MOVD $1409, R12 + B callbackasm1(SB) + MOVD $1410, R12 + B callbackasm1(SB) + MOVD $1411, R12 + B callbackasm1(SB) + MOVD $1412, R12 + B callbackasm1(SB) + MOVD $1413, R12 + B callbackasm1(SB) + MOVD $1414, R12 + B callbackasm1(SB) + MOVD $1415, R12 + B callbackasm1(SB) + MOVD $1416, R12 + B callbackasm1(SB) + MOVD $1417, R12 + B callbackasm1(SB) + MOVD $1418, R12 + B callbackasm1(SB) + MOVD $1419, R12 + B callbackasm1(SB) + MOVD $1420, R12 + B callbackasm1(SB) + MOVD $1421, R12 + B callbackasm1(SB) + MOVD $1422, R12 + B callbackasm1(SB) + MOVD $1423, R12 + B callbackasm1(SB) + MOVD $1424, R12 + B callbackasm1(SB) + MOVD $1425, R12 + B callbackasm1(SB) + MOVD $1426, R12 + B callbackasm1(SB) + MOVD $1427, R12 + B callbackasm1(SB) + MOVD $1428, R12 + B callbackasm1(SB) + MOVD $1429, R12 + B callbackasm1(SB) + MOVD $1430, R12 + B callbackasm1(SB) + MOVD $1431, R12 + B callbackasm1(SB) + MOVD $1432, R12 + B callbackasm1(SB) + MOVD $1433, R12 + B callbackasm1(SB) + MOVD $1434, R12 + B callbackasm1(SB) + MOVD $1435, R12 + B callbackasm1(SB) + MOVD $1436, R12 + B callbackasm1(SB) + MOVD $1437, R12 + B callbackasm1(SB) + MOVD $1438, R12 + B callbackasm1(SB) + MOVD $1439, R12 + B callbackasm1(SB) + MOVD $1440, R12 + B callbackasm1(SB) + MOVD $1441, R12 + B callbackasm1(SB) + MOVD $1442, R12 + B callbackasm1(SB) + MOVD $1443, R12 + B callbackasm1(SB) + MOVD $1444, R12 + B callbackasm1(SB) + MOVD $1445, R12 + B callbackasm1(SB) + MOVD $1446, R12 + B callbackasm1(SB) + MOVD $1447, R12 + B callbackasm1(SB) + MOVD $1448, R12 + B callbackasm1(SB) + MOVD $1449, R12 + B callbackasm1(SB) + MOVD $1450, R12 + B callbackasm1(SB) + MOVD $1451, R12 + B callbackasm1(SB) + MOVD $1452, R12 + B callbackasm1(SB) + MOVD $1453, R12 + B callbackasm1(SB) + MOVD $1454, R12 + B callbackasm1(SB) + MOVD $1455, R12 + B callbackasm1(SB) + MOVD $1456, R12 + B callbackasm1(SB) + MOVD $1457, R12 + B callbackasm1(SB) + MOVD $1458, R12 + B callbackasm1(SB) + MOVD $1459, R12 + B callbackasm1(SB) + MOVD $1460, R12 + B callbackasm1(SB) + MOVD $1461, R12 + B callbackasm1(SB) + MOVD $1462, R12 + B callbackasm1(SB) + MOVD $1463, R12 + B callbackasm1(SB) + MOVD $1464, R12 + B callbackasm1(SB) + MOVD $1465, R12 + B callbackasm1(SB) + MOVD $1466, R12 + B callbackasm1(SB) + MOVD $1467, R12 + B callbackasm1(SB) + MOVD $1468, R12 + B callbackasm1(SB) + MOVD $1469, R12 + B callbackasm1(SB) + MOVD $1470, R12 + B callbackasm1(SB) + MOVD $1471, R12 + B callbackasm1(SB) + MOVD $1472, R12 + B callbackasm1(SB) + MOVD $1473, R12 + B callbackasm1(SB) + MOVD $1474, R12 + B callbackasm1(SB) + MOVD $1475, R12 + B callbackasm1(SB) + MOVD $1476, R12 + B callbackasm1(SB) + MOVD $1477, R12 + B callbackasm1(SB) + MOVD $1478, R12 + B callbackasm1(SB) + MOVD $1479, R12 + B callbackasm1(SB) + MOVD $1480, R12 + B callbackasm1(SB) + MOVD $1481, R12 + B callbackasm1(SB) + MOVD $1482, R12 + B callbackasm1(SB) + MOVD $1483, R12 + B callbackasm1(SB) + MOVD $1484, R12 + B callbackasm1(SB) + MOVD $1485, R12 + B callbackasm1(SB) + MOVD $1486, R12 + B callbackasm1(SB) + MOVD $1487, R12 + B callbackasm1(SB) + MOVD $1488, R12 + B callbackasm1(SB) + MOVD $1489, R12 + B callbackasm1(SB) + MOVD $1490, R12 + B callbackasm1(SB) + MOVD $1491, R12 + B callbackasm1(SB) + MOVD $1492, R12 + B callbackasm1(SB) + MOVD $1493, R12 + B callbackasm1(SB) + MOVD $1494, R12 + B callbackasm1(SB) + MOVD $1495, R12 + B callbackasm1(SB) + MOVD $1496, R12 + B callbackasm1(SB) + MOVD $1497, R12 + B callbackasm1(SB) + MOVD $1498, R12 + B callbackasm1(SB) + MOVD $1499, R12 + B callbackasm1(SB) + MOVD $1500, R12 + B callbackasm1(SB) + MOVD $1501, R12 + B callbackasm1(SB) + MOVD $1502, R12 + B callbackasm1(SB) + MOVD $1503, R12 + B callbackasm1(SB) + MOVD $1504, R12 + B callbackasm1(SB) + MOVD $1505, R12 + B callbackasm1(SB) + MOVD $1506, R12 + B callbackasm1(SB) + MOVD $1507, R12 + B callbackasm1(SB) + MOVD $1508, R12 + B callbackasm1(SB) + MOVD $1509, R12 + B callbackasm1(SB) + MOVD $1510, R12 + B callbackasm1(SB) + MOVD $1511, R12 + B callbackasm1(SB) + MOVD $1512, R12 + B callbackasm1(SB) + MOVD $1513, R12 + B callbackasm1(SB) + MOVD $1514, R12 + B callbackasm1(SB) + MOVD $1515, R12 + B callbackasm1(SB) + MOVD $1516, R12 + B callbackasm1(SB) + MOVD $1517, R12 + B callbackasm1(SB) + MOVD $1518, R12 + B callbackasm1(SB) + MOVD $1519, R12 + B callbackasm1(SB) + MOVD $1520, R12 + B callbackasm1(SB) + MOVD $1521, R12 + B callbackasm1(SB) + MOVD $1522, R12 + B callbackasm1(SB) + MOVD $1523, R12 + B callbackasm1(SB) + MOVD $1524, R12 + B callbackasm1(SB) + MOVD $1525, R12 + B callbackasm1(SB) + MOVD $1526, R12 + B callbackasm1(SB) + MOVD $1527, R12 + B callbackasm1(SB) + MOVD $1528, R12 + B callbackasm1(SB) + MOVD $1529, R12 + B callbackasm1(SB) + MOVD $1530, R12 + B callbackasm1(SB) + MOVD $1531, R12 + B callbackasm1(SB) + MOVD $1532, R12 + B callbackasm1(SB) + MOVD $1533, R12 + B callbackasm1(SB) + MOVD $1534, R12 + B callbackasm1(SB) + MOVD $1535, R12 + B callbackasm1(SB) + MOVD $1536, R12 + B callbackasm1(SB) + MOVD $1537, R12 + B callbackasm1(SB) + MOVD $1538, R12 + B callbackasm1(SB) + MOVD $1539, R12 + B callbackasm1(SB) + MOVD $1540, R12 + B callbackasm1(SB) + MOVD $1541, R12 + B callbackasm1(SB) + MOVD $1542, R12 + B callbackasm1(SB) + MOVD $1543, R12 + B callbackasm1(SB) + MOVD $1544, R12 + B callbackasm1(SB) + MOVD $1545, R12 + B callbackasm1(SB) + MOVD $1546, R12 + B callbackasm1(SB) + MOVD $1547, R12 + B callbackasm1(SB) + MOVD $1548, R12 + B callbackasm1(SB) + MOVD $1549, R12 + B callbackasm1(SB) + MOVD $1550, R12 + B callbackasm1(SB) + MOVD $1551, R12 + B callbackasm1(SB) + MOVD $1552, R12 + B callbackasm1(SB) + MOVD $1553, R12 + B callbackasm1(SB) + MOVD $1554, R12 + B callbackasm1(SB) + MOVD $1555, R12 + B callbackasm1(SB) + MOVD $1556, R12 + B callbackasm1(SB) + MOVD $1557, R12 + B callbackasm1(SB) + MOVD $1558, R12 + B callbackasm1(SB) + MOVD $1559, R12 + B callbackasm1(SB) + MOVD $1560, R12 + B callbackasm1(SB) + MOVD $1561, R12 + B callbackasm1(SB) + MOVD $1562, R12 + B callbackasm1(SB) + MOVD $1563, R12 + B callbackasm1(SB) + MOVD $1564, R12 + B callbackasm1(SB) + MOVD $1565, R12 + B callbackasm1(SB) + MOVD $1566, R12 + B callbackasm1(SB) + MOVD $1567, R12 + B callbackasm1(SB) + MOVD $1568, R12 + B callbackasm1(SB) + MOVD $1569, R12 + B callbackasm1(SB) + MOVD $1570, R12 + B callbackasm1(SB) + MOVD $1571, R12 + B callbackasm1(SB) + MOVD $1572, R12 + B callbackasm1(SB) + MOVD $1573, R12 + B callbackasm1(SB) + MOVD $1574, R12 + B callbackasm1(SB) + MOVD $1575, R12 + B callbackasm1(SB) + MOVD $1576, R12 + B callbackasm1(SB) + MOVD $1577, R12 + B callbackasm1(SB) + MOVD $1578, R12 + B callbackasm1(SB) + MOVD $1579, R12 + B callbackasm1(SB) + MOVD $1580, R12 + B callbackasm1(SB) + MOVD $1581, R12 + B callbackasm1(SB) + MOVD $1582, R12 + B callbackasm1(SB) + MOVD $1583, R12 + B callbackasm1(SB) + MOVD $1584, R12 + B callbackasm1(SB) + MOVD $1585, R12 + B callbackasm1(SB) + MOVD $1586, R12 + B callbackasm1(SB) + MOVD $1587, R12 + B callbackasm1(SB) + MOVD $1588, R12 + B callbackasm1(SB) + MOVD $1589, R12 + B callbackasm1(SB) + MOVD $1590, R12 + B callbackasm1(SB) + MOVD $1591, R12 + B callbackasm1(SB) + MOVD $1592, R12 + B callbackasm1(SB) + MOVD $1593, R12 + B callbackasm1(SB) + MOVD $1594, R12 + B callbackasm1(SB) + MOVD $1595, R12 + B callbackasm1(SB) + MOVD $1596, R12 + B callbackasm1(SB) + MOVD $1597, R12 + B callbackasm1(SB) + MOVD $1598, R12 + B callbackasm1(SB) + MOVD $1599, R12 + B callbackasm1(SB) + MOVD $1600, R12 + B callbackasm1(SB) + MOVD $1601, R12 + B callbackasm1(SB) + MOVD $1602, R12 + B callbackasm1(SB) + MOVD $1603, R12 + B callbackasm1(SB) + MOVD $1604, R12 + B callbackasm1(SB) + MOVD $1605, R12 + B callbackasm1(SB) + MOVD $1606, R12 + B callbackasm1(SB) + MOVD $1607, R12 + B callbackasm1(SB) + MOVD $1608, R12 + B callbackasm1(SB) + MOVD $1609, R12 + B callbackasm1(SB) + MOVD $1610, R12 + B callbackasm1(SB) + MOVD $1611, R12 + B callbackasm1(SB) + MOVD $1612, R12 + B callbackasm1(SB) + MOVD $1613, R12 + B callbackasm1(SB) + MOVD $1614, R12 + B callbackasm1(SB) + MOVD $1615, R12 + B callbackasm1(SB) + MOVD $1616, R12 + B callbackasm1(SB) + MOVD $1617, R12 + B callbackasm1(SB) + MOVD $1618, R12 + B callbackasm1(SB) + MOVD $1619, R12 + B callbackasm1(SB) + MOVD $1620, R12 + B callbackasm1(SB) + MOVD $1621, R12 + B callbackasm1(SB) + MOVD $1622, R12 + B callbackasm1(SB) + MOVD $1623, R12 + B callbackasm1(SB) + MOVD $1624, R12 + B callbackasm1(SB) + MOVD $1625, R12 + B callbackasm1(SB) + MOVD $1626, R12 + B callbackasm1(SB) + MOVD $1627, R12 + B callbackasm1(SB) + MOVD $1628, R12 + B callbackasm1(SB) + MOVD $1629, R12 + B callbackasm1(SB) + MOVD $1630, R12 + B callbackasm1(SB) + MOVD $1631, R12 + B callbackasm1(SB) + MOVD $1632, R12 + B callbackasm1(SB) + MOVD $1633, R12 + B callbackasm1(SB) + MOVD $1634, R12 + B callbackasm1(SB) + MOVD $1635, R12 + B callbackasm1(SB) + MOVD $1636, R12 + B callbackasm1(SB) + MOVD $1637, R12 + B callbackasm1(SB) + MOVD $1638, R12 + B callbackasm1(SB) + MOVD $1639, R12 + B callbackasm1(SB) + MOVD $1640, R12 + B callbackasm1(SB) + MOVD $1641, R12 + B callbackasm1(SB) + MOVD $1642, R12 + B callbackasm1(SB) + MOVD $1643, R12 + B callbackasm1(SB) + MOVD $1644, R12 + B callbackasm1(SB) + MOVD $1645, R12 + B callbackasm1(SB) + MOVD $1646, R12 + B callbackasm1(SB) + MOVD $1647, R12 + B callbackasm1(SB) + MOVD $1648, R12 + B callbackasm1(SB) + MOVD $1649, R12 + B callbackasm1(SB) + MOVD $1650, R12 + B callbackasm1(SB) + MOVD $1651, R12 + B callbackasm1(SB) + MOVD $1652, R12 + B callbackasm1(SB) + MOVD $1653, R12 + B callbackasm1(SB) + MOVD $1654, R12 + B callbackasm1(SB) + MOVD $1655, R12 + B callbackasm1(SB) + MOVD $1656, R12 + B callbackasm1(SB) + MOVD $1657, R12 + B callbackasm1(SB) + MOVD $1658, R12 + B callbackasm1(SB) + MOVD $1659, R12 + B callbackasm1(SB) + MOVD $1660, R12 + B callbackasm1(SB) + MOVD $1661, R12 + B callbackasm1(SB) + MOVD $1662, R12 + B callbackasm1(SB) + MOVD $1663, R12 + B callbackasm1(SB) + MOVD $1664, R12 + B callbackasm1(SB) + MOVD $1665, R12 + B callbackasm1(SB) + MOVD $1666, R12 + B callbackasm1(SB) + MOVD $1667, R12 + B callbackasm1(SB) + MOVD $1668, R12 + B callbackasm1(SB) + MOVD $1669, R12 + B callbackasm1(SB) + MOVD $1670, R12 + B callbackasm1(SB) + MOVD $1671, R12 + B callbackasm1(SB) + MOVD $1672, R12 + B callbackasm1(SB) + MOVD $1673, R12 + B callbackasm1(SB) + MOVD $1674, R12 + B callbackasm1(SB) + MOVD $1675, R12 + B callbackasm1(SB) + MOVD $1676, R12 + B callbackasm1(SB) + MOVD $1677, R12 + B callbackasm1(SB) + MOVD $1678, R12 + B callbackasm1(SB) + MOVD $1679, R12 + B callbackasm1(SB) + MOVD $1680, R12 + B callbackasm1(SB) + MOVD $1681, R12 + B callbackasm1(SB) + MOVD $1682, R12 + B callbackasm1(SB) + MOVD $1683, R12 + B callbackasm1(SB) + MOVD $1684, R12 + B callbackasm1(SB) + MOVD $1685, R12 + B callbackasm1(SB) + MOVD $1686, R12 + B callbackasm1(SB) + MOVD $1687, R12 + B callbackasm1(SB) + MOVD $1688, R12 + B callbackasm1(SB) + MOVD $1689, R12 + B callbackasm1(SB) + MOVD $1690, R12 + B callbackasm1(SB) + MOVD $1691, R12 + B callbackasm1(SB) + MOVD $1692, R12 + B callbackasm1(SB) + MOVD $1693, R12 + B callbackasm1(SB) + MOVD $1694, R12 + B callbackasm1(SB) + MOVD $1695, R12 + B callbackasm1(SB) + MOVD $1696, R12 + B callbackasm1(SB) + MOVD $1697, R12 + B callbackasm1(SB) + MOVD $1698, R12 + B callbackasm1(SB) + MOVD $1699, R12 + B callbackasm1(SB) + MOVD $1700, R12 + B callbackasm1(SB) + MOVD $1701, R12 + B callbackasm1(SB) + MOVD $1702, R12 + B callbackasm1(SB) + MOVD $1703, R12 + B callbackasm1(SB) + MOVD $1704, R12 + B callbackasm1(SB) + MOVD $1705, R12 + B callbackasm1(SB) + MOVD $1706, R12 + B callbackasm1(SB) + MOVD $1707, R12 + B callbackasm1(SB) + MOVD $1708, R12 + B callbackasm1(SB) + MOVD $1709, R12 + B callbackasm1(SB) + MOVD $1710, R12 + B callbackasm1(SB) + MOVD $1711, R12 + B callbackasm1(SB) + MOVD $1712, R12 + B callbackasm1(SB) + MOVD $1713, R12 + B callbackasm1(SB) + MOVD $1714, R12 + B callbackasm1(SB) + MOVD $1715, R12 + B callbackasm1(SB) + MOVD $1716, R12 + B callbackasm1(SB) + MOVD $1717, R12 + B callbackasm1(SB) + MOVD $1718, R12 + B callbackasm1(SB) + MOVD $1719, R12 + B callbackasm1(SB) + MOVD $1720, R12 + B callbackasm1(SB) + MOVD $1721, R12 + B callbackasm1(SB) + MOVD $1722, R12 + B callbackasm1(SB) + MOVD $1723, R12 + B callbackasm1(SB) + MOVD $1724, R12 + B callbackasm1(SB) + MOVD $1725, R12 + B callbackasm1(SB) + MOVD $1726, R12 + B callbackasm1(SB) + MOVD $1727, R12 + B callbackasm1(SB) + MOVD $1728, R12 + B callbackasm1(SB) + MOVD $1729, R12 + B callbackasm1(SB) + MOVD $1730, R12 + B callbackasm1(SB) + MOVD $1731, R12 + B callbackasm1(SB) + MOVD $1732, R12 + B callbackasm1(SB) + MOVD $1733, R12 + B callbackasm1(SB) + MOVD $1734, R12 + B callbackasm1(SB) + MOVD $1735, R12 + B callbackasm1(SB) + MOVD $1736, R12 + B callbackasm1(SB) + MOVD $1737, R12 + B callbackasm1(SB) + MOVD $1738, R12 + B callbackasm1(SB) + MOVD $1739, R12 + B callbackasm1(SB) + MOVD $1740, R12 + B callbackasm1(SB) + MOVD $1741, R12 + B callbackasm1(SB) + MOVD $1742, R12 + B callbackasm1(SB) + MOVD $1743, R12 + B callbackasm1(SB) + MOVD $1744, R12 + B callbackasm1(SB) + MOVD $1745, R12 + B callbackasm1(SB) + MOVD $1746, R12 + B callbackasm1(SB) + MOVD $1747, R12 + B callbackasm1(SB) + MOVD $1748, R12 + B callbackasm1(SB) + MOVD $1749, R12 + B callbackasm1(SB) + MOVD $1750, R12 + B callbackasm1(SB) + MOVD $1751, R12 + B callbackasm1(SB) + MOVD $1752, R12 + B callbackasm1(SB) + MOVD $1753, R12 + B callbackasm1(SB) + MOVD $1754, R12 + B callbackasm1(SB) + MOVD $1755, R12 + B callbackasm1(SB) + MOVD $1756, R12 + B callbackasm1(SB) + MOVD $1757, R12 + B callbackasm1(SB) + MOVD $1758, R12 + B callbackasm1(SB) + MOVD $1759, R12 + B callbackasm1(SB) + MOVD $1760, R12 + B callbackasm1(SB) + MOVD $1761, R12 + B callbackasm1(SB) + MOVD $1762, R12 + B callbackasm1(SB) + MOVD $1763, R12 + B callbackasm1(SB) + MOVD $1764, R12 + B callbackasm1(SB) + MOVD $1765, R12 + B callbackasm1(SB) + MOVD $1766, R12 + B callbackasm1(SB) + MOVD $1767, R12 + B callbackasm1(SB) + MOVD $1768, R12 + B callbackasm1(SB) + MOVD $1769, R12 + B callbackasm1(SB) + MOVD $1770, R12 + B callbackasm1(SB) + MOVD $1771, R12 + B callbackasm1(SB) + MOVD $1772, R12 + B callbackasm1(SB) + MOVD $1773, R12 + B callbackasm1(SB) + MOVD $1774, R12 + B callbackasm1(SB) + MOVD $1775, R12 + B callbackasm1(SB) + MOVD $1776, R12 + B callbackasm1(SB) + MOVD $1777, R12 + B callbackasm1(SB) + MOVD $1778, R12 + B callbackasm1(SB) + MOVD $1779, R12 + B callbackasm1(SB) + MOVD $1780, R12 + B callbackasm1(SB) + MOVD $1781, R12 + B callbackasm1(SB) + MOVD $1782, R12 + B callbackasm1(SB) + MOVD $1783, R12 + B callbackasm1(SB) + MOVD $1784, R12 + B callbackasm1(SB) + MOVD $1785, R12 + B callbackasm1(SB) + MOVD $1786, R12 + B callbackasm1(SB) + MOVD $1787, R12 + B callbackasm1(SB) + MOVD $1788, R12 + B callbackasm1(SB) + MOVD $1789, R12 + B callbackasm1(SB) + MOVD $1790, R12 + B callbackasm1(SB) + MOVD $1791, R12 + B callbackasm1(SB) + MOVD $1792, R12 + B callbackasm1(SB) + MOVD $1793, R12 + B callbackasm1(SB) + MOVD $1794, R12 + B callbackasm1(SB) + MOVD $1795, R12 + B callbackasm1(SB) + MOVD $1796, R12 + B callbackasm1(SB) + MOVD $1797, R12 + B callbackasm1(SB) + MOVD $1798, R12 + B callbackasm1(SB) + MOVD $1799, R12 + B callbackasm1(SB) + MOVD $1800, R12 + B callbackasm1(SB) + MOVD $1801, R12 + B callbackasm1(SB) + MOVD $1802, R12 + B callbackasm1(SB) + MOVD $1803, R12 + B callbackasm1(SB) + MOVD $1804, R12 + B callbackasm1(SB) + MOVD $1805, R12 + B callbackasm1(SB) + MOVD $1806, R12 + B callbackasm1(SB) + MOVD $1807, R12 + B callbackasm1(SB) + MOVD $1808, R12 + B callbackasm1(SB) + MOVD $1809, R12 + B callbackasm1(SB) + MOVD $1810, R12 + B callbackasm1(SB) + MOVD $1811, R12 + B callbackasm1(SB) + MOVD $1812, R12 + B callbackasm1(SB) + MOVD $1813, R12 + B callbackasm1(SB) + MOVD $1814, R12 + B callbackasm1(SB) + MOVD $1815, R12 + B callbackasm1(SB) + MOVD $1816, R12 + B callbackasm1(SB) + MOVD $1817, R12 + B callbackasm1(SB) + MOVD $1818, R12 + B callbackasm1(SB) + MOVD $1819, R12 + B callbackasm1(SB) + MOVD $1820, R12 + B callbackasm1(SB) + MOVD $1821, R12 + B callbackasm1(SB) + MOVD $1822, R12 + B callbackasm1(SB) + MOVD $1823, R12 + B callbackasm1(SB) + MOVD $1824, R12 + B callbackasm1(SB) + MOVD $1825, R12 + B callbackasm1(SB) + MOVD $1826, R12 + B callbackasm1(SB) + MOVD $1827, R12 + B callbackasm1(SB) + MOVD $1828, R12 + B callbackasm1(SB) + MOVD $1829, R12 + B callbackasm1(SB) + MOVD $1830, R12 + B callbackasm1(SB) + MOVD $1831, R12 + B callbackasm1(SB) + MOVD $1832, R12 + B callbackasm1(SB) + MOVD $1833, R12 + B callbackasm1(SB) + MOVD $1834, R12 + B callbackasm1(SB) + MOVD $1835, R12 + B callbackasm1(SB) + MOVD $1836, R12 + B callbackasm1(SB) + MOVD $1837, R12 + B callbackasm1(SB) + MOVD $1838, R12 + B callbackasm1(SB) + MOVD $1839, R12 + B callbackasm1(SB) + MOVD $1840, R12 + B callbackasm1(SB) + MOVD $1841, R12 + B callbackasm1(SB) + MOVD $1842, R12 + B callbackasm1(SB) + MOVD $1843, R12 + B callbackasm1(SB) + MOVD $1844, R12 + B callbackasm1(SB) + MOVD $1845, R12 + B callbackasm1(SB) + MOVD $1846, R12 + B callbackasm1(SB) + MOVD $1847, R12 + B callbackasm1(SB) + MOVD $1848, R12 + B callbackasm1(SB) + MOVD $1849, R12 + B callbackasm1(SB) + MOVD $1850, R12 + B callbackasm1(SB) + MOVD $1851, R12 + B callbackasm1(SB) + MOVD $1852, R12 + B callbackasm1(SB) + MOVD $1853, R12 + B callbackasm1(SB) + MOVD $1854, R12 + B callbackasm1(SB) + MOVD $1855, R12 + B callbackasm1(SB) + MOVD $1856, R12 + B callbackasm1(SB) + MOVD $1857, R12 + B callbackasm1(SB) + MOVD $1858, R12 + B callbackasm1(SB) + MOVD $1859, R12 + B callbackasm1(SB) + MOVD $1860, R12 + B callbackasm1(SB) + MOVD $1861, R12 + B callbackasm1(SB) + MOVD $1862, R12 + B callbackasm1(SB) + MOVD $1863, R12 + B callbackasm1(SB) + MOVD $1864, R12 + B callbackasm1(SB) + MOVD $1865, R12 + B callbackasm1(SB) + MOVD $1866, R12 + B callbackasm1(SB) + MOVD $1867, R12 + B callbackasm1(SB) + MOVD $1868, R12 + B callbackasm1(SB) + MOVD $1869, R12 + B callbackasm1(SB) + MOVD $1870, R12 + B callbackasm1(SB) + MOVD $1871, R12 + B callbackasm1(SB) + MOVD $1872, R12 + B callbackasm1(SB) + MOVD $1873, R12 + B callbackasm1(SB) + MOVD $1874, R12 + B callbackasm1(SB) + MOVD $1875, R12 + B callbackasm1(SB) + MOVD $1876, R12 + B callbackasm1(SB) + MOVD $1877, R12 + B callbackasm1(SB) + MOVD $1878, R12 + B callbackasm1(SB) + MOVD $1879, R12 + B callbackasm1(SB) + MOVD $1880, R12 + B callbackasm1(SB) + MOVD $1881, R12 + B callbackasm1(SB) + MOVD $1882, R12 + B callbackasm1(SB) + MOVD $1883, R12 + B callbackasm1(SB) + MOVD $1884, R12 + B callbackasm1(SB) + MOVD $1885, R12 + B callbackasm1(SB) + MOVD $1886, R12 + B callbackasm1(SB) + MOVD $1887, R12 + B callbackasm1(SB) + MOVD $1888, R12 + B callbackasm1(SB) + MOVD $1889, R12 + B callbackasm1(SB) + MOVD $1890, R12 + B callbackasm1(SB) + MOVD $1891, R12 + B callbackasm1(SB) + MOVD $1892, R12 + B callbackasm1(SB) + MOVD $1893, R12 + B callbackasm1(SB) + MOVD $1894, R12 + B callbackasm1(SB) + MOVD $1895, R12 + B callbackasm1(SB) + MOVD $1896, R12 + B callbackasm1(SB) + MOVD $1897, R12 + B callbackasm1(SB) + MOVD $1898, R12 + B callbackasm1(SB) + MOVD $1899, R12 + B callbackasm1(SB) + MOVD $1900, R12 + B callbackasm1(SB) + MOVD $1901, R12 + B callbackasm1(SB) + MOVD $1902, R12 + B callbackasm1(SB) + MOVD $1903, R12 + B callbackasm1(SB) + MOVD $1904, R12 + B callbackasm1(SB) + MOVD $1905, R12 + B callbackasm1(SB) + MOVD $1906, R12 + B callbackasm1(SB) + MOVD $1907, R12 + B callbackasm1(SB) + MOVD $1908, R12 + B callbackasm1(SB) + MOVD $1909, R12 + B callbackasm1(SB) + MOVD $1910, R12 + B callbackasm1(SB) + MOVD $1911, R12 + B callbackasm1(SB) + MOVD $1912, R12 + B callbackasm1(SB) + MOVD $1913, R12 + B callbackasm1(SB) + MOVD $1914, R12 + B callbackasm1(SB) + MOVD $1915, R12 + B callbackasm1(SB) + MOVD $1916, R12 + B callbackasm1(SB) + MOVD $1917, R12 + B callbackasm1(SB) + MOVD $1918, R12 + B callbackasm1(SB) + MOVD $1919, R12 + B callbackasm1(SB) + MOVD $1920, R12 + B callbackasm1(SB) + MOVD $1921, R12 + B callbackasm1(SB) + MOVD $1922, R12 + B callbackasm1(SB) + MOVD $1923, R12 + B callbackasm1(SB) + MOVD $1924, R12 + B callbackasm1(SB) + MOVD $1925, R12 + B callbackasm1(SB) + MOVD $1926, R12 + B callbackasm1(SB) + MOVD $1927, R12 + B callbackasm1(SB) + MOVD $1928, R12 + B callbackasm1(SB) + MOVD $1929, R12 + B callbackasm1(SB) + MOVD $1930, R12 + B callbackasm1(SB) + MOVD $1931, R12 + B callbackasm1(SB) + MOVD $1932, R12 + B callbackasm1(SB) + MOVD $1933, R12 + B callbackasm1(SB) + MOVD $1934, R12 + B callbackasm1(SB) + MOVD $1935, R12 + B callbackasm1(SB) + MOVD $1936, R12 + B callbackasm1(SB) + MOVD $1937, R12 + B callbackasm1(SB) + MOVD $1938, R12 + B callbackasm1(SB) + MOVD $1939, R12 + B callbackasm1(SB) + MOVD $1940, R12 + B callbackasm1(SB) + MOVD $1941, R12 + B callbackasm1(SB) + MOVD $1942, R12 + B callbackasm1(SB) + MOVD $1943, R12 + B callbackasm1(SB) + MOVD $1944, R12 + B callbackasm1(SB) + MOVD $1945, R12 + B callbackasm1(SB) + MOVD $1946, R12 + B callbackasm1(SB) + MOVD $1947, R12 + B callbackasm1(SB) + MOVD $1948, R12 + B callbackasm1(SB) + MOVD $1949, R12 + B callbackasm1(SB) + MOVD $1950, R12 + B callbackasm1(SB) + MOVD $1951, R12 + B callbackasm1(SB) + MOVD $1952, R12 + B callbackasm1(SB) + MOVD $1953, R12 + B callbackasm1(SB) + MOVD $1954, R12 + B callbackasm1(SB) + MOVD $1955, R12 + B callbackasm1(SB) + MOVD $1956, R12 + B callbackasm1(SB) + MOVD $1957, R12 + B callbackasm1(SB) + MOVD $1958, R12 + B callbackasm1(SB) + MOVD $1959, R12 + B callbackasm1(SB) + MOVD $1960, R12 + B callbackasm1(SB) + MOVD $1961, R12 + B callbackasm1(SB) + MOVD $1962, R12 + B callbackasm1(SB) + MOVD $1963, R12 + B callbackasm1(SB) + MOVD $1964, R12 + B callbackasm1(SB) + MOVD $1965, R12 + B callbackasm1(SB) + MOVD $1966, R12 + B callbackasm1(SB) + MOVD $1967, R12 + B callbackasm1(SB) + MOVD $1968, R12 + B callbackasm1(SB) + MOVD $1969, R12 + B callbackasm1(SB) + MOVD $1970, R12 + B callbackasm1(SB) + MOVD $1971, R12 + B callbackasm1(SB) + MOVD $1972, R12 + B callbackasm1(SB) + MOVD $1973, R12 + B callbackasm1(SB) + MOVD $1974, R12 + B callbackasm1(SB) + MOVD $1975, R12 + B callbackasm1(SB) + MOVD $1976, R12 + B callbackasm1(SB) + MOVD $1977, R12 + B callbackasm1(SB) + MOVD $1978, R12 + B callbackasm1(SB) + MOVD $1979, R12 + B callbackasm1(SB) + MOVD $1980, R12 + B callbackasm1(SB) + MOVD $1981, R12 + B callbackasm1(SB) + MOVD $1982, R12 + B callbackasm1(SB) + MOVD $1983, R12 + B callbackasm1(SB) + MOVD $1984, R12 + B callbackasm1(SB) + MOVD $1985, R12 + B callbackasm1(SB) + MOVD $1986, R12 + B callbackasm1(SB) + MOVD $1987, R12 + B callbackasm1(SB) + MOVD $1988, R12 + B callbackasm1(SB) + MOVD $1989, R12 + B callbackasm1(SB) + MOVD $1990, R12 + B callbackasm1(SB) + MOVD $1991, R12 + B callbackasm1(SB) + MOVD $1992, R12 + B callbackasm1(SB) + MOVD $1993, R12 + B callbackasm1(SB) + MOVD $1994, R12 + B callbackasm1(SB) + MOVD $1995, R12 + B callbackasm1(SB) + MOVD $1996, R12 + B callbackasm1(SB) + MOVD $1997, R12 + B callbackasm1(SB) + MOVD $1998, R12 + B callbackasm1(SB) + MOVD $1999, R12 + B callbackasm1(SB) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.go index 642b31f895..258fcfe2fb 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/deprecation.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/annotations/deprecation.proto package annotations diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.go index cab78deb2c..828c87c5e3 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/annotations/resource.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/annotations/resource.proto package annotations diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/address.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/address.pb.go index df5b748dbe..a0852aa600 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/address.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/address.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/address.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/backoff.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/backoff.pb.go index 97bf7fbe54..68841ad157 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/backoff.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/backoff.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/backoff.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/base.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/base.pb.go index 37c18030bc..862e09a833 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/base.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/base.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/base.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/config_source.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/config_source.pb.go index 3675e9ab7b..295398b9f1 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/config_source.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/config_source.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/config_source.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/event_service_config.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/event_service_config.pb.go index 77c3825cdc..8d995326c1 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/event_service_config.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/event_service_config.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/event_service_config.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/extension.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/extension.pb.go index ca27380c95..81ec41a6e7 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/extension.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/extension.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/extension.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_method_list.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_method_list.pb.go index be6d9c1278..199ac40f04 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_method_list.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_method_list.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/grpc_method_list.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service.pb.go index 7e56d3db7f..3967277f61 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/grpc_service.proto package corev3 @@ -150,6 +150,7 @@ func (*GrpcService_EnvoyGrpc_) isGrpcService_TargetSpecifier() {} func (*GrpcService_GoogleGrpc_) isGrpcService_TargetSpecifier() {} +// [#next-free-field: 6] type GrpcService_EnvoyGrpc struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -172,6 +173,11 @@ type GrpcService_EnvoyGrpc struct { // This limit is applied to individual messages in the streaming response and not the total size of streaming response. // Defaults to 0, which means unlimited. MaxReceiveMessageLength *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=max_receive_message_length,json=maxReceiveMessageLength,proto3" json:"max_receive_message_length,omitempty"` + // This provides gRPC client level control over envoy generated headers. + // If false, the header will be sent but it can be overridden by per stream option. + // If true, the header will be removed and can not be overridden by per stream option. + // Default to false. + SkipEnvoyHeaders bool `protobuf:"varint,5,opt,name=skip_envoy_headers,json=skipEnvoyHeaders,proto3" json:"skip_envoy_headers,omitempty"` } func (x *GrpcService_EnvoyGrpc) Reset() { @@ -234,6 +240,13 @@ func (x *GrpcService_EnvoyGrpc) GetMaxReceiveMessageLength() *wrapperspb.UInt32V return nil } +func (x *GrpcService_EnvoyGrpc) GetSkipEnvoyHeaders() bool { + if x != nil { + return x.SkipEnvoyHeaders + } + return false +} + // [#next-free-field: 9] type GrpcService_GoogleGrpc struct { state protoimpl.MessageState @@ -1226,7 +1239,7 @@ var file_envoy_config_core_v3_grpc_service_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xf3, 0x22, 0x0a, 0x0b, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x23, 0x0a, 0x0b, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, @@ -1249,7 +1262,7 @@ var file_envoy_config_core_v3_grpc_service_proto_rawDesc = []byte{ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, - 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0xb9, 0x02, 0x0a, 0x09, + 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0xe7, 0x02, 0x0a, 0x09, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x47, 0x72, 0x70, 0x63, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, @@ -1266,255 +1279,258 @@ var file_envoy_config_core_v3_grpc_service_proto_rawDesc = []byte{ 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x17, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x47, 0x72, 0x70, 0x63, 0x1a, 0xfa, 0x1c, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x12, 0x26, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x72, 0x69, 0x12, 0x70, - 0x0a, 0x13, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x12, 0x63, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x12, 0x67, 0x0a, 0x10, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x0f, 0x63, 0x61, 0x6c, 0x6c, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, - 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x12, 0x38, 0x0a, 0x18, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, - 0x0a, 0x1d, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x62, 0x75, 0x66, - 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x19, 0x70, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, - 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x5b, - 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x52, 0x0b, - 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x9d, 0x02, 0x0a, 0x0e, - 0x53, 0x73, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x3f, - 0x0a, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, - 0x49, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x0a, - 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x65, - 0x72, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x09, 0x63, 0x65, 0x72, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, - 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x6c, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x60, 0x0a, 0x16, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, + 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x6b, 0x69, 0x70, 0x5f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x6b, 0x69, 0x70, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, - 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x92, 0x03, - 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x6c, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x73, - 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x0e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0d, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x72, 0x0a, - 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x76, 0x6f, + 0x79, 0x47, 0x72, 0x70, 0x63, 0x1a, 0xfa, 0x1c, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x47, 0x72, 0x70, 0x63, 0x12, 0x26, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x72, 0x69, 0x12, 0x70, 0x0a, 0x13, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x12, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x67, + 0x0a, 0x10, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, - 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, - 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x1a, 0x88, 0x0f, 0x0a, 0x0f, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x4c, 0x0a, 0x15, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x65, 0x6e, - 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x48, 0x00, 0x52, 0x13, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x12, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x9e, 0x01, - 0x0a, 0x1a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x5f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, - 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, - 0x57, 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x17, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x77, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x72, - 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x69, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x0f, 0x63, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x12, 0x38, 0x0a, 0x18, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, 0x0a, 0x1d, + 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, + 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x19, 0x70, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x0c, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, - 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x09, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, - 0x61, 0x6d, 0x12, 0x7d, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x12, 0x6a, 0x0a, 0x0b, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x52, 0x0b, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x9d, 0x02, 0x0a, 0x0e, 0x53, 0x73, + 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x0a, + 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x49, 0x0a, + 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x0a, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x65, 0x72, 0x74, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, + 0x63, 0x65, 0x72, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, + 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x6c, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x60, 0x0a, 0x16, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, + 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x47, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x92, 0x03, 0x0a, 0x12, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x6c, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x73, 0x6c, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x0e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x72, 0x0a, 0x11, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, - 0x00, 0x52, 0x0a, 0x73, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0xd9, 0x01, - 0x0a, 0x22, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4a, 0x57, 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x73, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, - 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x14, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x3a, 0x62, 0x9a, 0xc5, 0x88, 0x1e, 0x5d, 0x0a, 0x5b, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x57, 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0xcc, 0x01, 0x0a, 0x14, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x3a, 0x54, 0x9a, 0xc5, 0x88, 0x1e, 0x4f, 0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, + 0x47, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x10, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x3a, + 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, + 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x42, 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x1a, 0x88, 0x0f, 0x0a, 0x0f, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x4c, 0x0a, 0x15, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x48, 0x00, 0x52, 0x13, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x12, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x9e, 0x01, 0x0a, 0x1a, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x5f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, + 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x57, 0x54, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x48, 0x00, 0x52, 0x17, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x4a, 0x77, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x72, 0x0a, 0x0a, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x69, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, + 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x09, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x61, 0x6d, + 0x12, 0x7d, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0xea, 0x01, 0x0a, 0x1d, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x5d, 0x9a, 0xc5, 0x88, 0x1e, 0x58, - 0x0a, 0x56, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, - 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xd7, 0x03, 0x0a, 0x0a, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, - 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, - 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x72, - 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, - 0x30, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x28, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, + 0x61, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, + 0x6a, 0x0a, 0x0b, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x2e, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x0a, 0x73, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0xd9, 0x01, 0x0a, 0x22, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x57, + 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x73, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x34, 0x0a, + 0x16, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x73, 0x3a, 0x62, 0x9a, 0xc5, 0x88, 0x1e, 0x5d, 0x0a, 0x5b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, - 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, - 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x42, 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xc3, 0x02, - 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x56, 0x0a, - 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x41, 0x72, 0x67, 0x73, 0x2e, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x04, 0x61, 0x72, 0x67, 0x73, 0x1a, 0x63, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, - 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x16, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x77, 0x0a, 0x09, 0x41, 0x72, - 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x54, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, - 0x67, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, + 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x4a, 0x57, 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0xcc, 0x01, 0x0a, 0x14, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x3a, 0x54, 0x9a, 0xc5, 0x88, 0x1e, 0x4f, 0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, + 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0xea, 0x01, 0x0a, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, + 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x5d, 0x9a, 0xc5, 0x88, 0x1e, 0x58, 0x0a, 0x56, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x1a, 0xd7, 0x03, 0x0a, 0x0a, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x72, 0x69, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, + 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, + 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x30, 0x0a, + 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, + 0x10, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x2e, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3f, 0x9a, + 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, + 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, 0x1b, + 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xc3, 0x02, 0x0a, 0x0b, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x56, 0x0a, 0x04, 0x61, + 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, + 0x72, 0x67, 0x73, 0x2e, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x61, + 0x72, 0x67, 0x73, 0x1a, 0x63, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x16, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x77, 0x0a, 0x09, 0x41, 0x72, 0x67, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x54, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x47, 0x72, 0x70, 0x63, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x17, 0x0a, 0x10, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x42, 0x84, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, + 0x70, 0x63, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, + 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x17, 0x0a, 0x10, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x42, 0x84, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service.pb.validate.go index 4837ce6e46..9ef41b0774 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service.pb.validate.go @@ -451,6 +451,8 @@ func (m *GrpcService_EnvoyGrpc) validate(all bool) error { } } + // no validation rules for SkipEnvoyHeaders + if len(errors) > 0 { return GrpcService_EnvoyGrpcMultiError(errors) } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service_vtproto.pb.go index c9397e2b0c..90d07efa4a 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service_vtproto.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/grpc_service_vtproto.pb.go @@ -53,6 +53,16 @@ func (m *GrpcService_EnvoyGrpc) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.SkipEnvoyHeaders { + i-- + if m.SkipEnvoyHeaders { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } if m.MaxReceiveMessageLength != nil { size, err := (*wrapperspb.UInt32Value)(m.MaxReceiveMessageLength).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { @@ -1173,6 +1183,9 @@ func (m *GrpcService_EnvoyGrpc) SizeVT() (n int) { l = (*wrapperspb.UInt32Value)(m.MaxReceiveMessageLength).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } + if m.SkipEnvoyHeaders { + n += 2 + } n += len(m.unknownFields) return n } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/health_check.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/health_check.pb.go index 90563caffc..96ac5fc632 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/health_check.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/health_check.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/health_check.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/http_service.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/http_service.pb.go index 372e9e0337..ec8d54bb74 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/http_service.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/http_service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/http_service.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/http_uri.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/http_uri.pb.go index 35a9915883..c1ba4357f5 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/http_uri.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/http_uri.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/http_uri.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/protocol.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/protocol.pb.go index 888e4befcd..70be28739a 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/protocol.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/protocol.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/protocol.proto package corev3 @@ -550,10 +550,9 @@ type HttpProtocolOptions struct { // :ref:`HTTP_DOWNSTREAM_CONNECTION_IDLE `. IdleTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` // The maximum duration of a connection. The duration is defined as a period since a connection - // was established. If not set, there is no max duration. When max_connection_duration is reached - // and if there are no active streams, the connection will be closed. If the connection is a - // downstream connection and there are any active streams, the drain sequence will kick-in, - // and the connection will be force-closed after the drain period. See :ref:`drain_timeout + // was established. If not set, there is no max duration. When max_connection_duration is reached, + // the drain sequence will kick-in. The connection will be closed after the drain timeout period + // if there are no active streams. See :ref:`drain_timeout // `. MaxConnectionDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=max_connection_duration,json=maxConnectionDuration,proto3" json:"max_connection_duration,omitempty"` // The maximum number of headers. If unconfigured, the default diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/proxy_protocol.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/proxy_protocol.pb.go index e1e1990d48..43e7d77061 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/proxy_protocol.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/proxy_protocol.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/proxy_protocol.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/resolver.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/resolver.pb.go index 61d14ce90f..fc4ec52de9 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/resolver.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/resolver.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/resolver.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option.pb.go index 1b05852bfc..2b684f57b6 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/socket_option.proto package corev3 @@ -96,7 +96,7 @@ func (SocketOption_SocketState) EnumDescriptor() ([]byte, []int) { // :ref:`admin's ` socket_options etc. // // It should be noted that the name or level may have different values on different platforms. -// [#next-free-field: 7] +// [#next-free-field: 8] type SocketOption struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -117,6 +117,9 @@ type SocketOption struct { // The state in which the option will be applied. When used in BindConfig // STATE_PREBIND is currently the only valid value. State SocketOption_SocketState `protobuf:"varint,6,opt,name=state,proto3,enum=envoy.config.core.v3.SocketOption_SocketState" json:"state,omitempty"` + // Apply the socket option to the specified `socket type `_. + // If not specified, the socket option will be applied to all socket types. + Type *SocketOption_SocketType `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"` } func (x *SocketOption) Reset() { @@ -200,6 +203,13 @@ func (x *SocketOption) GetState() SocketOption_SocketState { return SocketOption_STATE_PREBIND } +func (x *SocketOption) GetType() *SocketOption_SocketType { + if x != nil { + return x.Type + } + return nil +} + type isSocketOption_Value interface { isSocketOption_Value() } @@ -265,6 +275,148 @@ func (x *SocketOptionsOverride) GetSocketOptions() []*SocketOption { return nil } +// The `socket type `_ to apply the socket option to. +// Only one field should be set. If multiple fields are set, the precedence order will determine +// the selected one. If none of the fields is set, the socket option will be applied to all socket types. +// +// For example: +// If :ref:`stream ` is set, +// it takes precedence over :ref:`datagram `. +type SocketOption_SocketType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Apply the socket option to the stream socket type. + Stream *SocketOption_SocketType_Stream `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` + // Apply the socket option to the datagram socket type. + Datagram *SocketOption_SocketType_Datagram `protobuf:"bytes,2,opt,name=datagram,proto3" json:"datagram,omitempty"` +} + +func (x *SocketOption_SocketType) Reset() { + *x = SocketOption_SocketType{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SocketOption_SocketType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocketOption_SocketType) ProtoMessage() {} + +func (x *SocketOption_SocketType) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocketOption_SocketType.ProtoReflect.Descriptor instead. +func (*SocketOption_SocketType) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_socket_option_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *SocketOption_SocketType) GetStream() *SocketOption_SocketType_Stream { + if x != nil { + return x.Stream + } + return nil +} + +func (x *SocketOption_SocketType) GetDatagram() *SocketOption_SocketType_Datagram { + if x != nil { + return x.Datagram + } + return nil +} + +// The stream socket type. +type SocketOption_SocketType_Stream struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SocketOption_SocketType_Stream) Reset() { + *x = SocketOption_SocketType_Stream{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SocketOption_SocketType_Stream) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocketOption_SocketType_Stream) ProtoMessage() {} + +func (x *SocketOption_SocketType_Stream) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocketOption_SocketType_Stream.ProtoReflect.Descriptor instead. +func (*SocketOption_SocketType_Stream) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_socket_option_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// The datagram socket type. +type SocketOption_SocketType_Datagram struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SocketOption_SocketType_Datagram) Reset() { + *x = SocketOption_SocketType_Datagram{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SocketOption_SocketType_Datagram) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocketOption_SocketType_Datagram) ProtoMessage() {} + +func (x *SocketOption_SocketType_Datagram) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocketOption_SocketType_Datagram.ProtoReflect.Descriptor instead. +func (*SocketOption_SocketType_Datagram) Descriptor() ([]byte, []int) { + return file_envoy_config_core_v3_socket_option_proto_rawDescGZIP(), []int{0, 0, 1} +} + var File_envoy_config_core_v3_socket_option_proto protoreflect.FileDescriptor var file_envoy_config_core_v3_socket_option_proto_rawDesc = []byte{ @@ -277,7 +429,7 @@ var file_envoy_config_core_v3_socket_option_proto_rawDesc = []byte{ 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x02, 0x0a, 0x0c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x04, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, @@ -292,30 +444,47 @@ var file_envoy_config_core_v3_socket_option_proto_rawDesc = []byte{ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x46, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, - 0x52, 0x45, 0x42, 0x49, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x3a, 0x25, - 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x22, 0x62, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x49, 0x0a, 0x0e, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x85, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xc4, 0x01, 0x0a, 0x0a, 0x53, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x06, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x52, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x67, 0x72, + 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, + 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x1a, 0x08, 0x0a, 0x06, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x1a, 0x0a, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, + 0x22, 0x46, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x42, 0x49, 0x4e, 0x44, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x55, 0x4e, + 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4c, 0x49, 0x53, + 0x54, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, + 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x0c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x62, 0x0a, + 0x15, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x42, 0x85, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x22, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x42, 0x11, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -331,20 +500,26 @@ func file_envoy_config_core_v3_socket_option_proto_rawDescGZIP() []byte { } var file_envoy_config_core_v3_socket_option_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v3_socket_option_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_config_core_v3_socket_option_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_envoy_config_core_v3_socket_option_proto_goTypes = []interface{}{ - (SocketOption_SocketState)(0), // 0: envoy.config.core.v3.SocketOption.SocketState - (*SocketOption)(nil), // 1: envoy.config.core.v3.SocketOption - (*SocketOptionsOverride)(nil), // 2: envoy.config.core.v3.SocketOptionsOverride + (SocketOption_SocketState)(0), // 0: envoy.config.core.v3.SocketOption.SocketState + (*SocketOption)(nil), // 1: envoy.config.core.v3.SocketOption + (*SocketOptionsOverride)(nil), // 2: envoy.config.core.v3.SocketOptionsOverride + (*SocketOption_SocketType)(nil), // 3: envoy.config.core.v3.SocketOption.SocketType + (*SocketOption_SocketType_Stream)(nil), // 4: envoy.config.core.v3.SocketOption.SocketType.Stream + (*SocketOption_SocketType_Datagram)(nil), // 5: envoy.config.core.v3.SocketOption.SocketType.Datagram } var file_envoy_config_core_v3_socket_option_proto_depIdxs = []int32{ 0, // 0: envoy.config.core.v3.SocketOption.state:type_name -> envoy.config.core.v3.SocketOption.SocketState - 1, // 1: envoy.config.core.v3.SocketOptionsOverride.socket_options:type_name -> envoy.config.core.v3.SocketOption - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 3, // 1: envoy.config.core.v3.SocketOption.type:type_name -> envoy.config.core.v3.SocketOption.SocketType + 1, // 2: envoy.config.core.v3.SocketOptionsOverride.socket_options:type_name -> envoy.config.core.v3.SocketOption + 4, // 3: envoy.config.core.v3.SocketOption.SocketType.stream:type_name -> envoy.config.core.v3.SocketOption.SocketType.Stream + 5, // 4: envoy.config.core.v3.SocketOption.SocketType.datagram:type_name -> envoy.config.core.v3.SocketOption.SocketType.Datagram + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_envoy_config_core_v3_socket_option_proto_init() } @@ -377,6 +552,42 @@ func file_envoy_config_core_v3_socket_option_proto_init() { return nil } } + file_envoy_config_core_v3_socket_option_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SocketOption_SocketType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_socket_option_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SocketOption_SocketType_Stream); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_core_v3_socket_option_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SocketOption_SocketType_Datagram); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_envoy_config_core_v3_socket_option_proto_msgTypes[0].OneofWrappers = []interface{}{ (*SocketOption_IntValue)(nil), @@ -388,7 +599,7 @@ func file_envoy_config_core_v3_socket_option_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_config_core_v3_socket_option_proto_rawDesc, NumEnums: 1, - NumMessages: 2, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option.pb.validate.go index 7f3c7f8a46..944e08984c 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option.pb.validate.go @@ -75,6 +75,35 @@ func (m *SocketOption) validate(all bool) error { errors = append(errors, err) } + if all { + switch v := interface{}(m.GetType()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketOptionValidationError{ + field: "Type", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketOptionValidationError{ + field: "Type", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetType()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketOptionValidationError{ + field: "Type", + reason: "embedded message failed validation", + cause: err, + } + } + } + oneofValuePresent := false switch v := m.Value.(type) { case *SocketOption_IntValue: @@ -329,3 +358,371 @@ var _ interface { Cause() error ErrorName() string } = SocketOptionsOverrideValidationError{} + +// Validate checks the field values on SocketOption_SocketType with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SocketOption_SocketType) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketOption_SocketType with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SocketOption_SocketTypeMultiError, or nil if none found. +func (m *SocketOption_SocketType) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketOption_SocketType) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetStream()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketOption_SocketTypeValidationError{ + field: "Stream", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketOption_SocketTypeValidationError{ + field: "Stream", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStream()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketOption_SocketTypeValidationError{ + field: "Stream", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDatagram()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketOption_SocketTypeValidationError{ + field: "Datagram", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketOption_SocketTypeValidationError{ + field: "Datagram", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDatagram()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketOption_SocketTypeValidationError{ + field: "Datagram", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return SocketOption_SocketTypeMultiError(errors) + } + + return nil +} + +// SocketOption_SocketTypeMultiError is an error wrapping multiple validation +// errors returned by SocketOption_SocketType.ValidateAll() if the designated +// constraints aren't met. +type SocketOption_SocketTypeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketOption_SocketTypeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketOption_SocketTypeMultiError) AllErrors() []error { return m } + +// SocketOption_SocketTypeValidationError is the validation error returned by +// SocketOption_SocketType.Validate if the designated constraints aren't met. +type SocketOption_SocketTypeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SocketOption_SocketTypeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SocketOption_SocketTypeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SocketOption_SocketTypeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SocketOption_SocketTypeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SocketOption_SocketTypeValidationError) ErrorName() string { + return "SocketOption_SocketTypeValidationError" +} + +// Error satisfies the builtin error interface +func (e SocketOption_SocketTypeValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSocketOption_SocketType.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SocketOption_SocketTypeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SocketOption_SocketTypeValidationError{} + +// Validate checks the field values on SocketOption_SocketType_Stream with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SocketOption_SocketType_Stream) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketOption_SocketType_Stream with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// SocketOption_SocketType_StreamMultiError, or nil if none found. +func (m *SocketOption_SocketType_Stream) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketOption_SocketType_Stream) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SocketOption_SocketType_StreamMultiError(errors) + } + + return nil +} + +// SocketOption_SocketType_StreamMultiError is an error wrapping multiple +// validation errors returned by SocketOption_SocketType_Stream.ValidateAll() +// if the designated constraints aren't met. +type SocketOption_SocketType_StreamMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketOption_SocketType_StreamMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketOption_SocketType_StreamMultiError) AllErrors() []error { return m } + +// SocketOption_SocketType_StreamValidationError is the validation error +// returned by SocketOption_SocketType_Stream.Validate if the designated +// constraints aren't met. +type SocketOption_SocketType_StreamValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SocketOption_SocketType_StreamValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SocketOption_SocketType_StreamValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SocketOption_SocketType_StreamValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SocketOption_SocketType_StreamValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SocketOption_SocketType_StreamValidationError) ErrorName() string { + return "SocketOption_SocketType_StreamValidationError" +} + +// Error satisfies the builtin error interface +func (e SocketOption_SocketType_StreamValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSocketOption_SocketType_Stream.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SocketOption_SocketType_StreamValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SocketOption_SocketType_StreamValidationError{} + +// Validate checks the field values on SocketOption_SocketType_Datagram with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *SocketOption_SocketType_Datagram) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketOption_SocketType_Datagram with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// SocketOption_SocketType_DatagramMultiError, or nil if none found. +func (m *SocketOption_SocketType_Datagram) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketOption_SocketType_Datagram) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SocketOption_SocketType_DatagramMultiError(errors) + } + + return nil +} + +// SocketOption_SocketType_DatagramMultiError is an error wrapping multiple +// validation errors returned by +// SocketOption_SocketType_Datagram.ValidateAll() if the designated +// constraints aren't met. +type SocketOption_SocketType_DatagramMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketOption_SocketType_DatagramMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketOption_SocketType_DatagramMultiError) AllErrors() []error { return m } + +// SocketOption_SocketType_DatagramValidationError is the validation error +// returned by SocketOption_SocketType_Datagram.Validate if the designated +// constraints aren't met. +type SocketOption_SocketType_DatagramValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SocketOption_SocketType_DatagramValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SocketOption_SocketType_DatagramValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SocketOption_SocketType_DatagramValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SocketOption_SocketType_DatagramValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SocketOption_SocketType_DatagramValidationError) ErrorName() string { + return "SocketOption_SocketType_DatagramValidationError" +} + +// Error satisfies the builtin error interface +func (e SocketOption_SocketType_DatagramValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSocketOption_SocketType_Datagram.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SocketOption_SocketType_DatagramValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SocketOption_SocketType_DatagramValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option_vtproto.pb.go index e2bbfadb65..75f5db5122 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option_vtproto.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/socket_option_vtproto.pb.go @@ -18,6 +18,125 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +func (m *SocketOption_SocketType_Stream) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SocketOption_SocketType_Stream) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *SocketOption_SocketType_Stream) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *SocketOption_SocketType_Datagram) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SocketOption_SocketType_Datagram) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *SocketOption_SocketType_Datagram) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *SocketOption_SocketType) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SocketOption_SocketType) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *SocketOption_SocketType) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Datagram != nil { + size, err := m.Datagram.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Stream != nil { + size, err := m.Stream.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *SocketOption) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -48,6 +167,16 @@ func (m *SocketOption) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Type != nil { + size, err := m.Type.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a + } if m.State != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.State)) i-- @@ -158,6 +287,44 @@ func (m *SocketOptionsOverride) MarshalToSizedBufferVTStrict(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *SocketOption_SocketType_Stream) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *SocketOption_SocketType_Datagram) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *SocketOption_SocketType) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Stream != nil { + l = m.Stream.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Datagram != nil { + l = m.Datagram.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func (m *SocketOption) SizeVT() (n int) { if m == nil { return 0 @@ -180,6 +347,10 @@ func (m *SocketOption) SizeVT() (n int) { if m.State != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.State)) } + if m.Type != nil { + l = m.Type.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } n += len(m.unknownFields) return n } diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/substitution_format_string.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/substitution_format_string.pb.go index bdd5af45f9..8c7fda3a1a 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/substitution_format_string.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/substitution_format_string.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/substitution_format_string.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/udp_socket_config.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/udp_socket_config.pb.go index e340a186b5..ebef4e6425 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/udp_socket_config.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/core/v3/udp_socket_config.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/config/core/v3/udp_socket_config.proto package corev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.go index 0d63630c81..6f09930e96 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/service/discovery/v3/ads.proto package discoveryv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_grpc.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_grpc.pb.go index 1b141d04c2..7a7f1af970 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_grpc.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.25.3 +// - protoc v5.26.1 // source: envoy/service/discovery/v3/ads.proto package discoveryv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.go index 6129b9687f..a9b5f69358 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/service/discovery/v3/discovery.proto package discoveryv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.go index 6d1caea4dc..db3bd5994f 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/filter_state.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.go index ff5b042eb5..a2f9c73adc 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/http_inputs.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.go index 9c6637860f..14a093334b 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/metadata.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.go index 4d3c6fdc89..d6083cb277 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/node.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.go index b651047200..2ad4bccfad 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/number.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.go index dad03aa3df..aac680dbe1 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/path.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.go index b1a201b9e5..383bb267c3 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/regex.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.go index fdd2529d4e..3da1aae4eb 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/status_code_input.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.go index 8534bd2bc2..2ebed90845 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/string.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.go index c534326cb5..ef844bc7f8 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/struct.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.go index cc668a2214..7ba125cf30 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/matcher/v3/value.proto package matcherv3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.go index 0c0a5f23b6..af620911fd 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/v3/hash_policy.proto package typev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.go index 78bf101cc0..74f4e24dfe 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/v3/http.proto package typev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.go index 1a4d4b9b90..f7e952b3a1 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/v3/http_status.proto package typev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.go index e299663a6a..45eb66186d 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/v3/percent.proto package typev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.go index 1ac2b1cc15..63be48f3c7 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/v3/range.proto package typev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.go index d499fd42fb..e7663f294f 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/v3/ratelimit_strategy.proto package typev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.go index 46b291f98b..3686888888 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/v3/ratelimit_unit.proto package typev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.go index 47a972ea54..630e6567c4 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/v3/semantic_version.proto package typev3 diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.go index 6d24481f15..9c21f24541 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.25.3 +// protoc v5.26.1 // source: envoy/type/v3/token_bucket.proto package typev3 diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go index a31b2e1a3f..6df95e89ec 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.22.2 +// protoc v3.21.12 // source: validate/validate.proto package validate @@ -1974,7 +1974,7 @@ type StringRules struct { // MaxBytes specifies that this field must be the specified number of bytes // at a maximum MaxBytes *uint64 `protobuf:"varint,5,opt,name=max_bytes,json=maxBytes" json:"max_bytes,omitempty"` - // Pattern specifes that this field must match against the specified + // Pattern specifies that this field must match against the specified // regular expression (RE2 syntax). The included expression should elide // any delimiters. Pattern *string `protobuf:"bytes,6,opt,name=pattern" json:"pattern,omitempty"` @@ -2349,7 +2349,7 @@ type BytesRules struct { // MaxLen specifies that this field must be the specified number of bytes // at a maximum MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` - // Pattern specifes that this field must match against the specified + // Pattern specifies that this field must match against the specified // regular expression (RE2 syntax). The included expression should elide // any delimiters. Pattern *string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"` @@ -2699,10 +2699,10 @@ type RepeatedRules struct { // items at a maximum MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` // Unique specifies that all elements in this field must be unique. This - // contraint is only applicable to scalar and enum types (messages are not + // constraint is only applicable to scalar and enum types (messages are not // supported). Unique *bool `protobuf:"varint,3,opt,name=unique" json:"unique,omitempty"` - // Items specifies the contraints to be applied to each item in the field. + // Items specifies the constraints to be applied to each item in the field. // Repeated message fields will still execute validation against each item // unless skip is specified here. Items *FieldRules `protobuf:"bytes,4,opt,name=items" json:"items,omitempty"` diff --git a/vendor/github.com/fsnotify/fsnotify/.cirrus.yml b/vendor/github.com/fsnotify/fsnotify/.cirrus.yml index ffc7b992b3..f4e7dbf37b 100644 --- a/vendor/github.com/fsnotify/fsnotify/.cirrus.yml +++ b/vendor/github.com/fsnotify/fsnotify/.cirrus.yml @@ -1,7 +1,7 @@ freebsd_task: name: 'FreeBSD' freebsd_instance: - image_family: freebsd-13-2 + image_family: freebsd-14-1 install_script: - pkg update -f - pkg install -y go @@ -9,5 +9,6 @@ freebsd_task: # run tests as user "cirrus" instead of root - pw useradd cirrus -m - chown -R cirrus:cirrus . - - FSNOTIFY_BUFFER=4096 sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... - - sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... + - FSNOTIFY_BUFFER=4096 sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... + - sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... + - FSNOTIFY_DEBUG=1 sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race -v ./... diff --git a/vendor/github.com/fsnotify/fsnotify/.editorconfig b/vendor/github.com/fsnotify/fsnotify/.editorconfig deleted file mode 100644 index fad895851e..0000000000 --- a/vendor/github.com/fsnotify/fsnotify/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*.go] -indent_style = tab -indent_size = 4 -insert_final_newline = true - -[*.{yml,yaml}] -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/vendor/github.com/fsnotify/fsnotify/.gitattributes b/vendor/github.com/fsnotify/fsnotify/.gitattributes deleted file mode 100644 index 32f1001be0..0000000000 --- a/vendor/github.com/fsnotify/fsnotify/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -go.sum linguist-generated diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore index 391cc076b1..daea9dd6d6 100644 --- a/vendor/github.com/fsnotify/fsnotify/.gitignore +++ b/vendor/github.com/fsnotify/fsnotify/.gitignore @@ -5,3 +5,6 @@ # Output of go build ./cmd/fsnotify /fsnotify /fsnotify.exe + +/test/kqueue +/test/a.out diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md index e0e5757549..fa854785d0 100644 --- a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md +++ b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md @@ -1,8 +1,36 @@ # Changelog -Unreleased ----------- -Nothing yet. +1.8.0 2023-10-31 +---------------- + +### Additions + +- all: add `FSNOTIFY_DEBUG` to print debug logs to stderr ([#619]) + +### Changes and fixes + +- windows: fix behaviour of `WatchList()` to be consistent with other platforms ([#610]) + +- kqueue: ignore events with Ident=0 ([#590]) + +- kqueue: set O_CLOEXEC to prevent passing file descriptors to children ([#617]) + +- kqueue: emit events as "/path/dir/file" instead of "path/link/file" when watching a symlink ([#625]) + +- inotify: don't send event for IN_DELETE_SELF when also watching the parent ([#620]) + +- inotify: fix panic when calling Remove() in a goroutine ([#650]) + +- fen: allow watching subdirectories of watched directories ([#621]) + +[#590]: https://github.com/fsnotify/fsnotify/pull/590 +[#610]: https://github.com/fsnotify/fsnotify/pull/610 +[#617]: https://github.com/fsnotify/fsnotify/pull/617 +[#619]: https://github.com/fsnotify/fsnotify/pull/619 +[#620]: https://github.com/fsnotify/fsnotify/pull/620 +[#621]: https://github.com/fsnotify/fsnotify/pull/621 +[#625]: https://github.com/fsnotify/fsnotify/pull/625 +[#650]: https://github.com/fsnotify/fsnotify/pull/650 1.7.0 - 2023-10-22 ------------------ diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md index ea379759d5..e4ac2a2fff 100644 --- a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md +++ b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md @@ -1,7 +1,7 @@ Thank you for your interest in contributing to fsnotify! We try to review and merge PRs in a reasonable timeframe, but please be aware that: -- To avoid "wasted" work, please discus changes on the issue tracker first. You +- To avoid "wasted" work, please discuss changes on the issue tracker first. You can just send PRs, but they may end up being rejected for one reason or the other. @@ -20,6 +20,124 @@ platforms. Testing different platforms locally can be done with something like Use the `-short` flag to make the "stress test" run faster. +Writing new tests +----------------- +Scripts in the testdata directory allow creating test cases in a "shell-like" +syntax. The basic format is: + + script + + Output: + desired output + +For example: + + # Create a new empty file with some data. + watch / + echo data >/file + + Output: + create /file + write /file + +Just create a new file to add a new test; select which tests to run with +`-run TestScript/[path]`. + +script +------ +The script is a "shell-like" script: + + cmd arg arg + +Comments are supported with `#`: + + # Comment + cmd arg arg # Comment + +All operations are done in a temp directory; a path like "/foo" is rewritten to +"/tmp/TestFoo/foo". + +Arguments can be quoted with `"` or `'`; there are no escapes and they're +functionally identical right now, but this may change in the future, so best to +assume shell-like rules. + + touch "/file with spaces" + +End-of-line escapes with `\` are not supported. + +### Supported commands + + watch path [ops] # Watch the path, reporting events for it. Nothing is + # watched by default. Optionally a list of ops can be + # given, as with AddWith(path, WithOps(...)). + unwatch path # Stop watching the path. + watchlist n # Assert watchlist length. + + stop # Stop running the script; for debugging. + debug [yes/no] # Enable/disable FSNOTIFY_DEBUG (tests are run in + parallel by default, so -parallel=1 is probably a good + idea). + + touch path + mkdir [-p] dir + ln -s target link # Only ln -s supported. + mkfifo path + mknod dev path + mv src dst + rm [-r] path + chmod mode path # Octal only + sleep time-in-ms + + cat path # Read path (does nothing with the data; just reads it). + echo str >>path # Append "str" to "path". + echo str >path # Truncate "path" and write "str". + + require reason # Skip the test if "reason" is true; "skip" and + skip reason # "require" behave identical; it supports both for + # readability. Possible reasons are: + # + # always Always skip this test. + # symlink Symlinks are supported (requires admin + # permissions on Windows). + # mkfifo Platform doesn't support FIFO named sockets. + # mknod Platform doesn't support device nodes. + + +output +------ +After `Output:` the desired output is given; this is indented by convention, but +that's not required. + +The format of that is: + + # Comment + event path # Comment + + system: + event path + system2: + event path + +Every event is one line, and any whitespace between the event and path are +ignored. The path can optionally be surrounded in ". Anything after a "#" is +ignored. + +Platform-specific tests can be added after GOOS; for example: + + watch / + touch /file + + Output: + # Tested if nothing else matches + create /file + + # Windows-specific test. + windows: + write /file + +You can specify multiple platforms with a comma (e.g. "windows, linux:"). +"kqueue" is a shortcut for all kqueue systems (BSD, macOS). + [goon]: https://github.com/arp242/goon [Vagrant]: https://www.vagrantup.com/ diff --git a/vendor/github.com/fsnotify/fsnotify/backend_fen.go b/vendor/github.com/fsnotify/fsnotify/backend_fen.go index 28497f1dd8..c349c326c7 100644 --- a/vendor/github.com/fsnotify/fsnotify/backend_fen.go +++ b/vendor/github.com/fsnotify/fsnotify/backend_fen.go @@ -1,8 +1,8 @@ //go:build solaris -// +build solaris -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh +// FEN backend for illumos (supported) and Solaris (untested, but should work). +// +// See port_create(3c) etc. for docs. https://www.illumos.org/man/3C/port_create package fsnotify @@ -12,150 +12,33 @@ import ( "os" "path/filepath" "sync" + "time" + "github.com/fsnotify/fsnotify/internal" "golang.org/x/sys/unix" ) -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. +type fen struct { Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. Errors chan error mu sync.Mutex port *unix.EventPort - done chan struct{} // Channel for sending a "quit message" to the reader goroutine - dirs map[string]struct{} // Explicitly watched directories - watches map[string]struct{} // Explicitly watched non-directories + done chan struct{} // Channel for sending a "quit message" to the reader goroutine + dirs map[string]Op // Explicitly watched directories + watches map[string]Op // Explicitly watched non-directories } -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { - return NewBufferedWatcher(0) +func newBackend(ev chan Event, errs chan error) (backend, error) { + return newBufferedBackend(0, ev, errs) } -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { - w := &Watcher{ - Events: make(chan Event, sz), - Errors: make(chan error), - dirs: make(map[string]struct{}), - watches: make(map[string]struct{}), +func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) { + w := &fen{ + Events: ev, + Errors: errs, + dirs: make(map[string]Op), + watches: make(map[string]Op), done: make(chan struct{}), } @@ -171,27 +54,30 @@ func NewBufferedWatcher(sz uint) (*Watcher, error) { // sendEvent attempts to send an event to the user, returning true if the event // was put in the channel successfully and false if the watcher has been closed. -func (w *Watcher) sendEvent(name string, op Op) (sent bool) { +func (w *fen) sendEvent(name string, op Op) (sent bool) { select { - case w.Events <- Event{Name: name, Op: op}: - return true case <-w.done: return false + case w.Events <- Event{Name: name, Op: op}: + return true } } // sendError attempts to send an error to the user, returning true if the error // was put in the channel successfully and false if the watcher has been closed. -func (w *Watcher) sendError(err error) (sent bool) { - select { - case w.Errors <- err: +func (w *fen) sendError(err error) (sent bool) { + if err == nil { return true + } + select { case <-w.done: return false + case w.Errors <- err: + return true } } -func (w *Watcher) isClosed() bool { +func (w *fen) isClosed() bool { select { case <-w.done: return true @@ -200,8 +86,7 @@ func (w *Watcher) isClosed() bool { } } -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { +func (w *fen) Close() error { // Take the lock used by associateFile to prevent lingering events from // being processed after the close w.mu.Lock() @@ -213,60 +98,21 @@ func (w *Watcher) Close() error { return w.port.Close() } -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return w.AddWith(name) } +func (w *fen) Add(name string) error { return w.AddWith(name) } -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { +func (w *fen) AddWith(name string, opts ...addOpt) error { if w.isClosed() { return ErrClosed } - if w.port.PathIsWatched(name) { - return nil + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s AddWith(%q)\n", + time.Now().Format("15:04:05.000000000"), name) } - _ = getOptions(opts...) + with := getOptions(opts...) + if !w.xSupports(with.op) { + return fmt.Errorf("%w: %s", xErrUnsupported, with.op) + } // Currently we resolve symlinks that were explicitly requested to be // watched. Otherwise we would use LStat here. @@ -283,7 +129,7 @@ func (w *Watcher) AddWith(name string, opts ...addOpt) error { } w.mu.Lock() - w.dirs[name] = struct{}{} + w.dirs[name] = with.op w.mu.Unlock() return nil } @@ -294,26 +140,22 @@ func (w *Watcher) AddWith(name string, opts ...addOpt) error { } w.mu.Lock() - w.watches[name] = struct{}{} + w.watches[name] = with.op w.mu.Unlock() return nil } -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { +func (w *fen) Remove(name string) error { if w.isClosed() { return nil } if !w.port.PathIsWatched(name) { return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s Remove(%q)\n", + time.Now().Format("15:04:05.000000000"), name) + } // The user has expressed an intent. Immediately remove this name from // whichever watch list it might be in. If it's not in there the delete @@ -346,7 +188,7 @@ func (w *Watcher) Remove(name string) error { } // readEvents contains the main loop that runs in a goroutine watching for events. -func (w *Watcher) readEvents() { +func (w *fen) readEvents() { // If this function returns, the watcher has been closed and we can close // these channels defer func() { @@ -382,17 +224,19 @@ func (w *Watcher) readEvents() { continue } + if debug { + internal.Debug(pevent.Path, pevent.Events) + } + err = w.handleEvent(&pevent) - if err != nil { - if !w.sendError(err) { - return - } + if !w.sendError(err) { + return } } } } -func (w *Watcher) handleDirectory(path string, stat os.FileInfo, follow bool, handler func(string, os.FileInfo, bool) error) error { +func (w *fen) handleDirectory(path string, stat os.FileInfo, follow bool, handler func(string, os.FileInfo, bool) error) error { files, err := os.ReadDir(path) if err != nil { return err @@ -418,7 +262,7 @@ func (w *Watcher) handleDirectory(path string, stat os.FileInfo, follow bool, ha // bitmap matches more than one event type (e.g. the file was both modified and // had the attributes changed between when the association was created and the // when event was returned) -func (w *Watcher) handleEvent(event *unix.PortEvent) error { +func (w *fen) handleEvent(event *unix.PortEvent) error { var ( events = event.Events path = event.Path @@ -510,15 +354,9 @@ func (w *Watcher) handleEvent(event *unix.PortEvent) error { } if events&unix.FILE_MODIFIED != 0 { - if fmode.IsDir() { - if watchedDir { - if err := w.updateDirectory(path); err != nil { - return err - } - } else { - if !w.sendEvent(path, Write) { - return nil - } + if fmode.IsDir() && watchedDir { + if err := w.updateDirectory(path); err != nil { + return err } } else { if !w.sendEvent(path, Write) { @@ -543,7 +381,7 @@ func (w *Watcher) handleEvent(event *unix.PortEvent) error { return nil } -func (w *Watcher) updateDirectory(path string) error { +func (w *fen) updateDirectory(path string) error { // The directory was modified, so we must find unwatched entities and watch // them. If something was removed from the directory, nothing will happen, // as everything else should still be watched. @@ -563,10 +401,8 @@ func (w *Watcher) updateDirectory(path string) error { return err } err = w.associateFile(path, finfo, false) - if err != nil { - if !w.sendError(err) { - return nil - } + if !w.sendError(err) { + return nil } if !w.sendEvent(path, Create) { return nil @@ -575,7 +411,7 @@ func (w *Watcher) updateDirectory(path string) error { return nil } -func (w *Watcher) associateFile(path string, stat os.FileInfo, follow bool) error { +func (w *fen) associateFile(path string, stat os.FileInfo, follow bool) error { if w.isClosed() { return ErrClosed } @@ -593,34 +429,34 @@ func (w *Watcher) associateFile(path string, stat os.FileInfo, follow bool) erro // cleared up that discrepancy. The most likely cause is that the event // has fired but we haven't processed it yet. err := w.port.DissociatePath(path) - if err != nil && err != unix.ENOENT { + if err != nil && !errors.Is(err, unix.ENOENT) { return err } } - // FILE_NOFOLLOW means we watch symlinks themselves rather than their - // targets. - events := unix.FILE_MODIFIED | unix.FILE_ATTRIB | unix.FILE_NOFOLLOW - if follow { - // We *DO* follow symlinks for explicitly watched entries. - events = unix.FILE_MODIFIED | unix.FILE_ATTRIB + + var events int + if !follow { + // Watch symlinks themselves rather than their targets unless this entry + // is explicitly watched. + events |= unix.FILE_NOFOLLOW + } + if true { // TODO: implement withOps() + events |= unix.FILE_MODIFIED } - return w.port.AssociatePath(path, stat, - events, - stat.Mode()) + if true { + events |= unix.FILE_ATTRIB + } + return w.port.AssociatePath(path, stat, events, stat.Mode()) } -func (w *Watcher) dissociateFile(path string, stat os.FileInfo, unused bool) error { +func (w *fen) dissociateFile(path string, stat os.FileInfo, unused bool) error { if !w.port.PathIsWatched(path) { return nil } return w.port.DissociatePath(path) } -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { +func (w *fen) WatchList() []string { if w.isClosed() { return nil } @@ -638,3 +474,11 @@ func (w *Watcher) WatchList() []string { return entries } + +func (w *fen) xSupports(op Op) bool { + if op.Has(xUnportableOpen) || op.Has(xUnportableRead) || + op.Has(xUnportableCloseWrite) || op.Has(xUnportableCloseRead) { + return false + } + return true +} diff --git a/vendor/github.com/fsnotify/fsnotify/backend_inotify.go b/vendor/github.com/fsnotify/fsnotify/backend_inotify.go index 921c1c1e40..36c311694c 100644 --- a/vendor/github.com/fsnotify/fsnotify/backend_inotify.go +++ b/vendor/github.com/fsnotify/fsnotify/backend_inotify.go @@ -1,8 +1,4 @@ //go:build linux && !appengine -// +build linux,!appengine - -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh package fsnotify @@ -10,127 +6,20 @@ import ( "errors" "fmt" "io" + "io/fs" "os" "path/filepath" "strings" "sync" + "time" "unsafe" + "github.com/fsnotify/fsnotify/internal" "golang.org/x/sys/unix" ) -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. +type inotify struct { Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. Errors chan error // Store fd here as os.File.Read() will no longer return on close after @@ -139,8 +28,26 @@ type Watcher struct { inotifyFile *os.File watches *watches done chan struct{} // Channel for sending a "quit message" to the reader goroutine - closeMu sync.Mutex + doneMu sync.Mutex doneResp chan struct{} // Channel to respond to Close + + // Store rename cookies in an array, with the index wrapping to 0. Almost + // all of the time what we get is a MOVED_FROM to set the cookie and the + // next event inotify sends will be MOVED_TO to read it. However, this is + // not guaranteed – as described in inotify(7) – and we may get other events + // between the two MOVED_* events (including other MOVED_* ones). + // + // A second issue is that moving a file outside the watched directory will + // trigger a MOVED_FROM to set the cookie, but we never see the MOVED_TO to + // read and delete it. So just storing it in a map would slowly leak memory. + // + // Doing it like this gives us a simple fast LRU-cache that won't allocate. + // Ten items should be more than enough for our purpose, and a loop over + // such a short array is faster than a map access anyway (not that it hugely + // matters since we're talking about hundreds of ns at the most, but still). + cookies [10]koekje + cookieIndex uint8 + cookiesMu sync.Mutex } type ( @@ -150,9 +57,14 @@ type ( path map[string]uint32 // pathname → wd } watch struct { - wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall) - flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags) - path string // Watch path. + wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall) + flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags) + path string // Watch path. + recurse bool // Recursion with ./...? + } + koekje struct { + cookie uint32 + path string } ) @@ -179,23 +91,45 @@ func (w *watches) add(ww *watch) { func (w *watches) remove(wd uint32) { w.mu.Lock() defer w.mu.Unlock() - delete(w.path, w.wd[wd].path) + watch := w.wd[wd] // Could have had Remove() called. See #616. + if watch == nil { + return + } + delete(w.path, watch.path) delete(w.wd, wd) } -func (w *watches) removePath(path string) (uint32, bool) { +func (w *watches) removePath(path string) ([]uint32, error) { w.mu.Lock() defer w.mu.Unlock() + path, recurse := recursivePath(path) wd, ok := w.path[path] if !ok { - return 0, false + return nil, fmt.Errorf("%w: %s", ErrNonExistentWatch, path) + } + + watch := w.wd[wd] + if recurse && !watch.recurse { + return nil, fmt.Errorf("can't use /... with non-recursive watch %q", path) } delete(w.path, path) delete(w.wd, wd) + if !watch.recurse { + return []uint32{wd}, nil + } - return wd, true + wds := make([]uint32, 0, 8) + wds = append(wds, wd) + for p, rwd := range w.path { + if filepath.HasPrefix(p, path) { + delete(w.path, p) + delete(w.wd, rwd) + wds = append(wds, rwd) + } + } + return wds, nil } func (w *watches) byPath(path string) *watch { @@ -236,20 +170,11 @@ func (w *watches) updatePath(path string, f func(*watch) (*watch, error)) error return nil } -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { - return NewBufferedWatcher(0) +func newBackend(ev chan Event, errs chan error) (backend, error) { + return newBufferedBackend(0, ev, errs) } -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { +func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) { // Need to set nonblocking mode for SetDeadline to work, otherwise blocking // I/O operations won't terminate on close. fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC | unix.IN_NONBLOCK) @@ -257,12 +182,12 @@ func NewBufferedWatcher(sz uint) (*Watcher, error) { return nil, errno } - w := &Watcher{ + w := &inotify{ + Events: ev, + Errors: errs, fd: fd, inotifyFile: os.NewFile(uintptr(fd), ""), watches: newWatches(), - Events: make(chan Event, sz), - Errors: make(chan error), done: make(chan struct{}), doneResp: make(chan struct{}), } @@ -272,26 +197,29 @@ func NewBufferedWatcher(sz uint) (*Watcher, error) { } // Returns true if the event was sent, or false if watcher is closed. -func (w *Watcher) sendEvent(e Event) bool { +func (w *inotify) sendEvent(e Event) bool { select { - case w.Events <- e: - return true case <-w.done: return false + case w.Events <- e: + return true } } // Returns true if the error was sent, or false if watcher is closed. -func (w *Watcher) sendError(err error) bool { - select { - case w.Errors <- err: +func (w *inotify) sendError(err error) bool { + if err == nil { return true + } + select { case <-w.done: return false + case w.Errors <- err: + return true } } -func (w *Watcher) isClosed() bool { +func (w *inotify) isClosed() bool { select { case <-w.done: return true @@ -300,15 +228,14 @@ func (w *Watcher) isClosed() bool { } } -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { - w.closeMu.Lock() +func (w *inotify) Close() error { + w.doneMu.Lock() if w.isClosed() { - w.closeMu.Unlock() + w.doneMu.Unlock() return nil } close(w.done) - w.closeMu.Unlock() + w.doneMu.Unlock() // Causes any blocking reads to return with an error, provided the file // still supports deadline operations. @@ -323,78 +250,104 @@ func (w *Watcher) Close() error { return nil } -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return w.AddWith(name) } - -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { +func (w *inotify) Add(name string) error { return w.AddWith(name) } + +func (w *inotify) AddWith(path string, opts ...addOpt) error { if w.isClosed() { return ErrClosed } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s AddWith(%q)\n", + time.Now().Format("15:04:05.000000000"), path) + } + + with := getOptions(opts...) + if !w.xSupports(with.op) { + return fmt.Errorf("%w: %s", xErrUnsupported, with.op) + } - name = filepath.Clean(name) - _ = getOptions(opts...) + path, recurse := recursivePath(path) + if recurse { + return filepath.WalkDir(path, func(root string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + if !d.IsDir() { + if root == path { + return fmt.Errorf("fsnotify: not a directory: %q", path) + } + return nil + } - var flags uint32 = unix.IN_MOVED_TO | unix.IN_MOVED_FROM | - unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY | - unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF + // Send a Create event when adding new directory from a recursive + // watch; this is for "mkdir -p one/two/three". Usually all those + // directories will be created before we can set up watchers on the + // subdirectories, so only "one" would be sent as a Create event and + // not "one/two" and "one/two/three" (inotifywait -r has the same + // problem). + if with.sendCreate && root != path { + w.sendEvent(Event{Name: root, Op: Create}) + } + + return w.add(root, with, true) + }) + } - return w.watches.updatePath(name, func(existing *watch) (*watch, error) { + return w.add(path, with, false) +} + +func (w *inotify) add(path string, with withOpts, recurse bool) error { + var flags uint32 + if with.noFollow { + flags |= unix.IN_DONT_FOLLOW + } + if with.op.Has(Create) { + flags |= unix.IN_CREATE + } + if with.op.Has(Write) { + flags |= unix.IN_MODIFY + } + if with.op.Has(Remove) { + flags |= unix.IN_DELETE | unix.IN_DELETE_SELF + } + if with.op.Has(Rename) { + flags |= unix.IN_MOVED_TO | unix.IN_MOVED_FROM | unix.IN_MOVE_SELF + } + if with.op.Has(Chmod) { + flags |= unix.IN_ATTRIB + } + if with.op.Has(xUnportableOpen) { + flags |= unix.IN_OPEN + } + if with.op.Has(xUnportableRead) { + flags |= unix.IN_ACCESS + } + if with.op.Has(xUnportableCloseWrite) { + flags |= unix.IN_CLOSE_WRITE + } + if with.op.Has(xUnportableCloseRead) { + flags |= unix.IN_CLOSE_NOWRITE + } + return w.register(path, flags, recurse) +} + +func (w *inotify) register(path string, flags uint32, recurse bool) error { + return w.watches.updatePath(path, func(existing *watch) (*watch, error) { if existing != nil { flags |= existing.flags | unix.IN_MASK_ADD } - wd, err := unix.InotifyAddWatch(w.fd, name, flags) + wd, err := unix.InotifyAddWatch(w.fd, path, flags) if wd == -1 { return nil, err } if existing == nil { return &watch{ - wd: uint32(wd), - path: name, - flags: flags, + wd: uint32(wd), + path: path, + flags: flags, + recurse: recurse, }, nil } @@ -404,49 +357,44 @@ func (w *Watcher) AddWith(name string, opts ...addOpt) error { }) } -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { +func (w *inotify) Remove(name string) error { if w.isClosed() { return nil } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s Remove(%q)\n", + time.Now().Format("15:04:05.000000000"), name) + } return w.remove(filepath.Clean(name)) } -func (w *Watcher) remove(name string) error { - wd, ok := w.watches.removePath(name) - if !ok { - return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) - } - - success, errno := unix.InotifyRmWatch(w.fd, wd) - if success == -1 { - // TODO: Perhaps it's not helpful to return an error here in every case; - // The only two possible errors are: - // - // - EBADF, which happens when w.fd is not a valid file descriptor - // of any kind. - // - EINVAL, which is when fd is not an inotify descriptor or wd - // is not a valid watch descriptor. Watch descriptors are - // invalidated when they are removed explicitly or implicitly; - // explicitly by inotify_rm_watch, implicitly when the file they - // are watching is deleted. - return errno +func (w *inotify) remove(name string) error { + wds, err := w.watches.removePath(name) + if err != nil { + return err + } + + for _, wd := range wds { + _, err := unix.InotifyRmWatch(w.fd, wd) + if err != nil { + // TODO: Perhaps it's not helpful to return an error here in every + // case; the only two possible errors are: + // + // EBADF, which happens when w.fd is not a valid file descriptor of + // any kind. + // + // EINVAL, which is when fd is not an inotify descriptor or wd is + // not a valid watch descriptor. Watch descriptors are invalidated + // when they are removed explicitly or implicitly; explicitly by + // inotify_rm_watch, implicitly when the file they are watching is + // deleted. + return err + } } return nil } -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { +func (w *inotify) WatchList() []string { if w.isClosed() { return nil } @@ -463,7 +411,7 @@ func (w *Watcher) WatchList() []string { // readEvents reads from the inotify file descriptor, converts the // received events into Event objects and sends them via the Events channel -func (w *Watcher) readEvents() { +func (w *inotify) readEvents() { defer func() { close(w.doneResp) close(w.Errors) @@ -506,15 +454,17 @@ func (w *Watcher) readEvents() { continue } - var offset uint32 // We don't know how many events we just read into the buffer // While the offset points to at least one whole event... + var offset uint32 for offset <= uint32(n-unix.SizeofInotifyEvent) { var ( // Point "raw" to the event in the buffer raw = (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset])) mask = uint32(raw.Mask) nameLen = uint32(raw.Len) + // Move to the next event in the buffer + next = func() { offset += unix.SizeofInotifyEvent + nameLen } ) if mask&unix.IN_Q_OVERFLOW != 0 { @@ -523,21 +473,53 @@ func (w *Watcher) readEvents() { } } - // If the event happened to the watched directory or the watched file, the kernel - // doesn't append the filename to the event, but we would like to always fill the - // the "Name" field with a valid filename. We retrieve the path of the watch from - // the "paths" map. + /// If the event happened to the watched directory or the watched + /// file, the kernel doesn't append the filename to the event, but + /// we would like to always fill the the "Name" field with a valid + /// filename. We retrieve the path of the watch from the "paths" + /// map. watch := w.watches.byWd(uint32(raw.Wd)) + /// Can be nil if Remove() was called in another goroutine for this + /// path inbetween reading the events from the kernel and reading + /// the internal state. Not much we can do about it, so just skip. + /// See #616. + if watch == nil { + next() + continue + } + + name := watch.path + if nameLen > 0 { + /// Point "bytes" at the first byte of the filename + bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen] + /// The filename is padded with NULL bytes. TrimRight() gets rid of those. + name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") + } + + if debug { + internal.Debug(name, raw.Mask, raw.Cookie) + } + + if mask&unix.IN_IGNORED != 0 { //&& event.Op != 0 + next() + continue + } // inotify will automatically remove the watch on deletes; just need // to clean our state here. - if watch != nil && mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF { + if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF { w.watches.remove(watch.wd) } + // We can't really update the state when a watched path is moved; // only IN_MOVE_SELF is sent and not IN_MOVED_{FROM,TO}. So remove // the watch. - if watch != nil && mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF { + if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF { + if watch.recurse { + next() // Do nothing + continue + } + err := w.remove(watch.path) if err != nil && !errors.Is(err, ErrNonExistentWatch) { if !w.sendError(err) { @@ -546,34 +528,69 @@ func (w *Watcher) readEvents() { } } - var name string - if watch != nil { - name = watch.path - } - if nameLen > 0 { - // Point "bytes" at the first byte of the filename - bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen] - // The filename is padded with NULL bytes. TrimRight() gets rid of those. - name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") + /// Skip if we're watching both this path and the parent; the parent + /// will already send a delete so no need to do it twice. + if mask&unix.IN_DELETE_SELF != 0 { + if _, ok := w.watches.path[filepath.Dir(watch.path)]; ok { + next() + continue + } } - event := w.newEvent(name, mask) + ev := w.newEvent(name, mask, raw.Cookie) + // Need to update watch path for recurse. + if watch.recurse { + isDir := mask&unix.IN_ISDIR == unix.IN_ISDIR + /// New directory created: set up watch on it. + if isDir && ev.Has(Create) { + err := w.register(ev.Name, watch.flags, true) + if !w.sendError(err) { + return + } - // Send the events that are not ignored on the events channel - if mask&unix.IN_IGNORED == 0 { - if !w.sendEvent(event) { - return + // This was a directory rename, so we need to update all + // the children. + // + // TODO: this is of course pretty slow; we should use a + // better data structure for storing all of this, e.g. store + // children in the watch. I have some code for this in my + // kqueue refactor we can use in the future. For now I'm + // okay with this as it's not publicly available. + // Correctness first, performance second. + if ev.renamedFrom != "" { + w.watches.mu.Lock() + for k, ww := range w.watches.wd { + if k == watch.wd || ww.path == ev.Name { + continue + } + if strings.HasPrefix(ww.path, ev.renamedFrom) { + ww.path = strings.Replace(ww.path, ev.renamedFrom, ev.Name, 1) + w.watches.wd[k] = ww + } + } + w.watches.mu.Unlock() + } } } - // Move to the next event in the buffer - offset += unix.SizeofInotifyEvent + nameLen + /// Send the events that are not ignored on the events channel + if !w.sendEvent(ev) { + return + } + next() } } } -// newEvent returns an platform-independent Event based on an inotify mask. -func (w *Watcher) newEvent(name string, mask uint32) Event { +func (w *inotify) isRecursive(path string) bool { + ww := w.watches.byPath(path) + if ww == nil { // path could be a file, so also check the Dir. + ww = w.watches.byPath(filepath.Dir(path)) + } + return ww != nil && ww.recurse +} + +func (w *inotify) newEvent(name string, mask, cookie uint32) Event { e := Event{Name: name} if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO { e.Op |= Create @@ -584,11 +601,58 @@ func (w *Watcher) newEvent(name string, mask uint32) Event { if mask&unix.IN_MODIFY == unix.IN_MODIFY { e.Op |= Write } + if mask&unix.IN_OPEN == unix.IN_OPEN { + e.Op |= xUnportableOpen + } + if mask&unix.IN_ACCESS == unix.IN_ACCESS { + e.Op |= xUnportableRead + } + if mask&unix.IN_CLOSE_WRITE == unix.IN_CLOSE_WRITE { + e.Op |= xUnportableCloseWrite + } + if mask&unix.IN_CLOSE_NOWRITE == unix.IN_CLOSE_NOWRITE { + e.Op |= xUnportableCloseRead + } if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM { e.Op |= Rename } if mask&unix.IN_ATTRIB == unix.IN_ATTRIB { e.Op |= Chmod } + + if cookie != 0 { + if mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM { + w.cookiesMu.Lock() + w.cookies[w.cookieIndex] = koekje{cookie: cookie, path: e.Name} + w.cookieIndex++ + if w.cookieIndex > 9 { + w.cookieIndex = 0 + } + w.cookiesMu.Unlock() + } else if mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO { + w.cookiesMu.Lock() + var prev string + for _, c := range w.cookies { + if c.cookie == cookie { + prev = c.path + break + } + } + w.cookiesMu.Unlock() + e.renamedFrom = prev + } + } return e } + +func (w *inotify) xSupports(op Op) bool { + return true // Supports everything. +} + +func (w *inotify) state() { + w.watches.mu.Lock() + defer w.watches.mu.Unlock() + for wd, ww := range w.watches.wd { + fmt.Fprintf(os.Stderr, "%4d: recurse=%t %q\n", wd, ww.recurse, ww.path) + } +} diff --git a/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go b/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go index 063a0915a0..d8de5ab76f 100644 --- a/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go +++ b/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go @@ -1,8 +1,4 @@ //go:build freebsd || openbsd || netbsd || dragonfly || darwin -// +build freebsd openbsd netbsd dragonfly darwin - -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh package fsnotify @@ -11,174 +7,195 @@ import ( "fmt" "os" "path/filepath" + "runtime" "sync" + "time" + "github.com/fsnotify/fsnotify/internal" "golang.org/x/sys/unix" ) -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. +type kqueue struct { Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. Errors chan error - done chan struct{} - kq int // File descriptor (as returned by the kqueue() syscall). - closepipe [2]int // Pipe used for closing. - mu sync.Mutex // Protects access to watcher data - watches map[string]int // Watched file descriptors (key: path). - watchesByDir map[string]map[int]struct{} // Watched file descriptors indexed by the parent directory (key: dirname(path)). - userWatches map[string]struct{} // Watches added with Watcher.Add() - dirFlags map[string]uint32 // Watched directories to fflags used in kqueue. - paths map[int]pathInfo // File descriptors to path names for processing kqueue events. - fileExists map[string]struct{} // Keep track of if we know this file exists (to stop duplicate create events). - isClosed bool // Set to true when Close() is first called + kq int // File descriptor (as returned by the kqueue() syscall). + closepipe [2]int // Pipe used for closing kq. + watches *watches + done chan struct{} + doneMu sync.Mutex } -type pathInfo struct { - name string - isDir bool +type ( + watches struct { + mu sync.RWMutex + wd map[int]watch // wd → watch + path map[string]int // pathname → wd + byDir map[string]map[int]struct{} // dirname(path) → wd + seen map[string]struct{} // Keep track of if we know this file exists. + byUser map[string]struct{} // Watches added with Watcher.Add() + } + watch struct { + wd int + name string + linkName string // In case of links; name is the target, and this is the link. + isDir bool + dirFlags uint32 + } +) + +func newWatches() *watches { + return &watches{ + wd: make(map[int]watch), + path: make(map[string]int), + byDir: make(map[string]map[int]struct{}), + seen: make(map[string]struct{}), + byUser: make(map[string]struct{}), + } } -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { - return NewBufferedWatcher(0) +func (w *watches) listPaths(userOnly bool) []string { + w.mu.RLock() + defer w.mu.RUnlock() + + if userOnly { + l := make([]string, 0, len(w.byUser)) + for p := range w.byUser { + l = append(l, p) + } + return l + } + + l := make([]string, 0, len(w.path)) + for p := range w.path { + l = append(l, p) + } + return l } -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { +func (w *watches) watchesInDir(path string) []string { + w.mu.RLock() + defer w.mu.RUnlock() + + l := make([]string, 0, 4) + for fd := range w.byDir[path] { + info := w.wd[fd] + if _, ok := w.byUser[info.name]; !ok { + l = append(l, info.name) + } + } + return l +} + +// Mark path as added by the user. +func (w *watches) addUserWatch(path string) { + w.mu.Lock() + defer w.mu.Unlock() + w.byUser[path] = struct{}{} +} + +func (w *watches) addLink(path string, fd int) { + w.mu.Lock() + defer w.mu.Unlock() + + w.path[path] = fd + w.seen[path] = struct{}{} +} + +func (w *watches) add(path, linkPath string, fd int, isDir bool) { + w.mu.Lock() + defer w.mu.Unlock() + + w.path[path] = fd + w.wd[fd] = watch{wd: fd, name: path, linkName: linkPath, isDir: isDir} + + parent := filepath.Dir(path) + byDir, ok := w.byDir[parent] + if !ok { + byDir = make(map[int]struct{}, 1) + w.byDir[parent] = byDir + } + byDir[fd] = struct{}{} +} + +func (w *watches) byWd(fd int) (watch, bool) { + w.mu.RLock() + defer w.mu.RUnlock() + info, ok := w.wd[fd] + return info, ok +} + +func (w *watches) byPath(path string) (watch, bool) { + w.mu.RLock() + defer w.mu.RUnlock() + info, ok := w.wd[w.path[path]] + return info, ok +} + +func (w *watches) updateDirFlags(path string, flags uint32) { + w.mu.Lock() + defer w.mu.Unlock() + + fd := w.path[path] + info := w.wd[fd] + info.dirFlags = flags + w.wd[fd] = info +} + +func (w *watches) remove(fd int, path string) bool { + w.mu.Lock() + defer w.mu.Unlock() + + isDir := w.wd[fd].isDir + delete(w.path, path) + delete(w.byUser, path) + + parent := filepath.Dir(path) + delete(w.byDir[parent], fd) + + if len(w.byDir[parent]) == 0 { + delete(w.byDir, parent) + } + + delete(w.wd, fd) + delete(w.seen, path) + return isDir +} + +func (w *watches) markSeen(path string, exists bool) { + w.mu.Lock() + defer w.mu.Unlock() + if exists { + w.seen[path] = struct{}{} + } else { + delete(w.seen, path) + } +} + +func (w *watches) seenBefore(path string) bool { + w.mu.RLock() + defer w.mu.RUnlock() + _, ok := w.seen[path] + return ok +} + +func newBackend(ev chan Event, errs chan error) (backend, error) { + return newBufferedBackend(0, ev, errs) +} + +func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) { kq, closepipe, err := newKqueue() if err != nil { return nil, err } - w := &Watcher{ - kq: kq, - closepipe: closepipe, - watches: make(map[string]int), - watchesByDir: make(map[string]map[int]struct{}), - dirFlags: make(map[string]uint32), - paths: make(map[int]pathInfo), - fileExists: make(map[string]struct{}), - userWatches: make(map[string]struct{}), - Events: make(chan Event, sz), - Errors: make(chan error), - done: make(chan struct{}), + w := &kqueue{ + Events: ev, + Errors: errs, + kq: kq, + closepipe: closepipe, + done: make(chan struct{}), + watches: newWatches(), } go w.readEvents() @@ -203,6 +220,8 @@ func newKqueue() (kq int, closepipe [2]int, err error) { unix.Close(kq) return kq, closepipe, err } + unix.CloseOnExec(closepipe[0]) + unix.CloseOnExec(closepipe[1]) // Register changes to listen on the closepipe. changes := make([]unix.Kevent_t, 1) @@ -221,166 +240,108 @@ func newKqueue() (kq int, closepipe [2]int, err error) { } // Returns true if the event was sent, or false if watcher is closed. -func (w *Watcher) sendEvent(e Event) bool { +func (w *kqueue) sendEvent(e Event) bool { select { - case w.Events <- e: - return true case <-w.done: return false + case w.Events <- e: + return true } } // Returns true if the error was sent, or false if watcher is closed. -func (w *Watcher) sendError(err error) bool { +func (w *kqueue) sendError(err error) bool { + if err == nil { + return true + } select { + case <-w.done: + return false case w.Errors <- err: return true + } +} + +func (w *kqueue) isClosed() bool { + select { case <-w.done: + return true + default: return false } } -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { - w.mu.Lock() - if w.isClosed { - w.mu.Unlock() +func (w *kqueue) Close() error { + w.doneMu.Lock() + if w.isClosed() { + w.doneMu.Unlock() return nil } - w.isClosed = true + close(w.done) + w.doneMu.Unlock() - // copy paths to remove while locked - pathsToRemove := make([]string, 0, len(w.watches)) - for name := range w.watches { - pathsToRemove = append(pathsToRemove, name) - } - w.mu.Unlock() // Unlock before calling Remove, which also locks + pathsToRemove := w.watches.listPaths(false) for _, name := range pathsToRemove { w.Remove(name) } // Send "quit" message to the reader goroutine. unix.Close(w.closepipe[1]) - close(w.done) - return nil } -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return w.AddWith(name) } +func (w *kqueue) Add(name string) error { return w.AddWith(name) } -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { - _ = getOptions(opts...) +func (w *kqueue) AddWith(name string, opts ...addOpt) error { + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s AddWith(%q)\n", + time.Now().Format("15:04:05.000000000"), name) + } + + with := getOptions(opts...) + if !w.xSupports(with.op) { + return fmt.Errorf("%w: %s", xErrUnsupported, with.op) + } - w.mu.Lock() - w.userWatches[name] = struct{}{} - w.mu.Unlock() _, err := w.addWatch(name, noteAllEvents) - return err + if err != nil { + return err + } + w.watches.addUserWatch(name) + return nil } -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { +func (w *kqueue) Remove(name string) error { + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s Remove(%q)\n", + time.Now().Format("15:04:05.000000000"), name) + } return w.remove(name, true) } -func (w *Watcher) remove(name string, unwatchFiles bool) error { - name = filepath.Clean(name) - w.mu.Lock() - if w.isClosed { - w.mu.Unlock() +func (w *kqueue) remove(name string, unwatchFiles bool) error { + if w.isClosed() { return nil } - watchfd, ok := w.watches[name] - w.mu.Unlock() + + name = filepath.Clean(name) + info, ok := w.watches.byPath(name) if !ok { return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) } - err := w.register([]int{watchfd}, unix.EV_DELETE, 0) + err := w.register([]int{info.wd}, unix.EV_DELETE, 0) if err != nil { return err } - unix.Close(watchfd) - - w.mu.Lock() - isDir := w.paths[watchfd].isDir - delete(w.watches, name) - delete(w.userWatches, name) - - parentName := filepath.Dir(name) - delete(w.watchesByDir[parentName], watchfd) - - if len(w.watchesByDir[parentName]) == 0 { - delete(w.watchesByDir, parentName) - } + unix.Close(info.wd) - delete(w.paths, watchfd) - delete(w.dirFlags, name) - delete(w.fileExists, name) - w.mu.Unlock() + isDir := w.watches.remove(info.wd, name) // Find all watched paths that are in this directory that are not external. if unwatchFiles && isDir { - var pathsToRemove []string - w.mu.Lock() - for fd := range w.watchesByDir[name] { - path := w.paths[fd] - if _, ok := w.userWatches[path.name]; !ok { - pathsToRemove = append(pathsToRemove, path.name) - } - } - w.mu.Unlock() + pathsToRemove := w.watches.watchesInDir(name) for _, name := range pathsToRemove { // Since these are internal, not much sense in propagating error to // the user, as that will just confuse them with an error about a @@ -391,23 +352,11 @@ func (w *Watcher) remove(name string, unwatchFiles bool) error { return nil } -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { - w.mu.Lock() - defer w.mu.Unlock() - if w.isClosed { +func (w *kqueue) WatchList() []string { + if w.isClosed() { return nil } - - entries := make([]string, 0, len(w.userWatches)) - for pathname := range w.userWatches { - entries = append(entries, pathname) - } - - return entries + return w.watches.listPaths(true) } // Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE) @@ -417,34 +366,26 @@ const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | un // described in kevent(2). // // Returns the real path to the file which was added, with symlinks resolved. -func (w *Watcher) addWatch(name string, flags uint32) (string, error) { - var isDir bool - name = filepath.Clean(name) - - w.mu.Lock() - if w.isClosed { - w.mu.Unlock() +func (w *kqueue) addWatch(name string, flags uint32) (string, error) { + if w.isClosed() { return "", ErrClosed } - watchfd, alreadyWatching := w.watches[name] - // We already have a watch, but we can still override flags. - if alreadyWatching { - isDir = w.paths[watchfd].isDir - } - w.mu.Unlock() + name = filepath.Clean(name) + + info, alreadyWatching := w.watches.byPath(name) if !alreadyWatching { fi, err := os.Lstat(name) if err != nil { return "", err } - // Don't watch sockets or named pipes + // Don't watch sockets or named pipes. if (fi.Mode()&os.ModeSocket == os.ModeSocket) || (fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe) { return "", nil } - // Follow Symlinks. + // Follow symlinks. if fi.Mode()&os.ModeSymlink == os.ModeSymlink { link, err := os.Readlink(name) if err != nil { @@ -455,18 +396,15 @@ func (w *Watcher) addWatch(name string, flags uint32) (string, error) { return "", nil } - w.mu.Lock() - _, alreadyWatching = w.watches[link] - w.mu.Unlock() - + _, alreadyWatching = w.watches.byPath(link) if alreadyWatching { // Add to watches so we don't get spurious Create events later // on when we diff the directories. - w.watches[name] = 0 - w.fileExists[name] = struct{}{} + w.watches.addLink(name, 0) return link, nil } + info.linkName = name name = link fi, err = os.Lstat(name) if err != nil { @@ -477,7 +415,7 @@ func (w *Watcher) addWatch(name string, flags uint32) (string, error) { // Retry on EINTR; open() can return EINTR in practice on macOS. // See #354, and Go issues 11180 and 39237. for { - watchfd, err = unix.Open(name, openMode, 0) + info.wd, err = unix.Open(name, openMode, 0) if err == nil { break } @@ -488,40 +426,25 @@ func (w *Watcher) addWatch(name string, flags uint32) (string, error) { return "", err } - isDir = fi.IsDir() + info.isDir = fi.IsDir() } - err := w.register([]int{watchfd}, unix.EV_ADD|unix.EV_CLEAR|unix.EV_ENABLE, flags) + err := w.register([]int{info.wd}, unix.EV_ADD|unix.EV_CLEAR|unix.EV_ENABLE, flags) if err != nil { - unix.Close(watchfd) + unix.Close(info.wd) return "", err } if !alreadyWatching { - w.mu.Lock() - parentName := filepath.Dir(name) - w.watches[name] = watchfd - - watchesByDir, ok := w.watchesByDir[parentName] - if !ok { - watchesByDir = make(map[int]struct{}, 1) - w.watchesByDir[parentName] = watchesByDir - } - watchesByDir[watchfd] = struct{}{} - w.paths[watchfd] = pathInfo{name: name, isDir: isDir} - w.mu.Unlock() + w.watches.add(name, info.linkName, info.wd, info.isDir) } - if isDir { - // Watch the directory if it has not been watched before, or if it was - // watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles) - w.mu.Lock() - + // Watch the directory if it has not been watched before, or if it was + // watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles) + if info.isDir { watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE && - (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE) - // Store flags so this watch can be updated later - w.dirFlags[name] = flags - w.mu.Unlock() + (!alreadyWatching || (info.dirFlags&unix.NOTE_WRITE) != unix.NOTE_WRITE) + w.watches.updateDirFlags(name, flags) if watchDir { if err := w.watchDirectoryFiles(name); err != nil { @@ -534,7 +457,7 @@ func (w *Watcher) addWatch(name string, flags uint32) (string, error) { // readEvents reads from kqueue and converts the received kevents into // Event values that it sends down the Events channel. -func (w *Watcher) readEvents() { +func (w *kqueue) readEvents() { defer func() { close(w.Events) close(w.Errors) @@ -543,50 +466,65 @@ func (w *Watcher) readEvents() { }() eventBuffer := make([]unix.Kevent_t, 10) - for closed := false; !closed; { + for { kevents, err := w.read(eventBuffer) // EINTR is okay, the syscall was interrupted before timeout expired. if err != nil && err != unix.EINTR { if !w.sendError(fmt.Errorf("fsnotify.readEvents: %w", err)) { - closed = true + return } - continue } - // Flush the events we received to the Events channel for _, kevent := range kevents { var ( - watchfd = int(kevent.Ident) - mask = uint32(kevent.Fflags) + wd = int(kevent.Ident) + mask = uint32(kevent.Fflags) ) // Shut down the loop when the pipe is closed, but only after all // other events have been processed. - if watchfd == w.closepipe[0] { - closed = true - continue + if wd == w.closepipe[0] { + return } - w.mu.Lock() - path := w.paths[watchfd] - w.mu.Unlock() + path, ok := w.watches.byWd(wd) + if debug { + internal.Debug(path.name, &kevent) + } - event := w.newEvent(path.name, mask) + // On macOS it seems that sometimes an event with Ident=0 is + // delivered, and no other flags/information beyond that, even + // though we never saw such a file descriptor. For example in + // TestWatchSymlink/277 (usually at the end, but sometimes sooner): + // + // fmt.Printf("READ: %2d %#v\n", kevent.Ident, kevent) + // unix.Kevent_t{Ident:0x2a, Filter:-4, Flags:0x25, Fflags:0x2, Data:0, Udata:(*uint8)(nil)} + // unix.Kevent_t{Ident:0x0, Filter:-4, Flags:0x25, Fflags:0x2, Data:0, Udata:(*uint8)(nil)} + // + // The first is a normal event, the second with Ident 0. No error + // flag, no data, no ... nothing. + // + // I read a bit through bsd/kern_event.c from the xnu source, but I + // don't really see an obvious location where this is triggered – + // this doesn't seem intentional, but idk... + // + // Technically fd 0 is a valid descriptor, so only skip it if + // there's no path, and if we're on macOS. + if !ok && kevent.Ident == 0 && runtime.GOOS == "darwin" { + continue + } + + event := w.newEvent(path.name, path.linkName, mask) if event.Has(Rename) || event.Has(Remove) { w.remove(event.Name, false) - w.mu.Lock() - delete(w.fileExists, event.Name) - w.mu.Unlock() + w.watches.markSeen(event.Name, false) } if path.isDir && event.Has(Write) && !event.Has(Remove) { - w.sendDirectoryChangeEvents(event.Name) - } else { - if !w.sendEvent(event) { - closed = true - continue - } + w.dirChange(event.Name) + } else if !w.sendEvent(event) { + return } if event.Has(Remove) { @@ -594,25 +532,34 @@ func (w *Watcher) readEvents() { // mv f1 f2 will delete f2, then create f2. if path.isDir { fileDir := filepath.Clean(event.Name) - w.mu.Lock() - _, found := w.watches[fileDir] - w.mu.Unlock() + _, found := w.watches.byPath(fileDir) if found { - err := w.sendDirectoryChangeEvents(fileDir) - if err != nil { - if !w.sendError(err) { - closed = true - } + // TODO: this branch is never triggered in any test. + // Added in d6220df (2012). + // isDir check added in 8611c35 (2016): https://github.com/fsnotify/fsnotify/pull/111 + // + // I don't really get how this can be triggered either. + // And it wasn't triggered in the patch that added it, + // either. + // + // Original also had a comment: + // make sure the directory exists before we watch for + // changes. When we do a recursive watch and perform + // rm -rf, the parent directory might have gone + // missing, ignore the missing directory and let the + // upcoming delete event remove the watch from the + // parent directory. + err := w.dirChange(fileDir) + if !w.sendError(err) { + return } } } else { - filePath := filepath.Clean(event.Name) - if fi, err := os.Lstat(filePath); err == nil { - err := w.sendFileCreatedEventIfNew(filePath, fi) - if err != nil { - if !w.sendError(err) { - closed = true - } + path := filepath.Clean(event.Name) + if fi, err := os.Lstat(path); err == nil { + err := w.sendCreateIfNew(path, fi) + if !w.sendError(err) { + return } } } @@ -622,8 +569,14 @@ func (w *Watcher) readEvents() { } // newEvent returns an platform-independent Event based on kqueue Fflags. -func (w *Watcher) newEvent(name string, mask uint32) Event { +func (w *kqueue) newEvent(name, linkName string, mask uint32) Event { e := Event{Name: name} + if linkName != "" { + // If the user watched "/path/link" then emit events as "/path/link" + // rather than "/path/target". + e.Name = linkName + } + if mask&unix.NOTE_DELETE == unix.NOTE_DELETE { e.Op |= Remove } @@ -645,8 +598,7 @@ func (w *Watcher) newEvent(name string, mask uint32) Event { } // watchDirectoryFiles to mimic inotify when adding a watch on a directory -func (w *Watcher) watchDirectoryFiles(dirPath string) error { - // Get all files +func (w *kqueue) watchDirectoryFiles(dirPath string) error { files, err := os.ReadDir(dirPath) if err != nil { return err @@ -674,9 +626,7 @@ func (w *Watcher) watchDirectoryFiles(dirPath string) error { } } - w.mu.Lock() - w.fileExists[cleanPath] = struct{}{} - w.mu.Unlock() + w.watches.markSeen(cleanPath, true) } return nil @@ -686,7 +636,7 @@ func (w *Watcher) watchDirectoryFiles(dirPath string) error { // // This functionality is to have the BSD watcher match the inotify, which sends // a create event for files created in a watched directory. -func (w *Watcher) sendDirectoryChangeEvents(dir string) error { +func (w *kqueue) dirChange(dir string) error { files, err := os.ReadDir(dir) if err != nil { // Directory no longer exists: we can ignore this safely. kqueue will @@ -694,61 +644,51 @@ func (w *Watcher) sendDirectoryChangeEvents(dir string) error { if errors.Is(err, os.ErrNotExist) { return nil } - return fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err) + return fmt.Errorf("fsnotify.dirChange: %w", err) } for _, f := range files { fi, err := f.Info() if err != nil { - return fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err) + return fmt.Errorf("fsnotify.dirChange: %w", err) } - err = w.sendFileCreatedEventIfNew(filepath.Join(dir, fi.Name()), fi) + err = w.sendCreateIfNew(filepath.Join(dir, fi.Name()), fi) if err != nil { // Don't need to send an error if this file isn't readable. if errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM) { return nil } - return fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err) + return fmt.Errorf("fsnotify.dirChange: %w", err) } } return nil } -// sendFileCreatedEvent sends a create event if the file isn't already being tracked. -func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fi os.FileInfo) (err error) { - w.mu.Lock() - _, doesExist := w.fileExists[filePath] - w.mu.Unlock() - if !doesExist { - if !w.sendEvent(Event{Name: filePath, Op: Create}) { - return +// Send a create event if the file isn't already being tracked, and start +// watching this file. +func (w *kqueue) sendCreateIfNew(path string, fi os.FileInfo) error { + if !w.watches.seenBefore(path) { + if !w.sendEvent(Event{Name: path, Op: Create}) { + return nil } } - // like watchDirectoryFiles (but without doing another ReadDir) - filePath, err = w.internalWatch(filePath, fi) + // Like watchDirectoryFiles, but without doing another ReadDir. + path, err := w.internalWatch(path, fi) if err != nil { return err } - - w.mu.Lock() - w.fileExists[filePath] = struct{}{} - w.mu.Unlock() - + w.watches.markSeen(path, true) return nil } -func (w *Watcher) internalWatch(name string, fi os.FileInfo) (string, error) { +func (w *kqueue) internalWatch(name string, fi os.FileInfo) (string, error) { if fi.IsDir() { // mimic Linux providing delete events for subdirectories, but preserve // the flags used if currently watching subdirectory - w.mu.Lock() - flags := w.dirFlags[name] - w.mu.Unlock() - - flags |= unix.NOTE_DELETE | unix.NOTE_RENAME - return w.addWatch(name, flags) + info, _ := w.watches.byPath(name) + return w.addWatch(name, info.dirFlags|unix.NOTE_DELETE|unix.NOTE_RENAME) } // watch file to mimic Linux inotify @@ -756,7 +696,7 @@ func (w *Watcher) internalWatch(name string, fi os.FileInfo) (string, error) { } // Register events with the queue. -func (w *Watcher) register(fds []int, flags int, fflags uint32) error { +func (w *kqueue) register(fds []int, flags int, fflags uint32) error { changes := make([]unix.Kevent_t, len(fds)) for i, fd := range fds { // SetKevent converts int to the platform-specific types. @@ -773,10 +713,21 @@ func (w *Watcher) register(fds []int, flags int, fflags uint32) error { } // read retrieves pending events, or waits until an event occurs. -func (w *Watcher) read(events []unix.Kevent_t) ([]unix.Kevent_t, error) { +func (w *kqueue) read(events []unix.Kevent_t) ([]unix.Kevent_t, error) { n, err := unix.Kevent(w.kq, nil, events, nil) if err != nil { return nil, err } return events[0:n], nil } + +func (w *kqueue) xSupports(op Op) bool { + if runtime.GOOS == "freebsd" { + //return true // Supports everything. + } + if op.Has(xUnportableOpen) || op.Has(xUnportableRead) || + op.Has(xUnportableCloseWrite) || op.Has(xUnportableCloseRead) { + return false + } + return true +} diff --git a/vendor/github.com/fsnotify/fsnotify/backend_other.go b/vendor/github.com/fsnotify/fsnotify/backend_other.go index d34a23c015..5eb5dbc66f 100644 --- a/vendor/github.com/fsnotify/fsnotify/backend_other.go +++ b/vendor/github.com/fsnotify/fsnotify/backend_other.go @@ -1,205 +1,23 @@ //go:build appengine || (!darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows) -// +build appengine !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows - -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh package fsnotify import "errors" -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. +type other struct { Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. Errors chan error } -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { +func newBackend(ev chan Event, errs chan error) (backend, error) { return nil, errors.New("fsnotify not supported on the current platform") } - -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { return NewWatcher() } - -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { return nil } - -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { return nil } - -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return nil } - -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { return nil } - -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { return nil } +func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) { + return newBackend(ev, errs) +} +func (w *other) Close() error { return nil } +func (w *other) WatchList() []string { return nil } +func (w *other) Add(name string) error { return nil } +func (w *other) AddWith(name string, opts ...addOpt) error { return nil } +func (w *other) Remove(name string) error { return nil } +func (w *other) xSupports(op Op) bool { return false } diff --git a/vendor/github.com/fsnotify/fsnotify/backend_windows.go b/vendor/github.com/fsnotify/fsnotify/backend_windows.go index 9bc91e5d61..c54a630838 100644 --- a/vendor/github.com/fsnotify/fsnotify/backend_windows.go +++ b/vendor/github.com/fsnotify/fsnotify/backend_windows.go @@ -1,12 +1,8 @@ //go:build windows -// +build windows // Windows backend based on ReadDirectoryChangesW() // // https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw -// -// Note: the documentation on the Watcher type and methods is generated from -// mkdoc.zsh package fsnotify @@ -19,123 +15,15 @@ import ( "runtime" "strings" "sync" + "time" "unsafe" + "github.com/fsnotify/fsnotify/internal" "golang.org/x/sys/windows" ) -// Watcher watches a set of paths, delivering events on a channel. -// -// A watcher should not be copied (e.g. pass it by pointer, rather than by -// value). -// -// # Linux notes -// -// When a file is removed a Remove event won't be emitted until all file -// descriptors are closed, and deletes will always emit a Chmod. For example: -// -// fp := os.Open("file") -// os.Remove("file") // Triggers Chmod -// fp.Close() // Triggers Remove -// -// This is the event that inotify sends, so not much can be changed about this. -// -// The fs.inotify.max_user_watches sysctl variable specifies the upper limit -// for the number of watches per user, and fs.inotify.max_user_instances -// specifies the maximum number of inotify instances per user. Every Watcher you -// create is an "instance", and every path you add is a "watch". -// -// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and -// /proc/sys/fs/inotify/max_user_instances -// -// To increase them you can use sysctl or write the value to the /proc file: -// -// # Default values on Linux 5.18 -// sysctl fs.inotify.max_user_watches=124983 -// sysctl fs.inotify.max_user_instances=128 -// -// To make the changes persist on reboot edit /etc/sysctl.conf or -// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check -// your distro's documentation): -// -// fs.inotify.max_user_watches=124983 -// fs.inotify.max_user_instances=128 -// -// Reaching the limit will result in a "no space left on device" or "too many open -// files" error. -// -// # kqueue notes (macOS, BSD) -// -// kqueue requires opening a file descriptor for every file that's being watched; -// so if you're watching a directory with five files then that's six file -// descriptors. You will run in to your system's "max open files" limit faster on -// these platforms. -// -// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to -// control the maximum number of open files, as well as /etc/login.conf on BSD -// systems. -// -// # Windows notes -// -// Paths can be added as "C:\path\to\dir", but forward slashes -// ("C:/path/to/dir") will also work. -// -// When a watched directory is removed it will always send an event for the -// directory itself, but may not send events for all files in that directory. -// Sometimes it will send events for all times, sometimes it will send no -// events, and often only for some files. -// -// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest -// value that is guaranteed to work with SMB filesystems. If you have many -// events in quick succession this may not be enough, and you will have to use -// [WithBufferSize] to increase the value. -type Watcher struct { - // Events sends the filesystem change events. - // - // fsnotify can send the following events; a "path" here can refer to a - // file, directory, symbolic link, or special file like a FIFO. - // - // fsnotify.Create A new path was created; this may be followed by one - // or more Write events if data also gets written to a - // file. - // - // fsnotify.Remove A path was removed. - // - // fsnotify.Rename A path was renamed. A rename is always sent with the - // old path as Event.Name, and a Create event will be - // sent with the new name. Renames are only sent for - // paths that are currently watched; e.g. moving an - // unmonitored file into a monitored directory will - // show up as just a Create. Similarly, renaming a file - // to outside a monitored directory will show up as - // only a Rename. - // - // fsnotify.Write A file or named pipe was written to. A Truncate will - // also trigger a Write. A single "write action" - // initiated by the user may show up as one or multiple - // writes, depending on when the system syncs things to - // disk. For example when compiling a large Go program - // you may get hundreds of Write events, and you may - // want to wait until you've stopped receiving them - // (see the dedup example in cmd/fsnotify). - // - // Some systems may send Write event for directories - // when the directory content changes. - // - // fsnotify.Chmod Attributes were changed. On Linux this is also sent - // when a file is removed (or more accurately, when a - // link to an inode is removed). On kqueue it's sent - // when a file is truncated. On Windows it's never - // sent. +type readDirChangesW struct { Events chan Event - - // Errors sends any errors. - // - // ErrEventOverflow is used to indicate there are too many events: - // - // - inotify: There are too many queued events (fs.inotify.max_queued_events sysctl) - // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. - // - kqueue, fen: Not used. Errors chan error port windows.Handle // Handle to completion port @@ -147,48 +35,40 @@ type Watcher struct { closed bool // Set to true when Close() is first called } -// NewWatcher creates a new Watcher. -func NewWatcher() (*Watcher, error) { - return NewBufferedWatcher(50) +func newBackend(ev chan Event, errs chan error) (backend, error) { + return newBufferedBackend(50, ev, errs) } -// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events -// channel. -// -// The main use case for this is situations with a very large number of events -// where the kernel buffer size can't be increased (e.g. due to lack of -// permissions). An unbuffered Watcher will perform better for almost all use -// cases, and whenever possible you will be better off increasing the kernel -// buffers instead of adding a large userspace buffer. -func NewBufferedWatcher(sz uint) (*Watcher, error) { +func newBufferedBackend(sz uint, ev chan Event, errs chan error) (backend, error) { port, err := windows.CreateIoCompletionPort(windows.InvalidHandle, 0, 0, 0) if err != nil { return nil, os.NewSyscallError("CreateIoCompletionPort", err) } - w := &Watcher{ + w := &readDirChangesW{ + Events: ev, + Errors: errs, port: port, watches: make(watchMap), input: make(chan *input, 1), - Events: make(chan Event, sz), - Errors: make(chan error), quit: make(chan chan<- error, 1), } go w.readEvents() return w, nil } -func (w *Watcher) isClosed() bool { +func (w *readDirChangesW) isClosed() bool { w.mu.Lock() defer w.mu.Unlock() return w.closed } -func (w *Watcher) sendEvent(name string, mask uint64) bool { +func (w *readDirChangesW) sendEvent(name, renamedFrom string, mask uint64) bool { if mask == 0 { return false } event := w.newEvent(name, uint32(mask)) + event.renamedFrom = renamedFrom select { case ch := <-w.quit: w.quit <- ch @@ -198,17 +78,19 @@ func (w *Watcher) sendEvent(name string, mask uint64) bool { } // Returns true if the error was sent, or false if watcher is closed. -func (w *Watcher) sendError(err error) bool { +func (w *readDirChangesW) sendError(err error) bool { + if err == nil { + return true + } select { case w.Errors <- err: return true case <-w.quit: + return false } - return false } -// Close removes all watches and closes the Events channel. -func (w *Watcher) Close() error { +func (w *readDirChangesW) Close() error { if w.isClosed() { return nil } @@ -226,57 +108,21 @@ func (w *Watcher) Close() error { return <-ch } -// Add starts monitoring the path for changes. -// -// A path can only be watched once; watching it more than once is a no-op and will -// not return an error. Paths that do not yet exist on the filesystem cannot be -// watched. -// -// A watch will be automatically removed if the watched path is deleted or -// renamed. The exception is the Windows backend, which doesn't remove the -// watcher on renames. -// -// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special -// filesystems (/proc, /sys, etc.) generally don't work. -// -// Returns [ErrClosed] if [Watcher.Close] was called. -// -// See [Watcher.AddWith] for a version that allows adding options. -// -// # Watching directories -// -// All files in a directory are monitored, including new files that are created -// after the watcher is started. Subdirectories are not watched (i.e. it's -// non-recursive). -// -// # Watching files -// -// Watching individual files (rather than directories) is generally not -// recommended as many programs (especially editors) update files atomically: it -// will write to a temporary file which is then moved to to destination, -// overwriting the original (or some variant thereof). The watcher on the -// original file is now lost, as that no longer exists. -// -// The upshot of this is that a power failure or crash won't leave a -// half-written file. -// -// Watch the parent directory and use Event.Name to filter out files you're not -// interested in. There is an example of this in cmd/fsnotify/file.go. -func (w *Watcher) Add(name string) error { return w.AddWith(name) } +func (w *readDirChangesW) Add(name string) error { return w.AddWith(name) } -// AddWith is like [Watcher.Add], but allows adding options. When using Add() -// the defaults described below are used. -// -// Possible options are: -// -// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on -// other platforms. The default is 64K (65536 bytes). -func (w *Watcher) AddWith(name string, opts ...addOpt) error { +func (w *readDirChangesW) AddWith(name string, opts ...addOpt) error { if w.isClosed() { return ErrClosed } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s AddWith(%q)\n", + time.Now().Format("15:04:05.000000000"), filepath.ToSlash(name)) + } with := getOptions(opts...) + if !w.xSupports(with.op) { + return fmt.Errorf("%w: %s", xErrUnsupported, with.op) + } if with.bufsize < 4096 { return fmt.Errorf("fsnotify.WithBufferSize: buffer size cannot be smaller than 4096 bytes") } @@ -295,18 +141,14 @@ func (w *Watcher) AddWith(name string, opts ...addOpt) error { return <-in.reply } -// Remove stops monitoring the path for changes. -// -// Directories are always removed non-recursively. For example, if you added -// /tmp/dir and /tmp/dir/subdir then you will need to remove both. -// -// Removing a path that has not yet been added returns [ErrNonExistentWatch]. -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) Remove(name string) error { +func (w *readDirChangesW) Remove(name string) error { if w.isClosed() { return nil } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s Remove(%q)\n", + time.Now().Format("15:04:05.000000000"), filepath.ToSlash(name)) + } in := &input{ op: opRemoveWatch, @@ -320,11 +162,7 @@ func (w *Watcher) Remove(name string) error { return <-in.reply } -// WatchList returns all paths explicitly added with [Watcher.Add] (and are not -// yet removed). -// -// Returns nil if [Watcher.Close] was called. -func (w *Watcher) WatchList() []string { +func (w *readDirChangesW) WatchList() []string { if w.isClosed() { return nil } @@ -335,7 +173,13 @@ func (w *Watcher) WatchList() []string { entries := make([]string, 0, len(w.watches)) for _, entry := range w.watches { for _, watchEntry := range entry { - entries = append(entries, watchEntry.path) + for name := range watchEntry.names { + entries = append(entries, filepath.Join(watchEntry.path, name)) + } + // the directory itself is being watched + if watchEntry.mask != 0 { + entries = append(entries, watchEntry.path) + } } } @@ -361,7 +205,7 @@ const ( sysFSIGNORED = 0x8000 ) -func (w *Watcher) newEvent(name string, mask uint32) Event { +func (w *readDirChangesW) newEvent(name string, mask uint32) Event { e := Event{Name: name} if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO { e.Op |= Create @@ -417,7 +261,7 @@ type ( watchMap map[uint32]indexMap ) -func (w *Watcher) wakeupReader() error { +func (w *readDirChangesW) wakeupReader() error { err := windows.PostQueuedCompletionStatus(w.port, 0, 0, nil) if err != nil { return os.NewSyscallError("PostQueuedCompletionStatus", err) @@ -425,7 +269,7 @@ func (w *Watcher) wakeupReader() error { return nil } -func (w *Watcher) getDir(pathname string) (dir string, err error) { +func (w *readDirChangesW) getDir(pathname string) (dir string, err error) { attr, err := windows.GetFileAttributes(windows.StringToUTF16Ptr(pathname)) if err != nil { return "", os.NewSyscallError("GetFileAttributes", err) @@ -439,7 +283,7 @@ func (w *Watcher) getDir(pathname string) (dir string, err error) { return } -func (w *Watcher) getIno(path string) (ino *inode, err error) { +func (w *readDirChangesW) getIno(path string) (ino *inode, err error) { h, err := windows.CreateFile(windows.StringToUTF16Ptr(path), windows.FILE_LIST_DIRECTORY, windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE, @@ -482,9 +326,8 @@ func (m watchMap) set(ino *inode, watch *watch) { } // Must run within the I/O thread. -func (w *Watcher) addWatch(pathname string, flags uint64, bufsize int) error { - //pathname, recurse := recursivePath(pathname) - recurse := false +func (w *readDirChangesW) addWatch(pathname string, flags uint64, bufsize int) error { + pathname, recurse := recursivePath(pathname) dir, err := w.getDir(pathname) if err != nil { @@ -538,7 +381,7 @@ func (w *Watcher) addWatch(pathname string, flags uint64, bufsize int) error { } // Must run within the I/O thread. -func (w *Watcher) remWatch(pathname string) error { +func (w *readDirChangesW) remWatch(pathname string) error { pathname, recurse := recursivePath(pathname) dir, err := w.getDir(pathname) @@ -566,11 +409,11 @@ func (w *Watcher) remWatch(pathname string) error { return fmt.Errorf("%w: %s", ErrNonExistentWatch, pathname) } if pathname == dir { - w.sendEvent(watch.path, watch.mask&sysFSIGNORED) + w.sendEvent(watch.path, "", watch.mask&sysFSIGNORED) watch.mask = 0 } else { name := filepath.Base(pathname) - w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED) + w.sendEvent(filepath.Join(watch.path, name), "", watch.names[name]&sysFSIGNORED) delete(watch.names, name) } @@ -578,23 +421,23 @@ func (w *Watcher) remWatch(pathname string) error { } // Must run within the I/O thread. -func (w *Watcher) deleteWatch(watch *watch) { +func (w *readDirChangesW) deleteWatch(watch *watch) { for name, mask := range watch.names { if mask&provisional == 0 { - w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED) + w.sendEvent(filepath.Join(watch.path, name), "", mask&sysFSIGNORED) } delete(watch.names, name) } if watch.mask != 0 { if watch.mask&provisional == 0 { - w.sendEvent(watch.path, watch.mask&sysFSIGNORED) + w.sendEvent(watch.path, "", watch.mask&sysFSIGNORED) } watch.mask = 0 } } // Must run within the I/O thread. -func (w *Watcher) startRead(watch *watch) error { +func (w *readDirChangesW) startRead(watch *watch) error { err := windows.CancelIo(watch.ino.handle) if err != nil { w.sendError(os.NewSyscallError("CancelIo", err)) @@ -624,7 +467,7 @@ func (w *Watcher) startRead(watch *watch) error { err := os.NewSyscallError("ReadDirectoryChanges", rdErr) if rdErr == windows.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 { // Watched directory was probably removed - w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) + w.sendEvent(watch.path, "", watch.mask&sysFSDELETESELF) err = nil } w.deleteWatch(watch) @@ -637,7 +480,7 @@ func (w *Watcher) startRead(watch *watch) error { // readEvents reads from the I/O completion port, converts the // received events into Event objects and sends them via the Events channel. // Entry point to the I/O thread. -func (w *Watcher) readEvents() { +func (w *readDirChangesW) readEvents() { var ( n uint32 key uintptr @@ -700,7 +543,7 @@ func (w *Watcher) readEvents() { } case windows.ERROR_ACCESS_DENIED: // Watched directory was probably removed - w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) + w.sendEvent(watch.path, "", watch.mask&sysFSDELETESELF) w.deleteWatch(watch) w.startRead(watch) continue @@ -733,6 +576,10 @@ func (w *Watcher) readEvents() { name := windows.UTF16ToString(buf) fullname := filepath.Join(watch.path, name) + if debug { + internal.Debug(fullname, raw.Action) + } + var mask uint64 switch raw.Action { case windows.FILE_ACTION_REMOVED: @@ -761,21 +608,22 @@ func (w *Watcher) readEvents() { } } - sendNameEvent := func() { - w.sendEvent(fullname, watch.names[name]&mask) - } if raw.Action != windows.FILE_ACTION_RENAMED_NEW_NAME { - sendNameEvent() + w.sendEvent(fullname, "", watch.names[name]&mask) } if raw.Action == windows.FILE_ACTION_REMOVED { - w.sendEvent(fullname, watch.names[name]&sysFSIGNORED) + w.sendEvent(fullname, "", watch.names[name]&sysFSIGNORED) delete(watch.names, name) } - w.sendEvent(fullname, watch.mask&w.toFSnotifyFlags(raw.Action)) + if watch.rename != "" && raw.Action == windows.FILE_ACTION_RENAMED_NEW_NAME { + w.sendEvent(fullname, filepath.Join(watch.path, watch.rename), watch.mask&w.toFSnotifyFlags(raw.Action)) + } else { + w.sendEvent(fullname, "", watch.mask&w.toFSnotifyFlags(raw.Action)) + } + if raw.Action == windows.FILE_ACTION_RENAMED_NEW_NAME { - fullname = filepath.Join(watch.path, watch.rename) - sendNameEvent() + w.sendEvent(filepath.Join(watch.path, watch.rename), "", watch.names[name]&mask) } // Move to the next event in the buffer @@ -787,8 +635,7 @@ func (w *Watcher) readEvents() { // Error! if offset >= n { //lint:ignore ST1005 Windows should be capitalized - w.sendError(errors.New( - "Windows system assumed buffer larger than it is, events have likely been missed")) + w.sendError(errors.New("Windows system assumed buffer larger than it is, events have likely been missed")) break } } @@ -799,7 +646,7 @@ func (w *Watcher) readEvents() { } } -func (w *Watcher) toWindowsFlags(mask uint64) uint32 { +func (w *readDirChangesW) toWindowsFlags(mask uint64) uint32 { var m uint32 if mask&sysFSMODIFY != 0 { m |= windows.FILE_NOTIFY_CHANGE_LAST_WRITE @@ -810,7 +657,7 @@ func (w *Watcher) toWindowsFlags(mask uint64) uint32 { return m } -func (w *Watcher) toFSnotifyFlags(action uint32) uint64 { +func (w *readDirChangesW) toFSnotifyFlags(action uint32) uint64 { switch action { case windows.FILE_ACTION_ADDED: return sysFSCREATE @@ -825,3 +672,11 @@ func (w *Watcher) toFSnotifyFlags(action uint32) uint64 { } return 0 } + +func (w *readDirChangesW) xSupports(op Op) bool { + if op.Has(xUnportableOpen) || op.Has(xUnportableRead) || + op.Has(xUnportableCloseWrite) || op.Has(xUnportableCloseRead) { + return false + } + return true +} diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go index 24c99cc499..0760efe916 100644 --- a/vendor/github.com/fsnotify/fsnotify/fsnotify.go +++ b/vendor/github.com/fsnotify/fsnotify/fsnotify.go @@ -3,19 +3,146 @@ // // Currently supported systems: // -// Linux 2.6.32+ via inotify -// BSD, macOS via kqueue -// Windows via ReadDirectoryChangesW -// illumos via FEN +// - Linux via inotify +// - BSD, macOS via kqueue +// - Windows via ReadDirectoryChangesW +// - illumos via FEN +// +// # FSNOTIFY_DEBUG +// +// Set the FSNOTIFY_DEBUG environment variable to "1" to print debug messages to +// stderr. This can be useful to track down some problems, especially in cases +// where fsnotify is used as an indirect dependency. +// +// Every event will be printed as soon as there's something useful to print, +// with as little processing from fsnotify. +// +// Example output: +// +// FSNOTIFY_DEBUG: 11:34:23.633087586 256:IN_CREATE → "/tmp/file-1" +// FSNOTIFY_DEBUG: 11:34:23.633202319 4:IN_ATTRIB → "/tmp/file-1" +// FSNOTIFY_DEBUG: 11:34:28.989728764 512:IN_DELETE → "/tmp/file-1" package fsnotify import ( "errors" "fmt" + "os" "path/filepath" "strings" ) +// Watcher watches a set of paths, delivering events on a channel. +// +// A watcher should not be copied (e.g. pass it by pointer, rather than by +// value). +// +// # Linux notes +// +// When a file is removed a Remove event won't be emitted until all file +// descriptors are closed, and deletes will always emit a Chmod. For example: +// +// fp := os.Open("file") +// os.Remove("file") // Triggers Chmod +// fp.Close() // Triggers Remove +// +// This is the event that inotify sends, so not much can be changed about this. +// +// The fs.inotify.max_user_watches sysctl variable specifies the upper limit +// for the number of watches per user, and fs.inotify.max_user_instances +// specifies the maximum number of inotify instances per user. Every Watcher you +// create is an "instance", and every path you add is a "watch". +// +// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and +// /proc/sys/fs/inotify/max_user_instances +// +// To increase them you can use sysctl or write the value to the /proc file: +// +// # Default values on Linux 5.18 +// sysctl fs.inotify.max_user_watches=124983 +// sysctl fs.inotify.max_user_instances=128 +// +// To make the changes persist on reboot edit /etc/sysctl.conf or +// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check +// your distro's documentation): +// +// fs.inotify.max_user_watches=124983 +// fs.inotify.max_user_instances=128 +// +// Reaching the limit will result in a "no space left on device" or "too many open +// files" error. +// +// # kqueue notes (macOS, BSD) +// +// kqueue requires opening a file descriptor for every file that's being watched; +// so if you're watching a directory with five files then that's six file +// descriptors. You will run in to your system's "max open files" limit faster on +// these platforms. +// +// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to +// control the maximum number of open files, as well as /etc/login.conf on BSD +// systems. +// +// # Windows notes +// +// Paths can be added as "C:\\path\\to\\dir", but forward slashes +// ("C:/path/to/dir") will also work. +// +// When a watched directory is removed it will always send an event for the +// directory itself, but may not send events for all files in that directory. +// Sometimes it will send events for all files, sometimes it will send no +// events, and often only for some files. +// +// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest +// value that is guaranteed to work with SMB filesystems. If you have many +// events in quick succession this may not be enough, and you will have to use +// [WithBufferSize] to increase the value. +type Watcher struct { + b backend + + // Events sends the filesystem change events. + // + // fsnotify can send the following events; a "path" here can refer to a + // file, directory, symbolic link, or special file like a FIFO. + // + // fsnotify.Create A new path was created; this may be followed by one + // or more Write events if data also gets written to a + // file. + // + // fsnotify.Remove A path was removed. + // + // fsnotify.Rename A path was renamed. A rename is always sent with the + // old path as Event.Name, and a Create event will be + // sent with the new name. Renames are only sent for + // paths that are currently watched; e.g. moving an + // unmonitored file into a monitored directory will + // show up as just a Create. Similarly, renaming a file + // to outside a monitored directory will show up as + // only a Rename. + // + // fsnotify.Write A file or named pipe was written to. A Truncate will + // also trigger a Write. A single "write action" + // initiated by the user may show up as one or multiple + // writes, depending on when the system syncs things to + // disk. For example when compiling a large Go program + // you may get hundreds of Write events, and you may + // want to wait until you've stopped receiving them + // (see the dedup example in cmd/fsnotify). + // + // Some systems may send Write event for directories + // when the directory content changes. + // + // fsnotify.Chmod Attributes were changed. On Linux this is also sent + // when a file is removed (or more accurately, when a + // link to an inode is removed). On kqueue it's sent + // when a file is truncated. On Windows it's never + // sent. + Events chan Event + + // Errors sends any errors. + Errors chan error +} + // Event represents a file system notification. type Event struct { // Path to the file or directory. @@ -30,6 +157,16 @@ type Event struct { // This is a bitmask and some systems may send multiple operations at once. // Use the Event.Has() method instead of comparing with ==. Op Op + + // Create events will have this set to the old path if it's a rename. This + // only works when both the source and destination are watched. It's not + // reliable when watching individual files, only directories. + // + // For example "mv /tmp/file /tmp/rename" will emit: + // + // Event{Op: Rename, Name: "/tmp/file"} + // Event{Op: Create, Name: "/tmp/rename", RenamedFrom: "/tmp/file"} + renamedFrom string } // Op describes a set of file operations. @@ -50,7 +187,7 @@ const ( // example "remove to trash" is often a rename). Remove - // The path was renamed to something else; any watched on it will be + // The path was renamed to something else; any watches on it will be // removed. Rename @@ -60,15 +197,155 @@ const ( // get triggered very frequently by some software. For example, Spotlight // indexing on macOS, anti-virus software, backup software, etc. Chmod + + // File descriptor was opened. + // + // Only works on Linux and FreeBSD. + xUnportableOpen + + // File was read from. + // + // Only works on Linux and FreeBSD. + xUnportableRead + + // File opened for writing was closed. + // + // Only works on Linux and FreeBSD. + // + // The advantage of using this over Write is that it's more reliable than + // waiting for Write events to stop. It's also faster (if you're not + // listening to Write events): copying a file of a few GB can easily + // generate tens of thousands of Write events in a short span of time. + xUnportableCloseWrite + + // File opened for reading was closed. + // + // Only works on Linux and FreeBSD. + xUnportableCloseRead ) -// Common errors that can be reported. var ( + // ErrNonExistentWatch is used when Remove() is called on a path that's not + // added. ErrNonExistentWatch = errors.New("fsnotify: can't remove non-existent watch") - ErrEventOverflow = errors.New("fsnotify: queue or buffer overflow") - ErrClosed = errors.New("fsnotify: watcher already closed") + + // ErrClosed is used when trying to operate on a closed Watcher. + ErrClosed = errors.New("fsnotify: watcher already closed") + + // ErrEventOverflow is reported from the Errors channel when there are too + // many events: + // + // - inotify: inotify returns IN_Q_OVERFLOW – because there are too + // many queued events (the fs.inotify.max_queued_events + // sysctl can be used to increase this). + // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. + // - kqueue, fen: Not used. + ErrEventOverflow = errors.New("fsnotify: queue or buffer overflow") + + // ErrUnsupported is returned by AddWith() when WithOps() specified an + // Unportable event that's not supported on this platform. + xErrUnsupported = errors.New("fsnotify: not supported with this backend") ) +// NewWatcher creates a new Watcher. +func NewWatcher() (*Watcher, error) { + ev, errs := make(chan Event), make(chan error) + b, err := newBackend(ev, errs) + if err != nil { + return nil, err + } + return &Watcher{b: b, Events: ev, Errors: errs}, nil +} + +// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events +// channel. +// +// The main use case for this is situations with a very large number of events +// where the kernel buffer size can't be increased (e.g. due to lack of +// permissions). An unbuffered Watcher will perform better for almost all use +// cases, and whenever possible you will be better off increasing the kernel +// buffers instead of adding a large userspace buffer. +func NewBufferedWatcher(sz uint) (*Watcher, error) { + ev, errs := make(chan Event), make(chan error) + b, err := newBufferedBackend(sz, ev, errs) + if err != nil { + return nil, err + } + return &Watcher{b: b, Events: ev, Errors: errs}, nil +} + +// Add starts monitoring the path for changes. +// +// A path can only be watched once; watching it more than once is a no-op and will +// not return an error. Paths that do not yet exist on the filesystem cannot be +// watched. +// +// A watch will be automatically removed if the watched path is deleted or +// renamed. The exception is the Windows backend, which doesn't remove the +// watcher on renames. +// +// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special +// filesystems (/proc, /sys, etc.) generally don't work. +// +// Returns [ErrClosed] if [Watcher.Close] was called. +// +// See [Watcher.AddWith] for a version that allows adding options. +// +// # Watching directories +// +// All files in a directory are monitored, including new files that are created +// after the watcher is started. Subdirectories are not watched (i.e. it's +// non-recursive). +// +// # Watching files +// +// Watching individual files (rather than directories) is generally not +// recommended as many programs (especially editors) update files atomically: it +// will write to a temporary file which is then moved to destination, +// overwriting the original (or some variant thereof). The watcher on the +// original file is now lost, as that no longer exists. +// +// The upshot of this is that a power failure or crash won't leave a +// half-written file. +// +// Watch the parent directory and use Event.Name to filter out files you're not +// interested in. There is an example of this in cmd/fsnotify/file.go. +func (w *Watcher) Add(path string) error { return w.b.Add(path) } + +// AddWith is like [Watcher.Add], but allows adding options. When using Add() +// the defaults described below are used. +// +// Possible options are: +// +// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on +// other platforms. The default is 64K (65536 bytes). +func (w *Watcher) AddWith(path string, opts ...addOpt) error { return w.b.AddWith(path, opts...) } + +// Remove stops monitoring the path for changes. +// +// Directories are always removed non-recursively. For example, if you added +// /tmp/dir and /tmp/dir/subdir then you will need to remove both. +// +// Removing a path that has not yet been added returns [ErrNonExistentWatch]. +// +// Returns nil if [Watcher.Close] was called. +func (w *Watcher) Remove(path string) error { return w.b.Remove(path) } + +// Close removes all watches and closes the Events channel. +func (w *Watcher) Close() error { return w.b.Close() } + +// WatchList returns all paths explicitly added with [Watcher.Add] (and are not +// yet removed). +// +// Returns nil if [Watcher.Close] was called. +func (w *Watcher) WatchList() []string { return w.b.WatchList() } + +// Supports reports if all the listed operations are supported by this platform. +// +// Create, Write, Remove, Rename, and Chmod are always supported. It can only +// return false for an Op starting with Unportable. +func (w *Watcher) xSupports(op Op) bool { return w.b.xSupports(op) } + func (o Op) String() string { var b strings.Builder if o.Has(Create) { @@ -80,6 +357,18 @@ func (o Op) String() string { if o.Has(Write) { b.WriteString("|WRITE") } + if o.Has(xUnportableOpen) { + b.WriteString("|OPEN") + } + if o.Has(xUnportableRead) { + b.WriteString("|READ") + } + if o.Has(xUnportableCloseWrite) { + b.WriteString("|CLOSE_WRITE") + } + if o.Has(xUnportableCloseRead) { + b.WriteString("|CLOSE_READ") + } if o.Has(Rename) { b.WriteString("|RENAME") } @@ -100,24 +389,48 @@ func (e Event) Has(op Op) bool { return e.Op.Has(op) } // String returns a string representation of the event with their path. func (e Event) String() string { + if e.renamedFrom != "" { + return fmt.Sprintf("%-13s %q ← %q", e.Op.String(), e.Name, e.renamedFrom) + } return fmt.Sprintf("%-13s %q", e.Op.String(), e.Name) } type ( + backend interface { + Add(string) error + AddWith(string, ...addOpt) error + Remove(string) error + WatchList() []string + Close() error + xSupports(Op) bool + } addOpt func(opt *withOpts) withOpts struct { - bufsize int + bufsize int + op Op + noFollow bool + sendCreate bool } ) +var debug = func() bool { + // Check for exactly "1" (rather than mere existence) so we can add + // options/flags in the future. I don't know if we ever want that, but it's + // nice to leave the option open. + return os.Getenv("FSNOTIFY_DEBUG") == "1" +}() + var defaultOpts = withOpts{ bufsize: 65536, // 64K + op: Create | Write | Remove | Rename | Chmod, } func getOptions(opts ...addOpt) withOpts { with := defaultOpts for _, o := range opts { - o(&with) + if o != nil { + o(&with) + } } return with } @@ -136,9 +449,44 @@ func WithBufferSize(bytes int) addOpt { return func(opt *withOpts) { opt.bufsize = bytes } } +// WithOps sets which operations to listen for. The default is [Create], +// [Write], [Remove], [Rename], and [Chmod]. +// +// Excluding operations you're not interested in can save quite a bit of CPU +// time; in some use cases there may be hundreds of thousands of useless Write +// or Chmod operations per second. +// +// This can also be used to add unportable operations not supported by all +// platforms; unportable operations all start with "Unportable": +// [UnportableOpen], [UnportableRead], [UnportableCloseWrite], and +// [UnportableCloseRead]. +// +// AddWith returns an error when using an unportable operation that's not +// supported. Use [Watcher.Support] to check for support. +func withOps(op Op) addOpt { + return func(opt *withOpts) { opt.op = op } +} + +// WithNoFollow disables following symlinks, so the symlinks themselves are +// watched. +func withNoFollow() addOpt { + return func(opt *withOpts) { opt.noFollow = true } +} + +// "Internal" option for recursive watches on inotify. +func withCreate() addOpt { + return func(opt *withOpts) { opt.sendCreate = true } +} + +var enableRecurse = false + // Check if this path is recursive (ends with "/..." or "\..."), and return the // path with the /... stripped. func recursivePath(path string) (string, bool) { + path = filepath.Clean(path) + if !enableRecurse { // Only enabled in tests for now. + return path, false + } if filepath.Base(path) == "..." { return filepath.Dir(path), true } diff --git a/vendor/github.com/fsnotify/fsnotify/internal/darwin.go b/vendor/github.com/fsnotify/fsnotify/internal/darwin.go new file mode 100644 index 0000000000..b0eab10090 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/darwin.go @@ -0,0 +1,39 @@ +//go:build darwin + +package internal + +import ( + "syscall" + + "golang.org/x/sys/unix" +) + +var ( + SyscallEACCES = syscall.EACCES + UnixEACCES = unix.EACCES +) + +var maxfiles uint64 + +// Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ +func SetRlimit() { + var l syscall.Rlimit + err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l) + if err == nil && l.Cur != l.Max { + l.Cur = l.Max + syscall.Setrlimit(syscall.RLIMIT_NOFILE, &l) + } + maxfiles = l.Cur + + if n, err := syscall.SysctlUint32("kern.maxfiles"); err == nil && uint64(n) < maxfiles { + maxfiles = uint64(n) + } + + if n, err := syscall.SysctlUint32("kern.maxfilesperproc"); err == nil && uint64(n) < maxfiles { + maxfiles = uint64(n) + } +} + +func Maxfiles() uint64 { return maxfiles } +func Mkfifo(path string, mode uint32) error { return unix.Mkfifo(path, mode) } +func Mknod(path string, mode uint32, dev int) error { return unix.Mknod(path, mode, dev) } diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go new file mode 100644 index 0000000000..928319fb09 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go @@ -0,0 +1,57 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ABSOLUTE", unix.NOTE_ABSOLUTE}, + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + {"NOTE_BACKGROUND", unix.NOTE_BACKGROUND}, + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_CRITICAL", unix.NOTE_CRITICAL}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXITSTATUS", unix.NOTE_EXITSTATUS}, + {"NOTE_EXIT_CSERROR", unix.NOTE_EXIT_CSERROR}, + {"NOTE_EXIT_DECRYPTFAIL", unix.NOTE_EXIT_DECRYPTFAIL}, + {"NOTE_EXIT_DETAIL", unix.NOTE_EXIT_DETAIL}, + {"NOTE_EXIT_DETAIL_MASK", unix.NOTE_EXIT_DETAIL_MASK}, + {"NOTE_EXIT_MEMORY", unix.NOTE_EXIT_MEMORY}, + {"NOTE_EXIT_REPARENTED", unix.NOTE_EXIT_REPARENTED}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FFAND", unix.NOTE_FFAND}, + {"NOTE_FFCOPY", unix.NOTE_FFCOPY}, + {"NOTE_FFCTRLMASK", unix.NOTE_FFCTRLMASK}, + {"NOTE_FFLAGSMASK", unix.NOTE_FFLAGSMASK}, + {"NOTE_FFNOP", unix.NOTE_FFNOP}, + {"NOTE_FFOR", unix.NOTE_FFOR}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_FUNLOCK", unix.NOTE_FUNLOCK}, + {"NOTE_LEEWAY", unix.NOTE_LEEWAY}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_MACHTIME", unix.NOTE_MACHTIME}, + {"NOTE_MACH_CONTINUOUS_TIME", unix.NOTE_MACH_CONTINUOUS_TIME}, + {"NOTE_NONE", unix.NOTE_NONE}, + {"NOTE_NSECONDS", unix.NOTE_NSECONDS}, + {"NOTE_OOB", unix.NOTE_OOB}, + //{"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, -0x100000 (?!) + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_REAP", unix.NOTE_REAP}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_SECONDS", unix.NOTE_SECONDS}, + {"NOTE_SIGNAL", unix.NOTE_SIGNAL}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_TRIGGER", unix.NOTE_TRIGGER}, + {"NOTE_USECONDS", unix.NOTE_USECONDS}, + {"NOTE_VM_ERROR", unix.NOTE_VM_ERROR}, + {"NOTE_VM_PRESSURE", unix.NOTE_VM_PRESSURE}, + {"NOTE_VM_PRESSURE_SUDDEN_TERMINATE", unix.NOTE_VM_PRESSURE_SUDDEN_TERMINATE}, + {"NOTE_VM_PRESSURE_TERMINATE", unix.NOTE_VM_PRESSURE_TERMINATE}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go new file mode 100644 index 0000000000..3186b0c349 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go @@ -0,0 +1,33 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FFAND", unix.NOTE_FFAND}, + {"NOTE_FFCOPY", unix.NOTE_FFCOPY}, + {"NOTE_FFCTRLMASK", unix.NOTE_FFCTRLMASK}, + {"NOTE_FFLAGSMASK", unix.NOTE_FFLAGSMASK}, + {"NOTE_FFNOP", unix.NOTE_FFNOP}, + {"NOTE_FFOR", unix.NOTE_FFOR}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_OOB", unix.NOTE_OOB}, + {"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_TRIGGER", unix.NOTE_TRIGGER}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go new file mode 100644 index 0000000000..f69fdb930f --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go @@ -0,0 +1,42 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ABSTIME", unix.NOTE_ABSTIME}, + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_CLOSE", unix.NOTE_CLOSE}, + {"NOTE_CLOSE_WRITE", unix.NOTE_CLOSE_WRITE}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FFAND", unix.NOTE_FFAND}, + {"NOTE_FFCOPY", unix.NOTE_FFCOPY}, + {"NOTE_FFCTRLMASK", unix.NOTE_FFCTRLMASK}, + {"NOTE_FFLAGSMASK", unix.NOTE_FFLAGSMASK}, + {"NOTE_FFNOP", unix.NOTE_FFNOP}, + {"NOTE_FFOR", unix.NOTE_FFOR}, + {"NOTE_FILE_POLL", unix.NOTE_FILE_POLL}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_MSECONDS", unix.NOTE_MSECONDS}, + {"NOTE_NSECONDS", unix.NOTE_NSECONDS}, + {"NOTE_OPEN", unix.NOTE_OPEN}, + {"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_READ", unix.NOTE_READ}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_SECONDS", unix.NOTE_SECONDS}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_TRIGGER", unix.NOTE_TRIGGER}, + {"NOTE_USECONDS", unix.NOTE_USECONDS}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go new file mode 100644 index 0000000000..607e683bd7 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go @@ -0,0 +1,32 @@ +//go:build freebsd || openbsd || netbsd || dragonfly || darwin + +package internal + +import ( + "fmt" + "os" + "strings" + "time" + + "golang.org/x/sys/unix" +) + +func Debug(name string, kevent *unix.Kevent_t) { + mask := uint32(kevent.Fflags) + + var ( + l []string + unknown = mask + ) + for _, n := range names { + if mask&n.m == n.m { + l = append(l, n.n) + unknown ^= n.m + } + } + if unknown > 0 { + l = append(l, fmt.Sprintf("0x%x", unknown)) + } + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s %10d:%-60s → %q\n", + time.Now().Format("15:04:05.000000000"), mask, strings.Join(l, " | "), name) +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_linux.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_linux.go new file mode 100644 index 0000000000..35c734be43 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_linux.go @@ -0,0 +1,56 @@ +package internal + +import ( + "fmt" + "os" + "strings" + "time" + + "golang.org/x/sys/unix" +) + +func Debug(name string, mask, cookie uint32) { + names := []struct { + n string + m uint32 + }{ + {"IN_ACCESS", unix.IN_ACCESS}, + {"IN_ATTRIB", unix.IN_ATTRIB}, + {"IN_CLOSE", unix.IN_CLOSE}, + {"IN_CLOSE_NOWRITE", unix.IN_CLOSE_NOWRITE}, + {"IN_CLOSE_WRITE", unix.IN_CLOSE_WRITE}, + {"IN_CREATE", unix.IN_CREATE}, + {"IN_DELETE", unix.IN_DELETE}, + {"IN_DELETE_SELF", unix.IN_DELETE_SELF}, + {"IN_IGNORED", unix.IN_IGNORED}, + {"IN_ISDIR", unix.IN_ISDIR}, + {"IN_MODIFY", unix.IN_MODIFY}, + {"IN_MOVE", unix.IN_MOVE}, + {"IN_MOVED_FROM", unix.IN_MOVED_FROM}, + {"IN_MOVED_TO", unix.IN_MOVED_TO}, + {"IN_MOVE_SELF", unix.IN_MOVE_SELF}, + {"IN_OPEN", unix.IN_OPEN}, + {"IN_Q_OVERFLOW", unix.IN_Q_OVERFLOW}, + {"IN_UNMOUNT", unix.IN_UNMOUNT}, + } + + var ( + l []string + unknown = mask + ) + for _, n := range names { + if mask&n.m == n.m { + l = append(l, n.n) + unknown ^= n.m + } + } + if unknown > 0 { + l = append(l, fmt.Sprintf("0x%x", unknown)) + } + var c string + if cookie > 0 { + c = fmt.Sprintf("(cookie: %d) ", cookie) + } + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s %-30s → %s%q\n", + time.Now().Format("15:04:05.000000000"), strings.Join(l, "|"), c, name) +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go new file mode 100644 index 0000000000..e5b3b6f694 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go @@ -0,0 +1,25 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go new file mode 100644 index 0000000000..1dd455bc5a --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go @@ -0,0 +1,28 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + // {"NOTE_CHANGE", unix.NOTE_CHANGE}, // Not on 386? + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EOF", unix.NOTE_EOF}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_TRUNCATE", unix.NOTE_TRUNCATE}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_solaris.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_solaris.go new file mode 100644 index 0000000000..f1b2e73bd5 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_solaris.go @@ -0,0 +1,45 @@ +package internal + +import ( + "fmt" + "os" + "strings" + "time" + + "golang.org/x/sys/unix" +) + +func Debug(name string, mask int32) { + names := []struct { + n string + m int32 + }{ + {"FILE_ACCESS", unix.FILE_ACCESS}, + {"FILE_MODIFIED", unix.FILE_MODIFIED}, + {"FILE_ATTRIB", unix.FILE_ATTRIB}, + {"FILE_TRUNC", unix.FILE_TRUNC}, + {"FILE_NOFOLLOW", unix.FILE_NOFOLLOW}, + {"FILE_DELETE", unix.FILE_DELETE}, + {"FILE_RENAME_TO", unix.FILE_RENAME_TO}, + {"FILE_RENAME_FROM", unix.FILE_RENAME_FROM}, + {"UNMOUNTED", unix.UNMOUNTED}, + {"MOUNTEDOVER", unix.MOUNTEDOVER}, + {"FILE_EXCEPTION", unix.FILE_EXCEPTION}, + } + + var ( + l []string + unknown = mask + ) + for _, n := range names { + if mask&n.m == n.m { + l = append(l, n.n) + unknown ^= n.m + } + } + if unknown > 0 { + l = append(l, fmt.Sprintf("0x%x", unknown)) + } + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s %10d:%-30s → %q\n", + time.Now().Format("15:04:05.000000000"), mask, strings.Join(l, " | "), name) +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_windows.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_windows.go new file mode 100644 index 0000000000..52bf4ce53b --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_windows.go @@ -0,0 +1,40 @@ +package internal + +import ( + "fmt" + "os" + "path/filepath" + "strings" + "time" + + "golang.org/x/sys/windows" +) + +func Debug(name string, mask uint32) { + names := []struct { + n string + m uint32 + }{ + {"FILE_ACTION_ADDED", windows.FILE_ACTION_ADDED}, + {"FILE_ACTION_REMOVED", windows.FILE_ACTION_REMOVED}, + {"FILE_ACTION_MODIFIED", windows.FILE_ACTION_MODIFIED}, + {"FILE_ACTION_RENAMED_OLD_NAME", windows.FILE_ACTION_RENAMED_OLD_NAME}, + {"FILE_ACTION_RENAMED_NEW_NAME", windows.FILE_ACTION_RENAMED_NEW_NAME}, + } + + var ( + l []string + unknown = mask + ) + for _, n := range names { + if mask&n.m == n.m { + l = append(l, n.n) + unknown ^= n.m + } + } + if unknown > 0 { + l = append(l, fmt.Sprintf("0x%x", unknown)) + } + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s %-65s → %q\n", + time.Now().Format("15:04:05.000000000"), strings.Join(l, " | "), filepath.ToSlash(name)) +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go b/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go new file mode 100644 index 0000000000..547df1df84 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go @@ -0,0 +1,31 @@ +//go:build freebsd + +package internal + +import ( + "syscall" + + "golang.org/x/sys/unix" +) + +var ( + SyscallEACCES = syscall.EACCES + UnixEACCES = unix.EACCES +) + +var maxfiles uint64 + +func SetRlimit() { + // Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ + var l syscall.Rlimit + err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l) + if err == nil && l.Cur != l.Max { + l.Cur = l.Max + syscall.Setrlimit(syscall.RLIMIT_NOFILE, &l) + } + maxfiles = uint64(l.Cur) +} + +func Maxfiles() uint64 { return maxfiles } +func Mkfifo(path string, mode uint32) error { return unix.Mkfifo(path, mode) } +func Mknod(path string, mode uint32, dev int) error { return unix.Mknod(path, mode, uint64(dev)) } diff --git a/vendor/github.com/fsnotify/fsnotify/internal/internal.go b/vendor/github.com/fsnotify/fsnotify/internal/internal.go new file mode 100644 index 0000000000..7daa45e19e --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/internal.go @@ -0,0 +1,2 @@ +// Package internal contains some helpers. +package internal diff --git a/vendor/github.com/fsnotify/fsnotify/internal/unix.go b/vendor/github.com/fsnotify/fsnotify/internal/unix.go new file mode 100644 index 0000000000..30976ce973 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/unix.go @@ -0,0 +1,31 @@ +//go:build !windows && !darwin && !freebsd + +package internal + +import ( + "syscall" + + "golang.org/x/sys/unix" +) + +var ( + SyscallEACCES = syscall.EACCES + UnixEACCES = unix.EACCES +) + +var maxfiles uint64 + +func SetRlimit() { + // Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ + var l syscall.Rlimit + err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l) + if err == nil && l.Cur != l.Max { + l.Cur = l.Max + syscall.Setrlimit(syscall.RLIMIT_NOFILE, &l) + } + maxfiles = uint64(l.Cur) +} + +func Maxfiles() uint64 { return maxfiles } +func Mkfifo(path string, mode uint32) error { return unix.Mkfifo(path, mode) } +func Mknod(path string, mode uint32, dev int) error { return unix.Mknod(path, mode, dev) } diff --git a/vendor/github.com/fsnotify/fsnotify/internal/unix2.go b/vendor/github.com/fsnotify/fsnotify/internal/unix2.go new file mode 100644 index 0000000000..37dfeddc28 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/unix2.go @@ -0,0 +1,7 @@ +//go:build !windows + +package internal + +func HasPrivilegesForSymlink() bool { + return true +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/windows.go b/vendor/github.com/fsnotify/fsnotify/internal/windows.go new file mode 100644 index 0000000000..a72c649549 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/windows.go @@ -0,0 +1,41 @@ +//go:build windows + +package internal + +import ( + "errors" + + "golang.org/x/sys/windows" +) + +// Just a dummy. +var ( + SyscallEACCES = errors.New("dummy") + UnixEACCES = errors.New("dummy") +) + +func SetRlimit() {} +func Maxfiles() uint64 { return 1<<64 - 1 } +func Mkfifo(path string, mode uint32) error { return errors.New("no FIFOs on Windows") } +func Mknod(path string, mode uint32, dev int) error { return errors.New("no device nodes on Windows") } + +func HasPrivilegesForSymlink() bool { + var sid *windows.SID + err := windows.AllocateAndInitializeSid( + &windows.SECURITY_NT_AUTHORITY, + 2, + windows.SECURITY_BUILTIN_DOMAIN_RID, + windows.DOMAIN_ALIAS_RID_ADMINS, + 0, 0, 0, 0, 0, 0, + &sid) + if err != nil { + return false + } + defer windows.FreeSid(sid) + token := windows.Token(0) + member, err := token.IsMember(sid) + if err != nil { + return false + } + return member || token.IsElevated() +} diff --git a/vendor/github.com/fsnotify/fsnotify/mkdoc.zsh b/vendor/github.com/fsnotify/fsnotify/mkdoc.zsh deleted file mode 100644 index 99012ae653..0000000000 --- a/vendor/github.com/fsnotify/fsnotify/mkdoc.zsh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env zsh -[ "${ZSH_VERSION:-}" = "" ] && echo >&2 "Only works with zsh" && exit 1 -setopt err_exit no_unset pipefail extended_glob - -# Simple script to update the godoc comments on all watchers so you don't need -# to update the same comment 5 times. - -watcher=$(</tmp/x - print -r -- $cmt >>/tmp/x - tail -n+$(( end + 1 )) $file >>/tmp/x - mv /tmp/x $file - done -} - -set-cmt '^type Watcher struct ' $watcher -set-cmt '^func NewWatcher(' $new -set-cmt '^func NewBufferedWatcher(' $newbuffered -set-cmt '^func (w \*Watcher) Add(' $add -set-cmt '^func (w \*Watcher) AddWith(' $addwith -set-cmt '^func (w \*Watcher) Remove(' $remove -set-cmt '^func (w \*Watcher) Close(' $close -set-cmt '^func (w \*Watcher) WatchList(' $watchlist -set-cmt '^[[:space:]]*Events *chan Event$' $events -set-cmt '^[[:space:]]*Errors *chan error$' $errors diff --git a/vendor/github.com/fsnotify/fsnotify/system_bsd.go b/vendor/github.com/fsnotify/fsnotify/system_bsd.go index 4322b0b885..f65e8fe3ed 100644 --- a/vendor/github.com/fsnotify/fsnotify/system_bsd.go +++ b/vendor/github.com/fsnotify/fsnotify/system_bsd.go @@ -1,5 +1,4 @@ //go:build freebsd || openbsd || netbsd || dragonfly -// +build freebsd openbsd netbsd dragonfly package fsnotify diff --git a/vendor/github.com/fsnotify/fsnotify/system_darwin.go b/vendor/github.com/fsnotify/fsnotify/system_darwin.go index 5da5ffa78f..a29fc7aab6 100644 --- a/vendor/github.com/fsnotify/fsnotify/system_darwin.go +++ b/vendor/github.com/fsnotify/fsnotify/system_darwin.go @@ -1,5 +1,4 @@ //go:build darwin -// +build darwin package fsnotify diff --git a/vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go b/vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go index 2523c6ad98..1f3c69d4b8 100644 --- a/vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go +++ b/vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go @@ -6,6 +6,7 @@ import ( "fmt" "net" "net/netip" + "net/url" "reflect" "strconv" "strings" @@ -176,6 +177,26 @@ func StringToTimeDurationHookFunc() DecodeHookFunc { } } +// StringToURLHookFunc returns a DecodeHookFunc that converts +// strings to *url.URL. +func StringToURLHookFunc() DecodeHookFunc { + return func( + f reflect.Type, + t reflect.Type, + data interface{}, + ) (interface{}, error) { + if f.Kind() != reflect.String { + return data, nil + } + if t != reflect.TypeOf(&url.URL{}) { + return data, nil + } + + // Convert it by parsing + return url.Parse(data.(string)) + } +} + // StringToIPHookFunc returns a DecodeHookFunc that converts // strings to net.IP func StringToIPHookFunc() DecodeHookFunc { diff --git a/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go b/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go index 1cd6204bb0..e77e63ba38 100644 --- a/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go +++ b/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go @@ -278,6 +278,10 @@ type DecoderConfig struct { // field name or tag. Defaults to `strings.EqualFold`. This can be used // to implement case-sensitive tag values, support snake casing, etc. MatchName func(mapKey, fieldName string) bool + + // DecodeNil, if set to true, will cause the DecodeHook (if present) to run + // even if the input is nil. This can be used to provide default values. + DecodeNil bool } // A Decoder takes a raw interface value and turns it into structured @@ -438,19 +442,26 @@ func (d *Decoder) Decode(input interface{}) error { return err } +// isNil returns true if the input is nil or a typed nil pointer. +func isNil(input interface{}) bool { + if input == nil { + return true + } + val := reflect.ValueOf(input) + return val.Kind() == reflect.Ptr && val.IsNil() +} + // Decodes an unknown data type into a specific reflection value. func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) error { - var inputVal reflect.Value - if input != nil { - inputVal = reflect.ValueOf(input) - - // We need to check here if input is a typed nil. Typed nils won't - // match the "input == nil" below so we check that here. - if inputVal.Kind() == reflect.Ptr && inputVal.IsNil() { - input = nil - } + var ( + inputVal = reflect.ValueOf(input) + outputKind = getKind(outVal) + decodeNil = d.config.DecodeNil && d.cachedDecodeHook != nil + ) + if isNil(input) { + // Typed nils won't match the "input == nil" below, so reset input. + input = nil } - if input == nil { // If the data is nil, then we don't set anything, unless ZeroFields is set // to true. @@ -461,17 +472,31 @@ func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) e d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) } } - return nil + if !decodeNil { + return nil + } } - if !inputVal.IsValid() { - // If the input value is invalid, then we just set the value - // to be the zero value. - outVal.Set(reflect.Zero(outVal.Type())) - if d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) + if !decodeNil { + // If the input value is invalid, then we just set the value + // to be the zero value. + outVal.Set(reflect.Zero(outVal.Type())) + if d.config.Metadata != nil && name != "" { + d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) + } + return nil + } + // Hooks need a valid inputVal, so reset it to zero value of outVal type. + switch outputKind { + case reflect.Struct, reflect.Map: + var mapVal map[string]interface{} + inputVal = reflect.ValueOf(mapVal) // create nil map pointer + case reflect.Slice, reflect.Array: + var sliceVal []interface{} + inputVal = reflect.ValueOf(sliceVal) // create nil slice pointer + default: + inputVal = reflect.Zero(outVal.Type()) } - return nil } if d.cachedDecodeHook != nil { @@ -482,9 +507,11 @@ func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) e return fmt.Errorf("error decoding '%s': %w", name, err) } } + if isNil(input) { + return nil + } var err error - outputKind := getKind(outVal) addMetaKey := true switch outputKind { case reflect.Bool: @@ -765,8 +792,8 @@ func (d *Decoder) decodeBool(name string, data interface{}, val reflect.Value) e } default: return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) + "'%s' expected type '%s', got unconvertible type '%#v', value: '%#v'", + name, val, dataVal, data) } return nil diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go index d7b15fcfb3..2e50082ad1 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go @@ -94,7 +94,7 @@ func Int64(val string) (int64, error) { } // Int64Slice converts 'val' where individual integers are separated by -// 'sep' into a int64 slice. +// 'sep' into an int64 slice. func Int64Slice(val, sep string) ([]int64, error) { s := strings.Split(val, sep) values := make([]int64, len(s)) @@ -118,7 +118,7 @@ func Int32(val string) (int32, error) { } // Int32Slice converts 'val' where individual integers are separated by -// 'sep' into a int32 slice. +// 'sep' into an int32 slice. func Int32Slice(val, sep string) ([]int32, error) { s := strings.Split(val, sep) values := make([]int32, len(s)) @@ -190,7 +190,7 @@ func Bytes(val string) ([]byte, error) { } // BytesSlice converts 'val' where individual bytes sequences, encoded in URL-safe -// base64 without padding, are separated by 'sep' into a slice of bytes slices slice. +// base64 without padding, are separated by 'sep' into a slice of byte slices. func BytesSlice(val, sep string) ([][]byte, error) { s := strings.Split(val, sep) values := make([][]byte, len(s)) diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go index 01f5734191..41cd4f5030 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go @@ -81,6 +81,21 @@ func HTTPError(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.R mux.errorHandler(ctx, mux, marshaler, w, r, err) } +// HTTPStreamError uses the mux-configured stream error handler to notify error to the client without closing the connection. +func HTTPStreamError(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, r *http.Request, err error) { + st := mux.streamErrorHandler(ctx, err) + msg := errorChunk(st) + buf, err := marshaler.Marshal(msg) + if err != nil { + grpclog.Errorf("Failed to marshal an error: %v", err) + return + } + if _, err := w.Write(buf); err != nil { + grpclog.Errorf("Failed to notify error to client: %v", err) + return + } +} + // DefaultHTTPErrorHandler is the default error handler. // If "err" is a gRPC Status, the function replies with the status code mapped by HTTPStatusFromCode. // If "err" is a HTTPStatusError, the function replies with the status code provide by that struct. This is diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go index 9005d6a0bf..2fcd7af3c4 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go @@ -155,7 +155,7 @@ func buildPathsBlindly(name string, in interface{}) []string { return paths } -// fieldMaskPathItem stores a in-progress deconstruction of a path for a fieldmask +// fieldMaskPathItem stores an in-progress deconstruction of a path for a fieldmask type fieldMaskPathItem struct { // the list of prior fields leading up to node connected by dots path string diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go index 0b051e6e89..07c28112c8 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go @@ -86,8 +86,8 @@ func (m marshalerRegistry) add(mime string, marshaler Marshaler) error { // It allows for a mapping of case-sensitive Content-Type MIME type string to runtime.Marshaler interfaces. // // For example, you could allow the client to specify the use of the runtime.JSONPb marshaler -// with a "application/jsonpb" Content-Type and the use of the runtime.JSONBuiltin marshaler -// with a "application/json" Content-Type. +// with an "application/jsonpb" Content-Type and the use of the runtime.JSONBuiltin marshaler +// with an "application/json" Content-Type. // "*" can be used to match any Content-Type. // This can be attached to a ServerMux with the marshaler option. func makeMarshalerMIMERegistry() marshalerRegistry { diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go index d549407f20..f710036b35 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go @@ -40,7 +40,7 @@ func Float32P(val string) (*float32, error) { } // Int64P parses the given string representation of an integer -// and returns a pointer to a int64 whose value is same as the parsed integer. +// and returns a pointer to an int64 whose value is same as the parsed integer. func Int64P(val string) (*int64, error) { i, err := Int64(val) if err != nil { @@ -50,7 +50,7 @@ func Int64P(val string) (*int64, error) { } // Int32P parses the given string representation of an integer -// and returns a pointer to a int32 whose value is same as the parsed integer. +// and returns a pointer to an int32 whose value is same as the parsed integer. func Int32P(val string) (*int32, error) { i, err := Int32(val) if err != nil { diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go index dfe7de4864..38ca39cc53 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go @@ -1,6 +1,6 @@ package utilities -// An OpCode is a opcode of compiled path patterns. +// OpCode is an opcode of compiled path patterns. type OpCode int // These constants are the valid values of OpCode. diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go index d224ab776c..66aa5f2dcc 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go @@ -5,7 +5,7 @@ import ( "strings" ) -// flagInterface is an cut down interface to `flag` +// flagInterface is a cut down interface to `flag` type flagInterface interface { Var(value flag.Value, name string, usage string) } diff --git a/vendor/github.com/hashicorp/consul/api/acl.go b/vendor/github.com/hashicorp/consul/api/acl.go index fcea0fdde0..b0ec6f2f47 100644 --- a/vendor/github.com/hashicorp/consul/api/acl.go +++ b/vendor/github.com/hashicorp/consul/api/acl.go @@ -21,13 +21,12 @@ const ( ACLManagementType = "management" // ACLTemplatedPolicy names - ACLTemplatedPolicyServiceName = "builtin/service" - ACLTemplatedPolicyNodeName = "builtin/node" - ACLTemplatedPolicyDNSName = "builtin/dns" - ACLTemplatedPolicyNomadServerName = "builtin/nomad-server" - ACLTemplatedPolicyWorkloadIdentityName = "builtin/workload-identity" - ACLTemplatedPolicyAPIGatewayName = "builtin/api-gateway" - ACLTemplatedPolicyNomadClientName = "builtin/nomad-client" + ACLTemplatedPolicyServiceName = "builtin/service" + ACLTemplatedPolicyNodeName = "builtin/node" + ACLTemplatedPolicyDNSName = "builtin/dns" + ACLTemplatedPolicyNomadServerName = "builtin/nomad-server" + ACLTemplatedPolicyAPIGatewayName = "builtin/api-gateway" + ACLTemplatedPolicyNomadClientName = "builtin/nomad-client" ) type ACLLink struct { diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_intentions.go b/vendor/github.com/hashicorp/consul/api/config_entry_intentions.go index 3f03b0875b..642479c1ba 100644 --- a/vendor/github.com/hashicorp/consul/api/config_entry_intentions.go +++ b/vendor/github.com/hashicorp/consul/api/config_entry_intentions.go @@ -63,13 +63,15 @@ type IntentionHTTPPermission struct { } type IntentionHTTPHeaderPermission struct { - Name string - Present bool `json:",omitempty"` - Exact string `json:",omitempty"` - Prefix string `json:",omitempty"` - Suffix string `json:",omitempty"` - Regex string `json:",omitempty"` - Invert bool `json:",omitempty"` + Name string + Present bool `json:",omitempty"` + Exact string `json:",omitempty"` + Prefix string `json:",omitempty"` + Suffix string `json:",omitempty"` + Contains string `json:",omitempty"` + Regex string `json:",omitempty"` + Invert bool `json:",omitempty"` + IgnoreCase bool `json:",omitempty" alias:"ignore_case"` } type IntentionJWTRequirement struct { diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_mesh.go b/vendor/github.com/hashicorp/consul/api/config_entry_mesh.go index e035d15967..647b02b238 100644 --- a/vendor/github.com/hashicorp/consul/api/config_entry_mesh.go +++ b/vendor/github.com/hashicorp/consul/api/config_entry_mesh.go @@ -69,12 +69,53 @@ type MeshDirectionalTLSConfig struct { type MeshHTTPConfig struct { SanitizeXForwardedClientCert bool `alias:"sanitize_x_forwarded_client_cert"` + // Incoming configures settings for incoming HTTP traffic to mesh proxies. + Incoming *MeshDirectionalHTTPConfig `json:",omitempty"` +} + +// MeshDirectionalHTTPConfig holds mesh configuration specific to HTTP +// requests for a given traffic direction. +type MeshDirectionalHTTPConfig struct { + RequestNormalization *RequestNormalizationMeshConfig `json:",omitempty" alias:"request_normalization"` } type PeeringMeshConfig struct { PeerThroughMeshGateways bool `json:",omitempty" alias:"peer_through_mesh_gateways"` } +// RequestNormalizationMeshConfig contains options pertaining to the +// normalization of HTTP requests processed by mesh proxies. +type RequestNormalizationMeshConfig struct { + // InsecureDisablePathNormalization sets the value of the \`normalize_path\` option in the Envoy listener's + // `HttpConnectionManager`. The default value is \`false\`. When set to \`true\` in Consul, \`normalize_path\` is + // set to \`false\` for the Envoy proxy. This parameter disables the normalization of request URL paths according to + // RFC 3986, conversion of \`\\\` to \`/\`, and decoding non-reserved %-encoded characters. When using L7 intentions + // with path match rules, we recommend enabling path normalization in order to avoid match rule circumvention with + // non-normalized path values. + InsecureDisablePathNormalization bool `json:",omitempty" alias:"insecure_disable_path_normalization"` + // MergeSlashes sets the value of the \`merge_slashes\` option in the Envoy listener's \`HttpConnectionManager\`. + // The default value is \`false\`. This option controls the normalization of request URL paths by merging + // consecutive \`/\` characters. This normalization is not part of RFC 3986. When using L7 intentions with path + // match rules, we recommend enabling this setting to avoid match rule circumvention through non-normalized path + // values, unless legitimate service traffic depends on allowing for repeat \`/\` characters, or upstream services + // are configured to differentiate between single and multiple slashes. + MergeSlashes bool `json:",omitempty" alias:"merge_slashes"` + // PathWithEscapedSlashesAction sets the value of the \`path_with_escaped_slashes_action\` option in the Envoy + // listener's \`HttpConnectionManager\`. The default value of this option is empty, which is equivalent to + // \`IMPLEMENTATION_SPECIFIC_DEFAULT\`. This parameter controls the action taken in response to request URL paths + // with escaped slashes in the path. When using L7 intentions with path match rules, we recommend enabling this + // setting to avoid match rule circumvention through non-normalized path values, unless legitimate service traffic + // depends on allowing for escaped \`/\` or \`\\\` characters, or upstream services are configured to differentiate + // between escaped and unescaped slashes. Refer to the Envoy documentation for more information on available + // options. + PathWithEscapedSlashesAction string `json:",omitempty" alias:"path_with_escaped_slashes_action"` + // HeadersWithUnderscoresAction sets the value of the \`headers_with_underscores_action\` option in the Envoy + // listener's \`HttpConnectionManager\` under \`common_http_protocol_options\`. The default value of this option is + // empty, which is equivalent to \`ALLOW\`. Refer to the Envoy documentation for more information on available + // options. + HeadersWithUnderscoresAction string `json:",omitempty" alias:"headers_with_underscores_action"` +} + func (e *MeshConfigEntry) GetKind() string { return MeshConfig } func (e *MeshConfigEntry) GetName() string { return MeshConfigMesh } func (e *MeshConfigEntry) GetPartition() string { return e.Partition } diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/configmanager/manager.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/configmanager/manager.go index de12a5d6f7..0041ed9414 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/configmanager/manager.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/configmanager/manager.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package configmanager diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/configmanager/metrics.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/configmanager/metrics.go index 08b64d7667..cec0f5d3c1 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/configmanager/metrics.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/configmanager/metrics.go @@ -1,16 +1,5 @@ // Copyright (c) 2018 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package configmanager diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/customtransport/buffered_read_transport.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/customtransport/buffered_read_transport.go index 2d5b8573a9..24058042b1 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/customtransport/buffered_read_transport.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/customtransport/buffered_read_transport.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package customtransport @@ -60,6 +49,7 @@ func (p *TBufferedReadTransport) Read(buf []byte) (int, error) { // RemainingBytes returns the number of bytes left to be read from the readBuf func (p *TBufferedReadTransport) RemainingBytes() uint64 { + //nolint: gosec // G115 return uint64(p.readBuf.Len()) } diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/httpserver/srv.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/httpserver/srv.go index 698bad33a7..384b4327e1 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/httpserver/srv.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/httpserver/srv.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package httpserver diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/processors/processor.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/processors/processor.go index 2ade7a29b5..947ca42310 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/processors/processor.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/processors/processor.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package processors diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/processors/thrift_processor.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/processors/thrift_processor.go index 0045388994..ba3ca9d3f5 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/processors/thrift_processor.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/processors/thrift_processor.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package processors diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/server.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/server.go index 42d6f85fcf..1a41e8be26 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/server.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/server.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package servers diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/tbuffered_server.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/tbuffered_server.go index f52a0fa6fe..a00e8f3860 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/tbuffered_server.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/tbuffered_server.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package servers diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/socket_buffer.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/socket_buffer.go index 5dd4763593..fe6eb10cf7 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/socket_buffer.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/socket_buffer.go @@ -1,16 +1,5 @@ // Copyright (c) 2020 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 //go:build !windows // +build !windows diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/socket_buffer_windows.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/socket_buffer_windows.go index dd763ec4c8..b4ad3b066d 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/socket_buffer_windows.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/socket_buffer_windows.go @@ -1,16 +1,5 @@ // Copyright (c) 2020 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package thriftudp diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/transport.go b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/transport.go index e124b16a10..81db276ff0 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/transport.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp/transport.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package thriftudp diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/model/sampling.go b/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/model/sampling.go index 32193039ad..9504506756 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/model/sampling.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/model/sampling.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy/factory.go b/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy/factory.go index 353512b0f7..243d08595e 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy/factory.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy/factory.go @@ -1,16 +1,5 @@ // Copyright (c) 2018 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package samplingstrategy diff --git a/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy/interface.go b/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy/interface.go index 4b599dd306..e47688a731 100644 --- a/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy/interface.go +++ b/vendor/github.com/jaegertracing/jaeger/cmd/collector/app/sampling/samplingstrategy/interface.go @@ -1,16 +1,5 @@ // Copyright (c) 2018 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package samplingstrategy diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/json/doc.go b/vendor/github.com/jaegertracing/jaeger/model/converter/json/doc.go index 547372cb96..50b692bacb 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/json/doc.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/json/doc.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 // Package json allows converting model.Trace to external JSON data model. package json diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/json/from_domain.go b/vendor/github.com/jaegertracing/jaeger/model/converter/json/from_domain.go index 677f96bb38..fb0754424c 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/json/from_domain.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/json/from_domain.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/json/process_hashtable.go b/vendor/github.com/jaegertracing/jaeger/model/converter/json/process_hashtable.go index 5a95af66f9..fb6eaf4c3d 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/json/process_hashtable.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/json/process_hashtable.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/json/sampling.go b/vendor/github.com/jaegertracing/jaeger/model/converter/json/sampling.go index b124114b6a..829670d146 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/json/sampling.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/json/sampling.go @@ -1,16 +1,5 @@ // Copyright (c) 2023 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/doc.go b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/doc.go index 26050003d6..4ed14a3000 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/doc.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/doc.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 // Package jaeger allows converting model.Trace to/from jaeger.thrift model. package jaeger diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/from_domain.go b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/from_domain.go index 6f8b85863d..b115c36150 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/from_domain.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/from_domain.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package jaeger @@ -112,6 +101,7 @@ func (d domainToJaegerTransformer) convertLogs(logs []model.Log) []*jaeger.Log { jaegerLogs := make([]*jaeger.Log, len(logs)) for idx, log := range logs { jaegerLogs[idx] = &jaeger.Log{ + //nolint: gosec // G115 Timestamp: int64(model.TimeAsEpochMicroseconds(log.Timestamp)), Fields: d.convertKeyValuesToTags(log.Fields), } @@ -122,6 +112,7 @@ func (d domainToJaegerTransformer) convertLogs(logs []model.Log) []*jaeger.Log { func (domainToJaegerTransformer) convertSpanRefs(refs []model.SpanRef) []*jaeger.SpanRef { jaegerSpanRefs := make([]*jaeger.SpanRef, len(refs)) for idx, ref := range refs { + //nolint: gosec // G115 jaegerSpanRefs[idx] = &jaeger.SpanRef{ RefType: jaeger.SpanRefType(ref.RefType), TraceIdLow: int64(ref.TraceID.Low), @@ -137,6 +128,7 @@ func (d domainToJaegerTransformer) transformSpan(span *model.Span) *jaeger.Span logs := d.convertLogs(span.Logs) refs := d.convertSpanRefs(span.References) + //nolint: gosec // G115 jaegerSpan := &jaeger.Span{ TraceIdLow: int64(span.TraceID.Low), TraceIdHigh: int64(span.TraceID.High), diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/sampling_from_domain.go b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/sampling_from_domain.go index c776072cd1..d456b01892 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/sampling_from_domain.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/sampling_from_domain.go @@ -1,16 +1,5 @@ // Copyright (c) 2018 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package jaeger @@ -55,7 +44,10 @@ func convertRateLimitingFromDomain(s *api_v2.RateLimitingSamplingStrategy) (*sam if s.MaxTracesPerSecond > math.MaxInt16 { return nil, errors.New("maxTracesPerSecond is higher than int16") } - return &sampling.RateLimitingSamplingStrategy{MaxTracesPerSecond: int16(s.GetMaxTracesPerSecond())}, nil + return &sampling.RateLimitingSamplingStrategy{ + //nolint: gosec // G115 + MaxTracesPerSecond: int16(s.GetMaxTracesPerSecond()), + }, nil } func convertPerOperationFromDomain(s *api_v2.PerOperationSamplingStrategies) *sampling.PerOperationSamplingStrategies { diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/sampling_to_domain.go b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/sampling_to_domain.go index 876e50a4a8..23cea6ccbf 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/sampling_to_domain.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/sampling_to_domain.go @@ -1,16 +1,5 @@ // Copyright (c) 2018 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package jaeger diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/to_domain.go b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/to_domain.go index 5f3838bc39..b3d082ea5a 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/to_domain.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/jaeger/to_domain.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package jaeger @@ -58,6 +47,7 @@ func (td toDomain) ToDomainSpan(jSpan *jaeger.Span, jProcess *jaeger.Process) *m } func (td toDomain) transformSpan(jSpan *jaeger.Span, mProcess *model.Process) *model.Span { + //nolint: gosec // G115 traceID := model.NewTraceID(uint64(jSpan.TraceIdHigh), uint64(jSpan.TraceIdLow)) // allocate extra space for future append operation tags := td.getTags(jSpan.Tags, 1) @@ -66,20 +56,25 @@ func (td toDomain) transformSpan(jSpan *jaeger.Span, mProcess *model.Process) *m // might still have these IDs without representing them in the References, so we // convert it back into child-of reference. if jSpan.ParentSpanId != 0 { + //nolint: gosec // G115 parentSpanID := model.NewSpanID(uint64(jSpan.ParentSpanId)) refs = model.MaybeAddParentSpanID(traceID, parentSpanID, refs) } return &model.Span{ - TraceID: traceID, + TraceID: traceID, + //nolint: gosec // G115 SpanID: model.NewSpanID(uint64(jSpan.SpanId)), OperationName: jSpan.OperationName, References: refs, - Flags: model.Flags(jSpan.Flags), - StartTime: model.EpochMicrosecondsAsTime(uint64(jSpan.StartTime)), - Duration: model.MicrosecondsAsDuration(uint64(jSpan.Duration)), - Tags: tags, - Logs: td.getLogs(jSpan.Logs), - Process: mProcess, + //nolint: gosec // G115 + Flags: model.Flags(jSpan.Flags), + //nolint: gosec // G115 + StartTime: model.EpochMicrosecondsAsTime(uint64(jSpan.StartTime)), + //nolint: gosec // G115 + Duration: model.MicrosecondsAsDuration(uint64(jSpan.Duration)), + Tags: tags, + Logs: td.getLogs(jSpan.Logs), + Process: mProcess, } } @@ -91,9 +86,12 @@ func (toDomain) getReferences(jRefs []*jaeger.SpanRef) []model.SpanRef { mRefs := make([]model.SpanRef, len(jRefs)) for idx, jRef := range jRefs { mRefs[idx] = model.SpanRef{ + //nolint: gosec // G115 RefType: model.SpanRefType(int(jRef.RefType)), + //nolint: gosec // G115 TraceID: model.NewTraceID(uint64(jRef.TraceIdHigh), uint64(jRef.TraceIdLow)), - SpanID: model.NewSpanID(uint64(jRef.SpanId)), + //nolint: gosec // G115 + SpanID: model.NewSpanID(uint64(jRef.SpanId)), } } @@ -151,6 +149,7 @@ func (td toDomain) getLogs(logs []*jaeger.Log) []model.Log { retMe := make([]model.Log, len(logs)) for i, log := range logs { retMe[i] = model.Log{ + //nolint: gosec // G115 Timestamp: model.EpochMicrosecondsAsTime(uint64(log.Timestamp)), Fields: td.getTags(log.Fields, 0), } diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/deserialize.go b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/deserialize.go index 821cf3914f..7f581895e3 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/deserialize.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/deserialize.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2018 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package zipkin diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/doc.go b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/doc.go index 7b7b461270..4f47098fd1 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/doc.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/doc.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 // Package zipkin allows converting model.Trace to/from zipkin.thrift model. package zipkin diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/process_hashtable.go b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/process_hashtable.go index cd75fca2b0..05c5a32d8c 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/process_hashtable.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/process_hashtable.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package zipkin diff --git a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/to_domain.go b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/to_domain.go index a75255e9eb..720553e3b0 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/to_domain.go +++ b/vendor/github.com/jaegertracing/jaeger/model/converter/thrift/zipkin/to_domain.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package zipkin @@ -135,9 +124,11 @@ func (td toDomain) transformSpan(zSpan *zipkincore.Span) []*model.Span { if zSpan.TraceIDHigh != nil { traceIDHigh = *zSpan.TraceIDHigh } + //nolint: gosec // G115 traceID := model.NewTraceID(uint64(traceIDHigh), uint64(zSpan.TraceID)) var refs []model.SpanRef if zSpan.ParentID != nil { + //nolint: gosec // G115 parentSpanID := model.NewSpanID(uint64(*zSpan.ParentID)) refs = model.MaybeAddParentSpanID(traceID, parentSpanID, refs) } @@ -147,15 +138,18 @@ func (td toDomain) transformSpan(zSpan *zipkincore.Span) []*model.Span { startTime, duration := td.getStartTimeAndDuration(zSpan) result := []*model.Span{{ - TraceID: traceID, + TraceID: traceID, + //nolint: gosec // G115 SpanID: model.NewSpanID(uint64(zSpan.ID)), OperationName: zSpan.Name, References: refs, Flags: flags, - StartTime: model.EpochMicrosecondsAsTime(uint64(startTime)), - Duration: model.MicrosecondsAsDuration(uint64(duration)), - Tags: tags, - Logs: td.getLogs(zSpan.Annotations), + //nolint: gosec // G115 + StartTime: model.EpochMicrosecondsAsTime(uint64(startTime)), + //nolint: gosec // G115 + Duration: model.MicrosecondsAsDuration(uint64(duration)), + Tags: tags, + Logs: td.getLogs(zSpan.Annotations), }} cs := td.findAnnotation(zSpan, zipkincore.CLIENT_SEND) @@ -163,7 +157,8 @@ func (td toDomain) transformSpan(zSpan *zipkincore.Span) []*model.Span { if cs != nil && sr != nil { // if the span is client and server we split it into two separate spans s := &model.Span{ - TraceID: traceID, + TraceID: traceID, + //nolint: gosec // G115 SpanID: model.NewSpanID(uint64(zSpan.ID)), OperationName: zSpan.Name, References: refs, @@ -172,14 +167,18 @@ func (td toDomain) transformSpan(zSpan *zipkincore.Span) []*model.Span { // if the first span is a client span we create server span and vice-versa. if result[0].IsRPCClient() { s.Tags = []model.KeyValue{model.String(keySpanKind, trace.SpanKindServer.String())} + //nolint: gosec // G115 s.StartTime = model.EpochMicrosecondsAsTime(uint64(sr.Timestamp)) if ss := td.findAnnotation(zSpan, zipkincore.SERVER_SEND); ss != nil { + //nolint: gosec // G115 s.Duration = model.MicrosecondsAsDuration(uint64(ss.Timestamp - sr.Timestamp)) } } else { s.Tags = []model.KeyValue{model.String(keySpanKind, trace.SpanKindClient.String())} + //nolint: gosec // G115 s.StartTime = model.EpochMicrosecondsAsTime(uint64(cs.Timestamp)) if cr := td.findAnnotation(zSpan, zipkincore.CLIENT_RECV); cr != nil { + //nolint: gosec // G115 s.Duration = model.MicrosecondsAsDuration(uint64(cr.Timestamp - cs.Timestamp)) } } @@ -231,6 +230,7 @@ func (td toDomain) generateProcess(zSpan *zipkincore.Span) (*model.Process, erro serviceName, ipv4, err := td.findServiceNameAndIP(zSpan) if ipv4 != 0 { // If the ip process tag already exists, don't add it again + //nolint: gosec // G115 tags = append(tags, model.Int64(IPTagName, int64(uint64(ipv4)))) } return model.NewProcess(serviceName, tags), err @@ -261,6 +261,7 @@ func (td toDomain) findServiceNameAndIP(zSpan *zipkincore.Span) (string, int32, } err := fmt.Errorf( "cannot find service name in Zipkin span [traceID=%x, spanID=%x]", + //nolint: gosec // G115 uint64(zSpan.TraceID), uint64(zSpan.ID)) return UnknownServiceName, 0, err } @@ -364,6 +365,7 @@ func (td toDomain) getLogs(annotations []*zipkincore.Annotation) []model.Log { } logFields := td.getLogFields(a) jLog := model.Log{ + //nolint: gosec // G115 Timestamp: model.EpochMicrosecondsAsTime(uint64(a.Timestamp)), Fields: logFields, } @@ -403,6 +405,7 @@ func (toDomain) getPeerTags(endpoint *zipkincore.Endpoint, tags []model.KeyValue } tags = append(tags, model.String(peerservice, endpoint.ServiceName)) if endpoint.Ipv4 != 0 { + //nolint: gosec // G115 ipv4 := int64(uint32(endpoint.Ipv4)) tags = append(tags, model.Int64(peerHostIPv4, ipv4)) } @@ -412,6 +415,7 @@ func (toDomain) getPeerTags(endpoint *zipkincore.Endpoint, tags []model.KeyValue tags = append(tags, model.Binary(peerHostIPv6, endpoint.Ipv6)) } if endpoint.Port != 0 { + //nolint: gosec // G115 port := int64(uint16(endpoint.Port)) tags = append(tags, model.Int64(peerPort, port)) } diff --git a/vendor/github.com/jaegertracing/jaeger/model/dependencies.go b/vendor/github.com/jaegertracing/jaeger/model/dependencies.go index d60bbb18f4..8a0f2745b1 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/dependencies.go +++ b/vendor/github.com/jaegertracing/jaeger/model/dependencies.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model diff --git a/vendor/github.com/jaegertracing/jaeger/model/doc.go b/vendor/github.com/jaegertracing/jaeger/model/doc.go index b44aea615a..bb8daf1390 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/doc.go +++ b/vendor/github.com/jaegertracing/jaeger/model/doc.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 // Package model describes the internal data model for Trace and Span package model diff --git a/vendor/github.com/jaegertracing/jaeger/model/hash.go b/vendor/github.com/jaegertracing/jaeger/model/hash.go index 890843a8aa..5b4a4dc442 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/hash.go +++ b/vendor/github.com/jaegertracing/jaeger/model/hash.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model diff --git a/vendor/github.com/jaegertracing/jaeger/model/ids.go b/vendor/github.com/jaegertracing/jaeger/model/ids.go index 525bbf874e..76c5102004 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/ids.go +++ b/vendor/github.com/jaegertracing/jaeger/model/ids.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2018 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model diff --git a/vendor/github.com/jaegertracing/jaeger/model/json/doc.go b/vendor/github.com/jaegertracing/jaeger/model/json/doc.go index ba31238980..514332ca9c 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/json/doc.go +++ b/vendor/github.com/jaegertracing/jaeger/model/json/doc.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 // Package json defines the external JSON representation for Jaeger traces. package json diff --git a/vendor/github.com/jaegertracing/jaeger/model/json/model.go b/vendor/github.com/jaegertracing/jaeger/model/json/model.go index ba1b5a44ab..6ee34f93fc 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/json/model.go +++ b/vendor/github.com/jaegertracing/jaeger/model/json/model.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package json diff --git a/vendor/github.com/jaegertracing/jaeger/model/keyvalue.go b/vendor/github.com/jaegertracing/jaeger/model/keyvalue.go index 96c15dfaa8..68fc91ea3a 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/keyvalue.go +++ b/vendor/github.com/jaegertracing/jaeger/model/keyvalue.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model @@ -210,6 +199,7 @@ func (kv KeyValue) Hash(w io.Writer) error { if _, err := w.Write([]byte(kv.Key)); err != nil { return err } + //nolint: gosec // G115 if err := binary.Write(w, binary.BigEndian, uint16(kv.VType)); err != nil { return err } diff --git a/vendor/github.com/jaegertracing/jaeger/model/process.go b/vendor/github.com/jaegertracing/jaeger/model/process.go index 1babaeb182..f2a7315188 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/process.go +++ b/vendor/github.com/jaegertracing/jaeger/model/process.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model diff --git a/vendor/github.com/jaegertracing/jaeger/model/sort.go b/vendor/github.com/jaegertracing/jaeger/model/sort.go index b2556d8cc4..91d8221908 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/sort.go +++ b/vendor/github.com/jaegertracing/jaeger/model/sort.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model diff --git a/vendor/github.com/jaegertracing/jaeger/model/span.go b/vendor/github.com/jaegertracing/jaeger/model/span.go index 833763efe9..51d96cae40 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/span.go +++ b/vendor/github.com/jaegertracing/jaeger/model/span.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model diff --git a/vendor/github.com/jaegertracing/jaeger/model/spanref.go b/vendor/github.com/jaegertracing/jaeger/model/spanref.go index 92acc21e9a..39d0e13820 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/spanref.go +++ b/vendor/github.com/jaegertracing/jaeger/model/spanref.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model diff --git a/vendor/github.com/jaegertracing/jaeger/model/time.go b/vendor/github.com/jaegertracing/jaeger/model/time.go index 34a66a7efc..153e52b760 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/time.go +++ b/vendor/github.com/jaegertracing/jaeger/model/time.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model @@ -23,22 +12,26 @@ import ( func EpochMicrosecondsAsTime(ts uint64) time.Time { seconds := ts / 1000000 nanos := 1000 * (ts % 1000000) + //nolint: gosec // G115 return time.Unix(int64(seconds), int64(nanos)).UTC() } // TimeAsEpochMicroseconds converts time.Time to microseconds since epoch, // which is the format the StartTime field is stored in the Span. func TimeAsEpochMicroseconds(t time.Time) uint64 { + //nolint: gosec // G115 return uint64(t.UnixNano() / 1000) } // MicrosecondsAsDuration converts duration in microseconds to time.Duration value. func MicrosecondsAsDuration(v uint64) time.Duration { + //nolint: gosec // G115 return time.Duration(v) * time.Microsecond } // DurationAsMicroseconds converts time.Duration to microseconds, // which is the format the Duration field is stored in the Span. func DurationAsMicroseconds(d time.Duration) uint64 { + //nolint: gosec // G115 return uint64(d.Nanoseconds() / 1000) } diff --git a/vendor/github.com/jaegertracing/jaeger/model/trace.go b/vendor/github.com/jaegertracing/jaeger/model/trace.go index fcc31b07ae..234e2adb14 100644 --- a/vendor/github.com/jaegertracing/jaeger/model/trace.go +++ b/vendor/github.com/jaegertracing/jaeger/model/trace.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package model diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/cache/cache.go b/vendor/github.com/jaegertracing/jaeger/pkg/cache/cache.go index 14a4c0bb6b..b4c24271af 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/cache/cache.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/cache/cache.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package cache diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/cache/lru.go b/vendor/github.com/jaegertracing/jaeger/pkg/cache/lru.go index 0ffd0e6321..5aa1ea5228 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/cache/lru.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/cache/lru.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package cache diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/clientcfg/clientcfghttp/cfgmgr.go b/vendor/github.com/jaegertracing/jaeger/pkg/clientcfg/clientcfghttp/cfgmgr.go index a34d19a7ba..81531004f3 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/clientcfg/clientcfghttp/cfgmgr.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/clientcfg/clientcfghttp/cfgmgr.go @@ -1,16 +1,5 @@ // Copyright (c) 2020 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package clientcfghttp diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/clientcfg/clientcfghttp/handler.go b/vendor/github.com/jaegertracing/jaeger/pkg/clientcfg/clientcfghttp/handler.go index 7bc22be9a4..53b1632be1 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/clientcfg/clientcfghttp/handler.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/clientcfg/clientcfghttp/handler.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package clientcfghttp diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/distributedlock/interface.go b/vendor/github.com/jaegertracing/jaeger/pkg/distributedlock/interface.go index 1abf600f4c..4103398440 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/distributedlock/interface.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/distributedlock/interface.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package distributedlock diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/counter.go b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/counter.go index e594940857..ad9d94febf 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/counter.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/counter.go @@ -1,17 +1,6 @@ // Copyright (c) 2022 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package metrics diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/factory.go b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/factory.go index b1b9000a28..faeaf3d158 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/factory.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/factory.go @@ -1,17 +1,6 @@ // Copyright (c) 2022 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package metrics diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/gauge.go b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/gauge.go index 53631d451d..3445b7ac32 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/gauge.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/gauge.go @@ -1,17 +1,6 @@ // Copyright (c) 2022 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package metrics diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/histogram.go b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/histogram.go index d3bd6174fe..b737e74c47 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/histogram.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/histogram.go @@ -1,16 +1,5 @@ // Copyright (c) 2018 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package metrics diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/metrics.go b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/metrics.go index a7954ded67..b81e3e4a77 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/metrics.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/metrics.go @@ -1,17 +1,6 @@ // Copyright (c) 2022 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package metrics diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/package.go b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/package.go index 9764382db1..a0587cbd06 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/package.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/package.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 // Package metrics provides an internal abstraction for metrics API, // and command line flags for configuring the metrics backend. diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/stopwatch.go b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/stopwatch.go index 0ca7097926..4685eaea9d 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/stopwatch.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/stopwatch.go @@ -1,17 +1,6 @@ // Copyright (c) 2022 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package metrics diff --git a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/timer.go b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/timer.go index 75df952d74..9396e50b8c 100644 --- a/vendor/github.com/jaegertracing/jaeger/pkg/metrics/timer.go +++ b/vendor/github.com/jaegertracing/jaeger/pkg/metrics/timer.go @@ -1,17 +1,6 @@ // Copyright (c) 2022 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package metrics diff --git a/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/from_domain.go b/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/from_domain.go index e573a23a3a..7dcbe4aecd 100644 --- a/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/from_domain.go +++ b/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/from_domain.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2018 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package dbmodel diff --git a/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/model.go b/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/model.go index db2fffac40..d849c48857 100644 --- a/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/model.go +++ b/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/model.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2018 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package dbmodel diff --git a/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/to_domain.go b/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/to_domain.go index 2bdd34ff64..5fae125a03 100644 --- a/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/to_domain.go +++ b/vendor/github.com/jaegertracing/jaeger/plugin/storage/es/spanstore/dbmodel/to_domain.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2018 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package dbmodel diff --git a/vendor/github.com/jaegertracing/jaeger/storage/dependencystore/interface.go b/vendor/github.com/jaegertracing/jaeger/storage/dependencystore/interface.go index 4a68149862..07f8ddd312 100644 --- a/vendor/github.com/jaegertracing/jaeger/storage/dependencystore/interface.go +++ b/vendor/github.com/jaegertracing/jaeger/storage/dependencystore/interface.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package dependencystore diff --git a/vendor/github.com/jaegertracing/jaeger/storage/doc.go b/vendor/github.com/jaegertracing/jaeger/storage/doc.go index 4b3b595ca6..a2aaeda251 100644 --- a/vendor/github.com/jaegertracing/jaeger/storage/doc.go +++ b/vendor/github.com/jaegertracing/jaeger/storage/doc.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 // Package storage is the collection of different storage interfaces that are shared by two or more components. // diff --git a/vendor/github.com/jaegertracing/jaeger/storage/factory.go b/vendor/github.com/jaegertracing/jaeger/storage/factory.go index 462a626b64..f3e8ea7f4a 100644 --- a/vendor/github.com/jaegertracing/jaeger/storage/factory.go +++ b/vendor/github.com/jaegertracing/jaeger/storage/factory.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package storage diff --git a/vendor/github.com/jaegertracing/jaeger/storage/metricsstore/interface.go b/vendor/github.com/jaegertracing/jaeger/storage/metricsstore/interface.go index dc62fd0fa5..05b1f67be9 100644 --- a/vendor/github.com/jaegertracing/jaeger/storage/metricsstore/interface.go +++ b/vendor/github.com/jaegertracing/jaeger/storage/metricsstore/interface.go @@ -1,16 +1,5 @@ // Copyright (c) 2021 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package metricsstore diff --git a/vendor/github.com/jaegertracing/jaeger/storage/samplingstore/interface.go b/vendor/github.com/jaegertracing/jaeger/storage/samplingstore/interface.go index 7c10aab8f4..ba2dbdf3cd 100644 --- a/vendor/github.com/jaegertracing/jaeger/storage/samplingstore/interface.go +++ b/vendor/github.com/jaegertracing/jaeger/storage/samplingstore/interface.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package samplingstore diff --git a/vendor/github.com/jaegertracing/jaeger/storage/spanstore/composite.go b/vendor/github.com/jaegertracing/jaeger/storage/spanstore/composite.go index 68f9607448..e4f79141c0 100644 --- a/vendor/github.com/jaegertracing/jaeger/storage/spanstore/composite.go +++ b/vendor/github.com/jaegertracing/jaeger/storage/spanstore/composite.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package spanstore diff --git a/vendor/github.com/jaegertracing/jaeger/storage/spanstore/downsampling_writer.go b/vendor/github.com/jaegertracing/jaeger/storage/spanstore/downsampling_writer.go index b6463edac8..ceb5040ac1 100644 --- a/vendor/github.com/jaegertracing/jaeger/storage/spanstore/downsampling_writer.go +++ b/vendor/github.com/jaegertracing/jaeger/storage/spanstore/downsampling_writer.go @@ -1,16 +1,5 @@ // Copyright (c) 2019 The Jaeger 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. +// SPDX-License-Identifier: Apache-2.0 package spanstore diff --git a/vendor/github.com/jaegertracing/jaeger/storage/spanstore/interface.go b/vendor/github.com/jaegertracing/jaeger/storage/spanstore/interface.go index 534cf8a228..c4c2918150 100644 --- a/vendor/github.com/jaegertracing/jaeger/storage/spanstore/interface.go +++ b/vendor/github.com/jaegertracing/jaeger/storage/spanstore/interface.go @@ -1,17 +1,6 @@ // Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber Technologies, 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. +// SPDX-License-Identifier: Apache-2.0 package spanstore diff --git a/vendor/github.com/klauspost/compress/.goreleaser.yml b/vendor/github.com/klauspost/compress/.goreleaser.yml index a22953805c..4528059ca6 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 684a30853a..de264c85a5 100644 --- a/vendor/github.com/klauspost/compress/README.md +++ b/vendor/github.com/klauspost/compress/README.md @@ -16,6 +16,13 @@ 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 diff --git a/vendor/github.com/klauspost/compress/zstd/encoder.go b/vendor/github.com/klauspost/compress/zstd/encoder.go index a79c4a527c..8f8223cd3a 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 { @@ -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 } diff --git a/vendor/github.com/klauspost/compress/zstd/zstd.go b/vendor/github.com/klauspost/compress/zstd/zstd.go index 4be7cc7367..066bef2a4f 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/knadh/koanf/v2/README.md b/vendor/github.com/knadh/koanf/v2/README.md index d7412704ee..b4947e556f 100644 --- a/vendor/github.com/knadh/koanf/v2/README.md +++ b/vendor/github.com/knadh/koanf/v2/README.md @@ -8,7 +8,7 @@ koanf v2 has modules (Providers) for reading configuration from a variety of sou All external dependencies in providers and parsers are detached from the core and can be installed separately as necessary. -[![Run Tests](https://github.com/knadh/koanf/actions/workflows/test.yml/badge.svg)](https://github.com/knadh/koanf/actions/workflows/test.yml) [![GoDoc](https://godoc.org/github.com/knadh/koanf?status.svg)](https://godoc.org/github.com/knadh/koanf) +[![Run Tests](https://github.com/knadh/koanf/actions/workflows/test.yml/badge.svg)](https://github.com/knadh/koanf/actions/workflows/test.yml) [![GoDoc](https://pkg.go.dev/badge/github.com/knadh/koanf?utm_source=godoc)](https://pkg.go.dev/github.com/knadh/koanf/v2) ### Installation @@ -26,11 +26,10 @@ go get -u github.com/knadh/koanf/providers/file # Install the necessary Parser(s). -# Available: toml, json, yaml, dotenv, hcl, hjson, nestedtext +# Available: toml, toml/v2, json, yaml, dotenv, hcl, hjson, nestedtext # go get -u github.com/knadh/koanf/parsers/$parser go get -u github.com/knadh/koanf/parsers/toml - ``` [See the list](#api) of all bundled Providers and Parsers. @@ -146,6 +145,9 @@ func main() { k.Print() }) + // To stop a file watcher, call: + // f.Unwatch() + // Block forever (and manually make a change to mock/mock.json) to // reload the config. log.Println("waiting forever. Try making a change to mock/mock.json to live reload") @@ -168,6 +170,10 @@ import ( "github.com/knadh/koanf/v2" "github.com/knadh/koanf/parsers/toml" + + // TOML version 2 is available at: + // "github.com/knadh/koanf/parsers/toml/v2" + "github.com/knadh/koanf/providers/file" "github.com/knadh/koanf/providers/posflag" flag "github.com/spf13/pflag" @@ -317,7 +323,7 @@ func main() { ``` ### Unmarshalling and marshalling -`Parser`s can be used to unmarshal and scan the values in a Koanf instance into a struct based on the field tags, and to marshal a Koanf instance back into serialized bytes, for example, back to JSON or YAML, to write back to files. +`Parser`s can be used to unmarshal and scan the values in a Koanf instance into a struct based on the field tags, and to marshal a Koanf instance back into serialized bytes, for example to JSON or YAML files ```go package main @@ -366,7 +372,7 @@ func main() { fmt.Println(out) // Marshal the instance back to JSON. - // The paser instance can be anything, eg: json.Paser(), yaml.Parser() etc. + // The parser instance can be anything, eg: json.Parser(), yaml.Parser() etc. b, _ := k.Marshal(parser) fmt.Println(string(b)) } @@ -677,6 +683,7 @@ Install with `go get -u github.com/knadh/koanf/parsers/$parser` | json | `json.Parser()` | Parses JSON bytes into a nested map | | yaml | `yaml.Parser()` | Parses YAML bytes into a nested map | | toml | `toml.Parser()` | Parses TOML bytes into a nested map | +| toml/v2 | `toml.Parser()` | Parses TOML bytes into a nested map (using go-toml v2) | | dotenv | `dotenv.Parser()` | Parses DotEnv bytes into a flat map | | hcl | `hcl.Parser(flattenSlices bool)` | Parses Hashicorp HCL bytes into a nested map. `flattenSlices` is recommended to be set to true. [Read more](https://github.com/hashicorp/hcl/issues/162). | | nestedtext | `nestedtext.Parser()` | Parses NestedText bytes into a flat map | diff --git a/vendor/github.com/knadh/koanf/v2/go.work.sum b/vendor/github.com/knadh/koanf/v2/go.work.sum index b879b3bf7d..eab7bcf845 100644 --- a/vendor/github.com/knadh/koanf/v2/go.work.sum +++ b/vendor/github.com/knadh/koanf/v2/go.work.sum @@ -125,7 +125,6 @@ github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91 github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= @@ -137,18 +136,18 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/hashicorp/consul/sdk v0.13.1/go.mod h1:SW/mM4LbKfqmMvcFu8v+eiQQ7oitXEFeiBe9StxERb0= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/vendor/github.com/leodido/go-syslog/v4/README.md b/vendor/github.com/leodido/go-syslog/v4/README.md index 5fdd7e1e69..168b880350 100644 --- a/vendor/github.com/leodido/go-syslog/v4/README.md +++ b/vendor/github.com/leodido/go-syslog/v4/README.md @@ -12,7 +12,7 @@ To wrap up, this package provides: - an [RFC5424-compliant parser and builder](/rfc5424) - an [RFC3164-compliant parser](/rfc3164) - ie., BSD-syslog messages -- a parser that works on streams for syslog with [octet counting](https://tools.ietf.org/html/rfc5425#section-4.3) framing technique, see [octetcounting](/octetcounting) +- a parser that works on streams for syslog with [octet counting](https://datatracker.ietf.org/doc/html/rfc6587#section-3.4.1) framing technique, see [octetcounting](/octetcounting) - a parser that works on streams for syslog with [non-transparent](https://tools.ietf.org/html/rfc6587#section-3.4.2) framing technique, see [nontransparent](/nontransparent) This library provides the pieces to parse Syslog messages transported following various RFCs. @@ -31,7 +31,7 @@ go get github.com/leodido/go-syslog/v4 ## Docs -[![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](http://godoc.org/github.com/leodido/go-syslog) +[![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](http://godoc.org/github.com/leodido/go-syslog/v4) The [docs](docs/) directory contains `.dot` files representing the finite-state machines (FSMs) implementing the syslog parsers and transports. diff --git a/vendor/github.com/leodido/go-syslog/v4/octetcounting/parser.go b/vendor/github.com/leodido/go-syslog/v4/octetcounting/parser.go index 5a5d4f8618..a8d63cc787 100644 --- a/vendor/github.com/leodido/go-syslog/v4/octetcounting/parser.go +++ b/vendor/github.com/leodido/go-syslog/v4/octetcounting/parser.go @@ -5,15 +5,14 @@ import ( "io" syslog "github.com/leodido/go-syslog/v4" - "github.com/leodido/go-syslog/v4/rfc5424" "github.com/leodido/go-syslog/v4/rfc3164" + "github.com/leodido/go-syslog/v4/rfc5424" ) // parser is capable to parse the input stream containing syslog messages with octetcounting framing. // // Use NewParser function to instantiate one. type parser struct { - msglen int64 maxMessageLength int s Scanner internal syslog.Machine @@ -96,6 +95,7 @@ func (p *parser) Parse(r io.Reader) { } func (p *parser) run() { + defer p.s.Release() for { var tok Token diff --git a/vendor/github.com/leodido/go-syslog/v4/octetcounting/scanner.go b/vendor/github.com/leodido/go-syslog/v4/octetcounting/scanner.go index 7926515f93..6317db0cf2 100644 --- a/vendor/github.com/leodido/go-syslog/v4/octetcounting/scanner.go +++ b/vendor/github.com/leodido/go-syslog/v4/octetcounting/scanner.go @@ -5,8 +5,38 @@ import ( "bytes" "io" "strconv" + "sync" ) +var readerPool sync.Pool + +// getReader returns a *bufio.Reader that is guaranteed +// to have a buffer of at least `size`. +func getReader(r io.Reader, size int) *bufio.Reader { + if buf := readerPool.Get(); buf != nil { + buf := buf.(*bufio.Reader) + + // If the buffer we get is smaller than the requested buffer, put it back + // and create a new one. stdlib has multiple buckets for various sizes to + // make this more efficient, but that's overkill here. + if buf.Size() < size { + readerPool.Put(buf) + buf = bufio.NewReaderSize(r, size) + } else { + buf.Reset(r) + } + + return buf + } + + return bufio.NewReaderSize(r, size) +} + +// putReader returns the given bufio.Reader to the pool to be used again. +func putReader(r *bufio.Reader) { + readerPool.Put(r) +} + // eof represents a marker byte for the end of the reader var eof = byte(0) @@ -39,7 +69,7 @@ type Scanner struct { // NewScanner returns a pointer to a new instance of Scanner. func NewScanner(r io.Reader, maxLength int) *Scanner { return &Scanner{ - r: bufio.NewReaderSize(r, maxLength+20), // max uint64 is 19 characters + a space + r: getReader(r, maxLength+20), // max uint64 is 19 characters + a space } } @@ -151,3 +181,7 @@ func (s *Scanner) scanSyslogMsg() Token { lit: b, } } + +func (s *Scanner) Release() { + putReader(s.r) +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider/README.md index b863f87689..d61a968b55 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider/README.md @@ -1,5 +1,5 @@ ## Summary -This package provides a `ConfigMapProvider` implementation for Amazon S3 (`s3provider`) that allows the Collector the ability to load configuration by fetching and reading config objects stored in Amazon S3. +This package provides a `ConfigMapProvider` implementation for Amazon S3 (`s3provider`) that allows the Collector the ability to load configuration by fetching and reading config objects stored in Amazon S3. ## How it works - It will be called by `ConfigMapResolver` to load configuration for the Collector. - By giving a config URI starting with prefix `s3://`, this `s3provider` will be used to download config objects from the given S3 URIs, and then use the downloaded configuration during Collector initialization. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/README.md index 9ec172840d..ce91aa63bd 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/README.md @@ -8,7 +8,7 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fawscloudwatchlogs%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fawscloudwatchlogs) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fawscloudwatchlogs%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fawscloudwatchlogs) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@boostchicken](https://www.github.com/boostchicken), [@bryan-aguilar](https://www.github.com/bryan-aguilar), [@rapphil](https://www.github.com/rapphil) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/config.go index 9432d20758..24cce8c0f9 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/config.go @@ -43,7 +43,7 @@ type Config struct { Tags map[string]*string `mapstructure:"tags"` // Queue settings frm the exporterhelper - exporterhelper.QueueSettings `mapstructure:"sending_queue"` + QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"` logger *zap.Logger @@ -73,7 +73,6 @@ func (config *Config) Validate() error { return retErr } return cwlogs.ValidateTagsInput(config.Tags) - } // TODO(jbd): Add ARN role to config. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/exporter.go index fd8641fac4..9aa14be1e3 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/exporter.go @@ -63,7 +63,6 @@ func newCwLogsPusher(expConfig *Config, params exp.Settings) (*cwlExporter, erro // create CWLogs client with aws session config svcStructuredLog := cwlogs.NewClient(params.Logger, awsConfig, params.BuildInfo, expConfig.LogGroupName, expConfig.LogRetention, expConfig.Tags, session, metadata.Type.String()) collectorIdentifier, err := uuid.NewRandom() - if err != nil { return nil, err } @@ -88,7 +87,7 @@ func newCwLogsExporter(config component.Config, params exp.Settings) (exp.Logs, if err != nil { return nil, err } - return exporterhelper.NewLogsExporter( + return exporterhelper.NewLogs( context.TODO(), params, config, @@ -105,13 +104,11 @@ func (e *cwlExporter) consumeLogs(_ context.Context, ld plog.Logs) error { var errs error err := pushLogsToCWLogs(e.logger, ld, e.Config, pusher) - if err != nil { errs = errors.Join(errs, fmt.Errorf("Error pushing logs: %w", err)) } err = pusher.ForceFlush() - if err != nil { errs = errors.Join(errs, fmt.Errorf("Error flushing logs: %w", err)) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/factory.go index 60c03c5fe5..cd94beef1a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/factory.go @@ -28,7 +28,7 @@ func NewFactory() exporter.Factory { } func createDefaultConfig() component.Config { - queueSettings := exporterhelper.NewDefaultQueueSettings() + queueSettings := exporterhelper.NewDefaultQueueConfig() // For backwards compatibilitiy, we default to 1 consumer queueSettings.NumConsumers = 1 @@ -45,5 +45,4 @@ func createLogsExporter(_ context.Context, params exporter.Settings, config comp return nil, errors.New("invalid configuration type; can't cast to awscloudwatchlogsexporter.Config") } return newCwLogsExporter(expConfig, params) - } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/metadata.yaml index d593d00745..8f5bc90e5d 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/metadata.yaml @@ -22,3 +22,5 @@ tests: top: # See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. - "go.opencensus.io/stats/view.(*worker).start" + - "net/http.(*persistConn).writeLoop" + - "internal/poll.runtime_pollWait" diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/README.md index 9dc35146e3..6eb5d1dd4e 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/README.md @@ -6,9 +6,10 @@ | Stability | [beta]: metrics | | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fawsemf%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fawsemf) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fawsemf%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fawsemf) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@shaochengwang](https://www.github.com/shaochengwang), [@mxiamxia](https://www.github.com/mxiamxia), [@bryan-aguilar](https://www.github.com/bryan-aguilar) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@mxiamxia](https://www.github.com/mxiamxia), [@bryan-aguilar](https://www.github.com/bryan-aguilar) | +| Emeritus | [@shaochengwang](https://www.github.com/shaochengwang) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib @@ -43,7 +44,7 @@ The following exporter configuration parameters are supported. | `resource_to_telemetry_conversion` | "resource_to_telemetry_conversion" is the option for converting resource attributes to telemetry attributes. It has only one config onption- `enabled`. For metrics, if `enabled=true`, all the resource attributes will be converted to metric labels by default. See `Resource Attributes to Metric Labels` section below for examples. | `enabled=false` | | `output_destination` | "output_destination" is an option to specify the EMFExporter output. Currently, two options are available. "cloudwatch" or "stdout" | `cloudwatch` | | `detailed_metrics` | Retain detailed datapoint values in exported metrics (e.g instead of exporting a quantile as a statistical value, preserve the quantile's population) | `false` | -| `parse_json_encoded_attr_values` | List of attribute keys whose corresponding values are JSON-encoded strings and will be converted to JSON structures in emf logs. For example, the attribute string value "{\\"x\\":5,\\"y\\":6}" will be converted to a json object: ```{"x": 5, "y": 6}``` | [ ] | +| `parse_json_encoded_attr_values` | List of attribute keys whose corresponding values are JSON-encoded strings and will be converted to JSON structures in emf logs. For example, the attribute string value "{\\"x\\":5,\\"y\\":6}" will be converted to a json object: ```{"x": 5, "y": 6}``` | [ ] | | [`metric_declarations`](#metric_declaration) | List of rules for filtering exported metrics and their dimensions. | [ ] | | [`metric_descriptors`](#metric_descriptor) | List of rules for inserting or updating metric descriptors. | [ ] | | `retain_initial_value_of_delta_metric` | This option specifies how the first value of a metric is handled. AWS EMF expects metric values to only contain deltas to the previous value. In the default case the first received value is therefor not sent to AWS but only used as a baseline for follow up changes to this metric. This is fine for high throughput metrics with stable labels (e.g. `requests{code=200}`). In this case it does not matter if the first value of this metric is discarded. However when your metric describes infrequent events or events with high label cardinality, then the exporter in default configuration would still drop the first occurrence of this metric. With this configuration value set to `true` the first value of all metrics will instead be send to AWS. | false | @@ -84,6 +85,14 @@ This exporter follows default credential resolution for the Follow the [guidelines](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) for the credential configuration. +## Metric Attributes +By setting attributes on your metrics you can change how individual metrics are sent to CloudWatch. Attributes can be set in code or using components like the [Attribute Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/attributesprocessor). + +The AWS EMF Exporter will interpret the following metric attributes to change how it publishes metrics to CloudWatch: + +| Attribute Name | Description | Default | +| :---------------- | :--------------------------------------------------------------------- | ------- | +| `aws.emf.storage_resolution` | This attribute should be set to an integer value of `1` or `60`. When sending the metric value to CloudWatch use the specified storage resolution value. CloudWatch currently supports a storage resolution of `1` or `60` to indicate 1 second or 60 second resolution. | `aws.emf.storage_resolution = 60` | ## Configuration Examples diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/config.go index 969a69e677..7495277e1c 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/config.go @@ -14,11 +14,9 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" ) -var ( - // eMFSupportedUnits contains the unit collection supported by CloudWatch backend service. - // https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html - eMFSupportedUnits = newEMFSupportedUnits() -) +// eMFSupportedUnits contains the unit collection supported by CloudWatch backend service. +// https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html +var eMFSupportedUnits = newEMFSupportedUnits() // Config defines configuration for AWS EMF exporter. type Config struct { @@ -152,11 +150,13 @@ func (config *Config) isAppSignalsEnabled() bool { func newEMFSupportedUnits() map[string]any { unitIndexer := map[string]any{} - for _, unit := range []string{"Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", + for _, unit := range []string{ + "Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits", "Percent", "Count", "Bytes/Second", "Kilobytes/Second", "Megabytes/Second", "Gigabytes/Second", "Terabytes/Second", "Bits/Second", "Kilobits/Second", - "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second", "None"} { + "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second", "None", + } { unitIndexer[unit] = nil } return unitIndexer diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/datapoint.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/datapoint.go index 1104a9e59e..001d83ab2b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/datapoint.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/datapoint.go @@ -334,7 +334,6 @@ func (dps summaryDataPointSlice) CalculateDeltaDatapoints(i int, instrumentation quantile := values.At(i) cLabels["quantile"] = strconv.FormatFloat(quantile.Quantile(), 'g', -1, 64) datapoints = append(datapoints, dataPoint{name: dps.metricName, value: quantile.Value(), labels: cLabels, timestampMs: timestampMs}) - } } else { metricVal := &cWMetricStats{Count: count, Sum: sum} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/emf_exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/emf_exporter.go index 67eb53b335..34b9eaf768 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/emf_exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/emf_exporter.go @@ -76,7 +76,6 @@ func newEmfExporter(config *Config, set exporter.Settings) (*emfExporter, error) cwlogs.WithUserAgentExtras(userAgentExtras...), ) collectorIdentifier, err := uuid.NewRandom() - if err != nil { return nil, err } @@ -136,7 +135,6 @@ func (emf *emfExporter) pushMetricsData(_ context.Context, md pmetric.Metrics) e fmt.Println(*putLogEvent.InputLogEvent.Message) } } else if strings.EqualFold(outputDestination, outputDestinationCloudWatch) { - emfPusher := emf.getPusher(putLogEvent.StreamKey) if emfPusher != nil { returnError := emfPusher.AddLogEntry(putLogEvent) @@ -167,7 +165,6 @@ func (emf *emfExporter) pushMetricsData(_ context.Context, md pmetric.Metrics) e } func (emf *emfExporter) getPusher(key cwlogs.StreamKey) cwlogs.Pusher { - var ok bool if _, ok = emf.pusherMap[key]; !ok { emf.pusherMap[key] = cwlogs.NewPusher(key, emf.retryCnt, *emf.svcStructuredLog, emf.config.logger) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/factory.go index 47fd367bf4..5f159b4b9f 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/factory.go @@ -60,7 +60,7 @@ func createMetricsExporter(ctx context.Context, params exporter.Settings, config return nil, err } - exporter, err := exporterhelper.NewMetricsExporter( + exporter, err := exporterhelper.NewMetrics( ctx, params, config, diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/grouped_metric.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/grouped_metric.go index dd3426cdc2..5ba39b93f7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/grouped_metric.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/grouped_metric.go @@ -36,7 +36,6 @@ func addToGroupedMetric( config *Config, calculators *emfCalculators, ) error { - dps := getDataPoints(pmd, metadata, config.logger) if dps == nil || dps.Len() == 0 { return nil @@ -107,7 +106,6 @@ func addToGroupedMetric( } } } - } return nil } @@ -194,6 +192,11 @@ func translateUnit(metric pmetric.Metric, descriptor map[string]MetricDescriptor } } switch unit { + case "1": + unit = "" + case "ns": + // CloudWatch doesn't support Nanoseconds + unit = "" case "ms": unit = "Milliseconds" case "s": @@ -202,7 +205,7 @@ func translateUnit(metric pmetric.Metric, descriptor map[string]MetricDescriptor unit = "Microseconds" case "By": unit = "Bytes" - case "Bi": + case "bit": unit = "Bits" } return unit diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/metadata.yaml index fe81230dea..78a4139e8f 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/metadata.yaml @@ -6,7 +6,8 @@ status: beta: [metrics] distributions: [contrib] codeowners: - active: [Aneurysm9, shaochengwang, mxiamxia, bryan-aguilar] + active: [Aneurysm9, mxiamxia, bryan-aguilar] + emeritus: [shaochengwang] tests: config: diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/metric_translator.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/metric_translator.go index 26aba7bd36..b5d9330503 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/metric_translator.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/metric_translator.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "reflect" + "strconv" "time" "go.opentelemetry.io/collector/pdata/pmetric" @@ -29,6 +30,9 @@ const ( prometheusReceiver = "prometheus" attributeReceiver = "receiver" fieldPrometheusMetricType = "prom_metric_type" + + // metric attributes for AWS EMF, not to be treated as metric labels + emfStorageResolutionAttribute = "aws.emf.storage_resolution" ) var fieldPrometheusTypes = map[pmetric.MetricType]string{ @@ -45,10 +49,16 @@ type cWMetrics struct { fields map[string]any } +type cWMetricInfo struct { + Name string + Unit string + StorageResolution int +} + type cWMeasurement struct { Namespace string Dimensions [][]string - Metrics []map[string]string + Metrics []cWMetricInfo } type cWMetricStats struct { @@ -156,7 +166,7 @@ func (mt metricTranslator) translateOTelToGroupedMetric(rm pmetric.ResourceMetri // translateGroupedMetricToCWMetric converts Grouped Metric format to CloudWatch Metric format. func translateGroupedMetricToCWMetric(groupedMetric *groupedMetric, config *Config) *cWMetrics { - labels := groupedMetric.labels + labels := filterAWSEMFAttributes(groupedMetric.labels) fieldsLength := len(labels) + len(groupedMetric.metrics) isPrometheusMetric := groupedMetric.metadata.receiver == prometheusReceiver @@ -198,7 +208,7 @@ func translateGroupedMetricToCWMetric(groupedMetric *groupedMetric, config *Conf // groupedMetricToCWMeasurement creates a single CW Measurement from a grouped metric. func groupedMetricToCWMeasurement(groupedMetric *groupedMetric, config *Config) cWMeasurement { - labels := groupedMetric.labels + labels := filterAWSEMFAttributes(groupedMetric.labels) dimensionRollupOption := config.DimensionRollupOption // Create a dimension set containing list of label names @@ -208,6 +218,7 @@ func groupedMetricToCWMeasurement(groupedMetric *groupedMetric, config *Config) dimSet[idx] = labelName idx++ } + dimensions := [][]string{dimSet} // Apply single/zero dimension rollup to labels @@ -228,14 +239,20 @@ func groupedMetricToCWMeasurement(groupedMetric *groupedMetric, config *Config) // Add on rolled-up dimensions dimensions = append(dimensions, rollupDimensionArray...) - metrics := make([]map[string]string, len(groupedMetric.metrics)) + metrics := make([]cWMetricInfo, len(groupedMetric.metrics)) idx = 0 for metricName, metricInfo := range groupedMetric.metrics { - metrics[idx] = map[string]string{ - "Name": metricName, + metrics[idx] = cWMetricInfo{ + Name: metricName, + StorageResolution: 60, } if metricInfo.unit != "" { - metrics[idx]["Unit"] = metricInfo.unit + metrics[idx].Unit = metricInfo.unit + } + if storRes, ok := groupedMetric.labels[emfStorageResolutionAttribute]; ok { + if storResInt, err := strconv.Atoi(storRes); err == nil { + metrics[idx].StorageResolution = storResInt + } } idx++ } @@ -250,7 +267,7 @@ func groupedMetricToCWMeasurement(groupedMetric *groupedMetric, config *Config) // groupedMetricToCWMeasurementsWithFilters filters the grouped metric using the given list of metric // declarations and returns the corresponding list of CW Measurements. func groupedMetricToCWMeasurementsWithFilters(groupedMetric *groupedMetric, config *Config) (cWMeasurements []cWMeasurement) { - labels := groupedMetric.labels + labels := filterAWSEMFAttributes(groupedMetric.labels) // Filter metric declarations by labels metricDeclarations := make([]*MetricDeclaration, 0, len(config.MetricDeclarations)) @@ -278,7 +295,7 @@ func groupedMetricToCWMeasurementsWithFilters(groupedMetric *groupedMetric, conf // Group metrics by matched metric declarations type metricDeclarationGroup struct { metricDeclIdxList []int - metrics []map[string]string + metrics []cWMetricInfo } metricDeclGroups := make(map[string]*metricDeclarationGroup) @@ -299,11 +316,17 @@ func groupedMetricToCWMeasurementsWithFilters(groupedMetric *groupedMetric, conf continue } - metric := map[string]string{ - "Name": metricName, + metric := cWMetricInfo{ + Name: metricName, + StorageResolution: 60, } if metricInfo.unit != "" { - metric["Unit"] = metricInfo.unit + metric.Unit = metricInfo.unit + } + if storRes, ok := groupedMetric.labels[emfStorageResolutionAttribute]; ok { + if storResInt, err := strconv.Atoi(storRes); err == nil { + metric.StorageResolution = storResInt + } } metricDeclKey := fmt.Sprint(metricDeclIdx) if group, ok := metricDeclGroups[metricDeclKey]; ok { @@ -311,7 +334,7 @@ func groupedMetricToCWMeasurementsWithFilters(groupedMetric *groupedMetric, conf } else { metricDeclGroups[metricDeclKey] = &metricDeclarationGroup{ metricDeclIdxList: metricDeclIdx, - metrics: []map[string]string{metric}, + metrics: []cWMetricInfo{metric}, } } } @@ -406,7 +429,6 @@ func translateCWMetricToEMF(cWMetric *cWMetrics, config *Config) (*cwlogs.Event, "CloudWatchMetrics": cWMetric.measurements, "Timestamp": cWMetric.timestampMs, } - } } @@ -450,7 +472,6 @@ func translateCWMetricToEMF(cWMetric *cWMetrics, config *Config) (*cwlogs.Event, func translateGroupedMetricToEmf(groupedMetric *groupedMetric, config *Config, defaultLogStream string) (*cwlogs.Event, error) { cWMetric := translateGroupedMetricToCWMetric(groupedMetric, config) event, err := translateCWMetricToEMF(cWMetric, config) - if err != nil { return nil, err } @@ -467,3 +488,14 @@ func translateGroupedMetricToEmf(groupedMetric *groupedMetric, config *Config, d return event, nil } + +func filterAWSEMFAttributes(labels map[string]string) map[string]string { + // remove any labels that are attributes specific to AWS EMF Exporter + filteredLabels := make(map[string]string) + for labelName := range labels { + if labelName != emfStorageResolutionAttribute { + filteredLabels[labelName] = labels[labelName] + } + } + return filteredLabels +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/util.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/util.go index 30e5e755f9..0c92c9be95 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/util.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter/util.go @@ -11,7 +11,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" "go.uber.org/zap" ) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/README.md index cd9174c5a9..8c35cf89fc 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/README.md @@ -8,7 +8,7 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fawsxray%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fawsxray) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fawsxray%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fawsxray) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@wangzlei](https://www.github.com/wangzlei), [@srprash](https://www.github.com/srprash) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/awsxray.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/awsxray.go index 1378b9de4f..dc01d1d8f9 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/awsxray.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/awsxray.go @@ -48,7 +48,7 @@ func newTracesExporter( opts = append(opts, telemetry.WithLogger(set.Logger)) sender = registry.Register(set.ID, cfg.TelemetryConfig, xrayClient, opts...) } - return exporterhelper.NewTracesExporter( + return exporterhelper.NewTraces( context.TODO(), set, cfg, diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/aws.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/aws.go index 1eff8f3cd1..20002ce3fc 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/aws.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/aws.go @@ -9,7 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" awsxray "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray" ) @@ -230,7 +230,7 @@ func makeAws(attributes map[string]pcommon.Value, resource pcommon.Resource, log case logGroups != (pcommon.Slice{}) && logGroups.Len() > 0: cwl = getLogGroupMetadata(logGroups, false) case logGroupNames != nil: - var configSlice = pcommon.NewSlice() + configSlice := pcommon.NewSlice() configSlice.EnsureCapacity(len(logGroupNames)) for _, s := range logGroupNames { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/cause.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/cause.go index 36edb287c3..35acc84d40 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/cause.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/cause.go @@ -14,21 +14,24 @@ import ( "github.com/aws/aws-sdk-go/aws" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" awsxray "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray" ) // ExceptionEventName the name of the exception event. // TODO: Remove this when collector defines this semantic convention. -const ExceptionEventName = "exception" -const AwsIndividualHTTPEventName = "HTTP request failure" -const AwsIndividualHTTPErrorEventType = "aws.http.error.event" -const AwsIndividualHTTPErrorCodeAttr = "http.response.status_code" -const AwsIndividualHTTPErrorMsgAttr = "aws.http.error_message" +const ( + ExceptionEventName = "exception" + AwsIndividualHTTPEventName = "HTTP request failure" + AwsIndividualHTTPErrorEventType = "aws.http.error.event" + AwsIndividualHTTPErrorCodeAttr = "http.response.status_code" + AwsIndividualHTTPErrorMsgAttr = "aws.http.error_message" +) func makeCause(span ptrace.Span, attributes map[string]pcommon.Value, resource pcommon.Resource) (isError, isFault, isThrottle bool, - filtered map[string]pcommon.Value, cause *awsxray.CauseData) { + filtered map[string]pcommon.Value, cause *awsxray.CauseData, +) { status := span.Status() filtered = attributes @@ -112,7 +115,9 @@ func makeCause(span ptrace.Span, attributes map[string]pcommon.Value, resource p cause = &awsxray.CauseData{ Type: awsxray.CauseTypeObject, CauseObject: awsxray.CauseObject{ - Exceptions: exceptions}} + Exceptions: exceptions, + }, + } case status.Code() != ptrace.StatusCodeError: cause = nil diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/http.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/http.go index f1f135dafe..e761eae7e0 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/http.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/http.go @@ -10,7 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" awsxray "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray" ) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/segment.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/segment.go index 9bb8582d14..849416bcd2 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/segment.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/segment.go @@ -18,7 +18,7 @@ import ( "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.8.0" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" awsxray "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil" @@ -46,21 +46,17 @@ const ( k8sRemoteNamespace = "K8s.RemoteNamespace" ) -var ( - // reInvalidSpanCharacters defines the invalid letters in a span name as per - // Allowed characters for X-Ray Segment Name: - // Unicode letters, numbers, and whitespace, and the following symbols: _, ., :, /, %, &, #, =, +, \, -, @ - // Doc: https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html - reInvalidSpanCharacters = regexp.MustCompile(`[^ 0-9\p{L}N_.:/%&#=+\-@]`) -) - -var ( - remoteXrayExporterDotConverter = featuregate.GlobalRegistry().MustRegister( - "exporter.xray.allowDot", - featuregate.StageBeta, - featuregate.WithRegisterDescription("X-Ray Exporter will no longer convert . to _ in annotation keys when this feature gate is enabled. "), - featuregate.WithRegisterFromVersion("v0.97.0"), - ) +// reInvalidSpanCharacters defines the invalid letters in a span name as per +// Allowed characters for X-Ray Segment Name: +// Unicode letters, numbers, and whitespace, and the following symbols: _, ., :, /, %, &, #, =, +, \, -, @ +// Doc: https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html +var reInvalidSpanCharacters = regexp.MustCompile(`[^ 0-9\p{L}N_.:/%&#=+\-@]`) + +var remoteXrayExporterDotConverter = featuregate.GlobalRegistry().MustRegister( + "exporter.xray.allowDot", + featuregate.StageBeta, + featuregate.WithRegisterDescription("X-Ray Exporter will no longer convert . to _ in annotation keys when this feature gate is enabled. "), + featuregate.WithRegisterFromVersion("v0.97.0"), ) const ( @@ -90,9 +86,7 @@ var removeAnnotationsFromServiceSegment = []string{ k8sRemoteNamespace, } -var ( - writers = newWriterPool(2048) -) +var writers = newWriterPool(2048) // MakeSegmentDocuments converts spans to json documents func MakeSegmentDocuments(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) ([]string, error) { @@ -143,13 +137,12 @@ func addNamespaceToSubsegmentWithRemoteService(span ptrace.Span, segment *awsxra } func MakeDependencySubsegmentForLocalRootDependencySpan(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool, serviceSegmentID pcommon.SpanID) (*awsxray.Segment, error) { - var dependencySpan = ptrace.NewSpan() + dependencySpan := ptrace.NewSpan() span.CopyTo(dependencySpan) dependencySpan.SetParentSpanID(serviceSegmentID) dependencySubsegment, err := MakeSegment(dependencySpan, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return nil, err } @@ -187,7 +180,6 @@ func MakeServiceSegmentForLocalRootDependencySpan(span ptrace.Span, resource pco } serviceSegment, err := MakeSegment(serviceSpan, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return nil, err } @@ -234,7 +226,6 @@ func MakeServiceSegmentForLocalRootDependencySpan(span ptrace.Span, resource pco func MakeServiceSegmentForLocalRootSpanWithoutDependency(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) ([]*awsxray.Segment, error) { segment, err := MakeSegment(span, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return nil, err } @@ -247,7 +238,6 @@ func MakeServiceSegmentForLocalRootSpanWithoutDependency(span ptrace.Span, resou func MakeNonLocalRootSegment(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) ([]*awsxray.Segment, error) { segment, err := MakeSegment(span, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return nil, err } @@ -259,7 +249,7 @@ func MakeNonLocalRootSegment(span ptrace.Span, resource pcommon.Resource, indexe func MakeServiceSegmentAndDependencySubsegment(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) ([]*awsxray.Segment, error) { // If it is a local root span and a dependency span, we need to make a segment and subsegment representing the local service and remote service, respectively. - var serviceSegmentID = newSegmentID() + serviceSegmentID := newSegmentID() var segments []*awsxray.Segment // Make Dependency Subsegment @@ -296,7 +286,6 @@ func MakeSegmentsFromSpan(span ptrace.Span, resource pcommon.Resource, indexedAt // MakeSegmentDocumentString will be deprecated in the future func MakeSegmentDocumentString(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) (string, error) { segment, err := MakeSegment(span, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return "", err } @@ -612,7 +601,8 @@ func addSpecialAttributes(attributes map[string]pcommon.Value, indexedAttrs []st } func makeXRayAttributes(attributes map[string]pcommon.Value, resource pcommon.Resource, storeResource bool, indexedAttrs []string, indexAllAttrs bool) ( - string, map[string]any, map[string]map[string]any) { + string, map[string]any, map[string]map[string]any, +) { var ( annotations = map[string]any{} metadata = map[string]map[string]any{} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/service.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/service.go index e6d32cb961..4977980825 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/service.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/service.go @@ -5,7 +5,7 @@ package translator // import "github.com/open-telemetry/opentelemetry-collector- import ( "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" awsxray "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray" ) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/span_links.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/span_links.go index 7a262b2fa5..c7b3df4734 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/span_links.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/span_links.go @@ -15,11 +15,10 @@ func makeSpanLinks(links ptrace.SpanLinkSlice, skipTimestampValidation bool) ([] for i := 0; i < links.Len(); i++ { var spanLinkData awsxray.SpanLinkData - var link = links.At(i) + link := links.At(i) - var spanID = link.SpanID().String() + spanID := link.SpanID().String() traceID, err := convertToAmazonTraceID(link.TraceID(), skipTimestampValidation) - if err != nil { return nil, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/sql.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/sql.go index 89e9e4876b..a69d2525f8 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/sql.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator/sql.go @@ -6,7 +6,7 @@ package translator // import "github.com/open-telemetry/opentelemetry-collector- import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" awsxray "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray" ) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/README.md index bc9803f3ba..73524f7959 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/README.md @@ -3,15 +3,13 @@ | Status | | | ------------- |-----------| -| Stability | [alpha]: logs | -| | [beta]: traces, metrics | +| Stability | [beta]: traces, metrics, logs | | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fdatadog%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fdatadog) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fdatadog%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fdatadog) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@dineshg13](https://www.github.com/dineshg13), [@liustanley](https://www.github.com/liustanley), [@songy23](https://www.github.com/songy23), [@mackjmr](https://www.github.com/mackjmr), [@ankitpatel96](https://www.github.com/ankitpatel96) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@mx-psi](https://www.github.com/mx-psi), [@dineshg13](https://www.github.com/dineshg13), [@liustanley](https://www.github.com/liustanley), [@songy23](https://www.github.com/songy23), [@mackjmr](https://www.github.com/mackjmr), [@ankitpatel96](https://www.github.com/ankitpatel96), [@jade-guiton-dd](https://www.github.com/jade-guiton-dd) | | Emeritus | [@gbbr](https://www.github.com/gbbr) | -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config.go index 251c4fc845..9409f86428 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config.go @@ -5,674 +5,158 @@ package datadogexporter // import "github.com/open-telemetry/opentelemetry-colle import ( "encoding" - "errors" - "fmt" - "regexp" - "strings" - "time" - "github.com/DataDog/datadog-agent/pkg/util/hostname/validate" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/config/configopaque" - "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.uber.org/zap" -) -var ( - errUnsetAPIKey = errors.New("api.key is not set") - errNoMetadata = errors.New("only_metadata can't be enabled when host_metadata::enabled = false or host_metadata::hostname_source != first_resource") - errEmptyEndpoint = errors.New("endpoint cannot be empty") + datadogconfig "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config" ) const ( + // Deprecated: [v0.110.0] Use `datadogconfig.TypeStr` instead. // DefaultSite is the default site of the Datadog intake to send data to - DefaultSite = "datadoghq.com" + DefaultSite = datadogconfig.DefaultSite ) +// Deprecated: [v0.110.0] Use `datadogconfig.TypeStr` instead. // APIConfig defines the API configuration options -type APIConfig struct { - // Key is the Datadog API key to associate your Agent's data with your organization. - // Create a new API key here: https://app.datadoghq.com/account/settings - Key configopaque.String `mapstructure:"key"` - - // Site is the site of the Datadog intake to send data to. - // The default value is "datadoghq.com". - Site string `mapstructure:"site"` - - // FailOnInvalidKey states whether to exit at startup on invalid API key. - // The default value is false. - FailOnInvalidKey bool `mapstructure:"fail_on_invalid_key"` -} +type APIConfig = datadogconfig.APIConfig +// Deprecated: [v0.110.0] Use `datadogconfig.MetricsConfig` instead. // MetricsConfig defines the metrics exporter specific configuration options -type MetricsConfig struct { - // DeltaTTL defines the time that previous points of a cumulative monotonic - // metric are kept in memory to calculate deltas - DeltaTTL int64 `mapstructure:"delta_ttl"` - - // TCPAddr.Endpoint is the host of the Datadog intake server to send metrics to. - // If unset, the value is obtained from the Site. - confignet.TCPAddrConfig `mapstructure:",squash"` - - ExporterConfig MetricsExporterConfig `mapstructure:",squash"` +type MetricsConfig = datadogconfig.MetricsConfig - // HistConfig defines the export of OTLP Histograms. - HistConfig HistogramConfig `mapstructure:"histograms"` - - // SumConfig defines the export of OTLP Sums. - SumConfig SumConfig `mapstructure:"sums"` - - // SummaryConfig defines the export for OTLP Summaries. - SummaryConfig SummaryConfig `mapstructure:"summaries"` -} - -type HistogramMode string +// Deprecated: [v0.110.0] Use `datadogconfig.HistogramMode` instead. +// HistogramMode is the export mode for OTLP Histogram metrics. +type HistogramMode = datadogconfig.HistogramMode const ( // HistogramModeNoBuckets reports no bucket histogram metrics. .sum and .count metrics will still be sent // if `send_count_sum_metrics` is enabled. - HistogramModeNoBuckets HistogramMode = "nobuckets" + HistogramModeNoBuckets HistogramMode = datadogconfig.HistogramModeNoBuckets // HistogramModeCounters reports histograms as Datadog counts, one metric per bucket. - HistogramModeCounters HistogramMode = "counters" + HistogramModeCounters HistogramMode = datadogconfig.HistogramModeCounters // HistogramModeDistributions reports histograms as Datadog distributions (recommended). - HistogramModeDistributions HistogramMode = "distributions" + HistogramModeDistributions HistogramMode = datadogconfig.HistogramModeDistributions ) var _ encoding.TextUnmarshaler = (*HistogramMode)(nil) -func (hm *HistogramMode) UnmarshalText(in []byte) error { - switch mode := HistogramMode(in); mode { - case HistogramModeCounters, HistogramModeDistributions, HistogramModeNoBuckets: - *hm = mode - return nil - default: - return fmt.Errorf("invalid histogram mode %q", mode) - } -} - +// Deprecated: [v0.110.0] Use `datadogconfig.HistogramConfig` instead. // HistogramConfig customizes export of OTLP Histograms. -type HistogramConfig struct { - // Mode for exporting histograms. Valid values are 'distributions', 'counters' or 'nobuckets'. - // - 'distributions' sends histograms as Datadog distributions (recommended). - // - 'counters' sends histograms as Datadog counts, one metric per bucket. - // - 'nobuckets' sends no bucket histogram metrics. Aggregation metrics will still be sent - // if `send_aggregation_metrics` is enabled. - // - // The current default is 'distributions'. - Mode HistogramMode `mapstructure:"mode"` - - // SendCountSum states if the export should send .sum and .count metrics for histograms. - // The default is false. - // Deprecated: [v0.75.0] Use `send_aggregation_metrics` (HistogramConfig.SendAggregations) instead. - SendCountSum bool `mapstructure:"send_count_sum_metrics"` - - // SendAggregations states if the exporter should send .sum, .count, .min and .max metrics for histograms. - // The default is false. - SendAggregations bool `mapstructure:"send_aggregation_metrics"` -} - -func (c *HistogramConfig) validate() error { - if c.Mode == HistogramModeNoBuckets && !c.SendAggregations { - return fmt.Errorf("'nobuckets' mode and `send_aggregation_metrics` set to false will send no histogram metrics") - } - return nil -} +type HistogramConfig = datadogconfig.HistogramConfig +// Deprecated: [v0.110.0] Use `datadogconfig.CumulativeMonotonicMode` instead. // CumulativeMonotonicSumMode is the export mode for OTLP Sum metrics. -type CumulativeMonotonicSumMode string +type CumulativeMonotonicSumMode = datadogconfig.CumulativeMonotonicSumMode const ( + // Deprecated: [v0.110.0] Use `datadogconfig.CumulativeMonotonicSumMode` instead. // CumulativeMonotonicSumModeToDelta calculates delta for // cumulative monotonic sum metrics in the client side and reports // them as Datadog counts. - CumulativeMonotonicSumModeToDelta CumulativeMonotonicSumMode = "to_delta" + CumulativeMonotonicSumModeToDelta CumulativeMonotonicSumMode = datadogconfig.CumulativeMonotonicSumModeToDelta + // Deprecated: [v0.110.0] Use `datadogconfig.CumulativeMonotonicSumMode` instead. // CumulativeMonotonicSumModeRawValue reports the raw value for // cumulative monotonic sum metrics as a Datadog gauge. - CumulativeMonotonicSumModeRawValue CumulativeMonotonicSumMode = "raw_value" + CumulativeMonotonicSumModeRawValue CumulativeMonotonicSumMode = datadogconfig.CumulativeMonotonicSumModeRawValue ) var _ encoding.TextUnmarshaler = (*CumulativeMonotonicSumMode)(nil) -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (sm *CumulativeMonotonicSumMode) UnmarshalText(in []byte) error { - switch mode := CumulativeMonotonicSumMode(in); mode { - case CumulativeMonotonicSumModeToDelta, - CumulativeMonotonicSumModeRawValue: - *sm = mode - return nil - default: - return fmt.Errorf("invalid cumulative monotonic sum mode %q", mode) - } -} - +// Deprecated: [v0.110.0] Use `datadogconfig.InitialValueMode` instead. // InitialValueMode defines what the exporter should do with the initial value // of a time series when transforming from cumulative to delta. -type InitialValueMode string +type InitialValueMode = datadogconfig.InitialValueMode const ( // InitialValueModeAuto reports the initial value if its start timestamp // is set and it happens after the process was started. - InitialValueModeAuto InitialValueMode = "auto" + InitialValueModeAuto InitialValueMode = datadogconfig.InitialValueModeAuto // InitialValueModeDrop always drops the initial value. - InitialValueModeDrop InitialValueMode = "drop" + InitialValueModeDrop InitialValueMode = datadogconfig.InitialValueModeDrop // InitialValueModeKeep always reports the initial value. - InitialValueModeKeep InitialValueMode = "keep" + InitialValueModeKeep InitialValueMode = datadogconfig.InitialValueModeKeep ) var _ encoding.TextUnmarshaler = (*InitialValueMode)(nil) -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (iv *InitialValueMode) UnmarshalText(in []byte) error { - switch mode := InitialValueMode(in); mode { - case InitialValueModeAuto, - InitialValueModeDrop, - InitialValueModeKeep: - *iv = mode - return nil - default: - return fmt.Errorf("invalid initial value mode %q", mode) - } -} - +// Deprecated: [v0.110.0] Use `datadogconfig.SumConfig` instead. // SumConfig customizes export of OTLP Sums. -type SumConfig struct { - // CumulativeMonotonicMode is the mode for exporting OTLP Cumulative Monotonic Sums. - // Valid values are 'to_delta' or 'raw_value'. - // - 'to_delta' calculates delta for cumulative monotonic sums and sends it as a Datadog count. - // - 'raw_value' sends the raw value of cumulative monotonic sums as Datadog gauges. - // - // The default is 'to_delta'. - // See https://docs.datadoghq.com/metrics/otlp/?tab=sum#mapping for details and examples. - CumulativeMonotonicMode CumulativeMonotonicSumMode `mapstructure:"cumulative_monotonic_mode"` - - // InitialCumulativeMonotonicMode defines the behavior of the exporter when receiving the first value - // of a cumulative monotonic sum. - InitialCumulativeMonotonicMode InitialValueMode `mapstructure:"initial_cumulative_monotonic_value"` -} +type SumConfig = datadogconfig.SumConfig +// Deprecated: [v0.110.0] Use `datadogconfig.SummaryMode` instead. // SummaryMode is the export mode for OTLP Summary metrics. -type SummaryMode string +type SummaryMode = datadogconfig.SummaryMode const ( // SummaryModeNoQuantiles sends no `.quantile` metrics. `.sum` and `.count` metrics will still be sent. - SummaryModeNoQuantiles SummaryMode = "noquantiles" + SummaryModeNoQuantiles SummaryMode = datadogconfig.SummaryModeNoQuantiles // SummaryModeGauges sends `.quantile` metrics as gauges tagged by the quantile. - SummaryModeGauges SummaryMode = "gauges" + SummaryModeGauges SummaryMode = datadogconfig.SummaryModeGauges ) var _ encoding.TextUnmarshaler = (*SummaryMode)(nil) -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (sm *SummaryMode) UnmarshalText(in []byte) error { - switch mode := SummaryMode(in); mode { - case SummaryModeNoQuantiles, - SummaryModeGauges: - *sm = mode - return nil - default: - return fmt.Errorf("invalid summary mode %q", mode) - } -} - +// Deprecated: [v0.110.0] Use `datadogconfig.SummaryMode` instead. // SummaryConfig customizes export of OTLP Summaries. -type SummaryConfig struct { - // Mode is the the mode for exporting OTLP Summaries. - // Valid values are 'noquantiles' or 'gauges'. - // - 'noquantiles' sends no `.quantile` metrics. `.sum` and `.count` metrics will still be sent. - // - 'gauges' sends `.quantile` metrics as gauges tagged by the quantile. - // - // The default is 'gauges'. - // See https://docs.datadoghq.com/metrics/otlp/?tab=summary#mapping for details and examples. - Mode SummaryMode `mapstructure:"mode"` -} +type SummaryConfig = datadogconfig.SummaryConfig +// Deprecated: [v0.110.0] Use `datadogconfig.MetricsExporterConfig` instead. // MetricsExporterConfig provides options for a user to customize the behavior of the // metrics exporter -type MetricsExporterConfig struct { - // ResourceAttributesAsTags, if set to true, will use the exporterhelper feature to transform all - // resource attributes into metric labels, which are then converted into tags - ResourceAttributesAsTags bool `mapstructure:"resource_attributes_as_tags"` - - // InstrumentationScopeMetadataAsTags, if set to true, adds the name and version of the - // instrumentation scope that created a metric to the metric tags - InstrumentationScopeMetadataAsTags bool `mapstructure:"instrumentation_scope_metadata_as_tags"` -} +type MetricsExporterConfig = datadogconfig.MetricsExporterConfig +// Deprecated: [v0.110.0] Use `datadogconfig.TracesExporterConfig` instead. // TracesConfig defines the traces exporter specific configuration options -type TracesConfig struct { - // TCPAddr.Endpoint is the host of the Datadog intake server to send traces to. - // If unset, the value is obtained from the Site. - confignet.TCPAddrConfig `mapstructure:",squash"` - - // ignored resources - // A blacklist of regular expressions can be provided to disable certain traces based on their resource name - // all entries must be surrounded by double quotes and separated by commas. - // ignore_resources: ["(GET|POST) /healthcheck"] - IgnoreResources []string `mapstructure:"ignore_resources"` - - // SpanNameRemappings is the map of datadog span names and preferred name to map to. This can be used to - // automatically map Datadog Span Operation Names to an updated value. All entries should be key/value pairs. - // span_name_remappings: - // io.opentelemetry.javaagent.spring.client: spring.client - // instrumentation:express.server: express - // go.opentelemetry.io_contrib_instrumentation_net_http_otelhttp.client: http.client - SpanNameRemappings map[string]string `mapstructure:"span_name_remappings"` - - // If set to true the OpenTelemetry span name will used in the Datadog resource name. - // If set to false the resource name will be filled with the instrumentation library name + span kind. - // The default value is `false`. - SpanNameAsResourceName bool `mapstructure:"span_name_as_resource_name"` - - // If set to true, enables an additional stats computation check on spans to see they have an eligible `span.kind` (server, consumer, client, producer). - // If enabled, a span with an eligible `span.kind` will have stats computed. If disabled, only top-level and measured spans will have stats computed. - // NOTE: For stats computed from OTel traces, only top-level spans are considered when this option is off. - // If you are sending OTel traces and want stats on non-top-level spans, this flag will need to be enabled. - // If you are sending OTel traces and do not want stats computed by span kind, you need to disable this flag and disable `compute_top_level_by_span_kind`. - ComputeStatsBySpanKind bool `mapstructure:"compute_stats_by_span_kind"` - - // If set to true, root spans and spans with a server or consumer `span.kind` will be marked as top-level. - // Additionally, spans with a client or producer `span.kind` will have stats computed. - // Enabling this config option may increase the number of spans that generate trace metrics, and may change which spans appear as top-level in Datadog. - // ComputeTopLevelBySpanKind needs to be enabled in both the Datadog connector and Datadog exporter configs if both components are being used. - // The default value is `false`. - ComputeTopLevelBySpanKind bool `mapstructure:"compute_top_level_by_span_kind"` - - // If set to true, enables `peer.service` aggregation in the exporter. If disabled, aggregated trace stats will not include `peer.service` as a dimension. - // For the best experience with `peer.service`, it is recommended to also enable `compute_stats_by_span_kind`. - // If enabling both causes the datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first. - // If the overhead remains high, it will be due to a high cardinality of `peer.service` values from the traces. You may need to check your instrumentation. - // Deprecated: Please use PeerTagsAggregation instead - PeerServiceAggregation bool `mapstructure:"peer_service_aggregation"` - - // If set to true, enables aggregation of peer related tags (e.g., `peer.service`, `db.instance`, etc.) in the datadog exporter. - // If disabled, aggregated trace stats will not include these tags as dimensions on trace metrics. - // For the best experience with peer tags, Datadog also recommends enabling `compute_stats_by_span_kind`. - // If you are using an OTel tracer, it's best to have both enabled because client/producer spans with relevant peer tags - // may not be marked by the datadog exporter as top-level spans. - // If enabling both causes the datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first. - // A high cardinality of peer tags or APM resources can also contribute to higher CPU and memory consumption. - // You can check for the cardinality of these fields by making trace search queries in the Datadog UI. - // The default list of peer tags can be found in https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/stats/concentrator.go. - PeerTagsAggregation bool `mapstructure:"peer_tags_aggregation"` - - // [BETA] Optional list of supplementary peer tags that go beyond the defaults. The Datadog backend validates all tags - // and will drop ones that are unapproved. The default set of peer tags can be found at - // https://github.com/DataDog/datadog-agent/blob/505170c4ac8c3cbff1a61cf5f84b28d835c91058/pkg/trace/stats/concentrator.go#L55. - PeerTags []string `mapstructure:"peer_tags"` - - // TraceBuffer specifies the number of Datadog Agent TracerPayloads to buffer before dropping. - // The default value is 0, meaning the Datadog Agent TracerPayloads are unbuffered. - TraceBuffer int `mapstructure:"trace_buffer"` - - // flushInterval defines the interval in seconds at which the writer flushes traces - // to the intake; used in tests. - flushInterval float64 -} +type TracesConfig = datadogconfig.TracesExporterConfig +// Deprecated: [v0.110.0] Use `datadogconfig.LogsConfig` instead. // LogsConfig defines logs exporter specific configuration -type LogsConfig struct { - // TCPAddr.Endpoint is the host of the Datadog intake server to send logs to. - // If unset, the value is obtained from the Site. - confignet.TCPAddrConfig `mapstructure:",squash"` - - // DumpPayloads report whether payloads should be dumped when logging level is debug. - // Note: this config option does not apply when the `exporter.datadogexporter.UseLogsAgentExporter` feature flag is enabled (now enabled by default). - // Deprecated: This config option is not supported in the Datadog Agent logs pipeline. - DumpPayloads bool `mapstructure:"dump_payloads"` - - // UseCompression enables the logs agent to compress logs before sending them. - // Note: this config option does not apply when the `exporter.datadogexporter.UseLogsAgentExporter` feature flag is disabled. - UseCompression bool `mapstructure:"use_compression"` - - // CompressionLevel accepts values from 0 (no compression) to 9 (maximum compression but higher resource usage). - // Only takes effect if UseCompression is set to true. - // Note: this config option does not apply when the `exporter.datadogexporter.UseLogsAgentExporter` feature flag is disabled. - CompressionLevel int `mapstructure:"compression_level"` - - // BatchWait represents the maximum time the logs agent waits to fill each batch of logs before sending. - // Note: this config option does not apply when the `exporter.datadogexporter.UseLogsAgentExporter` feature flag is disabled. - BatchWait int `mapstructure:"batch_wait"` -} +type LogsConfig = datadogconfig.LogsConfig +// Deprecated: [v0.110.0] Use `datadogconfig.TagsConfig` instead. // TagsConfig defines the tag-related configuration // It is embedded in the configuration -type TagsConfig struct { - // Hostname is the fallback hostname used for payloads without hostname-identifying attributes. - // This option will NOT change the hostname applied to your metrics, traces and logs if they already have hostname-identifying attributes. - // If unset, the hostname will be determined automatically. See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#fallback-hostname-logic for details. - // - // Prefer using the `datadog.host.name` resource attribute over using this setting. - // See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#general-hostname-semantic-conventions for details. - Hostname string `mapstructure:"hostname"` -} +type TagsConfig = datadogconfig.TagsConfig +// Deprecated: [v0.110.0] Use `datadogconfig.HostnameSource` instead. // HostnameSource is the source for the hostname of host metadata. -type HostnameSource string +type HostnameSource = datadogconfig.HostnameSource const ( + // Deprecated: [v0.110.0] Use `datadogconfig.HostnameSource` instead. // HostnameSourceFirstResource picks the host metadata hostname from the resource // attributes on the first OTLP payload that gets to the exporter. If it is lacking any // hostname-like attributes, it will fallback to 'config_or_system' behavior (see below). // // Do not use this hostname source if receiving data from multiple hosts. - HostnameSourceFirstResource HostnameSource = "first_resource" + HostnameSourceFirstResource HostnameSource = datadogconfig.HostnameSourceFirstResource + // Deprecated: [v0.110.0] Use `datadogconfig.HostnameSource` instead. // HostnameSourceConfigOrSystem picks the host metadata hostname from the 'hostname' setting, // and if this is empty, from available system APIs and cloud provider endpoints. - HostnameSourceConfigOrSystem HostnameSource = "config_or_system" + HostnameSourceConfigOrSystem HostnameSource = datadogconfig.HostnameSourceConfigOrSystem ) var _ encoding.TextUnmarshaler = (*HostnameSource)(nil) -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (sm *HostnameSource) UnmarshalText(in []byte) error { - switch mode := HostnameSource(in); mode { - case HostnameSourceFirstResource, - HostnameSourceConfigOrSystem: - *sm = mode - return nil - default: - return fmt.Errorf("invalid host metadata hostname source %q", mode) - } -} - +// Deprecated: [v0.110.0] Use `datadogconfig.HostMetadataConfig` instead. // HostMetadataConfig defines the host metadata related configuration. // Host metadata is the information used for populating the infrastructure list, // the host map and providing host tags functionality. // // The exporter will send host metadata for a single host, whose name is chosen // according to `host_metadata::hostname_source`. -type HostMetadataConfig struct { - // Enabled enables the host metadata functionality. - Enabled bool `mapstructure:"enabled"` - - // HostnameSource is the source for the hostname of host metadata. - // This hostname is used for identifying the infrastructure list, host map and host tag information related to the host where the Datadog exporter is running. - // Changing this setting will not change the host used to tag your metrics, traces and logs in any way. - // For remote hosts, see https://docs.datadoghq.com/opentelemetry/schema_semantics/host_metadata/. - // - // Valid values are 'first_resource' and 'config_or_system': - // - 'first_resource' picks the host metadata hostname from the resource - // attributes on the first OTLP payload that gets to the exporter. - // If the first payload lacks hostname-like attributes, it will fallback to 'config_or_system'. - // **Do not use this hostname source if receiving data from multiple hosts**. - // - 'config_or_system' picks the host metadata hostname from the 'hostname' setting, - // If this is empty it will use available system APIs and cloud provider endpoints. - // - // The default is 'config_or_system'. - HostnameSource HostnameSource `mapstructure:"hostname_source"` - - // Tags is a list of host tags. - // These tags will be attached to telemetry signals that have the host metadata hostname. - // To attach tags to telemetry signals regardless of the host, use a processor instead. - Tags []string `mapstructure:"tags"` - - // sourceTimeout is the timeout to fetch from each provider - for example AWS IMDS. - // If unset, or set to zero duration, there will be no timeout applied. - // Default is no timeout. - sourceTimeout time.Duration -} +type HostMetadataConfig = datadogconfig.HostMetadataConfig +// Deprecated: [v0.110.0] Use `datadogconfig.Config` instead. // Config defines configuration for the Datadog exporter. -type Config struct { - confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - configretry.BackOffConfig `mapstructure:"retry_on_failure"` - - TagsConfig `mapstructure:",squash"` - - // API defines the Datadog API configuration. - API APIConfig `mapstructure:"api"` - - // Metrics defines the Metrics exporter specific configuration - Metrics MetricsConfig `mapstructure:"metrics"` - - // Traces defines the Traces exporter specific configuration - Traces TracesConfig `mapstructure:"traces"` - - // Logs defines the Logs exporter specific configuration - Logs LogsConfig `mapstructure:"logs"` - - // HostMetadata defines the host metadata specific configuration - HostMetadata HostMetadataConfig `mapstructure:"host_metadata"` - - // OnlyMetadata defines whether to only send metadata - // This is useful for agent-collector setups, so that - // metadata about a host is sent to the backend even - // when telemetry data is reported via a different host. - // - // This flag is incompatible with disabling host metadata, - // `use_resource_metadata`, or `host_metadata::hostname_source != first_resource` - OnlyMetadata bool `mapstructure:"only_metadata"` - - // Non-fatal warnings found during configuration loading. - warnings []error -} - -// logWarnings logs warning messages that were generated on unmarshaling. -func (c *Config) logWarnings(logger *zap.Logger) { - for _, err := range c.warnings { - logger.Warn(fmt.Sprintf("%v", err)) - } -} +type Config = datadogconfig.Config var _ component.Config = (*Config)(nil) -// Validate the configuration for errors. This is required by component.Config. -func (c *Config) Validate() error { - if err := validateClientConfig(c.ClientConfig); err != nil { - return err - } - - if c.OnlyMetadata && (!c.HostMetadata.Enabled || c.HostMetadata.HostnameSource != HostnameSourceFirstResource) { - return errNoMetadata - } - - if err := validate.ValidHostname(c.Hostname); c.Hostname != "" && err != nil { - return fmt.Errorf("hostname field is invalid: %w", err) - } - - if c.API.Key == "" { - return errUnsetAPIKey - } - - if c.Traces.IgnoreResources != nil { - for _, entry := range c.Traces.IgnoreResources { - _, err := regexp.Compile(entry) - if err != nil { - return fmt.Errorf("'%s' is not valid resource filter regular expression", entry) - } - } - } - - if c.Traces.SpanNameRemappings != nil { - for key, value := range c.Traces.SpanNameRemappings { - if value == "" { - return fmt.Errorf("'%s' is not valid value for span name remapping", value) - } - if key == "" { - return fmt.Errorf("'%s' is not valid key for span name remapping", key) - } - } - } - - err := c.Metrics.HistConfig.validate() - if err != nil { - return err - } - - return nil -} - -func validateClientConfig(cfg confighttp.ClientConfig) error { - var unsupported []string - if cfg.Auth != nil { - unsupported = append(unsupported, "auth") - } - if cfg.Endpoint != "" { - unsupported = append(unsupported, "endpoint") - } - if cfg.Compression != "" { - unsupported = append(unsupported, "compression") - } - if cfg.Headers != nil { - unsupported = append(unsupported, "headers") - } - if cfg.HTTP2ReadIdleTimeout != 0 { - unsupported = append(unsupported, "http2_read_idle_timeout") - } - if cfg.HTTP2PingTimeout != 0 { - unsupported = append(unsupported, "http2_ping_timeout") - } - - if len(unsupported) > 0 { - return fmt.Errorf("these confighttp client configs are currently not respected by Datadog exporter: %s", strings.Join(unsupported, ", ")) - } - return nil -} - -var _ error = (*renameError)(nil) - -// renameError is an error related to a renamed setting. -type renameError struct { - // oldName of the configuration option. - oldName string - // newName of the configuration option. - newName string - // issueNumber on opentelemetry-collector-contrib for tracking - issueNumber uint -} - -// List of settings that have been removed, but for which we keep a custom error. -var removedSettings = []renameError{ - { - oldName: "metrics::send_monotonic_counter", - newName: "metrics::sums::cumulative_monotonic_mode", - issueNumber: 8489, - }, - { - oldName: "tags", - newName: "host_metadata::tags", - issueNumber: 9099, - }, - { - oldName: "send_metadata", - newName: "host_metadata::enabled", - issueNumber: 9099, - }, - { - oldName: "use_resource_metadata", - newName: "host_metadata::hostname_source", - issueNumber: 9099, - }, - { - oldName: "metrics::report_quantiles", - newName: "metrics::summaries::mode", - issueNumber: 8845, - }, - { - oldName: "metrics::instrumentation_library_metadata_as_tags", - newName: "metrics::instrumentation_scope_as_tags", - issueNumber: 11135, - }, -} - -// Error implements the error interface. -func (e renameError) Error() string { - return fmt.Sprintf( - "%q was removed in favor of %q. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/%d", - e.oldName, - e.newName, - e.issueNumber, - ) -} - -func handleRemovedSettings(configMap *confmap.Conf) error { - var errs []error - for _, removedErr := range removedSettings { - if configMap.IsSet(removedErr.oldName) { - errs = append(errs, removedErr) - } - } - - return errors.Join(errs...) -} - var _ confmap.Unmarshaler = (*Config)(nil) - -// Unmarshal a configuration map into the configuration struct. -func (c *Config) Unmarshal(configMap *confmap.Conf) error { - if err := handleRemovedSettings(configMap); err != nil { - return err - } - - err := configMap.Unmarshal(c) - if err != nil { - return err - } - - // Add deprecation warnings for deprecated settings. - renamingWarnings, err := handleRenamedSettings(configMap, c) - if err != nil { - return err - } - c.warnings = append(c.warnings, renamingWarnings...) - - c.API.Key = configopaque.String(strings.TrimSpace(string(c.API.Key))) - - // If an endpoint is not explicitly set, override it based on the site. - if !configMap.IsSet("metrics::endpoint") { - c.Metrics.TCPAddrConfig.Endpoint = fmt.Sprintf("https://api.%s", c.API.Site) - } - if !configMap.IsSet("traces::endpoint") { - c.Traces.TCPAddrConfig.Endpoint = fmt.Sprintf("https://trace.agent.%s", c.API.Site) - } - if !configMap.IsSet("logs::endpoint") { - c.Logs.TCPAddrConfig.Endpoint = fmt.Sprintf("https://http-intake.logs.%s", c.API.Site) - } - - // Return an error if an endpoint is explicitly set to "" - if c.Metrics.TCPAddrConfig.Endpoint == "" || c.Traces.TCPAddrConfig.Endpoint == "" || c.Logs.TCPAddrConfig.Endpoint == "" { - return errEmptyEndpoint - } - - const ( - initialValueSetting = "metrics::sums::initial_cumulative_monotonic_value" - cumulMonoMode = "metrics::sums::cumulative_monotonic_mode" - ) - if configMap.IsSet(initialValueSetting) && c.Metrics.SumConfig.CumulativeMonotonicMode != CumulativeMonotonicSumModeToDelta { - return fmt.Errorf("%q can only be configured when %q is set to %q", - initialValueSetting, cumulMonoMode, CumulativeMonotonicSumModeToDelta) - } - - logsExporterSettings := []struct { - setting string - valid bool - }{ - {setting: "logs::dump_payloads", valid: !isLogsAgentExporterEnabled()}, - {setting: "logs::use_compression", valid: isLogsAgentExporterEnabled()}, - {setting: "logs::compression_level", valid: isLogsAgentExporterEnabled()}, - {setting: "logs::batch_wait", valid: isLogsAgentExporterEnabled()}, - } - for _, logsExporterSetting := range logsExporterSettings { - if configMap.IsSet(logsExporterSetting.setting) && !logsExporterSetting.valid { - enabledText := "enabled" - if !isLogsAgentExporterEnabled() { - enabledText = "disabled" - } - return fmt.Errorf("%v is not valid when the exporter.datadogexporter.UseLogsAgentExporter feature gate is %v", logsExporterSetting.setting, enabledText) - } - if logsExporterSetting.setting == "logs::dump_payloads" && logsExporterSetting.valid && configMap.IsSet(logsExporterSetting.setting) { - c.warnings = append(c.warnings, fmt.Errorf("%v is deprecated and will raise an error if set when the Datadog Agent logs pipeline is enabled by default in collector version v0.108.0", logsExporterSetting.setting)) - } - } - - return nil -} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/factory.go index dd6acd25ce..3ba0176239 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/factory.go @@ -22,7 +22,6 @@ import ( "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" @@ -37,6 +36,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata" + datadogconfig "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" ) @@ -79,8 +79,6 @@ func enableZorkianMetricExport() error { return featuregate.GlobalRegistry().Set(metricExportNativeClientFeatureGate.ID(), false) } -const metadataReporterPeriod = 30 * time.Minute - func consumeResource(metadataReporter *inframetadata.Reporter, res pcommon.Resource, logger *zap.Logger) { if err := metadataReporter.ConsumeResource(res); err != nil { logger.Warn("failed to consume resource for host metadata", zap.Error(err), zap.Any("resource", res)) @@ -124,7 +122,7 @@ func (f *factory) AttributesTranslator(set component.TelemetrySettings) (*attrib func (f *factory) Reporter(params exporter.Settings, pcfg hostmetadata.PusherConfig) (*inframetadata.Reporter, error) { f.onceReporter.Do(func() { pusher := hostmetadata.NewPusher(params, pcfg) - f.reporter, f.reporterErr = inframetadata.NewReporter(params.Logger, pusher, metadataReporterPeriod) + f.reporter, f.reporterErr = inframetadata.NewReporter(params.Logger, pusher, pcfg.ReporterPeriod) if f.reporterErr == nil { go func() { if err := f.reporter.Run(context.Background()); err != nil { @@ -178,66 +176,14 @@ func NewFactory() exporter.Factory { } func defaultClientConfig() confighttp.ClientConfig { - // do not use NewDefaultClientConfig for backwards-compatibility - return confighttp.ClientConfig{ - Timeout: 15 * time.Second, - } + client := confighttp.NewDefaultClientConfig() + client.Timeout = 15 * time.Second + return client } // createDefaultConfig creates the default exporter configuration func (f *factory) createDefaultConfig() component.Config { - return &Config{ - ClientConfig: defaultClientConfig(), - BackOffConfig: configretry.NewDefaultBackOffConfig(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), - - API: APIConfig{ - Site: "datadoghq.com", - }, - - Metrics: MetricsConfig{ - TCPAddrConfig: confignet.TCPAddrConfig{ - Endpoint: "https://api.datadoghq.com", - }, - DeltaTTL: 3600, - ExporterConfig: MetricsExporterConfig{ - ResourceAttributesAsTags: false, - InstrumentationScopeMetadataAsTags: false, - }, - HistConfig: HistogramConfig{ - Mode: "distributions", - SendAggregations: false, - }, - SumConfig: SumConfig{ - CumulativeMonotonicMode: CumulativeMonotonicSumModeToDelta, - InitialCumulativeMonotonicMode: InitialValueModeAuto, - }, - SummaryConfig: SummaryConfig{ - Mode: SummaryModeGauges, - }, - }, - - Traces: TracesConfig{ - TCPAddrConfig: confignet.TCPAddrConfig{ - Endpoint: "https://trace.agent.datadoghq.com", - }, - IgnoreResources: []string{}, - }, - - Logs: LogsConfig{ - TCPAddrConfig: confignet.TCPAddrConfig{ - Endpoint: "https://http-intake.logs.datadoghq.com", - }, - UseCompression: true, - CompressionLevel: 6, - BatchWait: 5, - }, - - HostMetadata: HostMetadataConfig{ - Enabled: true, - HostnameSource: HostnameSourceConfigOrSystem, - }, - } + return datadogconfig.CreateDefaultConfig() } // checkAndCastConfig checks the configuration type and its warnings, and casts it to @@ -247,7 +193,7 @@ func checkAndCastConfig(c component.Config, logger *zap.Logger) *Config { if !ok { panic("programming error: config structure is not of type *datadogexporter.Config") } - cfg.logWarnings(logger) + cfg.LogWarnings(logger) return cfg } @@ -289,7 +235,7 @@ func (f *factory) createMetricsExporter( c component.Config, ) (exporter.Metrics, error) { cfg := checkAndCastConfig(c, set.TelemetrySettings.Logger) - hostProvider, err := f.SourceProvider(set.TelemetrySettings, cfg.Hostname, cfg.HostMetadata.sourceTimeout) + hostProvider, err := f.SourceProvider(set.TelemetrySettings, cfg.Hostname, cfg.HostMetadata.GetSourceTimeout()) if err != nil { return nil, fmt.Errorf("failed to build hostname provider: %w", err) } @@ -358,13 +304,13 @@ func (f *factory) createMetricsExporter( pushMetricsFn = exp.PushMetricsDataScrubbed } - exporter, err := exporterhelper.NewMetricsExporter( + exporter, err := exporterhelper.NewMetrics( ctx, set, cfg, pushMetricsFn, // explicitly disable since we rely on http.Client timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0 * time.Second}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0 * time.Second}), // We use our own custom mechanism for retries, since we hit several endpoints. exporterhelper.WithRetry(configretry.BackOffConfig{Enabled: false}), // The metrics remapping code mutates data @@ -409,7 +355,7 @@ func (f *factory) createTracesExporter( wg sync.WaitGroup // waits for agent to exit ) - hostProvider, err := f.SourceProvider(set.TelemetrySettings, cfg.Hostname, cfg.HostMetadata.sourceTimeout) + hostProvider, err := f.SourceProvider(set.TelemetrySettings, cfg.Hostname, cfg.HostMetadata.GetSourceTimeout()) if err != nil { return nil, fmt.Errorf("failed to build hostname provider: %w", err) } @@ -472,13 +418,13 @@ func (f *factory) createTracesExporter( } } - return exporterhelper.NewTracesExporter( + return exporterhelper.NewTraces( ctx, set, cfg, pusher, // explicitly disable since we rely on http.Client timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0 * time.Second}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0 * time.Second}), // We don't do retries on traces because of deduping concerns on APM Events. exporterhelper.WithRetry(configretry.BackOffConfig{Enabled: false}), exporterhelper.WithQueue(cfg.QueueSettings), @@ -494,9 +440,22 @@ func (f *factory) createLogsExporter( ) (exporter.Logs, error) { cfg := checkAndCastConfig(c, set.TelemetrySettings.Logger) + if cfg.Logs.DumpPayloads && isLogsAgentExporterEnabled() { + set.Logger.Warn("logs::dump_payloads is not valid when the exporter.datadogexporter.UseLogsAgentExporter feature gate is enabled") + } + if cfg.Logs.UseCompression && !isLogsAgentExporterEnabled() { + set.Logger.Warn("logs::use_compression is not valid when the exporter.datadogexporter.UseLogsAgentExporter feature gate is disabled") + } + if cfg.Logs.CompressionLevel != 0 && !isLogsAgentExporterEnabled() { + set.Logger.Warn("logs::compression_level is not valid when the exporter.datadogexporter.UseLogsAgentExporter feature gate is disabled") + } + if cfg.Logs.BatchWait != 0 && !isLogsAgentExporterEnabled() { + set.Logger.Warn("logs::batch_wait is not valid when the exporter.datadogexporter.UseLogsAgentExporter feature gate is disabled") + } + var pusher consumer.ConsumeLogsFunc var logsAgent logsagentpipeline.LogsAgent - hostProvider, err := f.SourceProvider(set.TelemetrySettings, cfg.Hostname, cfg.HostMetadata.sourceTimeout) + hostProvider, err := f.SourceProvider(set.TelemetrySettings, cfg.Hostname, cfg.HostMetadata.GetSourceTimeout()) if err != nil { return nil, fmt.Errorf("failed to build hostname provider: %w", err) } @@ -546,13 +505,13 @@ func (f *factory) createLogsExporter( } pusher = exp.consumeLogs } - return exporterhelper.NewLogsExporter( + return exporterhelper.NewLogs( ctx, set, cfg, pusher, // explicitly disable since we rely on http.Client timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0 * time.Second}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0 * time.Second}), exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithShutdown(func(context.Context) error { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/hostmetadata.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/hostmetadata.go index 1338bed2fb..ead1696a44 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/hostmetadata.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/hostmetadata.go @@ -18,5 +18,6 @@ func newMetadataConfigfromConfig(cfg *Config) hostmetadata.PusherConfig { InsecureSkipVerify: cfg.TLSSetting.InsecureSkipVerify, ClientConfig: cfg.ClientConfig, RetrySettings: cfg.BackOffConfig, + ReporterPeriod: cfg.HostMetadata.ReporterPeriod, } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil/api.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil/api.go index 346591e7ea..33e71a700c 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil/api.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil/api.go @@ -6,6 +6,7 @@ package clientutil // import "github.com/open-telemetry/opentelemetry-collector- import ( "context" "errors" + "net/http" "github.com/DataDog/datadog-api-client-go/v2/api/datadog" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV1" @@ -45,7 +46,7 @@ func ValidateAPIKey(ctx context.Context, apiKey string, logger *zap.Logger, apiC return nil } if err != nil { - if httpresp != nil && httpresp.StatusCode == 403 { + if httpresp != nil && httpresp.StatusCode == http.StatusForbidden { return WrapError(ErrInvalidAPI, httpresp) } logger.Warn("Error while validating API key", zap.Error(err)) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil/error_converter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil/error_converter.go index b4b2417ce1..638c4d993c 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil/error_converter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/clientutil/error_converter.go @@ -18,5 +18,5 @@ func WrapError(err error, resp *http.Response) error { } func isNonRetriable(resp *http.Response) bool { - return resp.StatusCode == 400 || resp.StatusCode == 404 || resp.StatusCode == 413 || resp.StatusCode == 403 + return resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusNotFound || resp.StatusCode == http.StatusRequestEntityTooLarge || resp.StatusCode == http.StatusForbidden } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/config.go index d5c4a3e341..ad99d4f5bc 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/config.go @@ -4,6 +4,8 @@ package hostmetadata // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata" import ( + "time" + "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/configretry" ) @@ -26,4 +28,6 @@ type PusherConfig struct { ClientConfig confighttp.ClientConfig // RetrySettings of exporter. RetrySettings configretry.BackOffConfig + // ReporterPeriod is the period of the reporter goroutine. + ReporterPeriod time.Duration } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/host.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/host.go index c99e689ac7..99f267afc3 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/host.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/host.go @@ -72,7 +72,6 @@ func GetSourceProvider(set component.TelemetrySettings, configHostname string, t []string{"config", "azure", "ecs", "ec2", "gcp", "kubernetes", "system"}, timeout, ) - if err != nil { return nil, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/azure/provider.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/azure/provider.go index bf66f14273..e6decc49f9 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/azure/provider.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/azure/provider.go @@ -15,8 +15,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure" ) -var _ source.Provider = (*Provider)(nil) -var _ provider.ClusterNameProvider = (*Provider)(nil) +var ( + _ source.Provider = (*Provider)(nil) + _ provider.ClusterNameProvider = (*Provider)(nil) +) type Provider struct { detector azure.Provider diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/ec2/ec2.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/ec2/ec2.go index d0920ecc58..ef20a53821 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/ec2/ec2.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/ec2/ec2.go @@ -21,9 +21,7 @@ import ( ec2provider "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/aws/ec2" ) -var ( - defaultPrefixes = [3]string{"ip-", "domu", "ec2amaz-"} -) +var defaultPrefixes = [3]string{"ip-", "domu", "ec2amaz-"} type HostInfo struct { InstanceID string @@ -82,8 +80,10 @@ func (hi *HostInfo) GetHostname(_ *zap.Logger) string { return hi.EC2Hostname } -var _ source.Provider = (*Provider)(nil) -var _ provider.ClusterNameProvider = (*Provider)(nil) +var ( + _ source.Provider = (*Provider)(nil) + _ provider.ClusterNameProvider = (*Provider)(nil) +) type Provider struct { once sync.Once diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/gcp/provider.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/gcp/provider.go index 5951494a80..eeb7fb7c04 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/gcp/provider.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/gcp/provider.go @@ -15,8 +15,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/provider" ) -var _ source.Provider = (*Provider)(nil) -var _ provider.ClusterNameProvider = (*Provider)(nil) +var ( + _ source.Provider = (*Provider)(nil) + _ provider.ClusterNameProvider = (*Provider)(nil) +) var _ gcpDetector = gcp.NewDetector() diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/k8s/nodename.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/k8s/nodename.go index 70c919da2d..2431b2a9c3 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/k8s/nodename.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/k8s/nodename.go @@ -70,7 +70,6 @@ func newNodeNameProvider() nodeNameProvider { client, err := k8sconfig.MakeClient(k8sconfig.APIConfig{ AuthType: k8sconfig.AuthTypeServiceAccount, }) - if err != nil { return &nodeNameUnavailable{err: err} } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/generated_status.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/generated_status.go index f4bfd12de6..f746a701d7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/generated_status.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/generated_status.go @@ -12,7 +12,7 @@ var ( ) const ( - LogsStability = component.StabilityLevelAlpha TracesStability = component.StabilityLevelBeta MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta ) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/consumer.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/consumer.go index ae00f72370..2d43e604ea 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/consumer.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/consumer.go @@ -15,9 +15,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/sketches" ) -var _ metrics.Consumer = (*Consumer)(nil) -var _ metrics.HostConsumer = (*Consumer)(nil) -var _ metrics.TagsConsumer = (*Consumer)(nil) +var ( + _ metrics.Consumer = (*Consumer)(nil) + _ metrics.HostConsumer = (*Consumer)(nil) + _ metrics.TagsConsumer = (*Consumer)(nil) +) // Consumer implements metrics.Consumer. It records consumed metrics, sketches and // APM stats payloads. It provides them to the caller using the All method. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/consumer_deprecated.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/consumer_deprecated.go index c47c2acda3..0b71f2c98d 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/consumer_deprecated.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/consumer_deprecated.go @@ -14,9 +14,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/sketches" ) -var _ metrics.Consumer = (*ZorkianConsumer)(nil) -var _ metrics.HostConsumer = (*ZorkianConsumer)(nil) -var _ metrics.TagsConsumer = (*ZorkianConsumer)(nil) +var ( + _ metrics.Consumer = (*ZorkianConsumer)(nil) + _ metrics.HostConsumer = (*ZorkianConsumer)(nil) + _ metrics.TagsConsumer = (*ZorkianConsumer)(nil) +) // ZorkianConsumer implements metrics.Consumer. It records consumed metrics, sketches and // APM stats payloads. It provides them to the caller using the All method. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metadata.yaml index f4edf2dbf8..bb1f67478b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metadata.yaml @@ -3,11 +3,10 @@ type: datadog status: class: exporter stability: - alpha: [logs] - beta: [traces, metrics] + beta: [traces, metrics, logs] distributions: [contrib] codeowners: - active: [mx-psi, dineshg13, liustanley, songy23, mackjmr, ankitpatel96] + active: [mx-psi, dineshg13, liustanley, songy23, mackjmr, ankitpatel96, jade-guiton-dd] emeritus: [gbbr] tests: diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metrics_exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metrics_exporter.go index 6fa87508f4..ed2938e0a4 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metrics_exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metrics_exporter.go @@ -18,8 +18,8 @@ import ( "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" otlpmetrics "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.uber.org/zap" @@ -32,6 +32,18 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/scrub" ) +var metricRemappingDisableddFeatureGate = featuregate.GlobalRegistry().MustRegister( + "exporter.datadogexporter.metricremappingdisabled", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("When enabled the Datadog Exporter remaps OpenTelemetry semantic conventions to Datadog semantic conventions. This feature gate is only for internal use."), + featuregate.WithRegisterReferenceURL("https://docs.datadoghq.com/opentelemetry/schema_semantics/metrics_mapping/"), +) + +// isMetricRemappingDisabled returns true if the datadogexporter should generate Datadog-compliant metrics from OpenTelemetry metrics +func isMetricRemappingDisabled() bool { + return metricRemappingDisableddFeatureGate.IsEnabled() +} + type metricsExporter struct { params exporter.Settings cfg *Config @@ -50,43 +62,6 @@ type metricsExporter struct { getPushTime func() uint64 } -// translatorFromConfig creates a new metrics translator from the exporter -func translatorFromConfig(set component.TelemetrySettings, cfg *Config, attrsTranslator *attributes.Translator, sourceProvider source.Provider, statsOut chan []byte) (*otlpmetrics.Translator, error) { - options := []otlpmetrics.TranslatorOption{ - otlpmetrics.WithDeltaTTL(cfg.Metrics.DeltaTTL), - otlpmetrics.WithFallbackSourceProvider(sourceProvider), - otlpmetrics.WithRemapping(), - } - - if cfg.Metrics.HistConfig.SendAggregations { - options = append(options, otlpmetrics.WithHistogramAggregations()) - } - - if cfg.Metrics.SummaryConfig.Mode == SummaryModeGauges { - options = append(options, otlpmetrics.WithQuantiles()) - } - - if cfg.Metrics.ExporterConfig.InstrumentationScopeMetadataAsTags { - options = append(options, otlpmetrics.WithInstrumentationScopeMetadataAsTags()) - } - - options = append(options, otlpmetrics.WithHistogramMode(otlpmetrics.HistogramMode(cfg.Metrics.HistConfig.Mode))) - - var numberMode otlpmetrics.NumberMode - switch cfg.Metrics.SumConfig.CumulativeMonotonicMode { - case CumulativeMonotonicSumModeRawValue: - numberMode = otlpmetrics.NumberModeRawValue - case CumulativeMonotonicSumModeToDelta: - numberMode = otlpmetrics.NumberModeCumulativeToDelta - } - options = append(options, otlpmetrics.WithNumberMode(numberMode)) - options = append(options, otlpmetrics.WithInitialCumulMonoValueMode( - otlpmetrics.InitialCumulMonoValueMode(cfg.Metrics.SumConfig.InitialCumulativeMonotonicMode))) - - options = append(options, otlpmetrics.WithStatsOut(statsOut)) - return otlpmetrics.NewTranslator(set, attrsTranslator, options...) -} - func newMetricsExporter( ctx context.Context, params exporter.Settings, @@ -98,7 +73,16 @@ func newMetricsExporter( metadataReporter *inframetadata.Reporter, statsOut chan []byte, ) (*metricsExporter, error) { - tr, err := translatorFromConfig(params.TelemetrySettings, cfg, attrsTranslator, sourceProvider, statsOut) + options := cfg.Metrics.ToTranslatorOpts() + options = append(options, otlpmetrics.WithFallbackSourceProvider(sourceProvider)) + options = append(options, otlpmetrics.WithStatsOut(statsOut)) + if isMetricRemappingDisabled() { + params.TelemetrySettings.Logger.Warn("Metric remapping is disabled in the Datadog exporter. OpenTelemetry metrics must be mapped to Datadog semantics before metrics are exported to Datadog (ex: via a processor).") + } else { + options = append(options, otlpmetrics.WithRemapping()) + } + + tr, err := otlpmetrics.NewTranslator(params.TelemetrySettings, attrsTranslator, options...) if err != nil { return nil, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/traces_exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/traces_exporter.go index 9254ffac74..a510c7e88a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/traces_exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/traces_exporter.go @@ -226,7 +226,7 @@ func newTraceAgentConfig(ctx context.Context, params exporter.Settings, cfg *Con return clientutil.NewHTTPClient(cfg.ClientConfig) } } - if v := cfg.Traces.flushInterval; v > 0 { + if v := cfg.Traces.GetFlushInterval(); v > 0 { acfg.TraceWriter.FlushPeriodSeconds = v } if v := cfg.Traces.TraceBuffer; v > 0 { @@ -238,6 +238,6 @@ func newTraceAgentConfig(ctx context.Context, params exporter.Settings, cfg *Con if cfg.Traces.ComputeTopLevelBySpanKind { acfg.Features["enable_otlp_compute_top_level_by_span_kind"] = struct{}{} } - tracelog.SetLogger(&zaplogger{params.Logger}) //TODO: This shouldn't be a singleton + tracelog.SetLogger(&zaplogger{params.Logger}) // TODO: This shouldn't be a singleton return acfg, nil } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/README.md index ec550717b6..1c7ab992f1 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/README.md @@ -4,15 +4,20 @@ | Status | | | ------------- |-----------| | Stability | [alpha]: traces, metrics, logs | -| Distributions | [core], [contrib] | +| Distributions | [core], [contrib], [k8s] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Ffile%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Ffile) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Ffile%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Ffile) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atingchen](https://www.github.com/atingchen) | -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[alpha]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#alpha [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[k8s]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s +Writes telemetry data to files on disk. + +Use the [OTLP JSON File receiver](../../receiver/otlpjsonfilereceiver/README.md) to read the data back into the collector (as long as the data was exported using OTLP JSON format). + Exporter supports the following features: + Support for writing pipeline data to a file. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/buffered_writer.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/buffered_writer.go index 6e50b65192..d3d8de03fc 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/buffered_writer.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/buffered_writer.go @@ -16,9 +16,7 @@ type bufferedWriteCloser struct { buffered *bufio.Writer } -var ( - _ io.WriteCloser = (*bufferedWriteCloser)(nil) -) +var _ io.WriteCloser = (*bufferedWriteCloser)(nil) func newBufferedWriteCloser(f io.WriteCloser) io.WriteCloser { return &bufferedWriteCloser{ diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/config.go index bdd05dd278..43499f70e1 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/config.go @@ -20,7 +20,6 @@ const ( // Config defines configuration for file exporter. type Config struct { - // Path of the file to write to. Path is relative to current directory. Path string `mapstructure:"path"` diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/factory.go index e0b7dcd1e2..e59b54d731 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/factory.go @@ -73,7 +73,7 @@ func createTracesExporter( cfg component.Config, ) (exporter.Traces, error) { fe := getOrCreateFileExporter(cfg, set.Logger) - return exporterhelper.NewTracesExporter( + return exporterhelper.NewTraces( ctx, set, cfg, @@ -90,7 +90,7 @@ func createMetricsExporter( cfg component.Config, ) (exporter.Metrics, error) { fe := getOrCreateFileExporter(cfg, set.Logger) - return exporterhelper.NewMetricsExporter( + return exporterhelper.NewMetrics( ctx, set, cfg, @@ -107,7 +107,7 @@ func createLogsExporter( cfg component.Config, ) (exporter.Logs, error) { fe := getOrCreateFileExporter(cfg, set.Logger) - return exporterhelper.NewLogsExporter( + return exporterhelper.NewLogs( ctx, set, cfg, @@ -120,7 +120,7 @@ func createLogsExporter( // getOrCreateFileExporter creates a FileExporter and caches it for a particular configuration, // or returns the already cached one. Caching is required because the factory is asked trace and -// metric receivers separately when it gets CreateTracesReceiver() and CreateMetricsReceiver() +// metric receivers separately when it gets CreateTraces() and CreateMetrics() // but they must not create separate objects, they must use one Exporter object per configuration. func getOrCreateFileExporter(cfg component.Config, logger *zap.Logger) FileExporter { conf := cfg.(*Config) @@ -143,7 +143,6 @@ func newFileExporter(conf *Config, logger *zap.Logger) FileExporter { conf: conf, logger: logger, } - } func newFileWriter(path string, shouldAppend bool, rotation *Rotation, flushInterval time.Duration, export exportFunc) (*fileWriter, error) { @@ -155,7 +154,7 @@ func newFileWriter(path string, shouldAppend bool, rotation *Rotation, flushInte } else { fileFlags |= os.O_TRUNC } - f, err := os.OpenFile(path, fileFlags, 0644) + f, err := os.OpenFile(path, fileFlags, 0o644) if err != nil { return nil, err } @@ -180,6 +179,6 @@ func newFileWriter(path string, shouldAppend bool, rotation *Rotation, flushInte // This is the map of already created File exporters for particular configurations. // We maintain this map because the Factory is asked trace and metric receivers separately -// when it gets CreateTracesReceiver() and CreateMetricsReceiver() but they must not +// when it gets CreateTraces() and CreateMetrics() but they must not // create separate objects, they must use one Exporter object per configuration. var exporters = sharedcomponent.NewSharedComponents() diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/file_writer.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/file_writer.go index fc4c34e254..0f1d607ba0 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/file_writer.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/file_writer.go @@ -95,7 +95,6 @@ func (w *fileWriter) start() { // Shutdown stops the exporter and is invoked during shutdown. // It stops the flush ticker if set. func (w *fileWriter) shutdown() error { - // Stop the flush ticker. if w.flushTicker != nil { // Stop the go routine. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/grouping_file_exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/grouping_file_exporter.go index 329c618785..322fef47e0 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/grouping_file_exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/grouping_file_exporter.go @@ -175,7 +175,7 @@ func (e *groupingFileExporter) getWriter(pathSegment string) (*fileWriter, error return writer, nil } - err := os.MkdirAll(path.Dir(fullPath), 0755) + err := os.MkdirAll(path.Dir(fullPath), 0o755) if err != nil { return nil, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/marshaller.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/marshaller.go index e3452b93ee..d80325d735 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/marshaller.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/marshaller.go @@ -18,10 +18,12 @@ var tracesMarshalers = map[string]ptrace.Marshaler{ formatTypeJSON: &ptrace.JSONMarshaler{}, formatTypeProto: &ptrace.ProtoMarshaler{}, } + var metricsMarshalers = map[string]pmetric.Marshaler{ formatTypeJSON: &pmetric.JSONMarshaler{}, formatTypeProto: &pmetric.ProtoMarshaler{}, } + var logsMarshalers = map[string]plog.Marshaler{ formatTypeJSON: &plog.JSONMarshaler{}, formatTypeProto: &plog.ProtoMarshaler{}, diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/metadata.yaml index 0749422f48..8a8b86f9a2 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter/metadata.yaml @@ -4,7 +4,7 @@ status: class: exporter stability: alpha: [traces, metrics, logs] - distributions: [core, contrib] + distributions: [core, contrib, k8s] codeowners: active: [atingchen] diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/README.md index c0ea3212cd..1ae82a9242 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/README.md @@ -8,7 +8,7 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fkafka%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fkafka) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fkafka%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fkafka) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@pavolloffay](https://www.github.com/pavolloffay), [@MovieStoreGuy](https://www.github.com/MovieStoreGuy) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib @@ -24,8 +24,8 @@ The following settings can be optionally configured: - `brokers` (default = localhost:9092): The list of kafka brokers. - `resolve_canonical_bootstrap_servers_only` (default = false): Whether to resolve then reverse-lookup broker IPs during startup. - `client_id` (default = "sarama"): The client ID to configure the Sarama Kafka client with. The client ID will be used for all produce requests. -- `topic` (default = otlp_spans for traces, otlp_metrics for metrics, otlp_logs for logs): The name of the kafka topic to export to. -- `topic_from_attribute` (default = ""): Specify the resource attribute whose value should be used as the message's topic. This option, when set, will take precedence over the default topic. If `topic_from_attribute` is not set, the message's topic will be set to the value of the configuration option `topic` instead. +- `topic` (default = otlp_spans for traces, otlp_metrics for metrics, otlp_logs for logs): The name of the default kafka topic to export to. See [Destination Topic](#destination-topic) below for more details. +- `topic_from_attribute` (default = ""): Specify the resource attribute whose value should be used as the message's topic. See [Destination Topic](#destination-topic) below for more details. - `encoding` (default = otlp_proto): The encoding of the traces sent to kafka. All available encodings: - `otlp_proto`: payload is Protobuf serialized from `ExportTraceServiceRequest` if set as a traces exporter or `ExportMetricsServiceRequest` for metrics or `ExportLogsServiceRequest` for logs. - `otlp_json`: payload is JSON serialized from `ExportTraceServiceRequest` if set as a traces exporter or `ExportMetricsServiceRequest` for metrics or `ExportLogsServiceRequest` for logs. @@ -105,3 +105,9 @@ exporters: - localhost:9092 protocol_version: 2.0.0 ``` + +## Destination Topic +The destination topic can be defined in a few different ways and takes priority in the following order: +1. When `topic_from_attribute` is configured, and the corresponding attribute is found on the ingested data, the value of this attribute is used. +2. If a prior component in the collector pipeline sets the topic on the context via the `topic.WithTopic` function (from the `github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic` package), the value set in the context is used. +3. Finally, the `topic` configuration is used as a default/fallback destination. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/config.go index e1c433a268..09968dd6a7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/config.go @@ -17,9 +17,9 @@ import ( // Config defines configuration for Kafka exporter. type Config struct { - exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - configretry.BackOffConfig `mapstructure:"retry_on_failure"` + TimeoutSettings exporterhelper.TimeoutConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // The list of kafka brokers (default localhost:9092) Brokers []string `mapstructure:"brokers"` diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/factory.go index 3334e3b268..eb366d7cfa 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/factory.go @@ -64,9 +64,9 @@ func NewFactory(options ...FactoryOption) exporter.Factory { func createDefaultConfig() component.Config { return &Config{ - TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), + TimeoutSettings: exporterhelper.NewDefaultTimeoutConfig(), BackOffConfig: configretry.NewDefaultBackOffConfig(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), + QueueSettings: exporterhelper.NewDefaultQueueConfig(), Brokers: []string{defaultBroker}, ClientID: defaultClientID, // using an empty topic to track when it has not been set by user, default is based on traces or metrics. @@ -90,8 +90,7 @@ func createDefaultConfig() component.Config { } } -type kafkaExporterFactory struct { -} +type kafkaExporterFactory struct{} func (f *kafkaExporterFactory) createTracesExporter( ctx context.Context, @@ -105,11 +104,8 @@ func (f *kafkaExporterFactory) createTracesExporter( if oCfg.Encoding == "otlp_json" { set.Logger.Info("otlp_json is considered experimental and should not be used in a production environment") } - exp, err := newTracesExporter(oCfg, set) - if err != nil { - return nil, err - } - return exporterhelper.NewTracesExporter( + exp := newTracesExporter(oCfg, set) + return exporterhelper.NewTraces( ctx, set, &oCfg, @@ -117,7 +113,7 @@ func (f *kafkaExporterFactory) createTracesExporter( exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), // Disable exporterhelper Timeout, because we cannot pass a Context to the Producer, // and will rely on the sarama Producer Timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}), exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), exporterhelper.WithStart(exp.start), @@ -136,11 +132,8 @@ func (f *kafkaExporterFactory) createMetricsExporter( if oCfg.Encoding == "otlp_json" { set.Logger.Info("otlp_json is considered experimental and should not be used in a production environment") } - exp, err := newMetricsExporter(oCfg, set) - if err != nil { - return nil, err - } - return exporterhelper.NewMetricsExporter( + exp := newMetricsExporter(oCfg, set) + return exporterhelper.NewMetrics( ctx, set, &oCfg, @@ -148,7 +141,7 @@ func (f *kafkaExporterFactory) createMetricsExporter( exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), // Disable exporterhelper Timeout, because we cannot pass a Context to the Producer, // and will rely on the sarama Producer Timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}), exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), exporterhelper.WithStart(exp.start), @@ -167,11 +160,8 @@ func (f *kafkaExporterFactory) createLogsExporter( if oCfg.Encoding == "otlp_json" { set.Logger.Info("otlp_json is considered experimental and should not be used in a production environment") } - exp, err := newLogsExporter(oCfg, set) - if err != nil { - return nil, err - } - return exporterhelper.NewLogsExporter( + exp := newLogsExporter(oCfg, set) + return exporterhelper.NewLogs( ctx, set, &oCfg, @@ -179,7 +169,7 @@ func (f *kafkaExporterFactory) createLogsExporter( exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), // Disable exporterhelper Timeout, because we cannot pass a Context to the Producer, // and will rely on the sarama Producer Timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}), exporterhelper.WithRetry(oCfg.BackOffConfig), exporterhelper.WithQueue(oCfg.QueueSettings), exporterhelper.WithStart(exp.start), diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/jaeger_marshaler.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/jaeger_marshaler.go index abc73c22f1..50640c8376 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/jaeger_marshaler.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/jaeger_marshaler.go @@ -22,10 +22,7 @@ type jaegerMarshaler struct { var _ TracesMarshaler = (*jaegerMarshaler)(nil) func (j jaegerMarshaler) Marshal(traces ptrace.Traces, topic string) ([]*sarama.ProducerMessage, error) { - batches, err := jaeger.ProtoFromTraces(traces) - if err != nil { - return nil, err - } + batches := jaeger.ProtoFromTraces(traces) var messages []*sarama.ProducerMessage var errs error @@ -58,8 +55,7 @@ type jaegerSpanMarshaler interface { encoding() string } -type jaegerProtoSpanMarshaler struct { -} +type jaegerProtoSpanMarshaler struct{} var _ jaegerSpanMarshaler = (*jaegerProtoSpanMarshaler)(nil) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/kafka_exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/kafka_exporter.go index 5e57e5d636..fe3130cecc 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/kafka_exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/kafka_exporter.go @@ -19,6 +19,7 @@ import ( "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic" ) var errUnrecognizedEncoding = fmt.Errorf("unrecognized encoding") @@ -40,8 +41,8 @@ func (ke kafkaErrors) Error() string { return fmt.Sprintf("Failed to deliver %d messages due to %s", ke.count, ke.err) } -func (e *kafkaTracesProducer) tracesPusher(_ context.Context, td ptrace.Traces) error { - messages, err := e.marshaler.Marshal(td, getTopic(&e.cfg, td.ResourceSpans())) +func (e *kafkaTracesProducer) tracesPusher(ctx context.Context, td ptrace.Traces) error { + messages, err := e.marshaler.Marshal(td, getTopic(ctx, &e.cfg, td.ResourceSpans())) if err != nil { return consumererror.NewPermanent(err) } @@ -65,7 +66,23 @@ func (e *kafkaTracesProducer) Close(context.Context) error { return e.producer.Close() } -func (e *kafkaTracesProducer) start(_ context.Context, _ component.Host) error { +func (e *kafkaTracesProducer) start(_ context.Context, host component.Host) error { + // extensions take precedence over internal encodings + if marshaler, errExt := loadEncodingExtension[ptrace.Marshaler]( + host, + e.cfg.Encoding, + ); errExt == nil { + e.marshaler = &tracesEncodingMarshaler{ + marshaler: *marshaler, + encoding: e.cfg.Encoding, + } + } + if marshaler, errInt := createTracesMarshaler(e.cfg); e.marshaler == nil && errInt == nil { + e.marshaler = marshaler + } + if e.marshaler == nil { + return errUnrecognizedEncoding + } producer, err := newSaramaProducer(e.cfg) if err != nil { return err @@ -82,8 +99,8 @@ type kafkaMetricsProducer struct { logger *zap.Logger } -func (e *kafkaMetricsProducer) metricsDataPusher(_ context.Context, md pmetric.Metrics) error { - messages, err := e.marshaler.Marshal(md, getTopic(&e.cfg, md.ResourceMetrics())) +func (e *kafkaMetricsProducer) metricsDataPusher(ctx context.Context, md pmetric.Metrics) error { + messages, err := e.marshaler.Marshal(md, getTopic(ctx, &e.cfg, md.ResourceMetrics())) if err != nil { return consumererror.NewPermanent(err) } @@ -107,7 +124,23 @@ func (e *kafkaMetricsProducer) Close(context.Context) error { return e.producer.Close() } -func (e *kafkaMetricsProducer) start(_ context.Context, _ component.Host) error { +func (e *kafkaMetricsProducer) start(_ context.Context, host component.Host) error { + // extensions take precedence over internal encodings + if marshaler, errExt := loadEncodingExtension[pmetric.Marshaler]( + host, + e.cfg.Encoding, + ); errExt == nil { + e.marshaler = &metricsEncodingMarshaler{ + marshaler: *marshaler, + encoding: e.cfg.Encoding, + } + } + if marshaler, errInt := createMetricMarshaler(e.cfg); e.marshaler == nil && errInt == nil { + e.marshaler = marshaler + } + if e.marshaler == nil { + return errUnrecognizedEncoding + } producer, err := newSaramaProducer(e.cfg) if err != nil { return err @@ -124,8 +157,8 @@ type kafkaLogsProducer struct { logger *zap.Logger } -func (e *kafkaLogsProducer) logsDataPusher(_ context.Context, ld plog.Logs) error { - messages, err := e.marshaler.Marshal(ld, getTopic(&e.cfg, ld.ResourceLogs())) +func (e *kafkaLogsProducer) logsDataPusher(ctx context.Context, ld plog.Logs) error { + messages, err := e.marshaler.Marshal(ld, getTopic(ctx, &e.cfg, ld.ResourceLogs())) if err != nil { return consumererror.NewPermanent(err) } @@ -149,7 +182,23 @@ func (e *kafkaLogsProducer) Close(context.Context) error { return e.producer.Close() } -func (e *kafkaLogsProducer) start(_ context.Context, _ component.Host) error { +func (e *kafkaLogsProducer) start(_ context.Context, host component.Host) error { + // extensions take precedence over internal encodings + if marshaler, errExt := loadEncodingExtension[plog.Marshaler]( + host, + e.cfg.Encoding, + ); errExt == nil { + e.marshaler = &logsEncodingMarshaler{ + marshaler: *marshaler, + encoding: e.cfg.Encoding, + } + } + if marshaler, errInt := createLogMarshaler(e.cfg); e.marshaler == nil && errInt == nil { + e.marshaler = marshaler + } + if e.marshaler == nil { + return errUnrecognizedEncoding + } producer, err := newSaramaProducer(e.cfg) if err != nil { return err @@ -168,7 +217,7 @@ func newSaramaProducer(config Config) (sarama.SyncProducer, error) { c.Producer.Return.Errors = true c.Producer.RequiredAcks = config.Producer.RequiredAcks // Because sarama does not accept a Context for every message, set the Timeout here. - c.Producer.Timeout = config.Timeout + c.Producer.Timeout = config.TimeoutSettings.Timeout c.Metadata.Full = config.Metadata.Full c.Metadata.Retry.Max = config.Metadata.Retry.Max c.Metadata.Retry.Backoff = config.Metadata.Retry.Backoff @@ -204,50 +253,26 @@ func newSaramaProducer(config Config) (sarama.SyncProducer, error) { return producer, nil } -func newMetricsExporter(config Config, set exporter.Settings) (*kafkaMetricsProducer, error) { - marshaler, err := createMetricMarshaler(config) - if err != nil { - return nil, err - } - - if marshaler == nil { - return nil, errUnrecognizedEncoding - } - +func newMetricsExporter(config Config, set exporter.Settings) *kafkaMetricsProducer { return &kafkaMetricsProducer{ - cfg: config, - marshaler: marshaler, - logger: set.Logger, - }, nil - + cfg: config, + logger: set.Logger, + } } // newTracesExporter creates Kafka exporter. -func newTracesExporter(config Config, set exporter.Settings) (*kafkaTracesProducer, error) { - marshaler, err := createTracesMarshaler(config) - if err != nil { - return nil, err - } - +func newTracesExporter(config Config, set exporter.Settings) *kafkaTracesProducer { return &kafkaTracesProducer{ - cfg: config, - marshaler: marshaler, - logger: set.Logger, - }, nil -} - -func newLogsExporter(config Config, set exporter.Settings) (*kafkaLogsProducer, error) { - marshaler, err := createLogMarshaler(config) - if err != nil { - return nil, err + cfg: config, + logger: set.Logger, } +} +func newLogsExporter(config Config, set exporter.Settings) *kafkaLogsProducer { return &kafkaLogsProducer{ - cfg: config, - marshaler: marshaler, - logger: set.Logger, - }, nil - + cfg: config, + logger: set.Logger, + } } type resourceSlice[T any] interface { @@ -259,15 +284,45 @@ type resource interface { Resource() pcommon.Resource } -func getTopic[T resource](cfg *Config, resources resourceSlice[T]) string { - if cfg.TopicFromAttribute == "" { - return cfg.Topic - } - for i := 0; i < resources.Len(); i++ { - rv, ok := resources.At(i).Resource().Attributes().Get(cfg.TopicFromAttribute) - if ok && rv.Str() != "" { - return rv.Str() +func getTopic[T resource](ctx context.Context, cfg *Config, resources resourceSlice[T]) string { + if cfg.TopicFromAttribute != "" { + for i := 0; i < resources.Len(); i++ { + rv, ok := resources.At(i).Resource().Attributes().Get(cfg.TopicFromAttribute) + if ok && rv.Str() != "" { + return rv.Str() + } } } + contextTopic, ok := topic.FromContext(ctx) + if ok { + return contextTopic + } return cfg.Topic } + +// loadEncodingExtension tries to load an available extension for the given encoding. +func loadEncodingExtension[T any](host component.Host, encoding string) (*T, error) { + extensionID, err := encodingToComponentID(encoding) + if err != nil { + return nil, err + } + encodingExtension, ok := host.GetExtensions()[*extensionID] + if !ok { + return nil, fmt.Errorf("unknown encoding extension %q", encoding) + } + unmarshaler, ok := encodingExtension.(T) + if !ok { + return nil, fmt.Errorf("extension %q is not an unmarshaler", encoding) + } + return &unmarshaler, nil +} + +// encodingToComponentID converts an encoding string to a component ID using the given encoding as type. +func encodingToComponentID(encoding string) (*component.ID, error) { + componentType, err := component.NewType(encoding) + if err != nil { + return nil, fmt.Errorf("invalid component type: %w", err) + } + id := component.NewID(componentType) + return &id, nil +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/marshaler.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/marshaler.go index 89b4bcc389..ba8f00ff5c 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/marshaler.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/marshaler.go @@ -4,6 +4,8 @@ package kafkaexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" import ( + "fmt" + "github.com/IBM/sarama" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" @@ -63,7 +65,6 @@ func createTracesMarshaler(config Config) (TracesMarshaler, error) { default: return nil, errUnrecognizedEncoding } - } // creates MetricsMarshaler based on the provided config @@ -97,3 +98,72 @@ func createLogMarshaler(config Config) (LogsMarshaler, error) { return nil, errUnrecognizedEncoding } } + +// tracesEncodingMarshaler is a wrapper around ptrace.Marshaler that implements TracesMarshaler. +type tracesEncodingMarshaler struct { + marshaler ptrace.Marshaler + encoding string +} + +func (t *tracesEncodingMarshaler) Marshal(traces ptrace.Traces, topic string) ([]*sarama.ProducerMessage, error) { + var messages []*sarama.ProducerMessage + data, err := t.marshaler.MarshalTraces(traces) + if err != nil { + return nil, fmt.Errorf("failed to marshal traces: %w", err) + } + messages = append(messages, &sarama.ProducerMessage{ + Topic: topic, + Value: sarama.ByteEncoder(data), + }) + return messages, nil +} + +func (t *tracesEncodingMarshaler) Encoding() string { + return t.encoding +} + +// metricsEncodingMarshaler is a wrapper around pmetric.Marshaler that implements MetricsMarshaler. +type metricsEncodingMarshaler struct { + marshaler pmetric.Marshaler + encoding string +} + +func (m *metricsEncodingMarshaler) Marshal(metrics pmetric.Metrics, topic string) ([]*sarama.ProducerMessage, error) { + var messages []*sarama.ProducerMessage + data, err := m.marshaler.MarshalMetrics(metrics) + if err != nil { + return nil, fmt.Errorf("failed to marshal metrics: %w", err) + } + messages = append(messages, &sarama.ProducerMessage{ + Topic: topic, + Value: sarama.ByteEncoder(data), + }) + return messages, nil +} + +func (m *metricsEncodingMarshaler) Encoding() string { + return m.encoding +} + +// logsEncodingMarshaler is a wrapper around plog.Marshaler that implements LogsMarshaler. +type logsEncodingMarshaler struct { + marshaler plog.Marshaler + encoding string +} + +func (l *logsEncodingMarshaler) Marshal(logs plog.Logs, topic string) ([]*sarama.ProducerMessage, error) { + var messages []*sarama.ProducerMessage + data, err := l.marshaler.MarshalLogs(logs) + if err != nil { + return nil, fmt.Errorf("failed to marshal logs: %w", err) + } + messages = append(messages, &sarama.ProducerMessage{ + Topic: topic, + Value: sarama.ByteEncoder(data), + }) + return messages, nil +} + +func (l *logsEncodingMarshaler) Encoding() string { + return l.encoding +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/pdata_marshaler.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/pdata_marshaler.go index 72a90b54fb..ae9726f2cb 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/pdata_marshaler.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/pdata_marshaler.go @@ -27,7 +27,7 @@ func (p pdataLogsMarshaler) Marshal(ld plog.Logs, topic string) ([]*sarama.Produ for i := 0; i < logs.Len(); i++ { resourceMetrics := logs.At(i) - var hash = pdatautil.MapHash(resourceMetrics.Resource().Attributes()) + hash := pdatautil.MapHash(resourceMetrics.Resource().Attributes()) newLogs := plog.NewLogs() resourceMetrics.CopyTo(newLogs.ResourceLogs().AppendEmpty()) @@ -80,7 +80,7 @@ func (p pdataMetricsMarshaler) Marshal(ld pmetric.Metrics, topic string) ([]*sar for i := 0; i < metrics.Len(); i++ { resourceMetrics := metrics.At(i) - var hash = pdatautil.MapHash(resourceMetrics.Resource().Attributes()) + hash := pdatautil.MapHash(resourceMetrics.Resource().Attributes()) newMetrics := pmetric.NewMetrics() resourceMetrics.CopyTo(newMetrics.ResourceMetrics().AppendEmpty()) @@ -140,7 +140,6 @@ func (p *pdataTracesMarshaler) Marshal(td ptrace.Traces, topic string) ([]*saram Value: sarama.ByteEncoder(bts), Key: sarama.ByteEncoder(traceutil.TraceIDToHexOrEmptyString(trace.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).TraceID())), }) - } } else { bts, err := p.marshaler.MarshalTraces(td) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/raw_marshaler.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/raw_marshaler.go index 166be57f3e..5a9e283436 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/raw_marshaler.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/raw_marshaler.go @@ -14,8 +14,7 @@ import ( var errUnsupported = errors.New("unsupported serialization") -type rawMarshaler struct { -} +type rawMarshaler struct{} func newRawMarshaler() rawMarshaler { return rawMarshaler{} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/README.md index b0fba78842..eecaa3e389 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/README.md @@ -5,13 +5,14 @@ | ------------- |-----------| | Stability | [development]: metrics | | | [beta]: traces, logs | -| Distributions | [contrib] | +| Distributions | [contrib], [k8s] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Floadbalancing%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Floadbalancing) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Floadbalancing%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Floadbalancing) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) | -[development]: https://github.com/open-telemetry/opentelemetry-collector#development -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[k8s]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s This is an exporter that will consistently export spans, metrics and logs depending on the `routing_key` configured. @@ -47,14 +48,39 @@ This also supports service name based exporting for traces. If you have two or m ## Resilience and scaling considerations -The `loadbalancingexporter` will, irrespective of the chosen resolver (`static`, `dns`, `k8s`), create one exporter per endpoint. The exporter conforms to its published configuration regarding sending queue and retry mechanisms. Importantly, the `loadbalancingexporter` will not attempt to re-route data to a healthy endpoint on delivery failure, and data loss is therefore possible if the exporter's target remains unavailable once redelivery is exhausted. Due consideration needs to be given to the exporter queue and retry configuration when running in a highly elastic environment. +The `loadbalancingexporter` will, irrespective of the chosen resolver (`static`, `dns`, `k8s`), create one `otlp` exporter per endpoint. Each level of exporters, `loadbalancingexporter` itself and all sub-exporters (one per each endpoint), have it's own queue, timeout and retry mechanisms. Importantly, the `loadbalancingexporter`, by default, will NOT attempt to re-route data to a healthy endpoint on delivery failure, because in-memory queue, retry and timeout setting are disabled by default ([more details on queuing, retry and timeout default settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md)). -* When using the `static` resolver and a target is unavailable, all the target's load-balanced telemetry will fail to be delivered until either the target is restored or removed from the static list. The same principle applies to the `dns` resolver. +``` + +------------------+ +---------------+ + resiliency options 1 | | | | + -- otlp exporter 1 ------------ backend 1 | + | ---/ | | | | + | ---/ +----|-------------+ +---------------+ + | ---/ | + +-----------------+ ---/ | + | --/ | + | loadbalancing | resiliency options 2 + | exporter | | + | --\ | + +-----------------+ ----\ | + ----\ +----|-------------+ +---------------+ + ----\ | | | | + --- otlp exporter N ------------ backend N | + | | | | + +------------------+ +---------------+ +``` + +* For all types of resolvers (`static`, `dns`, `k8s`) - if one of endpoints is unavailable - first works queue, retry and timeout settings defined for sub-exporters (under `otlp` property). Once redelivery is exhausted on sub-exporter level, and resilience options 1 are enabled - telemetry data returns to `loadbalancingexporter` itself and data redelivery happens according to exporter level queue, retry and timeout settings. +* When using the `static` resolver and all targets are unavailable, all load-balanced telemetry will fail to be delivered until either one or all targets are restored or valid target is added the static list. The same principle applies to the `dns` and `k8s` resolvers, except for endpoints list update which happens automatically. * When using `k8s`, `dns`, and likely future resolvers, topology changes are eventually reflected in the `loadbalancingexporter`. The `k8s` resolver will update more quickly than `dns`, but a window of time in which the true topology doesn't match the view of the `loadbalancingexporter` remains. +* Resiliency options 1 (`timeout`, `retry_on_failure` and `sending_queue` settings in `loadbalancing` section) - are useful for highly elastic environment (like k8s), where list of resolved endpoints frequently changed due to deployments, scale-up or scale-down events. In case of permanent change of list of resolved exporters this options provide capability to re-route data into new set of healthy backends. Disabled by default. +* Resiliency options 1 (`timeout`, `retry_on_failure` and `sending_queue` settings in `otlp` section) - are useful for temporary problems with specific backend, like network flukes. Persistent Queue is NOT supported here as all sub-exporter shares the same `sending_queue` configuration, including `storage`. Enabled by default. + +Unfortunately, data loss is still possible if all of the exporter's targets remains unavailable once redelivery is exhausted. Due consideration needs to be given to the exporter queue and retry configuration when running in a highly elastic environment. ## Configuration -Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using the processor. +Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using the exporter. * The `otlp` property configures the template used for building the OTLP exporter. Refer to the OTLP Exporter documentation for information on which options are available. Note that the `endpoint` property should not be set and will be overridden by this exporter with the backend endpoint. * The `resolver` accepts a `static` node, a `dns`, a `k8s` service or `aws_cloud_map`. If all four are specified, an `errMultipleResolversProvided` error will be thrown. @@ -89,6 +115,7 @@ Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using th * `traceID`: Routes spans based on their `traceID`. Invalid for metrics. * `metric`: Routes metrics based on their metric name. Invalid for spans. * `streamID`: Routes metrics based on their datapoint streamID. That's the unique hash of all it's attributes, plus the attributes and identifying information of its resource, scope, and metric data +* loadbalancing exporter supports set of standard [queuing, retry and timeout settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md), but they are disable by default to maintain compatibility Simple example @@ -116,11 +143,76 @@ exporters: - backend-2:4317 - backend-3:4317 - backend-4:4317 - # Notice to config a headless service DNS in Kubernetes + # Notice to config a headless service DNS in Kubernetes + # dns: + # hostname: otelcol-headless.observability.svc.cluster.local + +service: + pipelines: + traces: + receivers: + - otlp + processors: [] + exporters: + - loadbalancing + logs: + receivers: + - otlp + processors: [] + exporters: + - loadbalancing +``` + +Persistent queue, retry and timeout usage example: + +```yaml +receivers: + otlp: + protocols: + grpc: + endpoint: localhost:4317 + +processors: + +exporters: + loadbalancing: + timeout: 10s + retry_on_failure: + enabled: true + initial_interval: 5s + max_interval: 30s + max_elapsed_time: 300s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 1000 + storage: file_storage/otc + routing_key: "service" + protocol: + otlp: + # all options from the OTLP exporter are supported + # except the endpoint + timeout: 1s + sending_queue: + enabled: true + resolver: + static: + hostnames: + - backend-1:4317 + - backend-2:4317 + - backend-3:4317 + - backend-4:4317 + # Notice to config a headless service DNS in Kubernetes # dns: - # hostname: otelcol-headless.observability.svc.cluster.local + # hostname: otelcol-headless.observability.svc.cluster.local + +extensions: + file_storage/otc: + directory: /var/lib/storage/otc + timeout: 10s service: + extensions: [file_storage] pipelines: traces: receivers: @@ -333,7 +425,7 @@ service: ## Metrics -The following metrics are recorded by this processor: +The following metrics are recorded by this exporter: * `otelcol_loadbalancer_num_resolutions` represents the total number of resolutions performed by the resolver specified in the tag `resolver`, split by their outcome (`success=true|false`). For the static resolver, this should always be `1` with the tag `success=true`. * `otelcol_loadbalancer_num_backends` informs how many backends are currently in use. It should always match the number of items specified in the configuration file in case the `static` resolver is used, and should eventually (seconds) catch up with the DNS changes. Note that DNS caches that might exist between the load balancer and the record authority will influence how long it takes for the load balancer to see the change. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/config.go index 8496268de7..b9682df168 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/config.go @@ -7,6 +7,8 @@ import ( "time" "github.com/aws/aws-sdk-go-v2/service/servicediscovery/types" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/otlpexporter" ) @@ -30,6 +32,10 @@ const ( // Config defines configuration for the exporter. type Config struct { + TimeoutSettings exporterhelper.TimeoutConfig `mapstructure:",squash"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` + QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"` + Protocol Protocol `mapstructure:"protocol"` Resolver ResolverSettings `mapstructure:"resolver"` RoutingKey string `mapstructure:"routing_key"` diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/consistent_hashing.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/consistent_hashing.go index 3bd2b3de59..eda24bb292 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/consistent_hashing.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/consistent_hashing.go @@ -8,8 +8,10 @@ import ( "sort" ) -const maxPositions uint32 = 36000 // 360 degrees with two decimal places -const defaultWeight int = 100 // the number of points in the ring for each entry. For better results, it should be higher than 100. +const ( + maxPositions uint32 = 36000 // 360 degrees with two decimal places + defaultWeight int = 100 // the number of points in the ring for each entry. For better results, it should be higher than 100. +) // position represents a specific angle in the ring. // Each entry in the ring is positioned at an angle in a hypothetical circle, meaning that it ranges from 0 to 360. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/factory.go index f1c37e1517..1e10395162 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/factory.go @@ -7,14 +7,21 @@ package loadbalancingexporter // import "github.com/open-telemetry/opentelemetry import ( "context" + "fmt" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/otlpexporter" + "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/internal/metadata" ) +const ( + zapEndpointKey = "endpoint" +) + // NewFactory creates a factory for the exporter. func NewFactory() exporter.Factory { return exporter.NewFactory( @@ -32,20 +39,110 @@ func createDefaultConfig() component.Config { otlpDefaultCfg.Endpoint = "placeholder:4317" return &Config{ + // By default we disable resilience options on loadbalancing exporter level + // to maintain compatibility with workflow in previous versions Protocol: Protocol{ OTLP: *otlpDefaultCfg, }, } } -func createTracesExporter(_ context.Context, params exporter.Settings, cfg component.Config) (exporter.Traces, error) { - return newTracesExporter(params, cfg) +func buildExporterConfig(cfg *Config, endpoint string) otlpexporter.Config { + oCfg := cfg.Protocol.OTLP + oCfg.Endpoint = endpoint + + return oCfg +} + +func buildExporterSettings(params exporter.Settings, endpoint string) exporter.Settings { + // Override child exporter ID to segregate metrics from loadbalancing top level + childName := endpoint + if params.ID.Name() != "" { + childName = fmt.Sprintf("%s_%s", params.ID.Name(), childName) + } + params.ID = component.NewIDWithName(params.ID.Type(), childName) + // Add "endpoint" attribute to child exporter logger to segregate logs from loadbalancing top level + params.Logger = params.Logger.With(zap.String(zapEndpointKey, endpoint)) + + return params +} + +func buildExporterResilienceOptions(options []exporterhelper.Option, cfg *Config) []exporterhelper.Option { + if cfg.TimeoutSettings.Timeout > 0 { + options = append(options, exporterhelper.WithTimeout(cfg.TimeoutSettings)) + } + if cfg.QueueSettings.Enabled { + options = append(options, exporterhelper.WithQueue(cfg.QueueSettings)) + } + if cfg.BackOffConfig.Enabled { + options = append(options, exporterhelper.WithRetry(cfg.BackOffConfig)) + } + + return options +} + +func createTracesExporter(ctx context.Context, params exporter.Settings, cfg component.Config) (exporter.Traces, error) { + c := cfg.(*Config) + exporter, err := newTracesExporter(params, cfg) + if err != nil { + return nil, fmt.Errorf("cannot configure loadbalancing traces exporter: %w", err) + } + + options := []exporterhelper.Option{ + exporterhelper.WithStart(exporter.Start), + exporterhelper.WithShutdown(exporter.Shutdown), + exporterhelper.WithCapabilities(exporter.Capabilities()), + } + + return exporterhelper.NewTraces( + ctx, + params, + cfg, + exporter.ConsumeTraces, + buildExporterResilienceOptions(options, c)..., + ) } -func createLogsExporter(_ context.Context, params exporter.Settings, cfg component.Config) (exporter.Logs, error) { - return newLogsExporter(params, cfg) +func createLogsExporter(ctx context.Context, params exporter.Settings, cfg component.Config) (exporter.Logs, error) { + c := cfg.(*Config) + exporter, err := newLogsExporter(params, cfg) + if err != nil { + return nil, fmt.Errorf("cannot configure loadbalancing logs exporter: %w", err) + } + + options := []exporterhelper.Option{ + exporterhelper.WithStart(exporter.Start), + exporterhelper.WithShutdown(exporter.Shutdown), + exporterhelper.WithCapabilities(exporter.Capabilities()), + } + + return exporterhelper.NewLogs( + ctx, + params, + cfg, + exporter.ConsumeLogs, + buildExporterResilienceOptions(options, c)..., + ) } -func createMetricsExporter(_ context.Context, params exporter.Settings, cfg component.Config) (exporter.Metrics, error) { - return newMetricsExporter(params, cfg) +func createMetricsExporter(ctx context.Context, params exporter.Settings, cfg component.Config) (exporter.Metrics, error) { + c := cfg.(*Config) + exporter, err := newMetricsExporter(params, cfg) + if err != nil { + return nil, fmt.Errorf("cannot configure loadbalancing metrics exporter: %w", err) + } + + options := []exporterhelper.Option{ + exporterhelper.WithStart(exporter.Start), + exporterhelper.WithShutdown(exporter.Shutdown), + exporterhelper.WithCapabilities(exporter.Capabilities()), + } + + return exporterhelper.NewMetrics( + ctx, + params, + cfg, + exporter.ConsumeMetrics, + buildExporterResilienceOptions(options, c)..., + ) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go index 75a662ff39..0b94025141 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go @@ -6,21 +6,17 @@ import ( "errors" "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" ) -// Deprecated: [v0.108.0] use LeveledMeter instead. func Meter(settings component.TelemetrySettings) metric.Meter { return settings.MeterProvider.Meter("github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter") } -func LeveledMeter(settings component.TelemetrySettings, level configtelemetry.Level) metric.Meter { - return settings.LeveledMeterProvider(level).Meter("github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter") -} - func Tracer(settings component.TelemetrySettings) trace.Tracer { return settings.TracerProvider.Tracer("github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter") } @@ -34,46 +30,54 @@ type TelemetryBuilder struct { LoadbalancerNumBackendUpdates metric.Int64Counter LoadbalancerNumBackends metric.Int64Gauge LoadbalancerNumResolutions metric.Int64Counter - meters map[configtelemetry.Level]metric.Meter } -// telemetryBuilderOption applies changes to default builder. -type telemetryBuilderOption func(*TelemetryBuilder) +// TelemetryBuilderOption applies changes to default builder. +type TelemetryBuilderOption interface { + apply(*TelemetryBuilder) +} + +type telemetryBuilderOptionFunc func(mb *TelemetryBuilder) + +func (tbof telemetryBuilderOptionFunc) apply(mb *TelemetryBuilder) { + tbof(mb) +} // NewTelemetryBuilder provides a struct with methods to update all internal telemetry // for a component -func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { - builder := TelemetryBuilder{meters: map[configtelemetry.Level]metric.Meter{}} +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...TelemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{} for _, op := range options { - op(&builder) + op.apply(&builder) } - builder.meters[configtelemetry.LevelBasic] = LeveledMeter(settings, configtelemetry.LevelBasic) + builder.meter = Meter(settings) var err, errs error - builder.LoadbalancerBackendLatency, err = builder.meters[configtelemetry.LevelBasic].Int64Histogram( + builder.LoadbalancerBackendLatency, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Histogram( "otelcol_loadbalancer_backend_latency", metric.WithDescription("Response latency in ms for the backends."), - metric.WithUnit("ms"), metric.WithExplicitBucketBoundaries([]float64{5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000}...), + metric.WithUnit("ms"), + metric.WithExplicitBucketBoundaries([]float64{5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000}...), ) errs = errors.Join(errs, err) - builder.LoadbalancerBackendOutcome, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( + builder.LoadbalancerBackendOutcome, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_loadbalancer_backend_outcome", metric.WithDescription("Number of successes and failures for each endpoint."), metric.WithUnit("{outcomes}"), ) errs = errors.Join(errs, err) - builder.LoadbalancerNumBackendUpdates, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( + builder.LoadbalancerNumBackendUpdates, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_loadbalancer_num_backend_updates", metric.WithDescription("Number of times the list of backends was updated."), metric.WithUnit("{updates}"), ) errs = errors.Join(errs, err) - builder.LoadbalancerNumBackends, err = builder.meters[configtelemetry.LevelBasic].Int64Gauge( + builder.LoadbalancerNumBackends, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_loadbalancer_num_backends", metric.WithDescription("Current number of backends in use."), metric.WithUnit("{backends}"), ) errs = errors.Join(errs, err) - builder.LoadbalancerNumResolutions, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( + builder.LoadbalancerNumResolutions, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_loadbalancer_num_resolutions", metric.WithDescription("Number of times the resolver has triggered new resolutions."), metric.WithUnit("{resolutions}"), @@ -81,3 +85,10 @@ func NewTelemetryBuilder(settings component.TelemetrySettings, options ...teleme errs = errors.Join(errs, err) return &builder, errs } + +func getLeveledMeter(meter metric.Meter, cfgLevel, srvLevel configtelemetry.Level) metric.Meter { + if cfgLevel <= srvLevel { + return meter + } + return noop.Meter{} +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/loadbalancer.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/loadbalancer.go index 494266d130..12ef0b5025 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/loadbalancer.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/loadbalancer.go @@ -45,7 +45,7 @@ type loadBalancer struct { func newLoadBalancer(logger *zap.Logger, cfg component.Config, factory componentFactory, telemetry *metadata.TelemetryBuilder) (*loadBalancer, error) { oCfg := cfg.(*Config) - var count = 0 + count := 0 if oCfg.Resolver.DNS != nil { count++ } @@ -220,6 +220,10 @@ func endpointFound(endpoint string, endpoints []string) bool { func (lb *loadBalancer) Shutdown(ctx context.Context) error { err := lb.res.shutdown(ctx) lb.stopped = true + + for _, e := range lb.exporters { + err = errors.Join(err, e.Shutdown(ctx)) + } return err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/log_exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/log_exporter.go index 49068c7d9e..2d1385b76e 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/log_exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/log_exporter.go @@ -41,7 +41,9 @@ func newLogsExporter(params exporter.Settings, cfg component.Config) (*logExport exporterFactory := otlpexporter.NewFactory() cfFunc := func(ctx context.Context, endpoint string) (component.Component, error) { oCfg := buildExporterConfig(cfg.(*Config), endpoint) - return exporterFactory.CreateLogsExporter(ctx, params, &oCfg) + oParams := buildExporterSettings(params, endpoint) + + return exporterFactory.CreateLogs(ctx, oParams, &oCfg) } lb, err := newLoadBalancer(params.Logger, cfg, cfFunc, telemetry) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/metadata.yaml index d9fef7b30e..8a1c0d40b8 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/metadata.yaml @@ -5,8 +5,7 @@ status: stability: beta: [traces, logs] development: [metrics] - distributions: - - contrib + distributions: [contrib, k8s] codeowners: active: [jpkrohling] diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/metrics_exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/metrics_exporter.go index c5e9d8a69f..45bef77149 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/metrics_exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/metrics_exporter.go @@ -15,7 +15,7 @@ import ( "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/otlpexporter" "go.opentelemetry.io/collector/pdata/pmetric" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" "go.opentelemetry.io/otel/metric" "go.uber.org/multierr" @@ -43,7 +43,9 @@ func newMetricsExporter(params exporter.Settings, cfg component.Config) (*metric exporterFactory := otlpexporter.NewFactory() cfFunc := func(ctx context.Context, endpoint string) (component.Component, error) { oCfg := buildExporterConfig(cfg.(*Config), endpoint) - return exporterFactory.CreateMetricsExporter(ctx, params, &oCfg) + oParams := buildExporterSettings(params, endpoint) + + return exporterFactory.CreateMetrics(ctx, oParams, &oCfg) } lb, err := newLoadBalancer(params.Logger, cfg, cfFunc, telemetry) @@ -71,7 +73,6 @@ func newMetricsExporter(params exporter.Settings, cfg component.Config) (*metric return nil, fmt.Errorf("unsupported routing_key: %q", cfg.(*Config).RoutingKey) } return &metricExporter, nil - } func (e *metricExporterImp) Capabilities() consumer.Capabilities { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_aws_cloudmap.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_aws_cloudmap.go index 72b03f7e04..324093bc53 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_aws_cloudmap.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_aws_cloudmap.go @@ -101,7 +101,7 @@ func newCloudMapResolver( } if healthStatus == nil { - var healthStatusFilter = types.HealthStatusFilterHealthy + healthStatusFilter := types.HealthStatusFilterHealthy healthStatus = &healthStatusFilter } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_k8s.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_k8s.go index c2a9bbe20a..87940260a8 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_k8s.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_k8s.go @@ -77,7 +77,6 @@ func newK8sResolver(clt kubernetes.Interface, timeout time.Duration, tb *metadata.TelemetryBuilder, ) (*k8sResolver, error) { - if len(service) == 0 { return nil, errNoSvc } @@ -174,6 +173,7 @@ func (r *k8sResolver) shutdown(_ context.Context) error { r.shutdownWg.Wait() return nil } + func newInClusterClient() (kubernetes.Interface, error) { cfg, err := config.GetConfig() if err != nil { @@ -228,6 +228,7 @@ func (r *k8sResolver) onChange(f func([]string)) { defer r.changeCallbackLock.Unlock() r.onChangeCallbacks = append(r.onChangeCallbacks, f) } + func (r *k8sResolver) Endpoints() []string { r.updateLock.RLock() defer r.updateLock.RUnlock() diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_k8s_handler.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_k8s_handler.go index 0eac62ea40..186111eba4 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_k8s_handler.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_k8s_handler.go @@ -25,7 +25,7 @@ type handler struct { } func (h handler) OnAdd(obj any, _ bool) { - var endpoints []string + var endpoints map[string]bool switch object := obj.(type) { case *corev1.Endpoints: @@ -36,7 +36,7 @@ func (h handler) OnAdd(obj any, _ bool) { return } changed := false - for _, ep := range endpoints { + for ep := range endpoints { if _, loaded := h.endpoints.LoadOrStore(ep, true); !loaded { changed = true } @@ -49,28 +49,36 @@ func (h handler) OnAdd(obj any, _ bool) { func (h handler) OnUpdate(oldObj, newObj any) { switch oldEps := oldObj.(type) { case *corev1.Endpoints: - epRemove := convertToEndpoints(oldEps) - for _, ep := range epRemove { - h.endpoints.Delete(ep) - } - if len(epRemove) > 0 { - _, _ = h.callback(context.Background()) - } - newEps, ok := newObj.(*corev1.Endpoints) if !ok { h.logger.Warn("Got an unexpected Kubernetes data type during the update of the pods for a service", zap.Any("obj", newObj)) h.telemetry.LoadbalancerNumResolutions.Add(context.Background(), 1, metric.WithAttributeSet(k8sResolverFailureAttrSet)) return } + + oldEndpoints := convertToEndpoints(oldEps) + newEndpoints := convertToEndpoints(newEps) changed := false - for _, ep := range convertToEndpoints(newEps) { + + // Iterate through old endpoints and remove those that are not in the new list. + for ep := range oldEndpoints { + if _, ok := newEndpoints[ep]; !ok { + h.endpoints.Delete(ep) + changed = true + } + } + + // Iterate through new endpoints and add those that are not in the endpoints map already. + for ep := range newEndpoints { if _, loaded := h.endpoints.LoadOrStore(ep, true); !loaded { changed = true } } + if changed { _, _ = h.callback(context.Background()) + } else { + h.logger.Debug("No changes detected in the endpoints for the service", zap.Any("old", oldEps), zap.Any("new", newEps)) } default: // unsupported h.logger.Warn("Got an unexpected Kubernetes data type during the update of the pods for a service", zap.Any("obj", oldObj)) @@ -80,7 +88,7 @@ func (h handler) OnUpdate(oldObj, newObj any) { } func (h handler) OnDelete(obj any) { - var endpoints []string + var endpoints map[string]bool switch object := obj.(type) { case *cache.DeletedFinalStateUnknown: h.OnDelete(object.Obj) @@ -95,19 +103,19 @@ func (h handler) OnDelete(obj any) { return } if len(endpoints) != 0 { - for _, endpoint := range endpoints { + for endpoint := range endpoints { h.endpoints.Delete(endpoint) } _, _ = h.callback(context.Background()) } } -func convertToEndpoints(eps ...*corev1.Endpoints) []string { - var ipAddress []string +func convertToEndpoints(eps ...*corev1.Endpoints) map[string]bool { + ipAddress := map[string]bool{} for _, ep := range eps { for _, subsets := range ep.Subsets { for _, addr := range subsets.Addresses { - ipAddress = append(ipAddress, addr.IP) + ipAddress[addr.IP] = true } } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/trace_exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/trace_exporter.go index 3e088cea4b..e6fb9647d9 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/trace_exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter/trace_exporter.go @@ -45,7 +45,9 @@ func newTracesExporter(params exporter.Settings, cfg component.Config) (*traceEx exporterFactory := otlpexporter.NewFactory() cfFunc := func(ctx context.Context, endpoint string) (component.Component, error) { oCfg := buildExporterConfig(cfg.(*Config), endpoint) - return exporterFactory.CreateTracesExporter(ctx, params, &oCfg) + oParams := buildExporterSettings(params, endpoint) + + return exporterFactory.CreateTraces(ctx, oParams, &oCfg) } lb, err := newLoadBalancer(params.Logger, cfg, cfFunc, telemetry) @@ -69,12 +71,6 @@ func newTracesExporter(params exporter.Settings, cfg component.Config) (*traceEx return &traceExporter, nil } -func buildExporterConfig(cfg *Config, endpoint string) otlpexporter.Config { - oCfg := cfg.Protocol.OTLP - oCfg.Endpoint = endpoint - return oCfg -} - func (e *traceExporterImp) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: false} } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/README.md index 7becbc6f09..c614d8c17b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/README.md @@ -8,7 +8,7 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Flogzio%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Flogzio) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Flogzio%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Flogzio) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@yotamloe](https://www.github.com/yotamloe) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/config.go index d0d12bfacc..74c53e4958 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/config.go @@ -15,15 +15,15 @@ import ( // Config contains Logz.io specific configuration such as Account TracesToken, Region, etc. type Config struct { - confighttp.ClientConfig `mapstructure:",squash"` // confighttp client settings https://pkg.go.dev/go.opentelemetry.io/collector/config/confighttp#ClientConfig - exporterhelper.QueueSettings `mapstructure:"sending_queue"` // exporter helper queue settings https://pkg.go.dev/go.opentelemetry.io/collector/exporter/exporterhelper#QueueSettings - configretry.BackOffConfig `mapstructure:"retry_on_failure"` // exporter helper retry settings https://pkg.go.dev/go.opentelemetry.io/collector/exporter/exporterhelper#RetrySettings - Token configopaque.String `mapstructure:"account_token"` // Your Logz.io Account Token, can be found at https://app.logz.io/#/dashboard/settings/general - Region string `mapstructure:"region"` // Your Logz.io 2-letter region code, can be found at https://docs.logz.io/user-guide/accounts/account-region.html#available-regions - CustomEndpoint string `mapstructure:"custom_endpoint"` // **Deprecation** Custom endpoint to ship traces to. Use only for dev and tests. - DrainInterval int `mapstructure:"drain_interval"` // **Deprecation** Queue drain interval in seconds. Defaults to `3`. - QueueCapacity int64 `mapstructure:"queue_capacity"` // **Deprecation** Queue capacity in bytes. Defaults to `20 * 1024 * 1024` ~ 20mb. - QueueMaxLength int `mapstructure:"queue_max_length"` // **Deprecation** Max number of items allowed in the queue. Defaults to `500000`. + confighttp.ClientConfig `mapstructure:",squash"` // confighttp client settings https://pkg.go.dev/go.opentelemetry.io/collector/config/confighttp#ClientConfig + QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"` // exporter helper queue settings https://pkg.go.dev/go.opentelemetry.io/collector/exporter/exporterhelper#QueueSettings + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // exporter helper retry settings https://pkg.go.dev/go.opentelemetry.io/collector/exporter/exporterhelper#RetrySettings + Token configopaque.String `mapstructure:"account_token"` // Your Logz.io Account Token, can be found at https://app.logz.io/#/dashboard/settings/general + Region string `mapstructure:"region"` // Your Logz.io 2-letter region code, can be found at https://docs.logz.io/user-guide/accounts/account-region.html#available-regions + CustomEndpoint string `mapstructure:"custom_endpoint"` // **Deprecation** Custom endpoint to ship traces to. Use only for dev and tests. + DrainInterval int `mapstructure:"drain_interval"` // **Deprecation** Queue drain interval in seconds. Defaults to `3`. + QueueCapacity int64 `mapstructure:"queue_capacity"` // **Deprecation** Queue capacity in bytes. Defaults to `20 * 1024 * 1024` ~ 20mb. + QueueMaxLength int `mapstructure:"queue_max_length"` // **Deprecation** Max number of items allowed in the queue. Defaults to `500000`. } func (c *Config) Validate() error { @@ -36,7 +36,7 @@ func (c *Config) Validate() error { // CheckAndWarnDeprecatedOptions Is checking for soon deprecated configuration options (queue_max_length, queue_capacity, drain_interval, custom_endpoint) log a warning message and map to the relevant updated option func (c *Config) checkAndWarnDeprecatedOptions(logger hclog.Logger) { if c.QueueCapacity != 0 { - logger.Warn("You are using the deprecated`queue_capacity` option that will be removed in the next release; use exporter helper configuration instead: https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md") + logger.Warn("You are using the deprecated `queue_capacity` option that will be removed in the next release; use exporter helper configuration instead: https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md") } // Warn and map queue_max_length -> QueueSettings.QueueSize if c.QueueMaxLength != 0 { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/exporter.go index 218d2351a2..a4cc01780e 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/exporter.go @@ -77,18 +77,19 @@ func newLogzioTracesExporter(config *Config, set exporter.Settings) (exporter.Tr return nil, err } config.checkAndWarnDeprecatedOptions(exporter.logger) - return exporterhelper.NewTracesExporter( + return exporterhelper.NewTraces( context.TODO(), set, config, exporter.pushTraceData, exporterhelper.WithStart(exporter.start), // disable since we rely on http.Client timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}), exporterhelper.WithQueue(config.QueueSettings), exporterhelper.WithRetry(config.BackOffConfig), ) } + func newLogzioLogsExporter(config *Config, set exporter.Settings) (exporter.Logs, error) { exporter, err := newLogzioExporter(config, set) if err != nil { @@ -99,14 +100,14 @@ func newLogzioLogsExporter(config *Config, set exporter.Settings) (exporter.Logs return nil, err } config.checkAndWarnDeprecatedOptions(exporter.logger) - return exporterhelper.NewLogsExporter( + return exporterhelper.NewLogs( context.TODO(), set, config, exporter.pushLogData, exporterhelper.WithStart(exporter.start), // disable since we rely on http.Client timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}), exporterhelper.WithQueue(config.QueueSettings), exporterhelper.WithRetry(config.BackOffConfig), ) @@ -182,10 +183,7 @@ func mergeMapEntries(maps ...pcommon.Map) pcommon.Map { func (exporter *logzioExporter) pushTraceData(ctx context.Context, traces ptrace.Traces) error { // a buffer to store logzio span and services bytes var dataBuffer bytes.Buffer - batches, err := jaeger.ProtoFromTraces(traces) - if err != nil { - return err - } + batches := jaeger.ProtoFromTraces(traces) for _, batch := range batches { for _, span := range batch.Spans { span.Process = batch.Process @@ -195,7 +193,7 @@ func (exporter *logzioExporter) pushTraceData(ctx context.Context, traces ptrace if transformErr != nil { return transformErr } - _, err = dataBuffer.Write(append(logzioSpan, '\n')) + _, err := dataBuffer.Write(append(logzioSpan, '\n')) if err != nil { return err } @@ -220,7 +218,7 @@ func (exporter *logzioExporter) pushTraceData(ctx context.Context, traces ptrace } } } - err = exporter.export(ctx, exporter.config.ClientConfig.Endpoint, dataBuffer.Bytes()) + err := exporter.export(ctx, exporter.config.ClientConfig.Endpoint, dataBuffer.Bytes()) // reset the data buffer after each export to prevent duplicated data dataBuffer.Reset() return err diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/factory.go index 047a2a73d5..463cfeb0f5 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter/factory.go @@ -15,7 +15,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configcompression" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configopaque" "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -30,24 +29,21 @@ func NewFactory() exporter.Factory { createDefaultConfig, exporter.WithTraces(createTracesExporter, metadata.TracesStability), exporter.WithLogs(createLogsExporter, metadata.LogsStability)) - } func createDefaultConfig() component.Config { + clientConfig := confighttp.NewDefaultClientConfig() + clientConfig.Timeout = 30 * time.Second + // Default to gzip compression + clientConfig.Compression = configcompression.TypeGzip + // We almost read 0 bytes, so no need to tune ReadBufferSize. + clientConfig.WriteBufferSize = 512 * 1024 return &Config{ Region: "", Token: "", BackOffConfig: configretry.NewDefaultBackOffConfig(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), - ClientConfig: confighttp.ClientConfig{ - Endpoint: "", - Timeout: 30 * time.Second, - Headers: map[string]configopaque.String{}, - // Default to gzip compression - Compression: configcompression.TypeGzip, - // We almost read 0 bytes, so no need to tune ReadBufferSize. - WriteBufferSize: 512 * 1024, - }, + QueueSettings: exporterhelper.NewDefaultQueueConfig(), + ClientConfig: clientConfig, } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/README.md index e61a99217b..82d10371d2 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/README.md @@ -6,9 +6,9 @@ | Stability | [beta]: metrics | | Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fprometheus%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fprometheus) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fprometheus%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fprometheus) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@dashpole](https://www.github.com/dashpole) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@dashpole](https://www.github.com/dashpole), [@ArthurSens](https://www.github.com/ArthurSens) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/accumulator.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/accumulator.go index e5c7f28109..3a6559118f 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/accumulator.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/accumulator.go @@ -365,7 +365,6 @@ func accumulateHistogramValues(prev, current, dest pmetric.HistogramDataPoint) { } if match { - dest.SetCount(newer.Count() + older.Count()) dest.SetSum(newer.Sum() + older.Sum()) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/collector.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/collector.go index f6065307eb..dd38910954 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/collector.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/collector.go @@ -7,20 +7,22 @@ import ( "encoding/hex" "fmt" "sort" + "sync" + "time" "github.com/prometheus/client_golang/prometheus" + dto "github.com/prometheus/client_model/go" "github.com/prometheus/common/model" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" conventions "go.opentelemetry.io/collector/semconv/v1.25.0" "go.uber.org/zap" + "google.golang.org/protobuf/proto" prometheustranslator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus" ) -var ( - separatorString = string([]byte{model.SeparatorByte}) -) +var separatorString = string([]byte{model.SeparatorByte}) type collector struct { accumulator accumulator @@ -30,6 +32,13 @@ type collector struct { addMetricSuffixes bool namespace string constLabels prometheus.Labels + metricFamilies sync.Map + metricExpiration time.Duration +} + +type metricFamily struct { + lastSeen time.Time + mf *dto.MetricFamily } func newCollector(config *Config, logger *zap.Logger) *collector { @@ -40,6 +49,7 @@ func newCollector(config *Config, logger *zap.Logger) *collector { sendTimestamps: config.SendTimestamps, constLabels: config.ConstLabels, addMetricSuffixes: config.AddMetricSuffixes, + metricExpiration: config.MetricExpiration, } } @@ -72,7 +82,6 @@ func convertExemplars(exemplars pmetric.ExemplarSlice) []prometheus.Exemplar { Labels: exemplarLabels, Timestamp: e.Timestamp().AsTime(), } - } return result } @@ -105,7 +114,13 @@ func (c *collector) convertMetric(metric pmetric.Metric, resourceAttrs pcommon.M return nil, errUnknownMetricType } -func (c *collector) getMetricMetadata(metric pmetric.Metric, attributes pcommon.Map, resourceAttrs pcommon.Map) (*prometheus.Desc, []string) { +func (c *collector) getMetricMetadata(metric pmetric.Metric, mType *dto.MetricType, attributes pcommon.Map, resourceAttrs pcommon.Map) (*prometheus.Desc, []string, error) { + name := prometheustranslator.BuildCompliantName(metric, c.namespace, c.addMetricSuffixes) + help, err := c.validateMetrics(name, metric.Description(), mType) + if err != nil { + return nil, nil, err + } + keys := make([]string, 0, attributes.Len()+2) // +2 for job and instance labels. values := make([]string, 0, attributes.Len()+2) @@ -124,18 +139,17 @@ func (c *collector) getMetricMetadata(metric pmetric.Metric, attributes pcommon. values = append(values, instance) } - return prometheus.NewDesc( - prometheustranslator.BuildCompliantName(metric, c.namespace, c.addMetricSuffixes), - metric.Description(), - keys, - c.constLabels, - ), values + return prometheus.NewDesc(name, help, keys, c.constLabels), values, nil } func (c *collector) convertGauge(metric pmetric.Metric, resourceAttrs pcommon.Map) (prometheus.Metric, error) { ip := metric.Gauge().DataPoints().At(0) - desc, attributes := c.getMetricMetadata(metric, ip.Attributes(), resourceAttrs) + desc, attributes, err := c.getMetricMetadata(metric, dto.MetricType_GAUGE.Enum(), ip.Attributes(), resourceAttrs) + if err != nil { + return nil, err + } + var value float64 switch ip.ValueType() { case pmetric.NumberDataPointValueTypeInt: @@ -163,11 +177,16 @@ func (c *collector) convertSum(metric pmetric.Metric, resourceAttrs pcommon.Map) ip := metric.Sum().DataPoints().At(0) metricType := prometheus.GaugeValue + mType := dto.MetricType_GAUGE.Enum() if metric.Sum().IsMonotonic() { metricType = prometheus.CounterValue + mType = dto.MetricType_COUNTER.Enum() } - desc, attributes := c.getMetricMetadata(metric, ip.Attributes(), resourceAttrs) + desc, attributes, err := c.getMetricMetadata(metric, mType, ip.Attributes(), resourceAttrs) + if err != nil { + return nil, err + } var value float64 switch ip.ValueType() { case pmetric.NumberDataPointValueTypeInt: @@ -183,7 +202,6 @@ func (c *collector) convertSum(metric pmetric.Metric, resourceAttrs pcommon.Map) } var m prometheus.Metric - var err error if metricType == prometheus.CounterValue && ip.StartTimestamp().AsTime().Unix() > 0 { m, err = prometheus.NewConstMetricWithCreatedTimestamp(desc, metricType, value, ip.StartTimestamp().AsTime(), attributes...) } else { @@ -219,9 +237,11 @@ func (c *collector) convertSummary(metric pmetric.Metric, resourceAttrs pcommon. quantiles[qvj.Quantile()] = qvj.Value() } - desc, attributes := c.getMetricMetadata(metric, point.Attributes(), resourceAttrs) + desc, attributes, err := c.getMetricMetadata(metric, dto.MetricType_SUMMARY.Enum(), point.Attributes(), resourceAttrs) + if err != nil { + return nil, err + } var m prometheus.Metric - var err error if point.StartTimestamp().AsTime().Unix() > 0 { m, err = prometheus.NewConstSummaryWithCreatedTimestamp(desc, point.Count(), point.Sum(), quantiles, point.StartTimestamp().AsTime(), attributes...) } else { @@ -238,7 +258,10 @@ func (c *collector) convertSummary(metric pmetric.Metric, resourceAttrs pcommon. func (c *collector) convertDoubleHistogram(metric pmetric.Metric, resourceAttrs pcommon.Map) (prometheus.Metric, error) { ip := metric.Histogram().DataPoints().At(0) - desc, attributes := c.getMetricMetadata(metric, ip.Attributes(), resourceAttrs) + desc, attributes, err := c.getMetricMetadata(metric, dto.MetricType_HISTOGRAM.Enum(), ip.Attributes(), resourceAttrs) + if err != nil { + return nil, err + } indicesMap := make(map[float64]int) buckets := make([]float64, 0, ip.BucketCounts().Len()) @@ -267,7 +290,6 @@ func (c *collector) convertDoubleHistogram(metric pmetric.Metric, resourceAttrs exemplars := convertExemplars(ip.Exemplars()) var m prometheus.Metric - var err error if ip.StartTimestamp().AsTime().Unix() > 0 { m, err = prometheus.NewConstHistogramWithCreatedTimestamp(desc, ip.Count(), ip.Sum(), points, ip.StartTimestamp().AsTime(), attributes...) } else { @@ -404,4 +426,50 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) { ch <- m c.logger.Debug(fmt.Sprintf("metric served: %s", m.Desc().String())) } + c.cleanupMetricFamilies() +} + +func (c *collector) validateMetrics(name, description string, metricType *dto.MetricType) (help string, err error) { + now := time.Now() + v, exist := c.metricFamilies.Load(name) + if !exist { + c.metricFamilies.Store(name, metricFamily{ + lastSeen: now, + mf: &dto.MetricFamily{ + Name: proto.String(name), + Help: proto.String(description), + Type: metricType, + }, + }) + return description, nil + } + emf := v.(metricFamily) + if emf.mf.GetType() != *metricType { + return "", fmt.Errorf("instrument type conflict, using existing type definition. instrument: %s, existing: %s, dropped: %s", name, emf.mf.GetType(), *metricType) + } + emf.lastSeen = now + c.metricFamilies.Store(name, emf) + if emf.mf.GetHelp() != description { + c.logger.Info( + "Instrument description conflict, using existing", + zap.String("instrument", name), + zap.String("existing", emf.mf.GetHelp()), + zap.String("dropped", description), + ) + } + return emf.mf.GetHelp(), nil +} + +func (c *collector) cleanupMetricFamilies() { + expirationTime := time.Now().Add(-c.metricExpiration) + + c.metricFamilies.Range(func(key, value any) bool { + v := value.(metricFamily) + if expirationTime.After(v.lastSeen) { + c.logger.Debug("metric expired", zap.String("instrument", key.(string))) + c.metricFamilies.Delete(key) + return true + } + return true + }) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/factory.go index 2a94fc67a9..9b3975842a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/factory.go @@ -46,7 +46,7 @@ func createMetricsExporter( return nil, err } - exporter, err := exporterhelper.NewMetricsExporter( + exporter, err := exporterhelper.NewMetrics( ctx, set, cfg, diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/metadata.yaml index 16e8e72fdd..624b14ed43 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/metadata.yaml @@ -8,7 +8,7 @@ status: - core - contrib codeowners: - active: [Aneurysm9, dashpole] + active: [Aneurysm9, dashpole, ArthurSens] tests: config: diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/prometheus.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/prometheus.go index 893653d453..8de4fa367e 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/prometheus.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter/prometheus.go @@ -20,7 +20,7 @@ type prometheusExporter struct { config Config name string endpoint string - shutdownFunc func() error + shutdownFunc func(ctx context.Context) error handler http.Handler collector *collector registry *prometheus.Registry @@ -44,7 +44,7 @@ func newPrometheusExporter(config *Config, set exporter.Settings) (*prometheusEx endpoint: addr, collector: collector, registry: registry, - shutdownFunc: func() error { return nil }, + shutdownFunc: func(_ context.Context) error { return nil }, handler: promhttp.HandlerFor( registry, promhttp.HandlerOpts{ @@ -63,13 +63,15 @@ func (pe *prometheusExporter) Start(ctx context.Context, host component.Host) er return err } - pe.shutdownFunc = ln.Close - mux := http.NewServeMux() mux.Handle("/metrics", pe.handler) srv, err := pe.config.ToServer(ctx, host, pe.settings, mux) if err != nil { - return err + lnerr := ln.Close() + return errors.Join(err, lnerr) + } + pe.shutdownFunc = func(ctx context.Context) error { + return srv.Shutdown(ctx) } go func() { _ = srv.Serve(ln) @@ -88,6 +90,6 @@ func (pe *prometheusExporter) ConsumeMetrics(_ context.Context, md pmetric.Metri return nil } -func (pe *prometheusExporter) Shutdown(context.Context) error { - return pe.shutdownFunc() +func (pe *prometheusExporter) Shutdown(ctx context.Context) error { + return pe.shutdownFunc(ctx) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/DESIGN.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/DESIGN.md index 3fbf369050..36946ddccd 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/DESIGN.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/DESIGN.md @@ -45,10 +45,10 @@ Because of the gaps mentioned above, this project will convert from the current ## **2. Prometheus Remote Write/Cortex Exporter** -The Prometheus remote write/Cortex exporter should receive OTLP metrics, group data points by metric name and label set, convert each group to a TimeSeries, and send all TimeSeries to a storage backend via HTTP. +The Prometheus remote write/Cortex exporter should receive OTLP metrics, group data points by metric name and label set, convert each group to a TimeSeries, and send all TimeSeries to a storage backend via HTTP. ### **2.1 Receiving Metrics** -The Prometheus remote write/Cortex exporter receives a MetricsData instance in its PushMetrics() function. MetricsData contains a collection of Metric instances. Each Metric instance contains a series of data points, and each data point has a set of labels associated with it. Since Prometheus remote write TimeSeries are identified by unique sets of labels, the exporter needs to group data points within each Metric instance by their label set, and convert each group to a TimeSeries. +The Prometheus remote write/Cortex exporter receives a MetricsData instance in its PushMetrics() function. MetricsData contains a collection of Metric instances. Each Metric instance contains a series of data points, and each data point has a set of labels associated with it. Since Prometheus remote write TimeSeries are identified by unique sets of labels, the exporter needs to group data points within each Metric instance by their label set, and convert each group to a TimeSeries. To group data points by label set, the exporter should create a map with each PushMetrics() call. The key of the map should represent a combination of the following information: @@ -67,7 +67,7 @@ The value of the map should be Prometheus TimeSeries, and each data point’s va Pseudocode: - func PushMetrics(metricsData) { + func PushMetrics(metricsData) { // Create a map that stores distinct TimeSeries map := make(map[String][]TimeSeries) @@ -81,7 +81,7 @@ Pseudocode: // Add to TimeSeries // Sends TimeSeries to backend - export(map) + export(map) } ### **2.2 Mapping of OTLP Metrics to TimeSeries** diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/README.md index 806ee037e4..4357de6689 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/README.md @@ -6,9 +6,9 @@ | Stability | [beta]: metrics | | Distributions | [core], [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fprometheusremotewrite%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fprometheusremotewrite) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fprometheusremotewrite%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fprometheusremotewrite) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@rapphil](https://www.github.com/rapphil), [@dashpole](https://www.github.com/dashpole) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@rapphil](https://www.github.com/rapphil), [@dashpole](https://www.github.com/dashpole), [@ArthurSens](https://www.github.com/ArthurSens) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib @@ -54,12 +54,12 @@ The following settings can be optionally configured: - `remote_write_queue`: fine tuning for queueing and sending of the outgoing remote writes. - `enabled`: enable the sending queue (default: `true`) - `queue_size`: number of OTLP metrics that can be queued. Ignored if `enabled` is `false` (default: `10000`) - - `num_consumers`: minimum number of workers to use to fan out the outgoing requests. (default: `5`) **WARNING:** Currently, num_consumers doesn't have any effect due to incompatibility with Prometheus remote write API. The value will be ignored. Please see https://github.com/open-telemetry/opentelemetry-collector/issues/2949 for more information. + - `num_consumers`: minimum number of workers to use to fan out the outgoing requests. (default: `5`) - `resource_to_telemetry_conversion` - `enabled` (default = false): If `enabled` is `true`, all the resource attributes will be converted to metric labels by default. - `target_info`: customize `target_info` metric - `enabled` (default = true): If `enabled` is `true`, a `target_info` metric will be generated for each resource metric (see https://github.com/open-telemetry/opentelemetry-specification/pull/2381). -- `export_created_metric`: +- `export_created_metric`: `WARNING` Deprecated and planned for removal in v0.116.0. See [related issue](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/35003) for more information. - `enabled` (default = false): If `enabled` is `true`, a `_created` metric is exported for Summary, Histogram, and Monotonic Sum metric points if `StartTimeUnixNano` is set. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/config.go index f63468783b..23b8c5f1e4 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/config.go @@ -16,8 +16,8 @@ import ( // Config defines configuration for Remote Write exporter. type Config struct { - exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - configretry.BackOffConfig `mapstructure:"retry_on_failure"` + TimeoutSettings exporterhelper.TimeoutConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + configretry.BackOffConfig `mapstructure:"retry_on_failure"` // prefix attached to each exported metric name // See: https://prometheus.io/docs/practices/naming/#metric-names @@ -45,6 +45,8 @@ type Config struct { TargetInfo *TargetInfo `mapstructure:"target_info,omitempty"` // CreatedMetric allows customizing creation of _created metrics + // Deprecated[0.114.0]: The feature doesn't provide the expected behavior. Use Prometheus remote-write v2 to enable sending Created Timestamps. + // This feature is planned to be removed in v0.116.0 CreatedMetric *CreatedMetric `mapstructure:"export_created_metric,omitempty"` // AddMetricSuffixes controls whether unit and type suffixes are added to metrics on export diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/exporter.go index 8cad87a532..74e1cff42b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/exporter.go @@ -53,6 +53,21 @@ func (p *prwTelemetryOtel) recordTranslatedTimeSeries(ctx context.Context, numTS p.telemetryBuilder.ExporterPrometheusremotewriteTranslatedTimeSeries.Add(ctx, int64(numTS), metric.WithAttributes(p.otelAttrs...)) } +type buffer struct { + protobuf *proto.Buffer + snappy []byte +} + +// A reusable buffer pool for serializing protobufs and compressing them with Snappy. +var bufferPool = sync.Pool{ + New: func() any { + return &buffer{ + protobuf: proto.NewBuffer(nil), + snappy: nil, + } + }, +} + // prwExporter converts OTLP metrics to Prometheus remote write TimeSeries and sends them to a remote endpoint. type prwExporter struct { endpointURL *url.URL @@ -128,6 +143,10 @@ func newPRWExporter(cfg *Config, set exporter.Settings) (*prwExporter, error) { batchTimeSeriesState: newBatchTimeSericesState(), } + if prwe.exporterSettings.ExportCreatedMetric { + prwe.settings.Logger.Warn("export_created_metric is deprecated and will be removed in a future release") + } + prwe.wal = newWAL(cfg.WAL, prwe.export) return prwe, nil } @@ -271,14 +290,26 @@ func (prwe *prwExporter) export(ctx context.Context, requests []*prompb.WriteReq } func (prwe *prwExporter) execute(ctx context.Context, writeReq *prompb.WriteRequest) error { + buf := bufferPool.Get().(*buffer) + buf.protobuf.Reset() + defer bufferPool.Put(buf) + // Uses proto.Marshal to convert the WriteRequest into bytes array - data, errMarshal := proto.Marshal(writeReq) + errMarshal := buf.protobuf.Marshal(writeReq) if errMarshal != nil { return consumererror.NewPermanent(errMarshal) } // If we don't pass a buffer large enough, Snappy Encode function will not use it and instead will allocate a new buffer. - // Therefore we always let Snappy decide the size of the buffer. - compressedData := snappy.Encode(nil, data) + // Manually grow the buffer to make sure Snappy uses it and we can re-use it afterwards. + maxCompressedLen := snappy.MaxEncodedLen(len(buf.protobuf.Bytes())) + if maxCompressedLen > len(buf.snappy) { + if cap(buf.snappy) < maxCompressedLen { + buf.snappy = make([]byte, maxCompressedLen) + } else { + buf.snappy = buf.snappy[:maxCompressedLen] + } + } + compressedData := snappy.Encode(buf.snappy, buf.protobuf.Bytes()) // executeFunc can be used for backoff and non backoff scenarios. executeFunc := func() error { @@ -292,7 +323,7 @@ func (prwe *prwExporter) execute(ctx context.Context, writeReq *prompb.WriteRequ } // Create the HTTP POST request to send to the endpoint - req, err := http.NewRequestWithContext(ctx, "POST", prwe.endpointURL.String(), bytes.NewReader(compressedData)) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, prwe.endpointURL.String(), bytes.NewReader(compressedData)) if err != nil { return backoff.Permanent(consumererror.NewPermanent(err)) } @@ -326,7 +357,7 @@ func (prwe *prwExporter) execute(ctx context.Context, writeReq *prompb.WriteRequ // 429 errors are recoverable and the exporter should retry if RetryOnHTTP429 enabled // Reference: https://github.com/prometheus/prometheus/pull/12677 - if prwe.retryOnHTTP429 && resp.StatusCode == 429 { + if prwe.retryOnHTTP429 && resp.StatusCode == http.StatusTooManyRequests { return rerr } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/factory.go index 151ad5a81e..46c52d233d 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/factory.go @@ -10,7 +10,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configopaque" "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -36,17 +35,13 @@ func NewFactory() exporter.Factory { } func createMetricsExporter(ctx context.Context, set exporter.Settings, - cfg component.Config) (exporter.Metrics, error) { - + cfg component.Config, +) (exporter.Metrics, error) { prwCfg, ok := cfg.(*Config) if !ok { return nil, errors.New("invalid configuration") } - if prwCfg.RemoteWriteQueue.NumConsumers != 0 { - set.Logger.Warn("Currently, remote_write_queue.num_consumers doesn't have any effect due to incompatibility with Prometheus remote write API. The value will be ignored. Please see https://github.com/open-telemetry/opentelemetry-collector/issues/2949 for more information.") - } - prwe, err := newPRWExporter(prwCfg, set) if err != nil { return nil, err @@ -58,13 +53,13 @@ func createMetricsExporter(ctx context.Context, set exporter.Settings, // order for each timeseries. If we shard the incoming metrics // without considering this limitation, we experience // "out of order samples" errors. - exporter, err := exporterhelper.NewMetricsExporter( + exporter, err := exporterhelper.NewMetrics( ctx, set, cfg, prwe.PushMetrics, exporterhelper.WithTimeout(prwCfg.TimeoutSettings), - exporterhelper.WithQueue(exporterhelper.QueueSettings{ + exporterhelper.WithQueue(exporterhelper.QueueConfig{ Enabled: prwCfg.RemoteWriteQueue.Enabled, NumConsumers: 1, QueueSize: prwCfg.RemoteWriteQueue.QueueSize, @@ -81,23 +76,22 @@ func createMetricsExporter(ctx context.Context, set exporter.Settings, func createDefaultConfig() component.Config { retrySettings := configretry.NewDefaultBackOffConfig() retrySettings.InitialInterval = 50 * time.Millisecond + clientConfig := confighttp.NewDefaultClientConfig() + clientConfig.Endpoint = "http://some.url:9411/api/prom/push" + // We almost read 0 bytes, so no need to tune ReadBufferSize. + clientConfig.ReadBufferSize = 0 + clientConfig.WriteBufferSize = 512 * 1024 + clientConfig.Timeout = exporterhelper.NewDefaultTimeoutConfig().Timeout return &Config{ Namespace: "", ExternalLabels: map[string]string{}, MaxBatchSizeBytes: 3000000, - TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), + TimeoutSettings: exporterhelper.NewDefaultTimeoutConfig(), BackOffConfig: retrySettings, AddMetricSuffixes: true, SendMetadata: false, - ClientConfig: confighttp.ClientConfig{ - Endpoint: "http://some.url:9411/api/prom/push", - // We almost read 0 bytes, so no need to tune ReadBufferSize. - ReadBufferSize: 0, - WriteBufferSize: 512 * 1024, - Timeout: exporterhelper.NewDefaultTimeoutSettings().Timeout, - Headers: map[string]configopaque.String{}, - }, + ClientConfig: clientConfig, // TODO(jbd): Adjust the default queue size. RemoteWriteQueue: RemoteWriteQueue{ Enabled: true, diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go index 3492cf9440..248d453764 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go @@ -6,21 +6,17 @@ import ( "errors" "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" ) -// Deprecated: [v0.108.0] use LeveledMeter instead. func Meter(settings component.TelemetrySettings) metric.Meter { return settings.MeterProvider.Meter("github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter") } -func LeveledMeter(settings component.TelemetrySettings, level configtelemetry.Level) metric.Meter { - return settings.LeveledMeterProvider(level).Meter("github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter") -} - func Tracer(settings component.TelemetrySettings) trace.Tracer { return settings.TracerProvider.Tracer("github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter") } @@ -31,28 +27,35 @@ type TelemetryBuilder struct { meter metric.Meter ExporterPrometheusremotewriteFailedTranslations metric.Int64Counter ExporterPrometheusremotewriteTranslatedTimeSeries metric.Int64Counter - meters map[configtelemetry.Level]metric.Meter } -// telemetryBuilderOption applies changes to default builder. -type telemetryBuilderOption func(*TelemetryBuilder) +// TelemetryBuilderOption applies changes to default builder. +type TelemetryBuilderOption interface { + apply(*TelemetryBuilder) +} + +type telemetryBuilderOptionFunc func(mb *TelemetryBuilder) + +func (tbof telemetryBuilderOptionFunc) apply(mb *TelemetryBuilder) { + tbof(mb) +} // NewTelemetryBuilder provides a struct with methods to update all internal telemetry // for a component -func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { - builder := TelemetryBuilder{meters: map[configtelemetry.Level]metric.Meter{}} +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...TelemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{} for _, op := range options { - op(&builder) + op.apply(&builder) } - builder.meters[configtelemetry.LevelBasic] = LeveledMeter(settings, configtelemetry.LevelBasic) + builder.meter = Meter(settings) var err, errs error - builder.ExporterPrometheusremotewriteFailedTranslations, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( + builder.ExporterPrometheusremotewriteFailedTranslations, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_exporter_prometheusremotewrite_failed_translations", metric.WithDescription("Number of translation operations that failed to translate metrics from Otel to Prometheus"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.ExporterPrometheusremotewriteTranslatedTimeSeries, err = builder.meters[configtelemetry.LevelBasic].Int64Counter( + builder.ExporterPrometheusremotewriteTranslatedTimeSeries, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_exporter_prometheusremotewrite_translated_time_series", metric.WithDescription("Number of Prometheus time series that were translated from OTel metrics"), metric.WithUnit("1"), @@ -60,3 +63,10 @@ func NewTelemetryBuilder(settings component.TelemetrySettings, options ...teleme errs = errors.Join(errs, err) return &builder, errs } + +func getLeveledMeter(meter metric.Meter, cfgLevel, srvLevel configtelemetry.Level) metric.Meter { + if cfgLevel <= srvLevel { + return meter + } + return noop.Meter{} +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/metadata.yaml index 5cb0de3750..9d9ab6f8bb 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter/metadata.yaml @@ -6,7 +6,7 @@ status: beta: [metrics] distributions: [core, contrib] codeowners: - active: [Aneurysm9, rapphil, dashpole] + active: [Aneurysm9, rapphil, dashpole, ArthurSens] tests: expect_consumer_error: true diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/README.md index e6dc89e987..8c391ef71c 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/README.md @@ -8,7 +8,7 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fsapm%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fsapm) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fsapm%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fsapm) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax), [@atoulme](https://www.github.com/atoulme) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/config.go index 0c34eb7d23..90107d461f 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/config.go @@ -22,7 +22,6 @@ const ( // Config defines configuration for SAPM exporter. type Config struct { - // Endpoint is the destination to where traces will be sent to in SAPM format. // It must be a full URL and include the scheme, port and path e.g, https://ingest.signalfx.com/v2/trace Endpoint string `mapstructure:"endpoint"` @@ -49,9 +48,9 @@ type Config struct { splunk.AccessTokenPassthroughConfig `mapstructure:",squash"` - exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - configretry.BackOffConfig `mapstructure:"retry_on_failure"` + TimeoutSettings exporterhelper.TimeoutConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` } func (c *Config) Validate() error { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/exporter.go index 763f3acdb1..df56738c9d 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/exporter.go @@ -10,6 +10,7 @@ import ( "github.com/jaegertracing/jaeger/model" sapmclient "github.com/signalfx/sapm-proto/client" + "go.opentelemetry.io/collector/client" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" @@ -42,7 +43,6 @@ func (se *sapmExporter) Shutdown(context.Context) error { } func newSAPMExporter(cfg *Config, params exporter.Settings) (sapmExporter, error) { - client, err := sapmclient.New(cfg.clientOptions()...) if err != nil { return sapmExporter{}, err @@ -61,7 +61,7 @@ func newSAPMTracesExporter(cfg *Config, set exporter.Settings) (exporter.Traces, return nil, err } - te, err := exporterhelper.NewTracesExporter( + te, err := exporterhelper.NewTraces( context.TODO(), set, cfg, @@ -71,7 +71,6 @@ func newSAPMTracesExporter(cfg *Config, set exporter.Settings) (exporter.Traces, exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithTimeout(cfg.TimeoutSettings), ) - if err != nil { return nil, err } @@ -95,12 +94,9 @@ func (se *sapmExporter) pushTraceData(ctx context.Context, td ptrace.Traces) err return nil } - // All metrics in the pmetric.Metrics will have the same access token because of the BatchPerResourceMetrics. - accessToken := se.retrieveAccessToken(rss.At(0)) - batches, err := jaeger.ProtoFromTraces(td) - if err != nil { - return consumererror.NewPermanent(err) - } + accessToken := se.retrieveAccessToken(ctx, rss.At(0)) + + batches := jaeger.ProtoFromTraces(td) // Cannot remove the access token from the pdata, because exporters required to not modify incoming pdata, // so need to remove that after conversion. @@ -126,12 +122,18 @@ func (se *sapmExporter) pushTraceData(ctx context.Context, td ptrace.Traces) err return nil } -func (se *sapmExporter) retrieveAccessToken(md ptrace.ResourceSpans) string { +func (se *sapmExporter) retrieveAccessToken(ctx context.Context, md ptrace.ResourceSpans) string { if !se.config.AccessTokenPassthrough { // Nothing to do if token is pass through not configured or resource is nil. return "" } + cl := client.FromContext(ctx) + ss := cl.Metadata.Get(splunk.SFxAccessTokenHeader) + if len(ss) > 0 { + return ss[0] + } + attrs := md.Resource().Attributes() if accessToken, ok := attrs.Get(splunk.SFxAccessTokenLabel); ok { return accessToken.Str() diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/factory.go index df852b763d..c99a543280 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/factory.go @@ -33,9 +33,9 @@ func createDefaultConfig() component.Config { AccessTokenPassthroughConfig: splunk.AccessTokenPassthroughConfig{ AccessTokenPassthrough: true, }, - TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(), + TimeoutSettings: exporterhelper.NewDefaultTimeoutConfig(), BackOffConfig: configretry.NewDefaultBackOffConfig(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), + QueueSettings: exporterhelper.NewDefaultQueueConfig(), } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/metadata.yaml index 18c78b79d6..4bab155417 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter/metadata.yaml @@ -11,8 +11,3 @@ status: tests: expect_consumer_error: true - goleak: - ignore: - top: - # See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. - - "go.opencensus.io/stats/view.(*worker).start" \ No newline at end of file diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/README.md index d07b5b48a4..ad988488ee 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/README.md @@ -8,7 +8,7 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fsignalfx%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fsignalfx) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fsignalfx%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fsignalfx) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax), [@crobert-1](https://www.github.com/crobert-1) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/config.go index 808af0cf9f..9703b9313d 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/config.go @@ -50,9 +50,9 @@ var _ confmap.Unmarshaler = (*Config)(nil) // Config defines configuration for SignalFx exporter. type Config struct { - exporterhelper.QueueSettings `mapstructure:"sending_queue"` - configretry.BackOffConfig `mapstructure:"retry_on_failure"` - confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // AccessToken is the authentication token provided by SignalFx. AccessToken configopaque.String `mapstructure:"access_token"` @@ -131,7 +131,7 @@ type Config struct { // to be used in a dimension key. NonAlphanumericDimensionChars string `mapstructure:"nonalphanumeric_dimension_chars"` - // Whether to drop histogram bucket metrics dispatched to Splunk Observability. + // Whether to drop histogram bucket metrics dispatched to Splunk Observability. // Default value is set to false. DropHistogramBuckets bool `mapstructure:"drop_histogram_buckets"` diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/dpclient.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/dpclient.go index 82748947f4..cdb7338c1b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/dpclient.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/dpclient.go @@ -111,7 +111,6 @@ func (s *sfxDPClient) pushMetricsData( } return 0, nil - } func (s *sfxDPClient) postData(ctx context.Context, body io.Reader, headers map[string]string) error { @@ -119,7 +118,7 @@ func (s *sfxDPClient) postData(ctx context.Context, body io.Reader, headers map[ if !strings.HasSuffix(datapointURL.Path, "v2/datapoint") { datapointURL.Path = path.Join(datapointURL.Path, "v2/datapoint") } - req, err := http.NewRequestWithContext(ctx, "POST", datapointURL.String(), body) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, datapointURL.String(), body) if err != nil { return consumererror.NewPermanent(err) } @@ -154,7 +153,6 @@ func (s *sfxDPClient) postData(ctx context.Context, body io.Reader, headers map[ } func (s *sfxDPClient) pushMetricsDataForToken(ctx context.Context, sfxDataPoints []*sfxpb.DataPoint, accessToken string) (int, error) { - if s.logDataPoints { for _, dp := range sfxDataPoints { s.logger.Debug("Dispatching SFx datapoint", zap.Stringer("dp", dp)) @@ -210,7 +208,6 @@ func (s *sfxDPClient) retrieveAccessToken(md pmetric.ResourceMetrics) string { } func (s *sfxDPClient) pushOTLPMetricsDataForToken(ctx context.Context, mh pmetric.Metrics, accessToken string) (int, error) { - dataPointCount := mh.DataPointCount() if s.logDataPoints { s.logger.Debug("Count of metrics to send in OTLP format", @@ -247,7 +244,6 @@ func (s *sfxDPClient) pushOTLPMetricsDataForToken(ctx context.Context, mh pmetri s.logger.Debug("Sending metrics in OTLP format") err = s.postData(ctx, body, headers) - if err != nil { return dataPointCount, consumererror.NewMetrics(err, mh) } @@ -256,11 +252,9 @@ func (s *sfxDPClient) pushOTLPMetricsDataForToken(ctx context.Context, mh pmetri } func (s *sfxDPClient) encodeOTLPBody(md pmetric.Metrics) (bodyReader io.Reader, compressed bool, err error) { - tr := pmetricotlp.NewExportRequestFromMetrics(md) body, err := tr.MarshalProto() - if err != nil { return nil, false, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/eventclient.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/eventclient.go index 9ba8bab687..8bb12082cf 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/eventclient.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/eventclient.go @@ -58,7 +58,7 @@ func (s *sfxEventClient) pushLogsData(ctx context.Context, ld plog.Logs) (int, e if !strings.HasSuffix(eventURL.Path, "v2/event") { eventURL.Path = path.Join(eventURL.Path, "v2/event") } - req, err := http.NewRequestWithContext(ctx, "POST", eventURL.String(), body) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, eventURL.String(), body) if err != nil { return ld.LogRecordCount(), consumererror.NewPermanent(err) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/exporter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/exporter.go index 1a7ab7f60c..eaa3fa361a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/exporter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/exporter.go @@ -25,9 +25,7 @@ import ( metadata "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata" ) -var ( - errNotStarted = errors.New("exporter has not started") -) +var errNotStarted = errors.New("exporter has not started") // TODO: Find a place for this to be shared. type baseMetricsExporter struct { @@ -184,7 +182,6 @@ func newEventExporter(config *Config, createSettings exporter.Settings) (*signal logger: createSettings.Logger, telemetrySettings: createSettings.TelemetrySettings, }, nil - } func (se *signalfxExporter) startLogs(ctx context.Context, host component.Host) error { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/factory.go index 51aa322170..65a3d89137 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/factory.go @@ -50,18 +50,18 @@ func createDefaultConfig() component.Config { maxConnCount := defaultMaxConns idleConnTimeout := 30 * time.Second timeout := 10 * time.Second + clientConfig := confighttp.NewDefaultClientConfig() + clientConfig.Timeout = defaultHTTPTimeout + clientConfig.MaxIdleConns = &maxConnCount + clientConfig.MaxIdleConnsPerHost = &maxConnCount + clientConfig.IdleConnTimeout = &idleConnTimeout + clientConfig.HTTP2ReadIdleTimeout = defaultHTTP2ReadIdleTimeout + clientConfig.HTTP2PingTimeout = defaultHTTP2PingTimeout return &Config{ BackOffConfig: configretry.NewDefaultBackOffConfig(), - QueueSettings: exporterhelper.NewDefaultQueueSettings(), - ClientConfig: confighttp.ClientConfig{ - Timeout: defaultHTTPTimeout, - MaxIdleConns: &maxConnCount, - MaxIdleConnsPerHost: &maxConnCount, - IdleConnTimeout: &idleConnTimeout, - HTTP2ReadIdleTimeout: defaultHTTP2ReadIdleTimeout, - HTTP2PingTimeout: defaultHTTP2PingTimeout, - }, + QueueSettings: exporterhelper.NewDefaultQueueConfig(), + ClientConfig: clientConfig, AccessTokenPassthroughConfig: splunk.AccessTokenPassthroughConfig{ AccessTokenPassthrough: true, }, @@ -101,7 +101,7 @@ func createTracesExporter( set.Logger.Info("Correlation tracking enabled", zap.String("endpoint", corrCfg.ClientConfig.Endpoint)) tracker := correlation.NewTracker(corrCfg, cfg.AccessToken, set) - return exporterhelper.NewTracesExporter( + return exporterhelper.NewTraces( ctx, set, cfg, @@ -122,18 +122,17 @@ func createMetricsExporter( return nil, err } - me, err := exporterhelper.NewMetricsExporter( + me, err := exporterhelper.NewMetrics( ctx, set, cfg, exp.pushMetrics, // explicitly disable since we rely on http.Client timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}), exporterhelper.WithRetry(cfg.BackOffConfig), exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.shutdown)) - if err != nil { return nil, err } @@ -165,17 +164,16 @@ func createLogsExporter( return nil, err } - le, err := exporterhelper.NewLogsExporter( + le, err := exporterhelper.NewLogs( ctx, set, cfg, exp.pushLogs, // explicitly disable since we rely on http.Client timeout logic. - exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), + exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}), exporterhelper.WithRetry(expCfg.BackOffConfig), exporterhelper.WithQueue(expCfg.QueueSettings), exporterhelper.WithStart(exp.startLogs)) - if err != nil { return nil, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations/client.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations/client.go index ba86baf9a6..95f418ee01 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations/client.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations/client.go @@ -21,10 +21,12 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/requestcounter" ) -var ErrChFull = errors.New("request channel full") -var errRetryChFull = errors.New("retry channel full") -var errMaxAttempts = errors.New("maximum attempts exceeded") -var errRequestCancelled = errors.New("request cancelled") +var ( + ErrChFull = errors.New("request channel full") + errRetryChFull = errors.New("retry channel full") + errMaxAttempts = errors.New("maximum attempts exceeded") + errRequestCancelled = errors.New("request cancelled") +) // ErrMaxEntries is an error returned when the correlation endpoint returns a 418 http status // code indicating that the set of services or environments is too large to add another value @@ -199,7 +201,8 @@ func (cc *Client) Correlate(cor *Correlation, cb CorrelateCB) { cor.Logger(cc.log).WithError(err).WithFields(log.Fields{"method": http.MethodPut}).Error("Unable to update dimension, not retrying") } cb(cor, err) - }}) + }, + }) if err != nil { cor.Logger(cc.log).WithError(err).WithFields(log.Fields{"method": http.MethodPut}).Debug("Unable to update dimension, not retrying") } @@ -223,7 +226,8 @@ func (cc *Client) Delete(cor *Correlation, callback SuccessfulDeleteCB) { default: cc.log.WithError(err).Error("Unable to update dimension, not retrying") } - }}) + }, + }) if err != nil { cor.Logger(cc.log).WithError(err).WithFields(log.Fields{"method": http.MethodDelete}).Debug("Unable to update dimension, not retrying") } @@ -243,7 +247,7 @@ func (cc *Client) Get(dimName string, dimValue string, callback SuccessfulGetCB) callback: func(body []byte, statuscode int, err error) { switch statuscode { case http.StatusOK: - var response = map[string][]string{} + response := map[string][]string{} err = json.Unmarshal(body, &response) if err != nil { cc.log.WithError(err).WithFields(log.Fields{"dim": dimName, "value": dimValue}).Error("Unable to unmarshall correlations for dimension") diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations/dedup.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations/dedup.go index f5e51dcffc..28e26dc483 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations/dedup.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations/dedup.go @@ -21,7 +21,7 @@ type deduplicator struct { } func (d *deduplicator) purgeCreates() { - var elem = d.pendingCreates.Front() + elem := d.pendingCreates.Front() for { if elem == nil { return @@ -38,7 +38,7 @@ func (d *deduplicator) purgeCreates() { } func (d *deduplicator) purgeDeletes() { - var elem = d.pendingDeletes.Front() + elem := d.pendingDeletes.Front() for { if elem == nil { return @@ -60,7 +60,7 @@ func (d *deduplicator) purge() { } func (d *deduplicator) evictPendingDelete() { - var elem = d.pendingDeletes.Back() + elem := d.pendingDeletes.Back() if elem != nil { req, ok := elem.Value.(*request) if ok { @@ -72,14 +72,13 @@ func (d *deduplicator) evictPendingDelete() { } func (d *deduplicator) evictPendingCreate() { - var elem = d.pendingCreates.Back() + elem := d.pendingCreates.Back() if elem != nil { req, ok := elem.Value.(*request) if ok { req.cancel() d.pendingCreates.Remove(elem) delete(d.pendingCreateKeys, *req.Correlation) - } } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/log/log.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/log/log.go index 0924d8ce95..3709ddd5d7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/log/log.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/log/log.go @@ -7,8 +7,7 @@ package log // import "github.com/open-telemetry/opentelemetry-collector-contrib // Fields is a map that is used to populated logging context. type Fields map[string]any -type nilLogger struct { -} +type nilLogger struct{} func (n nilLogger) Debug(string) { } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/requestcounter/counter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/requestcounter/counter.go index ca7d597eb4..bdadb51de0 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/requestcounter/counter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/requestcounter/counter.go @@ -17,9 +17,11 @@ const ( resetRequestCountKey key = 3 ) -type getRequestCount func() uint32 -type incrementRequestCount func() -type resetRequestCount func() +type ( + getRequestCount func() uint32 + incrementRequestCount func() + resetRequestCount func() +) // checks if a counter already exists on the context func counterExists(ctx context.Context) (exists bool) { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/sender.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/sender.go index 708f005716..93d691ff11 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/sender.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/sender.go @@ -99,11 +99,15 @@ func (rs *ReqSender) sendRequest(req *http.Request) error { type key int -const RequestFailedCallbackKey key = 1 -const RequestSuccessCallbackKey key = 2 +const ( + RequestFailedCallbackKey key = 1 + RequestSuccessCallbackKey key = 2 +) -type RequestFailedCallback func(body []byte, statusCode int, err error) -type RequestSuccessCallback func([]byte) +type ( + RequestFailedCallback func(body []byte, statusCode int, err error) + RequestSuccessCallback func([]byte) +) func onRequestSuccess(req *http.Request, body []byte) { ctx := req.Context() @@ -113,6 +117,7 @@ func onRequestSuccess(req *http.Request, body []byte) { } cb(body) } + func onRequestFailed(req *http.Request, body []byte, statusCode int, err error) { ctx := req.Context() cb, ok := ctx.Value(RequestFailedCallbackKey).(RequestFailedCallback) @@ -124,7 +129,6 @@ func onRequestFailed(req *http.Request, body []byte, statusCode int, err error) func sendRequest(client *http.Client, req *http.Request) ([]byte, int, error) { resp, err := client.Do(req) - if err != nil { return nil, 0, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/tracetracker/tracker.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/tracetracker/tracker.go index 9637d11154..03adce7b92 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/tracetracker/tracker.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/tracetracker/tracker.go @@ -11,7 +11,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.26.0" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/log" diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/correlation/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/correlation/config.go index 72e20ffa68..0c69af3749 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/correlation/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/correlation/config.go @@ -9,15 +9,17 @@ import ( "time" "go.opentelemetry.io/collector/config/confighttp" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.26.0" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/correlations" ) // DefaultConfig returns default configuration correlation values. func DefaultConfig() *Config { + clientConfig := confighttp.NewDefaultClientConfig() + clientConfig.Timeout = 5 * time.Second return &Config{ - ClientConfig: confighttp.ClientConfig{Timeout: 5 * time.Second}, + ClientConfig: clientConfig, StaleServiceTimeout: 5 * time.Minute, SyncAttributes: map[string]string{ conventions.AttributeK8SPodUID: conventions.AttributeK8SPodUID, diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/correlation/correlation.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/correlation/correlation.go index eb2df4fb27..5b3ac9c66f 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/correlation/correlation.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/correlation/correlation.go @@ -68,7 +68,6 @@ func newCorrelationClient(ctx context.Context, cfg *Config, accessToken configop AccessToken: string(accessToken), URL: corrURL, }) - if err != nil { cancel() return nil, fmt.Errorf("failed to create correlation client: %w", err) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/dimclient.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/dimclient.go index 62366b4333..71e6dd00ca 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/dimclient.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/dimclient.go @@ -230,37 +230,38 @@ func (dc *DimensionClient) handleDimensionUpdate(ctx context.Context, dimUpdate ) req, err = dc.makePatchRequest(ctx, dimUpdate) - if err != nil { return err } req = req.WithContext( context.WithValue(req.Context(), RequestFailedCallbackKey, RequestFailedCallback(func(statusCode int, err error) { - if statusCode >= 400 && statusCode < 500 && statusCode != 404 { - dc.logger.Error( - "Unable to update dimension, not retrying", - zap.Error(err), - zap.String("URL", sanitize.URL(req.URL)), - zap.String("dimensionUpdate", dimUpdate.String()), - zap.Int("statusCode", statusCode), - ) - - // Don't retry if it is a 4xx error (except 404) since these - // imply an input/auth error, which is not going to be remedied - // by retrying. - // 404 errors are special because they can occur due to races - // within the dimension patch endpoint. - return + retry := false + retryMsg := "not retrying" + if statusCode == 400 && len(dimUpdate.Tags) > 0 { + // It's possible that number of tags is too large. In this case, + // we should retry the request without tags to update the dimension properties at least. + dimUpdate.Tags = nil + retry = true + retryMsg = "retrying without tags" + } else if statusCode == 404 || statusCode >= 500 { + // Retry on 5xx server errors or 404s which can occur due to races within the dimension patch endpoint. + retry = true + retryMsg = "retrying" } dc.logger.Error( - "Unable to update dimension, retrying", + "Unable to update dimension, "+retryMsg, zap.Error(err), zap.String("URL", sanitize.URL(req.URL)), zap.String("dimensionUpdate", dimUpdate.String()), zap.Int("statusCode", statusCode), ) + + if !retry { + return + } + // The retry is meant to provide some measure of robustness against // temporary API failures. If the API is down for significant // periods of time, dimension updates will probably eventually back @@ -330,7 +331,7 @@ func (dc *DimensionClient) makePatchRequest(ctx context.Context, dim *DimensionU req, err := http.NewRequestWithContext( ctx, - "PATCH", + http.MethodPatch, strings.TrimRight(url.String(), "/")+"/_/sfxagent", bytes.NewReader(json)) if err != nil { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/metadata.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/metadata.go index 188fb40478..9ccf16933a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/metadata.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/metadata.go @@ -20,7 +20,8 @@ type MetadataUpdateClient interface { func getDimensionUpdateFromMetadata( metadata metadata.MetadataUpdate, - metricsConverter translation.MetricsConverter) *DimensionUpdate { + metricsConverter translation.MetricsConverter, +) *DimensionUpdate { properties, tags := getPropertiesAndTags(metadata) return &DimensionUpdate{ diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/requests.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/requests.go index f328474404..4722f063d0 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/requests.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions/requests.go @@ -1,9 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - package dimensions // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/dimensions" import ( @@ -25,7 +22,8 @@ type ReqSender struct { } func NewReqSender(client *http.Client, - workerCount uint, diagnosticDimensions map[string]string) *ReqSender { + workerCount uint, diagnosticDimensions map[string]string, +) *ReqSender { return &ReqSender{ client: client, additionalDimensions: diagnosticDimensions, @@ -97,11 +95,15 @@ func (rs *ReqSender) sendRequest(req *http.Request) error { type key int -const RequestFailedCallbackKey key = 1 -const RequestSuccessCallbackKey key = 2 +const ( + RequestFailedCallbackKey key = 1 + RequestSuccessCallbackKey key = 2 +) -type RequestFailedCallback func(statusCode int, err error) -type RequestSuccessCallback func([]byte) +type ( + RequestFailedCallback func(statusCode int, err error) + RequestSuccessCallback func([]byte) +) func onRequestSuccess(req *http.Request, body []byte) { ctx := req.Context() @@ -111,6 +113,7 @@ func onRequestSuccess(req *http.Request, body []byte) { } cb(body) } + func onRequestFailed(req *http.Request, statusCode int, err error) { ctx := req.Context() cb, ok := ctx.Value(RequestFailedCallbackKey).(RequestFailedCallback) @@ -122,7 +125,6 @@ func onRequestFailed(req *http.Request, statusCode int, err error) { func sendRequest(client *http.Client, req *http.Request) ([]byte, int, error) { resp, err := client.Do(req) - if err != nil { return nil, 0, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/hostmetadata/host.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/hostmetadata/host.go index a9150b4a4c..2e9558f418 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/hostmetadata/host.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/hostmetadata/host.go @@ -32,10 +32,12 @@ var etcPath = func() string { const cpuStatsTimeout = 10 * time.Second // Map library functions to unexported package variables for testing purposes. -var cpuInfo = cpu.InfoWithContext -var cpuCounts = cpu.CountsWithContext -var memVirtualMemory = mem.VirtualMemory -var hostInfo = host.Info +var ( + cpuInfo = cpu.InfoWithContext + cpuCounts = cpu.CountsWithContext + memVirtualMemory = mem.VirtualMemory + hostInfo = host.Info +) // hostCPU information about the host type hostCPU struct { @@ -179,7 +181,7 @@ func getMemory() (*Memory, error) { func getStringFromFile(pattern string, path string) (string, error) { var err error var file []byte - var reg = regexp.MustCompile(pattern) + reg := regexp.MustCompile(pattern) if file, err = os.ReadFile(path); err == nil { if match := reg.FindSubmatch(file); len(match) > 1 { return string(match[1]), nil diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/converter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/converter.go index ffc5e91e1d..27d1930fa5 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/converter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/converter.go @@ -49,7 +49,8 @@ func NewMetricsConverter( includes []dpfilters.MetricFilter, nonAlphanumericDimChars string, dropHistogramBuckets bool, - processHistograms bool) (*MetricsConverter, error) { + processHistograms bool, +) (*MetricsConverter, error) { fs, err := dpfilters.NewFilterSet(excludes, includes) if err != nil { return nil, err diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/default_metrics.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/default_metrics.go index d0d5fc7115..9b7534f8b4 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/default_metrics.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/default_metrics.go @@ -85,21 +85,6 @@ exclude_metrics: # k8s metrics. - metric_names: - - k8s.cronjob.active_jobs - - k8s.job.active_pods - - k8s.job.desired_successful_pods - - k8s.job.failed_pods - - k8s.job.max_parallel_pods - - k8s.job.successful_pods - - k8s.statefulset.desired_pods - - k8s.statefulset.current_pods - - k8s.statefulset.ready_pods - - k8s.statefulset.updated_pods - - k8s.hpa.max_replicas - - k8s.hpa.min_replicas - - k8s.hpa.current_replicas - - k8s.hpa.desired_replicas - # matches all container limit metrics but k8s.container.cpu_limit and k8s.container.memory_limit - /^k8s\.container\..+_limit$/ - '!k8s.container.memory_limit' @@ -121,7 +106,7 @@ exclude_metrics: - /^(?i:(container)|(k8s\.node)|(k8s\.pod))\.memory\.page_faults$/ - /^(?i:(container)|(k8s\.node)|(k8s\.pod))\.memory\.rss$/ - /^(?i:(k8s\.node)|(k8s\.pod))\.memory\.usage$/ - - /^(?i:(container)|(k8s\.node)|(k8s\.pod))\.memory\.working_set$/ + - /^(?i:(k8s\.node)|(k8s\.pod))\.memory\.working_set$/ # matches (k8s.node|k8s.pod).filesystem... - /^k8s\.(?i:(node)|(pod))\.filesystem\.available$/ diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters/datapoint.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters/datapoint.go index 9afd30ab35..1b7068d560 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters/datapoint.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters/datapoint.go @@ -51,5 +51,4 @@ func (f *dataPointFilter) Matches(dp *sfxpb.DataPoint) bool { return f.dimensionsFilter == nil || f.dimensionsFilter.Matches(dp.Dimensions) } return false - } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters/string.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters/string.go index ee971708cd..093139ef81 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters/string.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/dpfilters/string.go @@ -33,7 +33,6 @@ func NewStringFilter(items []string) (*StringFilter, error) { reText := stripSlashes(m) re, err = regexp.Compile(reText) - if err != nil { return nil, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go index 9c542c7dbb..70a6c31344 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go @@ -84,6 +84,8 @@ func convertLogRecord(lr plog.LogRecord, resourceAttrs pcommon.Map, logger *zap. return true case splunk.SFxEventPropertiesKey: return true + case splunk.SFxAccessTokenLabel: + return true case splunk.SFxEventType: if v.Type() == pcommon.ValueTypeStr { event.EventType = v.Str() diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/translator.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/translator.go index 573691adce..324188e820 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/translator.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/translation/translator.go @@ -430,7 +430,6 @@ func (mp *MetricTranslator) TranslateDataPoints(logger *zap.Logger, sfxDataPoint for _, d := range dp.Dimensions { if k, ok := tr.CopyDimensions[d.Key]; ok { dp.Dimensions = append(dp.Dimensions, &sfxpb.Dimension{Key: k, Value: d.Value}) - } } } @@ -749,7 +748,7 @@ func aggregateDatapoints( // generate map keys. func stringifyDimensions(dimensions []*sfxpb.Dimension, exclusions []string) string { const aggregationKeyDelimiter = "//" - var aggregationKeyParts = make([]string, 0, len(dimensions)) + aggregationKeyParts := make([]string, 0, len(dimensions)) for _, d := range dimensions { if !dimensionIn(d, exclusions) { aggregationKeyParts = append(aggregationKeyParts, fmt.Sprintf("%s:%s", d.Key, d.Value)) @@ -824,7 +823,7 @@ func convertMetricValue(logger *zap.Logger, dp *sfxpb.DataPoint, newType MetricV zap.String("metric", dp.Metric)) return } - var intVal = int64(*val) + intVal := int64(*val) dp.Value = sfxpb.Datum{IntValue: &intVal} case MetricValueTypeDouble: val := dp.GetValue().IntValue @@ -833,7 +832,7 @@ func convertMetricValue(logger *zap.Logger, dp *sfxpb.DataPoint, newType MetricV zap.String("metric", dp.Metric)) return } - var floatVal = float64(*val) + floatVal := float64(*val) dp.Value = sfxpb.Datum{DoubleValue: &floatVal} } } @@ -870,7 +869,8 @@ func dropDimensions(dp *sfxpb.DataPoint, rule Rule) { func filterDimensionsByValues( dimensions []*sfxpb.Dimension, - dimensionPairs map[string]map[string]bool) []*sfxpb.Dimension { + dimensionPairs map[string]map[string]bool, +) []*sfxpb.Dimension { if len(dimensions) == 0 { return nil } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/README.md index ba0b529ceb..103eef2587 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/README.md @@ -7,7 +7,7 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fawsproxy%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fawsproxy) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fawsproxy%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fawsproxy) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@mxiamxia](https://www.github.com/mxiamxia) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib @@ -41,7 +41,7 @@ The TCP address and port on which this proxy listens for requests. Default: `localhost:2000` -You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to `0.0.0.0:2000`. This feature gate will be removed in a future release. +See our [security best practices doc](https://opentelemetry.io/docs/security/config-best-practices/#protect-against-denial-of-service-attacks) to understand how to set the endpoint in different environments. ### proxy_address (Optional) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/config.go index a2d0f5f0c9..a568feaf5c 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/config.go @@ -9,7 +9,6 @@ import ( // Config defines the configuration for an AWS X-Ray proxy. type Config struct { - // ProxyServer defines configurations related to the local TCP proxy server. ProxyConfig proxy.Config `mapstructure:",squash"` } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/extension.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/extension.go index 2b05655e76..dddaf7700b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/extension.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/extension.go @@ -27,7 +27,6 @@ var _ extension.Extension = (*xrayProxy)(nil) func (x *xrayProxy) Start(_ context.Context, host component.Host) error { srv, err := proxy.NewServer(&x.config.ProxyConfig, x.settings.Logger) - if err != nil { return err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/factory.go index d50e4a5bf2..3330f319f7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/factory.go @@ -13,7 +13,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy/internal/metadata" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" ) const ( @@ -34,7 +34,7 @@ func createDefaultConfig() component.Config { return &Config{ ProxyConfig: proxy.Config{ TCPAddrConfig: confignet.TCPAddrConfig{ - Endpoint: localhostgate.EndpointForPort(defaultPort), + Endpoint: testutil.EndpointForPort(defaultPort), }, TLSSetting: configtls.ClientConfig{ Insecure: false, diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/README.md index 299028a366..615129115e 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/README.md @@ -13,13 +13,14 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [core], [contrib] | +| Distributions | [core], [contrib], [k8s] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fhealthcheck%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fhealthcheck) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fhealthcheck%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fhealthcheck) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[k8s]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s Health Check extension enables an HTTP url that can be probed to check the @@ -28,7 +29,7 @@ liveness and/or readiness probe on Kubernetes. The following settings are required: -- `endpoint` (default = localhost:13133): Address to publish the health check status. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). You can temporarily disable the `component.UseLocalHostAsDefaultHost` feature gate to change this to 0.0.0.0:13133. This feature gate will be removed in a future release. +- `endpoint` (default = localhost:13133): Address to publish the health check status. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). See our [security best practices doc](https://opentelemetry.io/docs/security/config-best-practices/#protect-against-denial-of-service-attacks) to understand how to set the endpoint in different environments. - `path` (default = "/"): Specifies the path to be configured for the health check server. - `response_body` (default = ""): Specifies a static body that overrides the default response returned by the health check service. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/factory.go index aca68b892e..9303fa9be2 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/factory.go @@ -11,7 +11,7 @@ import ( "go.opentelemetry.io/collector/extension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/internal/metadata" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" ) const defaultPort = 13133 @@ -29,7 +29,7 @@ func NewFactory() extension.Factory { func createDefaultConfig() component.Config { return &Config{ ServerConfig: confighttp.ServerConfig{ - Endpoint: localhostgate.EndpointForPort(defaultPort), + Endpoint: testutil.EndpointForPort(defaultPort), }, CheckCollectorPipeline: defaultCheckCollectorPipelineSettings(), Path: "/", diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/healthcheckextension.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/healthcheckextension.go index ac597dcb00..e0745b459b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/healthcheckextension.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/healthcheckextension.go @@ -29,7 +29,6 @@ type healthCheckExtension struct { var _ extensioncapabilities.PipelineWatcher = (*healthCheckExtension)(nil) func (hc *healthCheckExtension) Start(ctx context.Context, host component.Host) error { - hc.logger.Info("Starting health_check extension", zap.Any("config", hc.config)) ln, err := hc.config.ToListener(ctx) if err != nil { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/metadata.yaml index e9fa29a57c..30e83b2d97 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension/metadata.yaml @@ -4,9 +4,9 @@ status: class: extension stability: beta: [extension] - distributions: [core, contrib] + distributions: [core, contrib, k8s] codeowners: - active: [jpkrohling] + active: [] tests: config: diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/README.md index 9d0bfc4462..b7708e3b7f 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/README.md @@ -6,9 +6,10 @@ | Stability | [beta] | | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fecsobserver%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fecsobserver) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fecsobserver%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fecsobserver) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax), [@rmfitzpatrick](https://www.github.com/rmfitzpatrick) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax) | +| Emeritus | [@rmfitzpatrick](https://www.github.com/rmfitzpatrick) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/config.go index 0633995a25..15615c1b37 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/config.go @@ -17,7 +17,6 @@ const ( ) type Config struct { - // ClusterName is the target ECS cluster name for service discovery. ClusterName string `mapstructure:"cluster_name" yaml:"cluster_name"` // ClusterRegion is the target ECS cluster's AWS region. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/fetcher.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/fetcher.go index cf21efafcb..f69dcf5223 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/fetcher.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/fetcher.go @@ -14,7 +14,7 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ecs" - "github.com/hashicorp/golang-lru/simplelru" + "github.com/hashicorp/golang-lru/v2/simplelru" "go.uber.org/zap" ) @@ -50,8 +50,8 @@ type taskFetcher struct { ecs ecsClient ec2 ec2Client cluster string - taskDefCache simplelru.LRUCache - ec2Cache simplelru.LRUCache + taskDefCache *simplelru.LRU[string, *ecs.TaskDefinition] + ec2Cache *simplelru.LRU[string, *ec2.Instance] serviceNameFilter serviceNameFilter } @@ -81,11 +81,11 @@ func newTaskFetcherFromConfig(cfg Config, logger *zap.Logger) (*taskFetcher, err func newTaskFetcher(opts taskFetcherOptions) (*taskFetcher, error) { // Init cache - taskDefCache, err := simplelru.NewLRU(taskDefCacheSize, nil) + taskDefCache, err := simplelru.NewLRU[string, *ecs.TaskDefinition](taskDefCacheSize, nil) if err != nil { return nil, err } - ec2Cache, err := simplelru.NewLRU(ec2CacheSize, nil) + ec2Cache, err := simplelru.NewLRU[string, *ec2.Instance](ec2CacheSize, nil) if err != nil { return nil, err } @@ -205,7 +205,7 @@ func (f *taskFetcher) attachTaskDefinition(ctx context.Context, tasks []*ecs.Tas } var def *ecs.TaskDefinition if cached, ok := f.taskDefCache.Get(arn); ok { - def = cached.(*ecs.TaskDefinition) + def = cached } else { res, err := svc.DescribeTaskDefinitionWithContext(ctx, &ecs.DescribeTaskDefinitionInput{ TaskDefinition: aws.String(arn), @@ -251,7 +251,7 @@ func (f *taskFetcher) attachContainerInstance(ctx context.Context, tasks []*task for instanceArn := range ciToEC2 { cached, ok := f.ec2Cache.Get(instanceArn) if ok { - ciToEC2[instanceArn] = cached.(*ec2.Instance) // use value from cache + ciToEC2[instanceArn] = cached // use value from cache } else { instanceList = append(instanceList, aws.String(instanceArn)) } @@ -289,7 +289,8 @@ func (f *taskFetcher) attachContainerInstance(ctx context.Context, tasks []*task // Run ecs.DescribeContainerInstances and ec2.DescribeInstances for a batch (less than 100 container instances). func (f *taskFetcher) describeContainerInstances(ctx context.Context, instanceList []*string, - ci2EC2 map[string]*ec2.Instance) error { + ci2EC2 map[string]*ec2.Instance, +) error { // Get container instances res, err := f.ecs.DescribeContainerInstancesWithContext(ctx, &ecs.DescribeContainerInstancesInput{ Cluster: aws.String(f.cluster), diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/metadata.yaml index 20ee26949e..e99b78c348 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/metadata.yaml @@ -6,7 +6,8 @@ status: beta: [extension] distributions: [contrib] codeowners: - active: [dmitryax, rmfitzpatrick] + active: [dmitryax] + emeritus: [rmfitzpatrick] # TODO: Update the extension to make the tests pass tests: diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/sd.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/sd.go index cbf49bfa9f..234a7e1817 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/sd.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/sd.go @@ -83,7 +83,7 @@ func (s *serviceDiscovery) runAndWriteFile(ctx context.Context) error { return err } // NOTE: We assume the folder already exists and does NOT try to create one. - if err := os.WriteFile(s.cfg.ResultFile, b, 0600); err != nil { + if err := os.WriteFile(s.cfg.ResultFile, b, 0o600); err != nil { return err } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/target.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/target.go index 70f8d0bb66..710ef631a2 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/target.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver/target.go @@ -121,9 +121,7 @@ func trimEmptyValueByKeyPrefix(m map[string]string, prefix string) { } } -var ( - invalidLabelCharRE = regexp.MustCompile(`[^a-zA-Z0-9_]`) -) +var invalidLabelCharRE = regexp.MustCompile(`[^a-zA-Z0-9_]`) // Copied from https://github.com/prometheus/prometheus/blob/8d2a8f493905e46fe6181e8c1b79ccdfcbdb57fc/util/strutil/strconv.go#L40-L44 func sanitizeLabelName(s string) string { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/README.md index d8558017e6..21225dd402 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/README.md @@ -4,13 +4,14 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [core], [contrib] | +| Distributions | [core], [contrib], [k8s] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fpprof%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fpprof) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fpprof%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fpprof) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@MovieStoreGuy](https://www.github.com/MovieStoreGuy) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[k8s]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s Performance Profiler extension enables the golang `net/http/pprof` endpoint. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/config.go index b289e2a05b..0ab9149c6f 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/config.go @@ -11,7 +11,6 @@ import ( // Config has the configuration for the extension enabling the golang // net/http/pprof (Performance Profiler) extension. type Config struct { - // TCPAddr is the address and port in which the pprof will be listening to. // Use localhost: to make it available only locally, or ":" to // make it available on all network interfaces. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/metadata.yaml index f9cefb4d9e..e5a2e11bb5 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension/metadata.yaml @@ -4,7 +4,7 @@ status: class: extension stability: beta: [extension] - distributions: [core, contrib] + distributions: [core, contrib, k8s] codeowners: active: [MovieStoreGuy] diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension/README.md index 2f9134c799..ca78fd9dde 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension/README.md @@ -7,7 +7,7 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fsigv4auth%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fsigv4auth) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fsigv4auth%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fsigv4auth) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@erichsueh3](https://www.github.com/erichsueh3) | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension/metadata.yaml index 4cd6bc99ac..fadb221d0d 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension/metadata.yaml @@ -10,4 +10,9 @@ status: active: [Aneurysm9, erichsueh3] tests: + goleak: + ignore: + top: + - "net/http.(*persistConn).writeLoop" + - "internal/poll.runtime_pollWait" config: diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/README.md index df13d76111..9691f18937 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/README.md @@ -4,12 +4,13 @@ | Status | | | ------------- |-----------| | Stability | [beta] | -| Distributions | [contrib] | +| Distributions | [contrib], [k8s] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Ffilestorage%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Ffilestorage) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Ffilestorage%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Ffilestorage) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@djaglowski](https://www.github.com/djaglowski) \| Seeking more code owners! | -[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[k8s]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s The File Storage extension can persist state to the local file system. @@ -24,6 +25,9 @@ The default timeout is `1s`. `fsync` when set, will force the database to perform an fsync after each write. This helps to ensure database integrity if there is an interruption to the database process, but at the cost of performance. See [DB.NoSync](https://pkg.go.dev/go.etcd.io/bbolt#DB) for more information. +`create_directory` when set, will create the data storage and compaction directory if it does not already exist. The directory will be created with `0750 (rwxr-x--)` permissions, by default. Use `directory_permissions` to customize directory creation permissions. + + ## Compaction `compaction` defines how and when files should be compacted. There are two modes of compaction available (both of which can be set concurrently): - `compaction.on_start` (default: false), which happens when collector starts @@ -124,7 +128,7 @@ following troubleshooting method works for bbolt-managed files. As such, there i When troubleshooting components that use the File Storage extension, it is sometimes helpful to read the raw contents of files created by the extension for the component. The simplest way to read files -created by the File Storage extension is to use the strings utility ([Linux](https://linux.die.net/man/1/strings), +created by the File Storage extension is to use the strings utility ([Linux](https://man7.org/linux/man-pages/man1/strings.1.html), [Windows](https://learn.microsoft.com/en-us/sysinternals/downloads/strings)). For example, here are the contents of the file created by the File Storage extension when it's configured as the storage diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/client.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/client.go index b97cad73c0..bff4b03d28 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/client.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/client.go @@ -50,7 +50,7 @@ func bboltOptions(timeout time.Duration, noSync bool) *bbolt.Options { func newClient(logger *zap.Logger, filePath string, timeout time.Duration, compactionCfg *CompactionConfig, noSync bool) (*fileStorageClient, error) { options := bboltOptions(timeout, noSync) - db, err := bbolt.Open(filePath, 0600, options) + db, err := bbolt.Open(filePath, 0o600, options) if err != nil { return nil, err } @@ -188,7 +188,7 @@ func (c *fileStorageClient) Compact(compactionDirectory string, timeout time.Dur zap.String(tempDirectoryKey, file.Name())) // cannot reuse newClient as db shouldn't contain any bucket - compactedDb, err = bbolt.Open(file.Name(), 0600, options) + compactedDb, err = bbolt.Open(file.Name(), 0o600, options) if err != nil { return err } @@ -209,7 +209,7 @@ func (c *fileStorageClient) Compact(compactionDirectory string, timeout time.Dur // replace current db file with compacted db file // we reopen the DB file irrespective of the success of the replace, as we can't leave it closed moveErr := moveFileWithFallback(compactedDbPath, dbPath) - c.db, openErr = bbolt.Open(dbPath, 0600, options) + c.db, openErr = bbolt.Open(dbPath, 0o600, options) // if we got errors for both rename and open, we'd rather return the open one // this should not happen in any kind of normal circumstance - maybe we should panic instead? @@ -337,7 +337,7 @@ func moveFileWithFallback(src string, dest string) error { return err } - if err = os.WriteFile(dest, data, 0600); err != nil { + if err = os.WriteFile(dest, data, 0o600); err != nil { return err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/config.go index d52c10be68..ef842a93b6 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/config.go @@ -8,9 +8,15 @@ import ( "fmt" "io/fs" "os" + "strconv" "time" ) +var ( + errInvalidOctal = errors.New("directory_permissions value must be a valid octal representation") + errInvalidPermissionBits = errors.New("directory_permissions contain invalid bits for file access") +) + // Config defines configuration for file storage extension. type Config struct { Directory string `mapstructure:"directory,omitempty"` @@ -20,6 +26,11 @@ type Config struct { // FSync specifies that fsync should be called after each database write FSync bool `mapstructure:"fsync,omitempty"` + + // CreateDirectory specifies that the directory should be created automatically by the extension on start + CreateDirectory bool `mapstructure:"create_directory,omitempty"` + DirectoryPermissions string `mapstructure:"directory_permissions,omitempty"` + directoryPermissionsParsed int64 `mapstructure:"-,omitempty"` } // CompactionConfig defines configuration for optional file storage compaction. @@ -59,18 +70,16 @@ func (cfg *Config) Validate() error { dirs = []string{cfg.Directory} } for _, dir := range dirs { - info, err := os.Stat(dir) - if err != nil { - if os.IsNotExist(err) { - return fmt.Errorf("directory must exist: %w", err) + if info, err := os.Stat(dir); err != nil { + if !cfg.CreateDirectory && os.IsNotExist(err) { + return fmt.Errorf("directory must exist: %w. You can enable the create_directory option to automatically create it", err) } fsErr := &fs.PathError{} - if errors.As(err, &fsErr) { + if errors.As(err, &fsErr) && !os.IsNotExist(err) { return fmt.Errorf("problem accessing configured directory: %s, err: %w", dir, fsErr) } - } - if !info.IsDir() { + } else if !info.IsDir() { return fmt.Errorf("%s is not a directory", dir) } } @@ -83,5 +92,15 @@ func (cfg *Config) Validate() error { return errors.New("compaction check interval must be positive when rebound compaction is set") } + if cfg.CreateDirectory { + permissions, err := strconv.ParseInt(cfg.DirectoryPermissions, 8, 32) + if err != nil { + return errInvalidOctal + } else if permissions&int64(os.ModePerm) != permissions { + return errInvalidPermissionBits + } + cfg.directoryPermissionsParsed = permissions + } + return nil } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/extension.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/extension.go index f9d0467acc..f26474e936 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/extension.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/extension.go @@ -26,6 +26,19 @@ type localFileStorage struct { var _ storage.Extension = (*localFileStorage)(nil) func newLocalFileStorage(logger *zap.Logger, config *Config) (extension.Extension, error) { + if config.CreateDirectory { + var dirs []string + if config.Compaction.OnStart || config.Compaction.OnRebound { + dirs = []string{config.Directory, config.Compaction.Directory} + } else { + dirs = []string{config.Directory} + } + for _, dir := range dirs { + if err := ensureDirectoryExists(dir, os.FileMode(config.directoryPermissionsParsed)); err != nil { + return nil, err + } + } + } return &localFileStorage{ cfg: config, logger: logger, @@ -59,7 +72,6 @@ func (lfs *localFileStorage) GetClient(_ context.Context, kind component.Kind, e rawName = sanitize(rawName) absoluteName := filepath.Join(lfs.cfg.Directory, rawName) client, err := newClient(lfs.logger, absoluteName, lfs.cfg.Timeout, lfs.cfg.Compaction, !lfs.cfg.FSync) - if err != nil { return nil, err } @@ -129,6 +141,14 @@ func isSafe(character rune) bool { return false } +func ensureDirectoryExists(path string, perm os.FileMode) error { + if _, err := os.Stat(path); os.IsNotExist(err) { + return os.MkdirAll(path, perm) + } + // we already handled other errors in config.Validate(), so it's okay to return nil + return nil +} + // cleanup left compaction temporary files from previous killed process func (lfs *localFileStorage) cleanup(compactionDirectory string) error { pattern := filepath.Join(compactionDirectory, fmt.Sprintf("%s*", TempDbPrefix)) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/factory.go index 130647a5b6..68bc845e68 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/factory.go @@ -47,8 +47,10 @@ func createDefaultConfig() component.Config { CheckInterval: defaultCompactionInterval, CleanupOnStart: false, }, - Timeout: time.Second, - FSync: false, + Timeout: time.Second, + FSync: false, + CreateDirectory: false, + DirectoryPermissions: "0750", } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/metadata.yaml index 59d4e666a7..6953a45f10 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage/metadata.yaml @@ -4,7 +4,7 @@ status: class: extension stability: beta: [extension] - distributions: [contrib] + distributions: [contrib, k8s] codeowners: active: [djaglowski] seeking_new: true diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil/conn.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil/conn.go index 4933a1bf9c..32963e8111 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil/conn.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil/conn.go @@ -45,7 +45,8 @@ const ( // newHTTPClient returns new HTTP client instance with provided configuration. func newHTTPClient(logger *zap.Logger, maxIdle int, requestTimeout int, noVerify bool, - proxyAddress string) (*http.Client, error) { + proxyAddress string, +) (*http.Client, error) { logger.Debug("Using proxy address: ", zap.String("proxyAddr", proxyAddress), ) @@ -137,7 +138,6 @@ func GetAWSConfigSession(logger *zap.Logger, cn ConnAttr, cfg *AWSSessionSetting logger.Debug("Fetch region from ec2 metadata", zap.String("region", awsRegion)) } } - } if awsRegion == "" { @@ -207,7 +207,6 @@ func (c *Conn) newAWSSession(logger *zap.Logger, roleArn string, region string) s, err = session.NewSession(&aws.Config{ Credentials: stsCreds, }) - if err != nil { logger.Error("Error in creating session object : ", zap.Error(err)) return s, err @@ -246,7 +245,8 @@ func getSTSCreds(logger *zap.Logger, region string, roleArn string) (*credential // AWS STS recommends that you provide both the Region and endpoint when you make calls to a Regional endpoint. // Reference: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#id_credentials_temp_enable-regions_writing_code func getSTSCredsFromRegionEndpoint(logger *zap.Logger, sess *session.Session, region string, - roleArn string) *credentials.Credentials { + roleArn string, +) *credentials.Credentials { regionalEndpoint := getSTSRegionalEndpoint(region) // if regionalEndpoint is "", the STS endpoint is Global endpoint for classic regions except ap-east-1 - (HKG) // for other opt-in regions, region value will create STS regional endpoint. @@ -260,7 +260,8 @@ func getSTSCredsFromRegionEndpoint(logger *zap.Logger, sess *session.Session, re // getSTSCredsFromPrimaryRegionEndpoint fetches STS credentials for provided roleARN from primary region endpoint in // the respective partition. func getSTSCredsFromPrimaryRegionEndpoint(logger *zap.Logger, t *session.Session, roleArn string, - region string) *credentials.Credentials { + region string, +) *credentials.Credentials { logger.Info("Credentials for provided RoleARN being fetched from STS primary region endpoint.") partitionID := getPartition(region) switch partitionID { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs/cwlog_client.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs/cwlog_client.go index 1cbf21ab10..a8a17e243b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs/cwlog_client.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs/cwlog_client.go @@ -26,9 +26,7 @@ const ( errCodeThrottlingException = "ThrottlingException" ) -var ( - containerInsightsRegexPattern = regexp.MustCompile(`^/aws/.*containerinsights/.*/(performance|prometheus)$`) -) +var containerInsightsRegexPattern = regexp.MustCompile(`^/aws/.*containerinsights/.*/(performance|prometheus)$`) // Possible exceptions are combination of common errors (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/CommonErrors.html) // and API specific erros (e.g. https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html#API_PutLogEvents_Errors) @@ -53,10 +51,12 @@ func WithUserAgentExtras(userAgentExtras ...string) ClientOption { // Create a log client based on the actual cloudwatch logs client. func newCloudWatchLogClient(svc cloudwatchlogsiface.CloudWatchLogsAPI, logRetention int64, tags map[string]*string, logger *zap.Logger) *Client { - logClient := &Client{svc: svc, + logClient := &Client{ + svc: svc, logRetention: logRetention, tags: tags, - logger: logger} + logger: logger, + } return logClient } @@ -122,10 +122,9 @@ func (client *Client) PutLogEvents(input *cloudwatchlogs.PutLogEventsInput, retr client.logger.Error("cwlog_client: Error occurs in PutLogEvents", zap.Error(awsErr)) return err } - } - //TODO: Should have metrics to provide visibility of these failures + // TODO: Should have metrics to provide visibility of these failures if response != nil { if response.RejectedLogEventsInfo != nil { rejectedLogEventsInfo := response.RejectedLogEventsInfo diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs/pusher.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs/pusher.go index cee16a6941..af8417dc8a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs/pusher.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs/pusher.go @@ -29,9 +29,7 @@ const ( evenTimestampLimitInFuture = -2 * time.Hour // None of the log events in the batch can be more than 2 hours in the future. ) -var ( - maxEventPayloadBytes = defaultMaxEventPayloadBytes -) +var maxEventPayloadBytes = defaultMaxEventPayloadBytes // Event struct to present a log event. type Event struct { @@ -48,7 +46,8 @@ func NewEvent(timestampMs int64, message string) *Event { event := &Event{ InputLogEvent: &cloudwatchlogs.InputLogEvent{ Timestamp: aws.Int64(timestampMs), - Message: aws.String(message)}, + Message: aws.String(message), + }, } return event } @@ -115,7 +114,8 @@ func newEventBatch(key StreamKey) *eventBatch { putLogEventsInput: &cloudwatchlogs.PutLogEventsInput{ LogGroupName: aws.String(key.LogGroupName), LogStreamName: aws.String(key.LogStreamName), - LogEvents: make([]*cloudwatchlogs.InputLogEvent, 0, maxRequestEventCount)}, + LogEvents: make([]*cloudwatchlogs.InputLogEvent, 0, maxRequestEventCount), + }, } } @@ -194,8 +194,8 @@ type logPusher struct { // NewPusher creates a logPusher instance func NewPusher(streamKey StreamKey, retryCnt int, - svcStructuredLog Client, logger *zap.Logger) Pusher { - + svcStructuredLog Client, logger *zap.Logger, +) Pusher { pusher := newLogPusher(streamKey, svcStructuredLog, logger) pusher.retryCnt = defaultRetryCount @@ -208,7 +208,8 @@ func NewPusher(streamKey StreamKey, retryCnt int, // Only create a logPusher, but not start the instance. func newLogPusher(streamKey StreamKey, - svcStructuredLog Client, logger *zap.Logger) *logPusher { + svcStructuredLog Client, logger *zap.Logger, +) *logPusher { pusher := &logPusher{ logGroupName: aws.String(streamKey.LogGroupName), logStreamName: aws.String(streamKey.LogStreamName), @@ -250,7 +251,6 @@ func (p *logPusher) ForceFlush() error { } func (p *logPusher) pushEventBatch(req any) error { - // http://docs.aws.amazon.com/goto/SdkForGoV1/logs-2014-03-28/PutLogEvents // The log events in the batch must be in chronological ordered by their // timestamp (the time the event occurred, expressed as the number of milliseconds @@ -262,7 +262,6 @@ func (p *logPusher) pushEventBatch(req any) error { startTime := time.Now() err := p.svcStructuredLog.PutLogEvents(putLogEventsInput, p.retryCnt) - if err != nil { return err } @@ -296,7 +295,6 @@ func (p *logPusher) addLogEvent(logEvent *Event) *eventBatch { } func (p *logPusher) renewEventBatch() *eventBatch { - var prevBatch *eventBatch if len(p.logEventBatch.putLogEventsInput.LogEvents) > 0 { prevBatch = p.logEventBatch diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil/metadata_provider.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil/metadata_provider.go index 34b814aba2..75698eedd2 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil/metadata_provider.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil/metadata_provider.go @@ -42,7 +42,7 @@ func NewDetectedTaskMetadataProvider(set component.TelemetrySettings) (MetadataP return nil, fmt.Errorf("unable to detect task metadata endpoint") } - clientSettings := confighttp.ClientConfig{} + clientSettings := confighttp.NewDefaultClientConfig() client, err := NewRestClient(*endpoint, clientSettings, set) if err != nil { return nil, err @@ -64,7 +64,6 @@ func (md *ecsMetadataProviderImpl) FetchTaskMetadata() (*TaskMetadata, error) { taskMetadata := &TaskMetadata{} err = json.NewDecoder(bytes.NewReader(resp)).Decode(taskMetadata) - if err != nil { return nil, fmt.Errorf("encountered unexpected error reading response from ECS Task Metadata Endpoint: %w", err) } @@ -82,7 +81,6 @@ func (md *ecsMetadataProviderImpl) FetchContainerMetadata() (*ContainerMetadata, containerMetadata := &ContainerMetadata{} err = json.NewDecoder(bytes.NewReader(resp)).Decode(containerMetadata) - if err != nil { return nil, fmt.Errorf("encountered unexpected error reading response from ECS Container Metadata Endpoint: %w", err) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/job.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/job.go index 3076e35464..b565482285 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/job.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/job.go @@ -27,8 +27,7 @@ type JobClient interface { JobToCronJob() map[string]string } -type noOpJobClient struct { -} +type noOpJobClient struct{} func (nc *noOpJobClient) JobToCronJob() map[string]string { return map[string]string{} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/obj_store.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/obj_store.go index 8f51bd5bf1..288e6eb26f 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/obj_store.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/obj_store.go @@ -80,7 +80,6 @@ func (s *ObjStore) Update(obj any) error { // Delete implements the Delete method of the store interface. // Delete deletes an existing entry in the ObjStore. func (s *ObjStore) Delete(obj any) error { - o, err := meta.Accessor(obj) if err != nil { return err diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/replicaset.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/replicaset.go index cfa73d773e..7d911c6a65 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/replicaset.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s/k8sclient/replicaset.go @@ -27,8 +27,7 @@ type ReplicaSetClient interface { ReplicaSetToDeployment() map[string]string } -type noOpReplicaSetClient struct { -} +type noOpReplicaSetClient struct{} func (nc *noOpReplicaSetClient) ReplicaSetToDeployment() map[string]string { return map[string]string{} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics/metric_calculator.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics/metric_calculator.go index 098b673fbd..16435ef7f7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics/metric_calculator.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics/metric_calculator.go @@ -122,7 +122,7 @@ type MapWithExpiry struct { // NewMapWithExpiry automatically starts a sweeper to enforce the maps TTL. ShutDown() must be called to ensure that these // go routines are properly cleaned up ShutDown() must be called. func NewMapWithExpiry(ttl time.Duration) *MapWithExpiry { - m := &MapWithExpiry{lock: &sync.Mutex{}, ttl: ttl, entries: make(map[any]*MetricValue), doneChan: make(chan struct{})} + m := &MapWithExpiry{lock: &sync.Mutex{}, ttl: ttl, entries: make(map[any]*MetricValue), doneChan: make(chan struct{}, 1000)} go m.sweep(m.CleanUp) return m } @@ -157,7 +157,6 @@ func (m *MapWithExpiry) Shutdown() error { return errors.New("shutdown called on an already closed channel") default: close(m.doneChan) - } return nil } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy/cfg.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy/cfg.go index 2d352d58f7..77aad63cce 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy/cfg.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy/cfg.go @@ -7,7 +7,7 @@ import ( "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtls" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" ) // Config is the configuration for the local TCP proxy server. @@ -49,7 +49,7 @@ type Config struct { func DefaultConfig() *Config { return &Config{ TCPAddrConfig: confignet.TCPAddrConfig{ - Endpoint: localhostgate.EndpointForPort(2000), + Endpoint: testutil.EndpointForPort(2000), }, ProxyAddress: "", TLSSetting: configtls.ClientConfig{ diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy/conn.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy/conn.go index e0e850428b..c9eb13f2e3 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy/conn.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy/conn.go @@ -60,7 +60,6 @@ var newAWSSession = func(roleArn string, region string, log *zap.Logger) (*sessi sess, err := session.NewSession(&aws.Config{ Credentials: stsCreds, }) - if err != nil { return nil, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/telemetry/nop_sender.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/telemetry/nop_sender.go index c87ac6edca..698967e996 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/telemetry/nop_sender.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/telemetry/nop_sender.go @@ -12,8 +12,7 @@ func NewNopSender() Sender { var nopSenderInstance Sender = &nopSender{} -type nopSender struct { -} +type nopSender struct{} func (n nopSender) Rotate() *xray.TelemetryRecord { return nil diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/xray_client.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/xray_client.go index adb8d0ba72..072d267a0c 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/xray_client.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray/xray_client.go @@ -20,9 +20,11 @@ import ( ) // Constant prefixes used to identify information in user-agent -const agentPrefix = "xray-otel-exporter/" -const execEnvPrefix = " exec-env/" -const osPrefix = " OS/" +const ( + agentPrefix = "xray-otel-exporter/" + execEnvPrefix = " exec-env/" + osPrefix = " OS/" +) // XRayClient represents X-Ray client. type XRayClient interface { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/docker/images.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/docker/images.go index 8e5b3353f0..b97c35aa8a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/docker/images.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/docker/images.go @@ -10,9 +10,7 @@ import ( "go.uber.org/zap" ) -var ( - extractImageRegexp = regexp.MustCompile(`^(?P([^/\s]+/)?([^:\s]+))(:(?P[^@\s]+))?(@sha256:(?P\d+))?$`) -) +var extractImageRegexp = regexp.MustCompile(`^(?P([^/\s]+/)?([^:\s]+))(:(?P[^@\s]+))?(@sha256:(?P\d+))?$`) type ImageRef struct { Repository string diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate/featuregate.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate/featuregate.go deleted file mode 100644 index 9d74c396e8..0000000000 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate/featuregate.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// package localhostgate defines a feature gate that controls whether server-like receivers and extensions use localhost as the default host for their endpoints. -// This package is duplicated across core and contrib to avoid exposing the feature gate as part of the public API. -// To do this we define a `registerOrLoad` helper and try to register the gate in both modules. -// IMPORTANT NOTE: ANY CHANGES TO THIS PACKAGE MUST BE MIRRORED IN THE CORE COUNTERPART. -// See https://github.com/open-telemetry/opentelemetry-collector/blob/main/internal/localhostgate/featuregate.go -package localhostgate // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate" - -import ( - "errors" - "fmt" - - "go.opentelemetry.io/collector/featuregate" - "go.uber.org/zap" -) - -const UseLocalHostAsDefaultHostID = "component.UseLocalHostAsDefaultHost" - -// UseLocalHostAsDefaultHostfeatureGate is the feature gate that controls whether -// server-like receivers and extensions such as the OTLP receiver use localhost as the default host for their endpoints. -var UseLocalHostAsDefaultHostfeatureGate = mustRegisterOrLoad( - featuregate.GlobalRegistry(), - UseLocalHostAsDefaultHostID, - featuregate.StageBeta, - featuregate.WithRegisterDescription("controls whether server-like receivers and extensions such as the OTLP receiver use localhost as the default host for their endpoints"), -) - -// mustRegisterOrLoad tries to register the feature gate and loads it if it already exists. -// It panics on any other error. -func mustRegisterOrLoad(reg *featuregate.Registry, id string, stage featuregate.Stage, opts ...featuregate.RegisterOption) *featuregate.Gate { - gate, err := reg.Register(id, stage, opts...) - - if errors.Is(err, featuregate.ErrAlreadyRegistered) { - // Gate is already registered; find it. - // Only a handful of feature gates are registered, so it's fine to iterate over all of them. - reg.VisitAll(func(g *featuregate.Gate) { - if g.ID() == id { - gate = g - return - } - }) - } else if err != nil { - panic(err) - } - - return gate -} - -// EndpointForPort gets the endpoint for a given port using localhost or 0.0.0.0 depending on the feature gate. -func EndpointForPort(port int) string { - host := "localhost" - if !UseLocalHostAsDefaultHostfeatureGate.IsEnabled() { - host = "0.0.0.0" - } - return fmt.Sprintf("%s:%d", host, port) -} - -// LogAboutUseLocalHostAsDefault logs about the upcoming change from 0.0.0.0 to localhost on server-like components. -func LogAboutUseLocalHostAsDefault(logger *zap.Logger) { - if !UseLocalHostAsDefaultHostfeatureGate.IsEnabled() { - logger.Info( - "The default endpoints for all servers in components have changed to use localhost instead of 0.0.0.0. Use the feature gate to temporarily revert to the previous default.", - zap.String("feature gate ID", UseLocalHostAsDefaultHostID), - ) - } -} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil/testutil.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil/testutil.go new file mode 100644 index 0000000000..1968e44d7a --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil/testutil.go @@ -0,0 +1,153 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package testutil // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" + +import ( + "fmt" + "net" + "os/exec" + "runtime" + "strconv" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/featuregate" +) + +type portpair struct { + first string + last string +} + +// GetAvailableLocalAddress finds an available local port on tcp network and returns an endpoint +// describing it. The port is available for opening when this function returns +// provided that there is no race by some other code to grab the same port +// immediately. +func GetAvailableLocalAddress(t testing.TB) string { + return GetAvailableLocalNetworkAddress(t, "tcp") +} + +// GetAvailableLocalNetworkAddress finds an available local port on specified network and returns an endpoint +// describing it. The port is available for opening when this function returns +// provided that there is no race by some other code to grab the same port +// immediately. +func GetAvailableLocalNetworkAddress(t testing.TB, network string) string { + // Retry has been added for windows as net.Listen can return a port that is not actually available. Details can be + // found in https://github.com/docker/for-win/issues/3171 but to summarize Hyper-V will reserve ranges of ports + // which do not show up under the "netstat -ano" but can only be found by + // "netsh interface ipv4 show excludedportrange protocol=tcp". We'll use []exclusions to hold those ranges and + // retry if the port returned by GetAvailableLocalAddress falls in one of those them. + var exclusions []portpair + + portFound := false + if runtime.GOOS == "windows" { + exclusions = getExclusionsList(t) + } + + var endpoint string + for !portFound { + endpoint = findAvailableAddress(t, network) + _, port, err := net.SplitHostPort(endpoint) + require.NoError(t, err) + portFound = true + if runtime.GOOS == "windows" { + for _, pair := range exclusions { + if port >= pair.first && port <= pair.last { + portFound = false + break + } + } + } + } + + return endpoint +} + +func findAvailableAddress(t testing.TB, network string) string { + switch network { + // net.Listen supported network strings + case "tcp", "tcp4", "tcp6", "unix", "unixpacket": + ln, err := net.Listen(network, "localhost:0") + require.NoError(t, err, "Failed to get a free local port") + // There is a possible race if something else takes this same port before + // the test uses it, however, that is unlikely in practice. + defer func() { + assert.NoError(t, ln.Close()) + }() + return ln.Addr().String() + // net.ListenPacket supported network strings + case "udp", "udp4", "udp6", "unixgram": + ln, err := net.ListenPacket(network, "localhost:0") + require.NoError(t, err, "Failed to get a free local port") + // There is a possible race if something else takes this same port before + // the test uses it, however, that is unlikely in practice. + defer func() { + assert.NoError(t, ln.Close()) + }() + return ln.LocalAddr().String() + } + return "" +} + +// Get excluded ports on Windows from the command: netsh interface ipv4 show excludedportrange protocol=tcp +func getExclusionsList(t testing.TB) []portpair { + cmdTCP := exec.Command("netsh", "interface", "ipv4", "show", "excludedportrange", "protocol=tcp") + outputTCP, errTCP := cmdTCP.CombinedOutput() + require.NoError(t, errTCP) + exclusions := createExclusionsList(t, string(outputTCP)) + + cmdUDP := exec.Command("netsh", "interface", "ipv4", "show", "excludedportrange", "protocol=udp") + outputUDP, errUDP := cmdUDP.CombinedOutput() + require.NoError(t, errUDP) + exclusions = append(exclusions, createExclusionsList(t, string(outputUDP))...) + + return exclusions +} + +func createExclusionsList(t testing.TB, exclusionsText string) []portpair { + var exclusions []portpair + + parts := strings.Split(exclusionsText, "--------") + require.Len(t, parts, 3) + portsText := strings.Split(parts[2], "*") + require.Greater(t, len(portsText), 1) // original text may have a suffix like " - Administered port exclusions." + lines := strings.Split(portsText[0], "\n") + for _, line := range lines { + if strings.TrimSpace(line) != "" { + entries := strings.Fields(strings.TrimSpace(line)) + require.Len(t, entries, 2) + pair := portpair{entries[0], entries[1]} + exclusions = append(exclusions, pair) + } + } + return exclusions +} + +// Force the state of feature gate for a test +// usage: defer SetFeatureGateForTest("gateName", true)() +func SetFeatureGateForTest(t testing.TB, gate *featuregate.Gate, enabled bool) func() { + originalValue := gate.IsEnabled() + require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), enabled)) + return func() { + require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), originalValue)) + } +} + +func GetAvailablePort(t testing.TB) int { + endpoint := GetAvailableLocalAddress(t) + _, port, err := net.SplitHostPort(endpoint) + require.NoError(t, err) + + portInt, err := strconv.Atoi(port) + require.NoError(t, err) + + return portInt +} + +// EndpointForPort gets the endpoint for a given port using localhost. +func EndpointForPort(port int) string { + return fmt.Sprintf("localhost:%d", port) +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/aggregateutil/aggregate.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/aggregateutil/aggregate.go index dcfe176be1..198ca09bee 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/aggregateutil/aggregate.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/aggregateutil/aggregate.go @@ -33,9 +33,21 @@ func CopyMetricDetails(from, to pmetric.Metric) { } func FilterAttrs(metric pmetric.Metric, filterAttrKeys []string) { - if len(filterAttrKeys) == 0 { + // filterAttrKeys being nil means the filter is to be skipped. + if filterAttrKeys == nil { return } + // filterAttrKeys being empty means it is explicitly expected to filter + // against an empty label set, which is functionally the same as removing + // all attributes. + if len(filterAttrKeys) == 0 { + RangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { + attrs.Clear() + return true + }) + } + // filterAttrKeys having provided attributes means the filter continues + // as normal. RangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { attrs.RemoveIf(func(k string, _ pcommon.Value) bool { return isNotPresent(k, filterAttrKeys) @@ -176,7 +188,6 @@ func mergeNumberDataPoints(dpsMap map[string]pmetric.NumberDataPointSlice, agg A dp.SetDoubleValue((medianNumbers[mNumber-1] + medianNumbers[mNumber]) / 2) } } - } case pmetric.NumberDataPointValueTypeInt: medianNumbers := []int64{dp.IntValue()} @@ -272,7 +283,8 @@ func mergeHistogramDataPoints(dpsMap map[string]pmetric.HistogramDataPointSlice, } func mergeExponentialHistogramDataPoints(dpsMap map[string]pmetric.ExponentialHistogramDataPointSlice, - to pmetric.ExponentialHistogramDataPointSlice) { + to pmetric.ExponentialHistogramDataPointSlice, +) { for _, dps := range dpsMap { dp := to.AppendEmpty() dps.At(0).MoveTo(dp) @@ -305,7 +317,8 @@ func mergeExponentialHistogramDataPoints(dpsMap map[string]pmetric.ExponentialHi } func groupNumberDataPoints(dps pmetric.NumberDataPointSlice, useStartTime bool, - dpsByAttrsAndTs map[string]pmetric.NumberDataPointSlice) { + dpsByAttrsAndTs map[string]pmetric.NumberDataPointSlice, +) { var keyHashParts []any for i := 0; i < dps.Len(); i++ { if useStartTime { @@ -320,7 +333,8 @@ func groupNumberDataPoints(dps pmetric.NumberDataPointSlice, useStartTime bool, } func groupHistogramDataPoints(dps pmetric.HistogramDataPointSlice, useStartTime bool, - dpsByAttrsAndTs map[string]pmetric.HistogramDataPointSlice) { + dpsByAttrsAndTs map[string]pmetric.HistogramDataPointSlice, +) { for i := 0; i < dps.Len(); i++ { dp := dps.At(i) keyHashParts := make([]any, 0, dp.ExplicitBounds().Len()+4) @@ -341,7 +355,8 @@ func groupHistogramDataPoints(dps pmetric.HistogramDataPointSlice, useStartTime } func groupExponentialHistogramDataPoints(dps pmetric.ExponentialHistogramDataPointSlice, useStartTime bool, - dpsByAttrsAndTs map[string]pmetric.ExponentialHistogramDataPointSlice) { + dpsByAttrsAndTs map[string]pmetric.ExponentialHistogramDataPointSlice, +) { for i := 0; i < dps.Len(); i++ { dp := dps.At(i) keyHashParts := make([]any, 0, 5) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction/attraction.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction/attraction.go index 19f3c46f06..b1a5083eba 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction/attraction.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction/attraction.go @@ -34,7 +34,7 @@ type ActionKeyValue struct { // The type of the value is inferred from the configuration. Value any `mapstructure:"value"` - // A regex pattern must be specified for the action EXTRACT. + // A regex pattern must be specified for the action EXTRACT. // It uses the attribute specified by `key' to extract values from // The target keys are inferred based on the names of the matcher groups // provided and the names will be inferred based on the values of the diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils/uri.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils/uri.go index 048e90e383..cd154b9d36 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils/uri.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/parseutils/uri.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - semconv "go.opentelemetry.io/collector/semconv/v1.25.0" + semconv "go.opentelemetry.io/collector/semconv/v1.27.0" ) const ( diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt.go index 921ebdc8c3..adb0c5dded 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/timeutils/internal/ctimefmt/ctimefmt.go @@ -16,9 +16,11 @@ import ( "time" ) -var ctimeRegexp = regexp.MustCompile(`%.`) -var invalidFractionalSecondsStrptime = regexp.MustCompile(`[^.,]%[Lfs]`) -var decimalsRegexp = regexp.MustCompile(`\d`) +var ( + ctimeRegexp = regexp.MustCompile(`%.`) + invalidFractionalSecondsStrptime = regexp.MustCompile(`[^.,]%[Lfs]`) + decimalsRegexp = regexp.MustCompile(`\d`) +) var ctimeSubstitutes = map[string]string{ "%Y": "2006", diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/timeutils/parser.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/timeutils/parser.go index 7b15ca4054..82c5523292 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/timeutils/parser.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/timeutils/parser.go @@ -4,6 +4,7 @@ package timeutils // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/timeutils" import ( + "errors" "fmt" "regexp" "strings" @@ -28,27 +29,15 @@ func ParseStrptime(layout string, value any, location *time.Location) (time.Time return ParseGotime(goLayout, value, location) } -// ParseLocalizedStrptime is like ParseStrptime, but instead of parsing a formatted time in -// English, it parses a value in foreign language, and returns the [time.Time] it represents. -// The language argument must be a well-formed BCP 47 language tag (e.g.: "en", "en-US"), and -// a known CLDR locale. +// ParseLocalizedStrptime is like ParseLocalizedGotime, but instead of using the native Go time layout, +// it uses the ctime-like format. func ParseLocalizedStrptime(layout string, value any, location *time.Location, language string) (time.Time, error) { goLayout, err := strptime.ToNative(layout) if err != nil { return time.Time{}, err } - stringValue, err := convertParsingValue(value) - if err != nil { - return time.Time{}, err - } - - translatedVal, err := lunes.Translate(goLayout, stringValue, language) - if err != nil { - return time.Time{}, err - } - - return ParseGotime(goLayout, translatedVal, location) + return ParseLocalizedGotime(goLayout, value, location, language) } func GetLocation(location *string, layout *string) (*time.Location, error) { @@ -69,6 +58,24 @@ func GetLocation(location *string, layout *string) (*time.Location, error) { return time.Local, nil } +// ParseLocalizedGotime is like ParseGotime, but instead of parsing a formatted time in +// English, it parses a value in foreign language, and returns the [time.Time] it represents. +// The language argument must be a well-formed BCP 47 language tag (e.g.: "en", "en-US"), and +// a known CLDR locale. +func ParseLocalizedGotime(layout string, value any, location *time.Location, language string) (time.Time, error) { + stringValue, err := convertParsingValue(value) + if err != nil { + return time.Time{}, err + } + + translatedVal, err := lunes.Translate(layout, stringValue, language) + if err != nil { + return time.Time{}, err + } + + return ParseGotime(layout, translatedVal, location) +} + func ParseGotime(layout string, value any, location *time.Location) (time.Time, error) { timeValue, err := parseGotime(layout, value, location) if err != nil { @@ -155,5 +162,21 @@ func ValidateGotime(layout string) error { return nil } +// ValidateLocale checks the given locale and returns an error if the language tag +// is not supported by the localized parser functions. +func ValidateLocale(locale string) error { + _, err := lunes.NewDefaultLocale(locale) + if err == nil { + return nil + } + + var e *lunes.ErrUnsupportedLocale + if errors.As(err, &e) { + return fmt.Errorf("unsupported locale '%s', value must be a supported BCP 47 language tag", locale) + } + + return fmt.Errorf("invalid locale '%s': %w", locale, err) +} + // Allows tests to override with deterministic value var Now = time.Now diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterlog/filterlog.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterlog/filterlog.go index b394397c19..41d324d86d 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterlog/filterlog.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterlog/filterlog.go @@ -28,7 +28,6 @@ var useOTTLBridge = featuregate.GlobalRegistry().MustRegister( // The logic determining if a log should be processed is based on include and exclude settings. // Include properties are checked before exclude settings are checked. func NewSkipExpr(mp *filterconfig.MatchConfig) (expr.BoolExpr[ottllog.TransformContext], error) { - if useOTTLBridge.IsEnabled() { return filterottl.NewLogSkipExprBridge(mp) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filtermatcher/attributematcher.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filtermatcher/attributematcher.go index a4261a0676..0a1d2c6d18 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filtermatcher/attributematcher.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filtermatcher/attributematcher.go @@ -37,7 +37,6 @@ func NewAttributesMatcher(config filterset.Config, attributes []filterconfig.Att // Convert attribute values from mp representation to in-memory representation. var rawAttributes []AttributeMatcher for _, attribute := range attributes { - if attribute.Key == "" { return nil, errors.New("can't have empty key in the list of attributes") } @@ -73,7 +72,6 @@ func NewAttributesMatcher(config filterset.Config, attributes []filterconfig.Att } default: return nil, filterset.NewUnrecognizedMatchTypeError(config.MatchType) - } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterottl/filter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterottl/filter.go index e4dad6ee93..705b2acf5a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterottl/filter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterottl/filter.go @@ -6,7 +6,6 @@ package filterottl // import "github.com/open-telemetry/opentelemetry-collector- import ( "go.opentelemetry.io/collector/component" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/expr" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllog" @@ -20,7 +19,7 @@ import ( // NewBoolExprForSpan creates a BoolExpr[ottlspan.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlspan.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected -func NewBoolExprForSpan(conditions []string, functions map[string]ottl.Factory[ottlspan.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlspan.TransformContext], error) { +func NewBoolExprForSpan(conditions []string, functions map[string]ottl.Factory[ottlspan.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (*ottl.ConditionSequence[ottlspan.TransformContext], error) { parser, err := ottlspan.NewParser(functions, set) if err != nil { return nil, err @@ -36,7 +35,7 @@ func NewBoolExprForSpan(conditions []string, functions map[string]ottl.Factory[o // NewBoolExprForSpanEvent creates a BoolExpr[ottlspanevent.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlspanevent.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected -func NewBoolExprForSpanEvent(conditions []string, functions map[string]ottl.Factory[ottlspanevent.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlspanevent.TransformContext], error) { +func NewBoolExprForSpanEvent(conditions []string, functions map[string]ottl.Factory[ottlspanevent.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (*ottl.ConditionSequence[ottlspanevent.TransformContext], error) { parser, err := ottlspanevent.NewParser(functions, set) if err != nil { return nil, err @@ -52,7 +51,7 @@ func NewBoolExprForSpanEvent(conditions []string, functions map[string]ottl.Fact // NewBoolExprForMetric creates a BoolExpr[ottlmetric.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlmetric.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected -func NewBoolExprForMetric(conditions []string, functions map[string]ottl.Factory[ottlmetric.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlmetric.TransformContext], error) { +func NewBoolExprForMetric(conditions []string, functions map[string]ottl.Factory[ottlmetric.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (*ottl.ConditionSequence[ottlmetric.TransformContext], error) { parser, err := ottlmetric.NewParser(functions, set) if err != nil { return nil, err @@ -68,7 +67,7 @@ func NewBoolExprForMetric(conditions []string, functions map[string]ottl.Factory // NewBoolExprForDataPoint creates a BoolExpr[ottldatapoint.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottldatapoint.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected -func NewBoolExprForDataPoint(conditions []string, functions map[string]ottl.Factory[ottldatapoint.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottldatapoint.TransformContext], error) { +func NewBoolExprForDataPoint(conditions []string, functions map[string]ottl.Factory[ottldatapoint.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (*ottl.ConditionSequence[ottldatapoint.TransformContext], error) { parser, err := ottldatapoint.NewParser(functions, set) if err != nil { return nil, err @@ -84,7 +83,7 @@ func NewBoolExprForDataPoint(conditions []string, functions map[string]ottl.Fact // NewBoolExprForLog creates a BoolExpr[ottllog.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottllog.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected -func NewBoolExprForLog(conditions []string, functions map[string]ottl.Factory[ottllog.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottllog.TransformContext], error) { +func NewBoolExprForLog(conditions []string, functions map[string]ottl.Factory[ottllog.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (*ottl.ConditionSequence[ottllog.TransformContext], error) { parser, err := ottllog.NewParser(functions, set) if err != nil { return nil, err @@ -100,7 +99,7 @@ func NewBoolExprForLog(conditions []string, functions map[string]ottl.Factory[ot // NewBoolExprForResource creates a BoolExpr[ottlresource.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlresource.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected -func NewBoolExprForResource(conditions []string, functions map[string]ottl.Factory[ottlresource.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlresource.TransformContext], error) { +func NewBoolExprForResource(conditions []string, functions map[string]ottl.Factory[ottlresource.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (*ottl.ConditionSequence[ottlresource.TransformContext], error) { parser, err := ottlresource.NewParser(functions, set) if err != nil { return nil, err @@ -116,7 +115,7 @@ func NewBoolExprForResource(conditions []string, functions map[string]ottl.Facto // NewBoolExprForScope creates a BoolExpr[ottlscope.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlresource.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected -func NewBoolExprForScope(conditions []string, functions map[string]ottl.Factory[ottlscope.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlscope.TransformContext], error) { +func NewBoolExprForScope(conditions []string, functions map[string]ottl.Factory[ottlscope.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (*ottl.ConditionSequence[ottlscope.TransformContext], error) { parser, err := ottlscope.NewParser(functions, set) if err != nil { return nil, err diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset/config.go index 7a60b64165..f6c6c757d5 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset/config.go @@ -22,9 +22,7 @@ const ( MatchTypeFieldName = "match_type" ) -var ( - validMatchTypes = []MatchType{Regexp, Strict} -) +var validMatchTypes = []MatchType{Regexp, Strict} // Config configures the matching behavior of a FilterSet. type Config struct { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterspan/filterspan.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterspan/filterspan.go index 2ee4358991..734b8a01b7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterspan/filterspan.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterspan/filterspan.go @@ -9,7 +9,7 @@ import ( "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/expr" diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig/config.go index 8d57fef870..d339116676 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig/config.go @@ -101,7 +101,6 @@ func CreateRestConfig(apiConf APIConfig) (*rest.Config, error) { } authConf, err = clientcmd.NewNonInteractiveDeferredLoadingClientConfig( loadingRules, configOverrides).ClientConfig() - if err != nil { return nil, fmt.Errorf("error connecting to k8s with auth_type=%s: %w", AuthTypeKubeConfig, err) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/authentication.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/authentication.go index d6e48b4bc9..491f02985a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/authentication.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/authentication.go @@ -93,7 +93,6 @@ func configurePlaintext(config PlainTextConfig, saramaConfig *sarama.Config) { } func configureSASL(config SASLConfig, saramaConfig *sarama.Config) error { - if config.Username == "" { return fmt.Errorf("username have to be provided") } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/scram_client.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/scram_client.go index 0c3f83d8ba..269dcfbd77 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/scram_client.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/scram_client.go @@ -34,7 +34,6 @@ func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error) { // completes is also an error. func (x *XDGSCRAMClient) Step(challenge string) (response string, err error) { return x.ClientConversation.Step(challenge) - } // Done returns true if the conversation is completed or has errored. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet/client.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet/client.go index df16aa3b3c..eda1b97c2d 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet/client.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet/client.go @@ -101,7 +101,6 @@ func (p *kubeConfigClientProvider) BuildClient() (Client, error) { tok: nil, logger: p.logger, }, nil - } type readOnlyClientProvider struct { @@ -121,7 +120,6 @@ func (p *readOnlyClientProvider) BuildClient() (Client, error) { tok: nil, logger: p.logger, }, nil - } type tlsClientProvider struct { @@ -296,7 +294,7 @@ func (c *clientImpl) buildReq(p string) (*http.Request, error) { if err != nil { return nil, err } - req, err := http.NewRequest("GET", reqURL, nil) + req, err := http.NewRequest(http.MethodGet, reqURL, nil) if err != nil { return nil, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure/metadata.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure/metadata.go index d64576e1ef..820974ff36 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure/metadata.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure/metadata.go @@ -82,7 +82,7 @@ func (p *azureProviderImpl) Metadata(ctx context.Context) (*ComputeMetadata, err return nil, fmt.Errorf("failed to query Azure IMDS: %w", err) } defer resp.Body.Close() - if resp.StatusCode != 200 { + if resp.StatusCode != http.StatusOK { //lint:ignore ST1005 Azure is a capitalized proper noun here return nil, fmt.Errorf("Azure IMDS replied with status code: %s", resp.Status) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/system/metadata.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/system/metadata.go index 6a8dda084d..0118fdeae0 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/system/metadata.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/system/metadata.go @@ -13,7 +13,7 @@ import ( "github.com/Showmax/go-fqdn" "github.com/shirou/gopsutil/v4/cpu" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" @@ -199,7 +199,6 @@ func (p systemMetadataProvider) HostIPs() (ips []net.IP, err error) { ips = append(ips, ip) } - } return ips, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk/common.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk/common.go index c6b4f67e6e..c7cc3c2ecb 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk/common.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk/common.go @@ -38,9 +38,7 @@ const ( metricNamePattern = "^metric_name:([A-Za-z\\.:][A-Za-z0-9_\\.:]*)$" ) -var ( - metricNameRegexp = regexp.MustCompile(metricNamePattern) -) +var metricNameRegexp = regexp.MustCompile(metricNamePattern) // AccessTokenPassthroughConfig configures passing through access tokens. type AccessTokenPassthroughConfig struct { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk/hostid.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk/hostid.go index 8a9305567c..588a1180f5 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk/hostid.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk/hostid.go @@ -8,7 +8,7 @@ import ( "strings" "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" ) // HostIDKey represents a host identifier. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr/batchperresourceattr.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr/batchperresourceattr.go index 92f55b6481..510b41f6fc 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr/batchperresourceattr.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr/batchperresourceattr.go @@ -35,9 +35,9 @@ func NewMultiBatchPerResourceTraces(attrKeys []string, next consumer.Traces) con } } -// Capabilities implements the consumer interface. +// Capabilities returns the capabilities of the next consumer because batchTraces doesn't mutate data itself. func (bt *batchTraces) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: false} + return bt.next.Capabilities() } func (bt *batchTraces) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { @@ -98,9 +98,9 @@ func NewMultiBatchPerResourceMetrics(attrKeys []string, next consumer.Metrics) c } } -// Capabilities implements the consumer interface. +// Capabilities returns the capabilities of the next consumer because batchMetrics doesn't mutate data itself. func (bt *batchMetrics) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: false} + return bt.next.Capabilities() } func (bt *batchMetrics) ConsumeMetrics(ctx context.Context, td pmetric.Metrics) error { @@ -159,9 +159,9 @@ func NewMultiBatchPerResourceLogs(attrKeys []string, next consumer.Logs) consume } } -// Capabilities implements the consumer interface. +// Capabilities returns the capabilities of the next consumer because batchLogs doesn't mutate data itself. func (bt *batchLogs) Capabilities() consumer.Capabilities { - return consumer.Capabilities{MutatesData: false} + return bt.next.Capabilities() } func (bt *batchLogs) ConsumeLogs(ctx context.Context, td plog.Logs) error { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/LICENSE b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/config.go new file mode 100644 index 0000000000..c1b40bd7ce --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/config.go @@ -0,0 +1,350 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package config // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config" + +import ( + "errors" + "fmt" + "strings" + "time" + + "github.com/DataDog/datadog-agent/pkg/util/hostname/validate" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.uber.org/zap" +) + +var ( + // ErrUnsetAPIKey is returned when the API key is not set. + ErrUnsetAPIKey = errors.New("api.key is not set") + // ErrNoMetadata is returned when only_metadata is enabled but host metadata is disabled or hostname_source is not first_resource. + ErrNoMetadata = errors.New("only_metadata can't be enabled when host_metadata::enabled = false or host_metadata::hostname_source != first_resource") + // ErrInvalidHostname is returned when the hostname is invalid. + ErrEmptyEndpoint = errors.New("endpoint cannot be empty") +) + +const ( + // DefaultSite is the default site of the Datadog intake to send data to + DefaultSite = "datadoghq.com" +) + +// APIConfig defines the API configuration options +type APIConfig struct { + // Key is the Datadog API key to associate your Agent's data with your organization. + // Create a new API key here: https://app.datadoghq.com/account/settings + Key configopaque.String `mapstructure:"key"` + + // Site is the site of the Datadog intake to send data to. + // The default value is "datadoghq.com". + Site string `mapstructure:"site"` + + // FailOnInvalidKey states whether to exit at startup on invalid API key. + // The default value is false. + FailOnInvalidKey bool `mapstructure:"fail_on_invalid_key"` +} + +// TagsConfig defines the tag-related configuration +// It is embedded in the configuration +type TagsConfig struct { + // Hostname is the fallback hostname used for payloads without hostname-identifying attributes. + // This option will NOT change the hostname applied to your metrics, traces and logs if they already have hostname-identifying attributes. + // If unset, the hostname will be determined automatically. See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#fallback-hostname-logic for details. + // + // Prefer using the `datadog.host.name` resource attribute over using this setting. + // See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#general-hostname-semantic-conventions for details. + Hostname string `mapstructure:"hostname"` +} + +// Config defines configuration for the Datadog exporter. +type Config struct { + confighttp.ClientConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"` + configretry.BackOffConfig `mapstructure:"retry_on_failure"` + + TagsConfig `mapstructure:",squash"` + + // API defines the Datadog API configuration. + API APIConfig `mapstructure:"api"` + + // Metrics defines the Metrics exporter specific configuration + Metrics MetricsConfig `mapstructure:"metrics"` + + // Traces defines the Traces exporter specific configuration + Traces TracesExporterConfig `mapstructure:"traces"` + + // Logs defines the Logs exporter specific configuration + Logs LogsConfig `mapstructure:"logs"` + + // HostMetadata defines the host metadata specific configuration + HostMetadata HostMetadataConfig `mapstructure:"host_metadata"` + + // OnlyMetadata defines whether to only send metadata + // This is useful for agent-collector setups, so that + // metadata about a host is sent to the backend even + // when telemetry data is reported via a different host. + // + // This flag is incompatible with disabling host metadata, + // `use_resource_metadata`, or `host_metadata::hostname_source != first_resource` + OnlyMetadata bool `mapstructure:"only_metadata"` + + // Non-fatal warnings found during configuration loading. + warnings []error +} + +// LogWarnings logs warning messages that were generated on unmarshaling. +func (c *Config) LogWarnings(logger *zap.Logger) { + for _, err := range c.warnings { + logger.Warn(fmt.Sprintf("%v", err)) + } +} + +var _ component.Config = (*Config)(nil) + +// Validate the configuration for errors. This is required by component.Config. +func (c *Config) Validate() error { + if err := validateClientConfig(c.ClientConfig); err != nil { + return err + } + + if c.OnlyMetadata && (!c.HostMetadata.Enabled || c.HostMetadata.HostnameSource != HostnameSourceFirstResource) { + return ErrNoMetadata + } + + if err := validate.ValidHostname(c.Hostname); c.Hostname != "" && err != nil { + return fmt.Errorf("hostname field is invalid: %w", err) + } + + if c.API.Key == "" { + return ErrUnsetAPIKey + } + + if err := c.Traces.Validate(); err != nil { + return err + } + + err := c.Metrics.HistConfig.validate() + if err != nil { + return err + } + + if c.HostMetadata.ReporterPeriod < 5*time.Minute { + return errors.New("reporter_period must be 5 minutes or higher") + } + + return nil +} + +func validateClientConfig(cfg confighttp.ClientConfig) error { + var unsupported []string + if cfg.Auth != nil { + unsupported = append(unsupported, "auth") + } + if cfg.Endpoint != "" { + unsupported = append(unsupported, "endpoint") + } + if cfg.Compression != "" { + unsupported = append(unsupported, "compression") + } + if len(cfg.Headers) > 0 { + unsupported = append(unsupported, "headers") + } + if cfg.HTTP2ReadIdleTimeout != 0 { + unsupported = append(unsupported, "http2_read_idle_timeout") + } + if cfg.HTTP2PingTimeout != 0 { + unsupported = append(unsupported, "http2_ping_timeout") + } + + if len(unsupported) > 0 { + return fmt.Errorf("these confighttp client configs are currently not respected by Datadog exporter: %s", strings.Join(unsupported, ", ")) + } + return nil +} + +var _ error = (*renameError)(nil) + +// renameError is an error related to a renamed setting. +type renameError struct { + // oldName of the configuration option. + oldName string + // newName of the configuration option. + newName string + // issueNumber on opentelemetry-collector-contrib for tracking + issueNumber uint +} + +// List of settings that have been removed, but for which we keep a custom error. +var removedSettings = []renameError{ + { + oldName: "metrics::send_monotonic_counter", + newName: "metrics::sums::cumulative_monotonic_mode", + issueNumber: 8489, + }, + { + oldName: "tags", + newName: "host_metadata::tags", + issueNumber: 9099, + }, + { + oldName: "send_metadata", + newName: "host_metadata::enabled", + issueNumber: 9099, + }, + { + oldName: "use_resource_metadata", + newName: "host_metadata::hostname_source", + issueNumber: 9099, + }, + { + oldName: "metrics::report_quantiles", + newName: "metrics::summaries::mode", + issueNumber: 8845, + }, + { + oldName: "metrics::instrumentation_library_metadata_as_tags", + newName: "metrics::instrumentation_scope_as_tags", + issueNumber: 11135, + }, +} + +// Error implements the error interface. +func (e renameError) Error() string { + return fmt.Sprintf( + "%q was removed in favor of %q. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/%d", + e.oldName, + e.newName, + e.issueNumber, + ) +} + +func handleRemovedSettings(configMap *confmap.Conf) error { + var errs []error + for _, removedErr := range removedSettings { + if configMap.IsSet(removedErr.oldName) { + errs = append(errs, removedErr) + } + } + + return errors.Join(errs...) +} + +var _ confmap.Unmarshaler = (*Config)(nil) + +// Unmarshal a configuration map into the configuration struct. +func (c *Config) Unmarshal(configMap *confmap.Conf) error { + if err := handleRemovedSettings(configMap); err != nil { + return err + } + + err := configMap.Unmarshal(c) + if err != nil { + return err + } + + // Add deprecation warnings for deprecated settings. + renamingWarnings, err := handleRenamedSettings(configMap, c) + if err != nil { + return err + } + c.warnings = append(c.warnings, renamingWarnings...) + + c.API.Key = configopaque.String(strings.TrimSpace(string(c.API.Key))) + + // If an endpoint is not explicitly set, override it based on the site. + if !configMap.IsSet("metrics::endpoint") { + c.Metrics.TCPAddrConfig.Endpoint = fmt.Sprintf("https://api.%s", c.API.Site) + } + if !configMap.IsSet("traces::endpoint") { + c.Traces.TCPAddrConfig.Endpoint = fmt.Sprintf("https://trace.agent.%s", c.API.Site) + } + if !configMap.IsSet("logs::endpoint") { + c.Logs.TCPAddrConfig.Endpoint = fmt.Sprintf("https://http-intake.logs.%s", c.API.Site) + } + + // Return an error if an endpoint is explicitly set to "" + if c.Metrics.TCPAddrConfig.Endpoint == "" || c.Traces.TCPAddrConfig.Endpoint == "" || c.Logs.TCPAddrConfig.Endpoint == "" { + return ErrEmptyEndpoint + } + + const ( + initialValueSetting = "metrics::sums::initial_cumulative_monotonic_value" + cumulMonoMode = "metrics::sums::cumulative_monotonic_mode" + ) + if configMap.IsSet(initialValueSetting) && c.Metrics.SumConfig.CumulativeMonotonicMode != CumulativeMonotonicSumModeToDelta { + return fmt.Errorf("%q can only be configured when %q is set to %q", + initialValueSetting, cumulMonoMode, CumulativeMonotonicSumModeToDelta) + } + + return nil +} + +func defaultClientConfig() confighttp.ClientConfig { + client := confighttp.NewDefaultClientConfig() + client.Timeout = 15 * time.Second + return client +} + +// CreateDefaultConfig creates the default exporter configuration +func CreateDefaultConfig() component.Config { + return &Config{ + ClientConfig: defaultClientConfig(), + BackOffConfig: configretry.NewDefaultBackOffConfig(), + QueueSettings: exporterhelper.NewDefaultQueueConfig(), + + API: APIConfig{ + Site: "datadoghq.com", + }, + + Metrics: MetricsConfig{ + TCPAddrConfig: confignet.TCPAddrConfig{ + Endpoint: "https://api.datadoghq.com", + }, + DeltaTTL: 3600, + ExporterConfig: MetricsExporterConfig{ + ResourceAttributesAsTags: false, + InstrumentationScopeMetadataAsTags: false, + }, + HistConfig: HistogramConfig{ + Mode: "distributions", + SendAggregations: false, + }, + SumConfig: SumConfig{ + CumulativeMonotonicMode: CumulativeMonotonicSumModeToDelta, + InitialCumulativeMonotonicMode: InitialValueModeAuto, + }, + SummaryConfig: SummaryConfig{ + Mode: SummaryModeGauges, + }, + }, + + Traces: TracesExporterConfig{ + TCPAddrConfig: confignet.TCPAddrConfig{ + Endpoint: "https://trace.agent.datadoghq.com", + }, + TracesConfig: TracesConfig{ + IgnoreResources: []string{}, + }, + }, + + Logs: LogsConfig{ + TCPAddrConfig: confignet.TCPAddrConfig{ + Endpoint: "https://http-intake.logs.datadoghq.com", + }, + UseCompression: true, + CompressionLevel: 6, + BatchWait: 5, + }, + + HostMetadata: HostMetadataConfig{ + Enabled: true, + HostnameSource: HostnameSourceConfigOrSystem, + ReporterPeriod: 30 * time.Minute, + }, + } +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config_warnings.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/config_warnings.go similarity index 95% rename from vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config_warnings.go rename to vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/config_warnings.go index 8197903d22..0e5701c995 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config_warnings.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/config_warnings.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package datadogexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter" +package config // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config" import ( "errors" diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/host.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/host.go new file mode 100644 index 0000000000..4d481aa005 --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/host.go @@ -0,0 +1,90 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package config // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config" + +import ( + "encoding" + "fmt" + "time" +) + +// HostnameSource is the source for the hostname of host metadata. +type HostnameSource string + +const ( + // HostnameSourceFirstResource picks the host metadata hostname from the resource + // attributes on the first OTLP payload that gets to the exporter. If it is lacking any + // hostname-like attributes, it will fallback to 'config_or_system' behavior (see below). + // + // Do not use this hostname source if receiving data from multiple hosts. + HostnameSourceFirstResource HostnameSource = "first_resource" + + // HostnameSourceConfigOrSystem picks the host metadata hostname from the 'hostname' setting, + // and if this is empty, from available system APIs and cloud provider endpoints. + HostnameSourceConfigOrSystem HostnameSource = "config_or_system" +) + +var _ encoding.TextUnmarshaler = (*HostnameSource)(nil) + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (sm *HostnameSource) UnmarshalText(in []byte) error { + switch mode := HostnameSource(in); mode { + case HostnameSourceFirstResource, + HostnameSourceConfigOrSystem: + *sm = mode + return nil + default: + return fmt.Errorf("invalid host metadata hostname source %q", mode) + } +} + +// HostMetadataConfig defines the host metadata related configuration. +// Host metadata is the information used for populating the infrastructure list, +// the host map and providing host tags functionality. +// +// The exporter will send host metadata for a single host, whose name is chosen +// according to `host_metadata::hostname_source`. +type HostMetadataConfig struct { + // Enabled enables the host metadata functionality. + Enabled bool `mapstructure:"enabled"` + + // HostnameSource is the source for the hostname of host metadata. + // This hostname is used for identifying the infrastructure list, host map and host tag information related to the host where the Datadog exporter is running. + // Changing this setting will not change the host used to tag your metrics, traces and logs in any way. + // For remote hosts, see https://docs.datadoghq.com/opentelemetry/schema_semantics/host_metadata/. + // + // Valid values are 'first_resource' and 'config_or_system': + // - 'first_resource' picks the host metadata hostname from the resource + // attributes on the first OTLP payload that gets to the exporter. + // If the first payload lacks hostname-like attributes, it will fallback to 'config_or_system'. + // **Do not use this hostname source if receiving data from multiple hosts**. + // - 'config_or_system' picks the host metadata hostname from the 'hostname' setting, + // If this is empty it will use available system APIs and cloud provider endpoints. + // + // The default is 'config_or_system'. + HostnameSource HostnameSource `mapstructure:"hostname_source"` + + // Tags is a list of host tags. + // These tags will be attached to telemetry signals that have the host metadata hostname. + // To attach tags to telemetry signals regardless of the host, use a processor instead. + Tags []string `mapstructure:"tags"` + + // sourceTimeout is the timeout to fetch from each provider - for example AWS IMDS. + // If unset, or set to zero duration, there will be no timeout applied. + // Default is no timeout. + sourceTimeout time.Duration + + // ReporterPeriod is the period at which the host metadata reporter will run. + ReporterPeriod time.Duration `mapstructure:"reporter_period"` +} + +// SetSourceTimeout sets the timeout to fetch from each provider - for example AWS IMDS. +func (h *HostMetadataConfig) SetSourceTimeout(t time.Duration) { + h.sourceTimeout = t +} + +// GetSourceTimeout returns the timeout to fetch from each provider - for example AWS IMDS. +func (h *HostMetadataConfig) GetSourceTimeout() time.Duration { + return h.sourceTimeout +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/logs.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/logs.go new file mode 100644 index 0000000000..b1d4cf5a57 --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/logs.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package config // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config" + +import "go.opentelemetry.io/collector/config/confignet" + +// LogsConfig defines logs exporter specific configuration +type LogsConfig struct { + // TCPAddr.Endpoint is the host of the Datadog intake server to send logs to. + // If unset, the value is obtained from the Site. + confignet.TCPAddrConfig `mapstructure:",squash"` + + // DumpPayloads report whether payloads should be dumped when logging level is debug. + // Note: this config option does not apply when the `exporter.datadogexporter.UseLogsAgentExporter` feature flag is enabled (now enabled by default). + // Deprecated: This config option is not supported in the Datadog Agent logs pipeline. + DumpPayloads bool `mapstructure:"dump_payloads"` + + // UseCompression enables the logs agent to compress logs before sending them. + // Note: this config option does not apply when the `exporter.datadogexporter.UseLogsAgentExporter` feature flag is disabled. + UseCompression bool `mapstructure:"use_compression"` + + // CompressionLevel accepts values from 0 (no compression) to 9 (maximum compression but higher resource usage). + // Only takes effect if UseCompression is set to true. + // Note: this config option does not apply when the `exporter.datadogexporter.UseLogsAgentExporter` feature flag is disabled. + CompressionLevel int `mapstructure:"compression_level"` + + // BatchWait represents the maximum time the logs agent waits to fill each batch of logs before sending. + // Note: this config option does not apply when the `exporter.datadogexporter.UseLogsAgentExporter` feature flag is disabled. + BatchWait int `mapstructure:"batch_wait"` +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/metrics.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/metrics.go new file mode 100644 index 0000000000..c17a148af8 --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/metrics.go @@ -0,0 +1,243 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package config // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config" + +import ( + "encoding" + "fmt" + + otlpmetrics "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" + "go.opentelemetry.io/collector/config/confignet" +) + +// MetricsConfig defines the metrics exporter specific configuration options +type MetricsConfig struct { + // DeltaTTL defines the time that previous points of a cumulative monotonic + // metric are kept in memory to calculate deltas + DeltaTTL int64 `mapstructure:"delta_ttl"` + + // TCPAddr.Endpoint is the host of the Datadog intake server to send metrics to. + // If unset, the value is obtained from the Site. + confignet.TCPAddrConfig `mapstructure:",squash"` + + ExporterConfig MetricsExporterConfig `mapstructure:",squash"` + + // HistConfig defines the export of OTLP Histograms. + HistConfig HistogramConfig `mapstructure:"histograms"` + + // SumConfig defines the export of OTLP Sums. + SumConfig SumConfig `mapstructure:"sums"` + + // SummaryConfig defines the export for OTLP Summaries. + SummaryConfig SummaryConfig `mapstructure:"summaries"` +} + +type HistogramMode string + +const ( + // HistogramModeNoBuckets reports no bucket histogram metrics. .sum and .count metrics will still be sent + // if `send_count_sum_metrics` is enabled. + HistogramModeNoBuckets HistogramMode = "nobuckets" + // HistogramModeCounters reports histograms as Datadog counts, one metric per bucket. + HistogramModeCounters HistogramMode = "counters" + // HistogramModeDistributions reports histograms as Datadog distributions (recommended). + HistogramModeDistributions HistogramMode = "distributions" +) + +var _ encoding.TextUnmarshaler = (*HistogramMode)(nil) + +func (hm *HistogramMode) UnmarshalText(in []byte) error { + switch mode := HistogramMode(in); mode { + case HistogramModeCounters, HistogramModeDistributions, HistogramModeNoBuckets: + *hm = mode + return nil + default: + return fmt.Errorf("invalid histogram mode %q", mode) + } +} + +// HistogramConfig customizes export of OTLP Histograms. +type HistogramConfig struct { + // Mode for exporting histograms. Valid values are 'distributions', 'counters' or 'nobuckets'. + // - 'distributions' sends histograms as Datadog distributions (recommended). + // - 'counters' sends histograms as Datadog counts, one metric per bucket. + // - 'nobuckets' sends no bucket histogram metrics. Aggregation metrics will still be sent + // if `send_aggregation_metrics` is enabled. + // + // The current default is 'distributions'. + Mode HistogramMode `mapstructure:"mode"` + + // SendCountSum states if the export should send .sum and .count metrics for histograms. + // The default is false. + // Deprecated: [v0.75.0] Use `send_aggregation_metrics` (HistogramConfig.SendAggregations) instead. + SendCountSum bool `mapstructure:"send_count_sum_metrics"` + + // SendAggregations states if the exporter should send .sum, .count, .min and .max metrics for histograms. + // The default is false. + SendAggregations bool `mapstructure:"send_aggregation_metrics"` +} + +func (c *HistogramConfig) validate() error { + if c.Mode == HistogramModeNoBuckets && !c.SendAggregations { + return fmt.Errorf("'nobuckets' mode and `send_aggregation_metrics` set to false will send no histogram metrics") + } + return nil +} + +// CumulativeMonotonicSumMode is the export mode for OTLP Sum metrics. +type CumulativeMonotonicSumMode string + +const ( + // CumulativeMonotonicSumModeToDelta calculates delta for + // cumulative monotonic sum metrics in the client side and reports + // them as Datadog counts. + CumulativeMonotonicSumModeToDelta CumulativeMonotonicSumMode = "to_delta" + + // CumulativeMonotonicSumModeRawValue reports the raw value for + // cumulative monotonic sum metrics as a Datadog gauge. + CumulativeMonotonicSumModeRawValue CumulativeMonotonicSumMode = "raw_value" +) + +var _ encoding.TextUnmarshaler = (*CumulativeMonotonicSumMode)(nil) + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (sm *CumulativeMonotonicSumMode) UnmarshalText(in []byte) error { + switch mode := CumulativeMonotonicSumMode(in); mode { + case CumulativeMonotonicSumModeToDelta, + CumulativeMonotonicSumModeRawValue: + *sm = mode + return nil + default: + return fmt.Errorf("invalid cumulative monotonic sum mode %q", mode) + } +} + +// InitialValueMode defines what the exporter should do with the initial value +// of a time series when transforming from cumulative to delta. +type InitialValueMode string + +const ( + // InitialValueModeAuto reports the initial value if its start timestamp + // is set and it happens after the process was started. + InitialValueModeAuto InitialValueMode = "auto" + + // InitialValueModeDrop always drops the initial value. + InitialValueModeDrop InitialValueMode = "drop" + + // InitialValueModeKeep always reports the initial value. + InitialValueModeKeep InitialValueMode = "keep" +) + +var _ encoding.TextUnmarshaler = (*InitialValueMode)(nil) + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (iv *InitialValueMode) UnmarshalText(in []byte) error { + switch mode := InitialValueMode(in); mode { + case InitialValueModeAuto, + InitialValueModeDrop, + InitialValueModeKeep: + *iv = mode + return nil + default: + return fmt.Errorf("invalid initial value mode %q", mode) + } +} + +// SumConfig customizes export of OTLP Sums. +type SumConfig struct { + // CumulativeMonotonicMode is the mode for exporting OTLP Cumulative Monotonic Sums. + // Valid values are 'to_delta' or 'raw_value'. + // - 'to_delta' calculates delta for cumulative monotonic sums and sends it as a Datadog count. + // - 'raw_value' sends the raw value of cumulative monotonic sums as Datadog gauges. + // + // The default is 'to_delta'. + // See https://docs.datadoghq.com/metrics/otlp/?tab=sum#mapping for details and examples. + CumulativeMonotonicMode CumulativeMonotonicSumMode `mapstructure:"cumulative_monotonic_mode"` + + // InitialCumulativeMonotonicMode defines the behavior of the exporter when receiving the first value + // of a cumulative monotonic sum. + InitialCumulativeMonotonicMode InitialValueMode `mapstructure:"initial_cumulative_monotonic_value"` +} + +// SummaryMode is the export mode for OTLP Summary metrics. +type SummaryMode string + +const ( + // SummaryModeNoQuantiles sends no `.quantile` metrics. `.sum` and `.count` metrics will still be sent. + SummaryModeNoQuantiles SummaryMode = "noquantiles" + // SummaryModeGauges sends `.quantile` metrics as gauges tagged by the quantile. + SummaryModeGauges SummaryMode = "gauges" +) + +var _ encoding.TextUnmarshaler = (*SummaryMode)(nil) + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (sm *SummaryMode) UnmarshalText(in []byte) error { + switch mode := SummaryMode(in); mode { + case SummaryModeNoQuantiles, + SummaryModeGauges: + *sm = mode + return nil + default: + return fmt.Errorf("invalid summary mode %q", mode) + } +} + +// SummaryConfig customizes export of OTLP Summaries. +type SummaryConfig struct { + // Mode is the the mode for exporting OTLP Summaries. + // Valid values are 'noquantiles' or 'gauges'. + // - 'noquantiles' sends no `.quantile` metrics. `.sum` and `.count` metrics will still be sent. + // - 'gauges' sends `.quantile` metrics as gauges tagged by the quantile. + // + // The default is 'gauges'. + // See https://docs.datadoghq.com/metrics/otlp/?tab=summary#mapping for details and examples. + Mode SummaryMode `mapstructure:"mode"` +} + +// MetricsExporterConfig provides options for a user to customize the behavior of the +// metrics exporter +type MetricsExporterConfig struct { + // ResourceAttributesAsTags, if set to true, will use the exporterhelper feature to transform all + // resource attributes into metric labels, which are then converted into tags + ResourceAttributesAsTags bool `mapstructure:"resource_attributes_as_tags"` + + // InstrumentationScopeMetadataAsTags, if set to true, adds the name and version of the + // instrumentation scope that created a metric to the metric tags + InstrumentationScopeMetadataAsTags bool `mapstructure:"instrumentation_scope_metadata_as_tags"` +} + +// ToTranslatorOpts returns a list of metrics translator options from the metrics config +func (mcfg MetricsConfig) ToTranslatorOpts() []otlpmetrics.TranslatorOption { + options := []otlpmetrics.TranslatorOption{ + otlpmetrics.WithDeltaTTL(mcfg.DeltaTTL), + } + + if mcfg.HistConfig.SendAggregations { + options = append(options, otlpmetrics.WithHistogramAggregations()) + } + + if mcfg.SummaryConfig.Mode == SummaryModeGauges { + options = append(options, otlpmetrics.WithQuantiles()) + } + + if mcfg.ExporterConfig.InstrumentationScopeMetadataAsTags { + options = append(options, otlpmetrics.WithInstrumentationScopeMetadataAsTags()) + } + + options = append(options, otlpmetrics.WithHistogramMode(otlpmetrics.HistogramMode(mcfg.HistConfig.Mode))) + + var numberMode otlpmetrics.NumberMode + switch mcfg.SumConfig.CumulativeMonotonicMode { + case CumulativeMonotonicSumModeRawValue: + numberMode = otlpmetrics.NumberModeRawValue + case CumulativeMonotonicSumModeToDelta: + numberMode = otlpmetrics.NumberModeCumulativeToDelta + } + options = append(options, otlpmetrics.WithNumberMode(numberMode)) + options = append(options, otlpmetrics.WithInitialCumulMonoValueMode( + otlpmetrics.InitialCumulMonoValueMode(mcfg.SumConfig.InitialCumulativeMonotonicMode))) + + return options +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/traces.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/traces.go new file mode 100644 index 0000000000..1e338fa58a --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config/traces.go @@ -0,0 +1,167 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package config // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config" + +import ( + "fmt" + "regexp" + "time" + + "go.opentelemetry.io/collector/config/confignet" +) + +// TracesConfig defines the traces exporter specific configuration options +type TracesConfig struct { + // ignored resources + // A blacklist of regular expressions can be provided to disable certain traces based on their resource name + // all entries must be surrounded by double quotes and separated by commas. + // ignore_resources: ["(GET|POST) /healthcheck"] + IgnoreResources []string `mapstructure:"ignore_resources"` + + // SpanNameRemappings is the map of datadog span names and preferred name to map to. This can be used to + // automatically map Datadog Span Operation Names to an updated value. All entries should be key/value pairs. + // span_name_remappings: + // io.opentelemetry.javaagent.spring.client: spring.client + // instrumentation:express.server: express + // go.opentelemetry.io_contrib_instrumentation_net_http_otelhttp.client: http.client + SpanNameRemappings map[string]string `mapstructure:"span_name_remappings"` + + // If set to true the OpenTelemetry span name will used in the Datadog resource name. + // If set to false the resource name will be filled with the instrumentation library name + span kind. + // The default value is `false`. + SpanNameAsResourceName bool `mapstructure:"span_name_as_resource_name"` + + // If set to true, enables an additional stats computation check on spans to see they have an eligible `span.kind` (server, consumer, client, producer). + // If enabled, a span with an eligible `span.kind` will have stats computed. If disabled, only top-level and measured spans will have stats computed. + // NOTE: For stats computed from OTel traces, only top-level spans are considered when this option is off. + // If you are sending OTel traces and want stats on non-top-level spans, this flag will need to be enabled. + // If you are sending OTel traces and do not want stats computed by span kind, you need to disable this flag and disable `compute_top_level_by_span_kind`. + ComputeStatsBySpanKind bool `mapstructure:"compute_stats_by_span_kind"` + + // If set to true, root spans and spans with a server or consumer `span.kind` will be marked as top-level. + // Additionally, spans with a client or producer `span.kind` will have stats computed. + // Enabling this config option may increase the number of spans that generate trace metrics, and may change which spans appear as top-level in Datadog. + // ComputeTopLevelBySpanKind needs to be enabled in both the Datadog connector and Datadog exporter configs if both components are being used. + // The default value is `false`. + ComputeTopLevelBySpanKind bool `mapstructure:"compute_top_level_by_span_kind"` + + // If set to true, enables `peer.service` aggregation in the exporter. If disabled, aggregated trace stats will not include `peer.service` as a dimension. + // For the best experience with `peer.service`, it is recommended to also enable `compute_stats_by_span_kind`. + // If enabling both causes the datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first. + // If the overhead remains high, it will be due to a high cardinality of `peer.service` values from the traces. You may need to check your instrumentation. + // Deprecated: Please use PeerTagsAggregation instead + PeerServiceAggregation bool `mapstructure:"peer_service_aggregation"` + + // If set to true, enables aggregation of peer related tags (e.g., `peer.service`, `db.instance`, etc.) in the datadog exporter. + // If disabled, aggregated trace stats will not include these tags as dimensions on trace metrics. + // For the best experience with peer tags, Datadog also recommends enabling `compute_stats_by_span_kind`. + // If you are using an OTel tracer, it's best to have both enabled because client/producer spans with relevant peer tags + // may not be marked by the datadog exporter as top-level spans. + // If enabling both causes the datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first. + // A high cardinality of peer tags or APM resources can also contribute to higher CPU and memory consumption. + // You can check for the cardinality of these fields by making trace search queries in the Datadog UI. + // The default list of peer tags can be found in https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/stats/concentrator.go. + PeerTagsAggregation bool `mapstructure:"peer_tags_aggregation"` + + // [BETA] Optional list of supplementary peer tags that go beyond the defaults. The Datadog backend validates all tags + // and will drop ones that are unapproved. The default set of peer tags can be found at + // https://github.com/DataDog/datadog-agent/blob/505170c4ac8c3cbff1a61cf5f84b28d835c91058/pkg/trace/stats/concentrator.go#L55. + PeerTags []string `mapstructure:"peer_tags"` +} + +func (c *TracesConfig) Validate() error { + if c.IgnoreResources != nil { + for _, entry := range c.IgnoreResources { + _, err := regexp.Compile(entry) + if err != nil { + return fmt.Errorf("'%s' is not valid resource filter regular expression", entry) + } + } + } + + if c.SpanNameRemappings != nil { + for key, value := range c.SpanNameRemappings { + if value == "" { + return fmt.Errorf("'%s' is not valid value for span name remapping", value) + } + if key == "" { + return fmt.Errorf("'%s' is not valid key for span name remapping", key) + } + } + } + return nil +} + +// TracesExporterConfig Traces configuration in DD exporter +type TracesExporterConfig struct { + // TCPAddr.Endpoint is the host of the Datadog intake server to send traces to. + // If unset, the value is obtained from the Site. + confignet.TCPAddrConfig `mapstructure:",squash"` + + // TracesConfig contains the common configuration for all traces. + TracesConfig `mapstructure:",squash"` + + // TraceBuffer specifies the number of Datadog Agent TracerPayloads to buffer before dropping. + // The default value is 0, meaning the Datadog Agent TracerPayloads are unbuffered. + TraceBuffer int `mapstructure:"trace_buffer"` + + // flushInterval defines the interval in seconds at which the writer flushes traces + // to the intake; used in tests. + flushInterval float64 +} + +// SetFlushInterval sets the interval in seconds at which the writer flushes traces +func (c *TracesExporterConfig) SetFlushInterval(interval float64) { + c.flushInterval = interval +} + +// GetFlushInterval returns the interval in seconds at which the writer flushes traces +func (c *TracesExporterConfig) GetFlushInterval() float64 { + return c.flushInterval +} + +func (c *TracesExporterConfig) Validate() error { + if err := c.TracesConfig.Validate(); err != nil { + return err + } + if c.TraceBuffer < 0 { + return fmt.Errorf("trace buffer must be non-negative") + } + + return nil +} + +// TracesConnectorConfig Traces configuration in DD connector +type TracesConnectorConfig struct { + // TracesConfig contains the common configuration for all traces. + TracesConfig `mapstructure:",squash"` + + // TraceBuffer specifies the number of Datadog Agent TracerPayloads to buffer before dropping. + // The default value is 1000. + TraceBuffer int `mapstructure:"trace_buffer"` + + // ResourceAttributesAsContainerTags specifies the list of resource attributes to be used as container tags. + ResourceAttributesAsContainerTags []string `mapstructure:"resource_attributes_as_container_tags"` + + // BucketInterval specifies the time interval size of aggregation buckets that aggregate the Datadog trace metrics. + // It is also the time interval that Datadog trace metrics payloads are flushed to the pipeline. + // If you are concerned about the metric volume generated by the Datadog connector and the resulting networking egress, try increasing bucket_interval. + // Default is 10s if unset. + BucketInterval time.Duration `mapstructure:"bucket_interval"` +} + +func (c *TracesConnectorConfig) Validate() error { + if err := c.TracesConfig.Validate(); err != nil { + return err + } + + if c.TraceBuffer < 0 { + return fmt.Errorf("trace buffer must be non-negative") + } + + if c.BucketInterval < 0 { + return fmt.Errorf("bucket interval must be non-negative") + } + return nil +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata/metadata.yaml index e2972c99bb..7509bde48a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata/metadata.yaml +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata/metadata.yaml @@ -1,3 +1,4 @@ status: codeowners: - active: [rmfitzpatrick] \ No newline at end of file + active: [dmitryax] + emeritus: [rmfitzpatrick] \ No newline at end of file diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/LICENSE b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/Makefile b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/Makefile new file mode 100644 index 0000000000..bdd863a203 --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/README.md new file mode 100644 index 0000000000..663d969e5d --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/README.md @@ -0,0 +1,4 @@ +# Kafka Topic Context Accessor + +This module is used for accessing the topic within a context. +See the [kafka exporter readme](../../../exporter/kafkaexporter/README.md#destination-topic) for more details. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/kafka_ctx.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/kafka_ctx.go new file mode 100644 index 0000000000..603863615f --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/kafka_ctx.go @@ -0,0 +1,19 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package topic // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic" + +import ( + "context" +) + +func WithTopic(ctx context.Context, topic string) context.Context { + return context.WithValue(ctx, topicContextKey{}, topic) +} + +func FromContext(ctx context.Context) (string, bool) { + contextTopic, ok := ctx.Value(topicContextKey{}).(string) + return contextTopic, ok +} + +type topicContextKey struct{} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/metadata.yaml b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/metadata.yaml new file mode 100644 index 0000000000..708ccce63f --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic/metadata.yaml @@ -0,0 +1,6 @@ +type: topic + +status: + class: pkg + codeowners: + active: [pavolloffay, MovieStoreGuy] diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/README.md index 57a53ac9e0..50ec9d9449 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/README.md @@ -6,13 +6,18 @@ | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Apkg%2Fottl%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Apkg%2Fottl) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Apkg%2Fottl%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Apkg%2Fottl) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@TylerHelmuth](https://www.github.com/TylerHelmuth), [@kentquirk](https://www.github.com/kentquirk), [@bogdandrutu](https://www.github.com/bogdandrutu), [@evan-bradley](https://www.github.com/evan-bradley) \| Seeking more code owners! | -[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[alpha]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#alpha The OpenTelemetry Transformation Language is a language for transforming open telemetry data based on the [OpenTelemetry Collector Processing Exploration](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/rfcs/processing.md). This package reads in OTTL statements and converts them to invokable functions/booleans based on the OTTL's grammar. +- [Getting Started](#getting-started) +- [Examples](#examples) +- [Troubleshooting](#troubleshooting) +- [Resources](#resources) + ## Getting Started If you're looking to write OTTL statements for a component's configuration check out these resources. @@ -151,3 +156,10 @@ service: 2024-05-29T16:38:09.600-0600 debug ottl@v0.101.0/parser.go:268 TransformContext after statement execution {"kind": "processor", "name": "transform", "pipeline": "logs", "statement": "set(instrumentation_scope.attributes[\"test\"], [\"pass\"])", "condition matched": true, "TransformContext": {"resource": {"attributes": {"test": "pass"}, "dropped_attribute_count": 0}, "scope": {"attributes": {"test": ["pass"]}, "dropped_attribute_count": 0, "name": "", "version": ""}, "log_record": {"attributes": {"log.file.name": "test.log"}, "body": "test", "dropped_attribute_count": 0, "flags": 0, "observed_time_unix_nano": 1717022289500721000, "severity_number": 0, "severity_text": "", "span_id": "", "time_unix_nano": 0, "trace_id": ""}, "cache": {}}} 2024-05-29T16:38:09.601-0600 debug ottl@v0.101.0/parser.go:268 TransformContext after statement execution {"kind": "processor", "name": "transform", "pipeline": "logs", "statement": "set(attributes[\"test\"], true)", "condition matched": true, "TransformContext": {"resource": {"attributes": {"test": "pass"}, "dropped_attribute_count": 0}, "scope": {"attributes": {"test": ["pass"]}, "dropped_attribute_count": 0, "name": "", "version": ""}, "log_record": {"attributes": {"log.file.name": "test.log", "test": true}, "body": "test", "dropped_attribute_count": 0, "flags": 0, "observed_time_unix_nano": 1717022289500721000, "severity_number": 0, "severity_text": "", "span_id": "", "time_unix_nano": 0, "trace_id": ""}, "cache": {}}} ``` + +## Resources + +These are previous conference presentations given about OTTL: +- [OTTL Me Why Transforming Telemetry in the OpenTelemetry Collector Just Got Better](https://youtu.be/uVs0oUV72CE) +- [Managing Observability Data at the Edge with the OpenTelemetry Collector and OTTL](https://youtu.be/GO0ulYLxy_8) +- [The OTTL Cookbook: A Collection of Solutions to Common Problems](https://www.youtube.com/watch?v=UGTU0-KT_60) \ No newline at end of file diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/boolean_value.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/boolean_value.go index 9bd2df9171..fd3378d343 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/boolean_value.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/boolean_value.go @@ -94,7 +94,6 @@ func (p *Parser[K]) newComparisonEvaluator(comparison *comparison) (BoolExpr[K], } return p.compare(a, b, comparison.Op), nil }}, nil - } func (p *Parser[K]) newBoolExpr(expr *booleanExpression) (BoolExpr[K], error) { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/context_inferrer.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/context_inferrer.go new file mode 100644 index 0000000000..da4ade7832 --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/context_inferrer.go @@ -0,0 +1,77 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottl // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + +import "math" + +var defaultContextInferPriority = []string{ + "log", + "metric", + "datapoint", + "spanevent", + "span", + "resource", + "scope", + "instrumentation_scope", +} + +// contextInferrer is an interface used to infer the OTTL context from statements paths. +type contextInferrer interface { + // infer returns the OTTL context inferred from the given statements paths. + infer(statements []string) (string, error) +} + +type priorityContextInferrer struct { + contextPriority map[string]int +} + +func (s *priorityContextInferrer) infer(statements []string) (string, error) { + var inferredContext string + var inferredContextPriority int + + for _, statement := range statements { + parsed, err := parseStatement(statement) + if err != nil { + return inferredContext, err + } + + for _, p := range getParsedStatementPaths(parsed) { + pathContextPriority, ok := s.contextPriority[p.Context] + if !ok { + // Lowest priority + pathContextPriority = math.MaxInt + } + + if inferredContext == "" || pathContextPriority < inferredContextPriority { + inferredContext = p.Context + inferredContextPriority = pathContextPriority + } + } + } + + return inferredContext, nil +} + +// defaultPriorityContextInferrer is like newPriorityContextInferrer, but using the default +// context priorities and ignoring unknown/non-prioritized contexts. +func defaultPriorityContextInferrer() contextInferrer { + return newPriorityContextInferrer(defaultContextInferPriority) +} + +// newPriorityContextInferrer creates a new priority-based context inferrer. +// To infer the context, it compares all [ottl.Path.Context] values, prioritizing them based +// on the provide contextsPriority argument, the lower the context position is in the array, +// the more priority it will have over other items. +// If unknown/non-prioritized contexts are found on the statements, they can be either ignored +// or considered when no other prioritized context is found. To skip unknown contexts, the +// ignoreUnknownContext argument must be set to false. +func newPriorityContextInferrer(contextsPriority []string) contextInferrer { + contextPriority := make(map[string]int, len(contextsPriority)) + for i, ctx := range contextsPriority { + contextPriority[ctx] = i + } + return &priorityContextInferrer{ + contextPriority: contextPriority, + } +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint/datapoint.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint/datapoint.go index a8a6f21580..9c50d85cd7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint/datapoint.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottldatapoint/datapoint.go @@ -23,9 +23,11 @@ const ( contextName = "DataPoint" ) -var _ internal.ResourceContext = (*TransformContext)(nil) -var _ internal.InstrumentationScopeContext = (*TransformContext)(nil) -var _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +var ( + _ internal.ResourceContext = (*TransformContext)(nil) + _ internal.InstrumentationScopeContext = (*TransformContext)(nil) + _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +) type TransformContext struct { dataPoint any diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllog/log.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllog/log.go index 5ae4091686..7ca056730c 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllog/log.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottllog/log.go @@ -25,9 +25,11 @@ const ( contextName = "Log" ) -var _ internal.ResourceContext = (*TransformContext)(nil) -var _ internal.InstrumentationScopeContext = (*TransformContext)(nil) -var _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +var ( + _ internal.ResourceContext = (*TransformContext)(nil) + _ internal.InstrumentationScopeContext = (*TransformContext)(nil) + _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +) type TransformContext struct { logRecord plog.LogRecord diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlmetric/metrics.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlmetric/metrics.go index ce5ff174ee..eba931c744 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlmetric/metrics.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlmetric/metrics.go @@ -15,9 +15,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal" ) -var _ internal.ResourceContext = TransformContext{} -var _ internal.InstrumentationScopeContext = TransformContext{} -var _ internal.MetricContext = TransformContext{} +var ( + _ internal.ResourceContext = TransformContext{} + _ internal.InstrumentationScopeContext = TransformContext{} + _ internal.MetricContext = TransformContext{} +) type TransformContext struct { metric pmetric.Metric diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlresource/resource.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlresource/resource.go index f7fddd5b7a..da3a8ceea1 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlresource/resource.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlresource/resource.go @@ -17,8 +17,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal/logging" ) -var _ internal.ResourceContext = (*TransformContext)(nil) -var _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +var ( + _ internal.ResourceContext = (*TransformContext)(nil) + _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +) type TransformContext struct { resource pcommon.Resource diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlscope/scope.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlscope/scope.go index b55635bdcd..3ae5e09764 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlscope/scope.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlscope/scope.go @@ -17,9 +17,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal/logging" ) -var _ internal.ResourceContext = (*TransformContext)(nil) -var _ internal.InstrumentationScopeContext = (*TransformContext)(nil) -var _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +var ( + _ internal.ResourceContext = (*TransformContext)(nil) + _ internal.InstrumentationScopeContext = (*TransformContext)(nil) + _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +) type TransformContext struct { instrumentationScope pcommon.InstrumentationScope diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlspan/span.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlspan/span.go index 34fc2c944c..aa3283124b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlspan/span.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlspan/span.go @@ -18,9 +18,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal/logging" ) -var _ internal.ResourceContext = (*TransformContext)(nil) -var _ internal.InstrumentationScopeContext = (*TransformContext)(nil) -var _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +var ( + _ internal.ResourceContext = (*TransformContext)(nil) + _ internal.InstrumentationScopeContext = (*TransformContext)(nil) + _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +) type TransformContext struct { span ptrace.Span diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlspanevent/span_events.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlspanevent/span_events.go index 8a4de90f15..b3826f690d 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlspanevent/span_events.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/ottlspanevent/span_events.go @@ -19,9 +19,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/contexts/internal/logging" ) -var _ internal.ResourceContext = (*TransformContext)(nil) -var _ internal.InstrumentationScopeContext = (*TransformContext)(nil) -var _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +var ( + _ internal.ResourceContext = (*TransformContext)(nil) + _ internal.InstrumentationScopeContext = (*TransformContext)(nil) + _ zapcore.ObjectMarshaler = (*TransformContext)(nil) +) type TransformContext struct { spanEvent ptrace.SpanEvent @@ -179,8 +181,8 @@ func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ot default: return nil, internal.FormatDefaultErrorMessage(path.Name(), path.String(), "Span Event", internal.SpanEventRef) } - } + func accessCache() ottl.StandardGetSetter[TransformContext] { return ottl.StandardGetSetter[TransformContext]{ Getter: func(_ context.Context, tCtx TransformContext) (any, error) { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/expression.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/expression.go index c69c9f0e31..a2e8d29e63 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/expression.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/expression.go @@ -13,7 +13,7 @@ import ( "strconv" "time" - jsoniter "github.com/json-iterator/go" + "github.com/goccy/go-json" "go.opentelemetry.io/collector/pdata/pcommon" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/internal/ottlcommon" @@ -111,10 +111,35 @@ func (g exprGetter[K]) Get(ctx context.Context, tCtx K) (any, error) { } result = ottlcommon.GetValue(r.At(int(*k.Int))) case []any: - if int(*k.Int) >= len(r) || int(*k.Int) < 0 { - return nil, fmt.Errorf("index %v out of bounds", *k.Int) + result, err = getElementByIndex(r, k.Int) + if err != nil { + return nil, err + } + case []string: + result, err = getElementByIndex(r, k.Int) + if err != nil { + return nil, err + } + case []bool: + result, err = getElementByIndex(r, k.Int) + if err != nil { + return nil, err + } + case []float64: + result, err = getElementByIndex(r, k.Int) + if err != nil { + return nil, err + } + case []int64: + result, err = getElementByIndex(r, k.Int) + if err != nil { + return nil, err + } + case []byte: + result, err = getElementByIndex(r, k.Int) + if err != nil { + return nil, err } - result = r[*k.Int] default: return nil, fmt.Errorf("type, %T, does not support int indexing", result) } @@ -125,6 +150,13 @@ func (g exprGetter[K]) Get(ctx context.Context, tCtx K) (any, error) { return result, nil } +func getElementByIndex[T any](r []T, idx *int64) (any, error) { + if int(*idx) >= len(r) || int(*idx) < 0 { + return nil, fmt.Errorf("index %v out of bounds", *idx) + } + return r[*idx], nil +} + type listGetter[K any] struct { slice []Getter[K] } @@ -160,7 +192,6 @@ func (m *mapGetter[K]) Get(ctx context.Context, tCtx K) (any, error) { default: evaluated[k] = t } - } result := pcommon.NewMap() if err := result.FromRaw(evaluated); err != nil { @@ -429,22 +460,25 @@ func (g StandardStringLikeGetter[K]) Get(ctx context.Context, tCtx K) (*string, case []byte: result = hex.EncodeToString(v) case pcommon.Map: - result, err = jsoniter.MarshalToString(v.AsRaw()) + resultBytes, err := json.Marshal(v.AsRaw()) if err != nil { return nil, err } + result = string(resultBytes) case pcommon.Slice: - result, err = jsoniter.MarshalToString(v.AsRaw()) + resultBytes, err := json.Marshal(v.AsRaw()) if err != nil { return nil, err } + result = string(resultBytes) case pcommon.Value: result = v.AsString() default: - result, err = jsoniter.MarshalToString(v) + resultBytes, err := json.Marshal(v) if err != nil { return nil, TypeError(fmt.Sprintf("unsupported type: %T", v)) } + result = string(resultBytes) } return &result, nil } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/functions.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/functions.go index 251e79587b..4ff92123c7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/functions.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/functions.go @@ -33,16 +33,7 @@ func buildOriginalText(path *path) string { for i, f := range path.Fields { builder.WriteString(f.Name) if len(f.Keys) > 0 { - for _, k := range f.Keys { - builder.WriteString("[") - if k.Int != nil { - builder.WriteString(strconv.FormatInt(*k.Int, 10)) - } - if k.String != nil { - builder.WriteString(*k.String) - } - builder.WriteString("]") - } + builder.WriteString(buildOriginalKeysText(f.Keys)) } if i != len(path.Fields)-1 { builder.WriteString(".") @@ -51,6 +42,23 @@ func buildOriginalText(path *path) string { return builder.String() } +func buildOriginalKeysText(keys []key) string { + var builder strings.Builder + if len(keys) > 0 { + for _, k := range keys { + builder.WriteString("[") + if k.Int != nil { + builder.WriteString(strconv.FormatInt(*k.Int, 10)) + } + if k.String != nil { + builder.WriteString(*k.String) + } + builder.WriteString("]") + } + } + return builder.String() +} + func (p *Parser[K]) newPath(path *path) (*basePath[K], error) { if len(path.Fields) == 0 { return nil, fmt.Errorf("cannot make a path from zero fields") diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/grammar.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/grammar.go index 369eff00ec..a1e5eb53a8 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/grammar.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/grammar.go @@ -6,6 +6,7 @@ package ottl // import "github.com/open-telemetry/opentelemetry-collector-contri import ( "encoding/hex" "fmt" + "strings" "github.com/alecthomas/participle/v2/lexer" ) @@ -19,17 +20,17 @@ type parsedStatement struct { } func (p *parsedStatement) checkForCustomError() error { + validator := &grammarCustomErrorsVisitor{} if p.Converter != nil { - return fmt.Errorf("editor names must start with a lowercase letter but got '%v'", p.Converter.Function) - } - err := p.Editor.checkForCustomError() - if err != nil { - return err + validator.add(fmt.Errorf("editor names must start with a lowercase letter but got '%v'", p.Converter.Function)) } + + p.Editor.accept(validator) if p.WhereClause != nil { - return p.WhereClause.checkForCustomError() + p.WhereClause.accept(validator) } - return nil + + return validator.join() } type constExpr struct { @@ -47,14 +48,16 @@ type booleanValue struct { SubExpr *booleanExpression `parser:"| '(' @@ ')' )"` } -func (b *booleanValue) checkForCustomError() error { +func (b *booleanValue) accept(v grammarVisitor) { if b.Comparison != nil { - return b.Comparison.checkForCustomError() + b.Comparison.accept(v) + } + if b.ConstExpr != nil && b.ConstExpr.Converter != nil { + b.ConstExpr.Converter.accept(v) } if b.SubExpr != nil { - return b.SubExpr.checkForCustomError() + b.SubExpr.accept(v) } - return nil } // opAndBooleanValue represents the right side of an AND boolean expression. @@ -63,8 +66,10 @@ type opAndBooleanValue struct { Value *booleanValue `parser:"@@"` } -func (b *opAndBooleanValue) checkForCustomError() error { - return b.Value.checkForCustomError() +func (b *opAndBooleanValue) accept(v grammarVisitor) { + if b.Value != nil { + b.Value.accept(v) + } } // term represents an arbitrary number of boolean values joined by AND. @@ -73,18 +78,15 @@ type term struct { Right []*opAndBooleanValue `parser:"@@*"` } -func (b *term) checkForCustomError() error { - err := b.Left.checkForCustomError() - if err != nil { - return err +func (b *term) accept(v grammarVisitor) { + if b.Left != nil { + b.Left.accept(v) } for _, r := range b.Right { - err = r.checkForCustomError() - if err != nil { - return err + if r != nil { + r.accept(v) } } - return nil } // opOrTerm represents the right side of an OR boolean expression. @@ -93,8 +95,10 @@ type opOrTerm struct { Term *term `parser:"@@"` } -func (b *opOrTerm) checkForCustomError() error { - return b.Term.checkForCustomError() +func (b *opOrTerm) accept(v grammarVisitor) { + if b.Term != nil { + b.Term.accept(v) + } } // booleanExpression represents a true/false decision expressed @@ -105,17 +109,20 @@ type booleanExpression struct { } func (b *booleanExpression) checkForCustomError() error { - err := b.Left.checkForCustomError() - if err != nil { - return err + validator := &grammarCustomErrorsVisitor{} + b.accept(validator) + return validator.join() +} + +func (b *booleanExpression) accept(v grammarVisitor) { + if b.Left != nil { + b.Left.accept(v) } for _, r := range b.Right { - err = r.checkForCustomError() - if err != nil { - return err + if r != nil { + r.accept(v) } } - return nil } // compareOp is the type of a comparison operator. @@ -178,13 +185,9 @@ type comparison struct { Right value `parser:"@@"` } -func (c *comparison) checkForCustomError() error { - err := c.Left.checkForCustomError() - if err != nil { - return err - } - err = c.Right.checkForCustomError() - return err +func (c *comparison) accept(v grammarVisitor) { + c.Left.accept(v) + c.Right.accept(v) } // editor represents the function call of a statement. @@ -195,19 +198,11 @@ type editor struct { Keys []key `parser:"( @@ )*"` } -func (i *editor) checkForCustomError() error { - var err error - +func (i *editor) accept(v grammarVisitor) { + v.visitEditor(i) for _, arg := range i.Arguments { - err = arg.checkForCustomError() - if err != nil { - return err - } - } - if i.Keys != nil { - return fmt.Errorf("only paths and converters may be indexed, not editors, but got %v %v", i.Function, i.Keys) + arg.accept(v) } - return nil } // converter represents a converter function call. @@ -217,14 +212,22 @@ type converter struct { Keys []key `parser:"( @@ )*"` } +func (c *converter) accept(v grammarVisitor) { + if c.Arguments != nil { + for _, a := range c.Arguments { + a.accept(v) + } + } +} + type argument struct { Name string `parser:"(@(Lowercase(Uppercase | Lowercase)*) Equal)?"` Value value `parser:"( @@"` FunctionName *string `parser:"| @(Uppercase(Uppercase | Lowercase)*) )"` } -func (a *argument) checkForCustomError() error { - return a.Value.checkForCustomError() +func (a *argument) accept(v grammarVisitor) { + a.Value.accept(v) } // value represents a part of a parsed statement which is resolved to a value of some sort. This can be a telemetry path @@ -241,18 +244,27 @@ type value struct { List *list `parser:"| @@)"` } -func (v *value) checkForCustomError() error { +func (v *value) accept(vis grammarVisitor) { + vis.visitValue(v) if v.Literal != nil { - return v.Literal.checkForCustomError() + v.Literal.accept(vis) } if v.MathExpression != nil { - return v.MathExpression.checkForCustomError() + v.MathExpression.accept(vis) + } + if v.Map != nil { + v.Map.accept(vis) + } + if v.List != nil { + for _, i := range v.List.Values { + i.accept(vis) + } } - return nil } // path represents a telemetry path mathExpression. type path struct { + Pos lexer.Position Context string `parser:"(@Lowercase '.')?"` Fields []field `parser:"@@ ( '.' @@ )*"` } @@ -276,6 +288,14 @@ type mapValue struct { Values []mapItem `parser:"'{' (@@ ','?)* '}'"` } +func (m *mapValue) accept(v grammarVisitor) { + for _, i := range m.Values { + if i.Value != nil { + i.Value.accept(v) + } + } +} + type mapItem struct { Key *string `parser:"@String ':'"` Value *value `parser:"@@"` @@ -319,11 +339,17 @@ type mathExprLiteral struct { Path *path `parser:"| @@ )"` } -func (m *mathExprLiteral) checkForCustomError() error { +func (m *mathExprLiteral) accept(v grammarVisitor) { + v.visitMathExprLiteral(m) + if m.Path != nil { + v.visitPath(m.Path) + } if m.Editor != nil { - return fmt.Errorf("converter names must start with an uppercase letter but got '%v'", m.Editor.Function) + m.Editor.accept(v) + } + if m.Converter != nil { + m.Converter.accept(v) } - return nil } type mathValue struct { @@ -331,11 +357,13 @@ type mathValue struct { SubExpression *mathExpression `parser:"| '(' @@ ')' )"` } -func (m *mathValue) checkForCustomError() error { +func (m *mathValue) accept(v grammarVisitor) { if m.Literal != nil { - return m.Literal.checkForCustomError() + m.Literal.accept(v) + } + if m.SubExpression != nil { + m.SubExpression.accept(v) } - return m.SubExpression.checkForCustomError() } type opMultDivValue struct { @@ -343,8 +371,10 @@ type opMultDivValue struct { Value *mathValue `parser:"@@"` } -func (m *opMultDivValue) checkForCustomError() error { - return m.Value.checkForCustomError() +func (m *opMultDivValue) accept(v grammarVisitor) { + if m.Value != nil { + m.Value.accept(v) + } } type addSubTerm struct { @@ -352,18 +382,15 @@ type addSubTerm struct { Right []*opMultDivValue `parser:"@@*"` } -func (m *addSubTerm) checkForCustomError() error { - err := m.Left.checkForCustomError() - if err != nil { - return err +func (m *addSubTerm) accept(v grammarVisitor) { + if m.Left != nil { + m.Left.accept(v) } for _, r := range m.Right { - err = r.checkForCustomError() - if err != nil { - return err + if r != nil { + r.accept(v) } } - return nil } type opAddSubTerm struct { @@ -371,8 +398,10 @@ type opAddSubTerm struct { Term *addSubTerm `parser:"@@"` } -func (m *opAddSubTerm) checkForCustomError() error { - return m.Term.checkForCustomError() +func (r *opAddSubTerm) accept(v grammarVisitor) { + if r.Term != nil { + r.Term.accept(v) + } } type mathExpression struct { @@ -380,18 +409,17 @@ type mathExpression struct { Right []*opAddSubTerm `parser:"@@*"` } -func (m *mathExpression) checkForCustomError() error { - err := m.Left.checkForCustomError() - if err != nil { - return err +func (m *mathExpression) accept(v grammarVisitor) { + if m.Left != nil { + m.Left.accept(v) } - for _, r := range m.Right { - err = r.checkForCustomError() - if err != nil { - return err + if m.Right != nil { + for _, r := range m.Right { + if r != nil { + r.accept(v) + } } } - return nil } type mathOp int @@ -464,3 +492,71 @@ func buildLexer() *lexer.StatefulDefinition { {Name: "whitespace", Pattern: `\s+`}, }) } + +// grammarCustomError represents a grammar error in which the statement has a valid syntax +// according to the grammar's definition, but is still logically invalid. +type grammarCustomError struct { + errs []error +} + +// Error returns all errors messages separate by semicolons. +func (e *grammarCustomError) Error() string { + switch len(e.errs) { + case 0: + return "" + case 1: + return e.errs[0].Error() + default: + var b strings.Builder + b.WriteString(e.errs[0].Error()) + for _, err := range e.errs[1:] { + b.WriteString("; ") + b.WriteString(err.Error()) + } + return b.String() + } +} + +func (e *grammarCustomError) Unwrap() []error { + return e.errs +} + +// grammarVisitor allows accessing the grammar AST nodes using the visitor pattern. +type grammarVisitor interface { + visitPath(v *path) + visitEditor(v *editor) + visitValue(v *value) + visitMathExprLiteral(v *mathExprLiteral) +} + +// grammarCustomErrorsVisitor is used to execute custom validations on the grammar AST. +type grammarCustomErrorsVisitor struct { + errs []error +} + +func (g *grammarCustomErrorsVisitor) add(err error) { + g.errs = append(g.errs, err) +} + +func (g *grammarCustomErrorsVisitor) join() error { + if len(g.errs) == 0 { + return nil + } + return &grammarCustomError{errs: g.errs} +} + +func (g *grammarCustomErrorsVisitor) visitPath(_ *path) {} + +func (g *grammarCustomErrorsVisitor) visitValue(_ *value) {} + +func (g *grammarCustomErrorsVisitor) visitEditor(v *editor) { + if v.Keys != nil { + g.add(fmt.Errorf("only paths and converters may be indexed, not editors, but got %s%s", v.Function, buildOriginalKeysText(v.Keys))) + } +} + +func (g *grammarCustomErrorsVisitor) visitMathExprLiteral(v *mathExprLiteral) { + if v.Editor != nil { + g.add(fmt.Errorf("converter names must start with an uppercase letter but got '%v'", v.Editor.Function)) + } +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/README.md b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/README.md index 7c21b4cd6d..a1ef094b42 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/README.md +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/README.md @@ -29,9 +29,9 @@ In these situations the function will error if it does not know how to do the co Use `ErrorMode` to determine how the `Statement` handles these errors. See the component-specific guides for how each uses error mode: -- [filterprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/filterprocessor#ottl) -- [routingprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/routingprocessor#tech-preview-opentelemetry-transformation-language-statements-as-routing-conditions) -- [transformprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor#config) +- [filterprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/filterprocessor/README.md#configuration) +- [routingconnector](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/connector/routingconnector/README.md#configuration) +- [transformprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/transformprocessor/README.md#config) ## Editors @@ -413,16 +413,20 @@ Available Converters: - [Decode](#decode) - [Concat](#concat) - [ConvertCase](#convertcase) +- [ConvertAttributesToElementsXML](#convertattributestoelementsxml) +- [ConvertTextToElementsXML](#converttexttoelementsxml) - [Day](#day) +- [Double](#double) +- [Duration](#duration) - [ExtractPatterns](#extractpatterns) - [ExtractGrokPatterns](#extractgrokpatterns) - [FNV](#fnv) - [Format](#format) +- [GetXML](#getxml) - [Hex](#hex) - [Hour](#hour) - [Hours](#hours) -- [Double](#double) -- [Duration](#duration) +- [InsertXML](#insertxml) - [Int](#int) - [IsBool](#isbool) - [IsDouble](#isdouble) @@ -445,17 +449,21 @@ Available Converters: - [ParseCSV](#parsecsv) - [ParseJSON](#parsejson) - [ParseKeyValue](#parsekeyvalue) +- [ParseSimplifiedXML](#parsesimplifiedxml) - [ParseXML](#parsexml) +- [RemoveXML](#removexml) - [Seconds](#seconds) - [SHA1](#sha1) - [SHA256](#sha256) - [SHA512](#sha512) +- [SliceToMap](#slicetomap) - [Sort](#sort) - [SpanID](#spanid) - [Split](#split) - [String](#string) - [Substring](#substring) - [Time](#time) +- [ToKeyValueString](#tokeyvaluestring) - [TraceID](#traceid) - [TruncateTime](#truncatetime) - [Unix](#unix) @@ -543,6 +551,61 @@ Examples: - `ConvertCase(metric.name, "snake")` +### ConvertAttributesToElementsXML + +`ConvertAttributesToElementsXML(target, Optional[xpath])` + +The `ConvertAttributesToElementsXML` Converter returns an edited version of an XML string where attributes are converted into child elements. + +`target` is a Getter that returns a string. This string should be in XML format. +If `target` is not a string, nil, or cannot be parsed as XML, `ConvertAttributesToElementsXML` will return an error. + +`xpath` (optional) is a string that specifies an [XPath](https://www.w3.org/TR/1999/REC-xpath-19991116/) expression that +selects one or more elements. Attributes will only be converted within the result(s) of the xpath. + +For example, `baz` will be converted to `bazbar`. + +Examples: + +Convert all attributes in a document + +- `ConvertAttributesToElementsXML(body)` + +Convert only attributes within "Record" elements + +- `ConvertAttributesToElementsXML(body, "/Log/Record")` + +### ConvertTextToElementsXML + +`ConvertTextToElementsXML(target, Optional[xpath], Optional[elementName])` + +The `ConvertTextToElementsXML` Converter returns an edited version of an XML string where all text belongs to a dedicated element. + +`target` is a Getter that returns a string. This string should be in XML format. +If `target` is not a string, nil, or cannot be parsed as XML, `ConvertTextToElementsXML` will return an error. + +`xpath` (optional) is a string that specifies an [XPath](https://www.w3.org/TR/1999/REC-xpath-19991116/) expression that +selects one or more elements. Content will only be converted within the result(s) of the xpath. The default is `/`. + +`elementName` (optional) is a string that is used for any element tags that are created to wrap content. +The default is `"value"`. + +For example, `foobar` will be converted to `foobar`. + +Examples: + +Ensure all text content in a document is wrapped in a dedicated element + +- `ConvertTextToElementsXML(body)` + +Use a custom name for any new elements + +- `ConvertTextToElementsXML(body, elementName = "custom")` + +Convert only part of the document + +- `ConvertTextToElementsXML(body, "/some/part/", "value")` + ### Day `Day(value)` @@ -741,6 +804,37 @@ Examples: - `Format("%04d-%02d-%02d", [Year(Now()), Month(Now()), Day(Now())])` - `Format("%s/%s/%04d-%02d-%02d.log", [attributes["hostname"], body["program"], Year(Now()), Month(Now()), Day(Now())])` + +### GetXML + +`GetXML(target, xpath)` + +The `GetXML` Converter returns an XML string with selected elements. + +`target` is a Getter that returns a string. This string should be in XML format. +If `target` is not a string, nil, or is not valid xml, `GetXML` will return an error. + +`xpath` is a string that specifies an [XPath](https://www.w3.org/TR/1999/REC-xpath-19991116/) expression that +selects one or more elements. Currently, this converter only supports selecting elements. + +Examples: + +Get all elements at the root of the document with tag "a" + +- `GetXML(body, "/a")` + +Gel all elements anywhere in the document with tag "a" + +- `GetXML(body, "//a")` + +Get the first element at the root of the document with tag "a" + +- `GetXML(body, "/a[1]")` + +Get all elements in the document with tag "a" that have an attribute "b" with value "c" + +- `GetXML(body, "//a[@b='c']")` + ### Hex `Hex(value)` @@ -796,6 +890,35 @@ Examples: - `Hours(Duration("1h"))` +### InsertXML + +`InsertXML(target, xpath, value)` + +The `InsertXML` Converter returns an edited version of an XML string with child elements added to selected elements. + +`target` is a Getter that returns a string. This string should be in XML format and represents the document which will +be modified. If `target` is not a string, nil, or is not valid xml, `InsertXML` will return an error. + +`xpath` is a string that specifies an [XPath](https://www.w3.org/TR/1999/REC-xpath-19991116/) expression that +selects one or more elements. + +`value` is a Getter that returns a string. This string should be in XML format and represents the document which will +be inserted into `target`. If `value` is not a string, nil, or is not valid xml, `InsertXML` will return an error. + +Examples: + +Add an element "foo" to the root of the document + +- `InsertXML(body, "/", "")` + +Add an element "bar" to any element called "foo" + +- `InsertXML(body, "//foo", "")` + +Fetch and insert an xml document into another + +- `InsertXML(body, "/subdoc", attributes["subdoc"])` + ### Int `Int(value)` @@ -1170,7 +1293,7 @@ The `ParseJSON` Converter returns a `pcommon.Map` or `pcommon.Slice` struct that `target` is a Getter that returns a string. This string should be in json format. If `target` is not a string, nil, or cannot be parsed as JSON, `ParseJSON` will return an error. -Unmarshalling is done using [jsoniter](https://github.com/json-iterator/go). +Unmarshalling is done using [goccy/go-json](https://github.com/goccy/go-json). Each JSON type is converted into a `pdata.Value` using the following map: ``` @@ -1214,6 +1337,132 @@ Examples: - `ParseKeyValue("k1!v1_k2!v2_k3!v3", "!", "_")` - `ParseKeyValue(attributes["pairs"])` +### ParseSimplifiedXML + +`ParseSimplifiedXML(target)` + +The `ParseSimplifiedXML` Converter returns a `pcommon.Map` struct that is the result of parsing the target string without preservation of attributes or extraneous text content. + +The goal of this Converter is to produce a more user-friendly representation of XML data than the `ParseXML` Converter. +This Converter should be preferred over `ParseXML` when minor semantic details (e.g. order of elements) are not critically important, when subsequent processing or querying of the result is expected, or when human-readability is a concern. + +This Converter disregards certain aspects of XML, specifically attributes and extraneous text content, in order to produce +a direct representation of XML data. Users are encouraged to simplify their XML documents prior to using `ParseSimplifiedXML`. + +See other functions which may be useful for preparing XML documents: + +- `ConvertAttributesToElementsXML` +- `ConvertTextToElementsXML` +- `RemoveXML` +- `InsertXML` +- `GetXML` + +#### Formal Definitions + +A "Simplified XML" document contains no attributes and no extraneous text content. + +An element has "extraneous text content" when it contains both text and element content. e.g. + +```xml + + bar + world + +``` + +#### Parsing logic + +1. Declaration elements, attributes, comments, and extraneous text content are ignored. +2. Elements which contain a value are converted into key/value pairs. + e.g. `bar` becomes `"foo": "bar"` +3. Elements which contain child elements are converted into a key/value pair where the value is a map. + e.g. ` baz ` becomes `"foo": { "bar": "baz" }` +4. Sibling elements that share the same tag will be combined into a slice. + e.g. ` 1 2 3 ` becomes `"a": { "b": "1", "c": [ "2", "3" ] }`. +5. Empty elements are dropped, but they can determine whether a value should be a slice or map. + e.g. ` 1 ` becomes `"a": { "b": [ "1" ] }` instead of `"a": { "b": "1" }` + +#### Examples + +Parse a Simplified XML document from the body: + +```xml + + 1 + jane +
+ + Something happened + unknown +
+
+``` + +```json +{ + "event": { + "id": 1, + "user": "jane", + "details": { + "time": "2021-10-01T12:00:00Z", + "description": "Something happened", + "cause": "unknown" + } + } +} +``` + +Parse a Simplified XML document with unique child elements: + +```xml + + 1 + 2 + +``` + +```json +{ + "x": { + "y": "1", + "z": "2" + } +} +``` + +Parse a Simplified XML document with multiple elements of the same tag: + +```xml + + 1 + 2 + +``` + +```json +{ + "a": { + "b": ["1", "2"] + } +} +``` + +Parse a Simplified XML document with CDATA element: + +```xml + + 1 + + +``` + +```json +{ + "a": { + "b": ["1", "2"] + } +} +``` ### ParseXML @@ -1285,7 +1534,70 @@ Examples: - `ParseXML("")` +### RemoveXML + +`RemoveXML(target, xpath)` + +The `RemoveXML` Converter returns an edited version of an XML string with selected elements removed. + +`target` is a Getter that returns a string. This string should be in XML format. +If `target` is not a string, nil, or is not valid xml, `RemoveXML` will return an error. + +`xpath` is a string that specifies an [XPath](https://www.w3.org/TR/1999/REC-xpath-19991116/) expression that +selects one or more elements to remove from the XML document. + +For example, the XPath `/Log/Record[./Name/@type="archive"]` applied to the following XML document: + +```xml + + + + 00001 + + Some data + + + 00002 + + Some data + + +``` + +will return: + +```xml + + + + 00002 + + Some data + + +``` + +Examples: + +Delete the attribute "foo" from the elements with tag "a" + +- `RemoveXML(body, "/a/@foo")` + +Delete all elements with tag "b" that are children of elements with tag "a" + +- `RemoveXML(body, "/a/b")` + +Delete all elements with tag "b" that are children of elements with tag "a" and have the attribute "foo" with value "bar" +- `RemoveXML(body, "/a/b[@foo='bar']")` + +Delete all comments + +- `RemoveXML(body, "//comment()")` + +Delete text from nodes that contain the word "sensitive" + +- `RemoveXML(body, "//*[contains(text(), 'sensitive')]")` ### Seconds @@ -1357,6 +1669,67 @@ Examples: - `SHA512("name")` +### SliceToMap + +`SliceToMap(target, keyPath, Optional[valuePath])` + +The `SliceToMap` converter converts a slice of objects to a map. The arguments are as follows: + +- `target`: A list of maps containing the entries to be converted. +- `keyPath`: A string array that determines the name of the keys for the map entries by pointing to the value of an attribute within each slice item. Note that +the `keyPath` must resolve to a string value, otherwise the converter will not be able to convert the item +to a map entry. +- `valuePath`: This optional string array determines which attribute should be used as the value for the map entry. If no +`valuePath` is defined, the value of the map entry will be the same as the original slice item. + +Examples: + +The examples below will convert the following input: + +```yaml +attributes: + hello: world + things: + - name: foo + value: 2 + - name: bar + value: 5 +``` + +- `SliceToMap(attributes["things"], ["name"])`: + +This converts the input above to the following: + +```yaml +attributes: + hello: world + things: + foo: + name: foo + value: 2 + bar: + name: bar + value: 5 +``` + +- `SliceToMap(attributes["things"], ["name"], ["value"])`: + +This converts the input above to the following: + +```yaml +attributes: + hello: world + things: + foo: 2 + bar: 5 +``` + +Once the `SliceToMap` function has been applied to a value, the converted entries are addressable via their keys: + +- `set(attributes["thingsMap"], SliceToMap(attributes["things"], ["name"]))` +- `set(attributes["element_1"], attributes["thingsMap"]["foo'])` +- `set(attributes["element_2"], attributes["thingsMap"]["bar'])` + ### Sort `Sort(target, Optional[order])` @@ -1455,11 +1828,11 @@ Examples: ### Time -`Time(target, format, Optional[location])` +`Time(target, format, Optional[location], Optional[locale])` The `Time` Converter takes a string representation of a time and converts it to a Golang `time.Time`. -`target` is a string. `format` is a string, `location` is an optional string. +`target` is a string. `format` is a string, `location` is an optional string, `locale` is an optional string. If either `target` or `format` are nil, an error is returned. The parser used is the parser at [internal/coreinternal/parser](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/internal/coreinternal/timeutils). If the `target` and `format` do not follow the parsing rules used by this parser, an error is returned. @@ -1490,6 +1863,10 @@ If either `target` or `format` are nil, an error is returned. The parser used is |`%s` | Nanosecond as a zero-padded number | 00000000, ..., 99999999 | |`%z` | UTC offset in the form ±HHMM[SS[.ffffff]] or empty | +0000, -0400 | |`%Z` | Timezone name or abbreviation or empty | UTC, EST, CST | +|`%i` | Timezone as +/-HH | -07 | +|`%j` | Timezone as +/-HH:MM | -07:00 | +|`%k` | Timezone as +/-HH:MM:SS | -07:00:00 | +|`%w` | Timezone as +/-HHMMSS | -070000 | |`%D`, `%x` | Short MM/DD/YYYY date, equivalent to %m/%d/%y | 01/21/2031 | |`%F` | Short YYYY-MM-DD date, equivalent to %Y-%m-%d | 2031-01-21 | |`%T`,`%X` | ISO 8601 time format (HH:MM:SS), equivalent to %H:%M:%S | 02:55:02 | @@ -1519,6 +1896,55 @@ Examples: - `Time("2012-11-01T22:08:41+0000 EST", "%Y-%m-%dT%H:%M:%S%z %Z")` - `Time("2023-05-26 12:34:56", "%Y-%m-%d %H:%M:%S", "America/New_York")` +`locale` specifies the input language of the `target` value. It is used to interpret timestamp values written in a specific language, +ensuring that the function can correctly parse the localized month names, day names, and periods of the day based on the provided language. + +The value must be a well-formed BCP 47 language tag, and a known [CLDR](https://cldr.unicode.org) v45 locale. +If not supplied, English (`en`) is used. + +Examples: + +- `Time("mercoledì set 4 2024", "%A %h %e %Y", "", "it")` +- `Time("Febrero 25 lunes, 2002, 02:03:04 p.m.", "%B %d %A, %Y, %r", "America/New_York", "es-ES")` + +### ToKeyValueString + +`ToKeyValueString(target, Optional[delimiter], Optional[pair_delimiter], Optional[sort_output])` + +The `ToKeyValueString` Converter takes a `pcommon.Map` and converts it to a `string` of key value pairs. + +- `target` is a Getter that returns a `pcommon.Map`. +- `delimiter` is an optional string that is used to join keys and values, the default is `=`. +- `pair_delimiter` is an optional string that is used to join key value pairs, the default is a single space (` `). +- `sort_output` is an optional bool that is used to deterministically sort the keys of the output string. It should only be used if the output is required to be in the same order each time, as it introduces some performance overhead. + +For example, the following map `{"k1":"v1","k2":"v2","k3":"v3"}` will use default delimiters and be converted into the following string: + +``` +`k1=v1 k2=v2 k3=v3` +``` + +**Note:** Any nested arrays or maps will be represented as a JSON string. It is recommended to [flatten](#flatten) `target` before using this function. + +For example, `{"k1":"v1","k2":{"k3":"v3","k4":["v4","v5"]}}` will be converted to: + +``` +`k1=v1 k2={\"k3\":\"v3\",\"k4\":[\"v4\",\"v5\"]}` +``` + +**Note:** If any keys or values contain either delimiter, they will be double quoted. If any double quotes are present in the quoted value, they will be escaped. + +For example, `{"k1":"v1","k2":"v=2","k3"="\"v=3\""}` will be converted to: + +``` +`k1=v1 k2="v=2" k3="\"v=3\""` +``` + +Examples: + +- `ToKeyValueString(body)` +- `ToKeyValueString(body, ":", ",", true)` + ### TraceID `TraceID(bytes)` diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_append.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_append.go index 362f896703..3bf6cb2a90 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_append.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_append.go @@ -21,6 +21,7 @@ type AppendArguments[K any] struct { func NewAppendFactory[K any]() ottl.Factory[K] { return ottl.NewFactory("append", &AppendArguments[K]{}, createAppendFunction[K]) } + func createAppendFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { args, ok := oArgs.(*AppendArguments[K]) if !ok { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_base64decode.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_base64decode.go index 42e401d715..f626adc3b5 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_base64decode.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_base64decode.go @@ -30,7 +30,6 @@ func createBase64DecodeFunction[K any](_ ottl.FunctionContext, oArgs ottl.Argume } func Base64Decode[K any](target ottl.StringGetter[K]) (ottl.ExprFunc[K], error) { - return func(ctx context.Context, tCtx K) (any, error) { val, err := target.Get(ctx, tCtx) if err != nil { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_convert_attributes_to_elements_xml.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_convert_attributes_to_elements_xml.go new file mode 100644 index 0000000000..64d4ecc5fd --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_convert_attributes_to_elements_xml.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + + "github.com/antchfx/xmlquery" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type ConvertAttributesToElementsXMLArguments[K any] struct { + Target ottl.StringGetter[K] + XPath ottl.Optional[string] +} + +func NewConvertAttributesToElementsXMLFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("ConvertAttributesToElementsXML", &ConvertAttributesToElementsXMLArguments[K]{}, createConvertAttributesToElementsXMLFunction[K]) +} + +func createConvertAttributesToElementsXMLFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*ConvertAttributesToElementsXMLArguments[K]) + + if !ok { + return nil, fmt.Errorf("ConvertAttributesToElementsXML args must be of type *ConvertAttributesToElementsXMLAguments[K]") + } + + xPath := args.XPath.Get() + if xPath == "" { + xPath = "//@*" // All attributes in the document + } + if err := validateXPath(xPath); err != nil { + return nil, err + } + + return convertAttributesToElementsXML(args.Target, xPath), nil +} + +// convertAttributesToElementsXML returns a string that is a result of converting all attributes of the +// target XML into child elements. These new elements are added as the last child elements of the parent. +// e.g. -> worldbar +func convertAttributesToElementsXML[K any](target ottl.StringGetter[K], xPath string) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + var doc *xmlquery.Node + if targetVal, err := target.Get(ctx, tCtx); err != nil { + return nil, err + } else if doc, err = parseNodesXML(targetVal); err != nil { + return nil, err + } + for _, n := range xmlquery.Find(doc, xPath) { + if n.Type != xmlquery.AttributeNode { + continue + } + xmlquery.AddChild(n.Parent, &xmlquery.Node{ + Type: xmlquery.ElementNode, + Data: n.Data, + FirstChild: &xmlquery.Node{ + Type: xmlquery.TextNode, + Data: n.InnerText(), + }, + }) + n.Parent.RemoveAttr(n.Data) + } + return doc.OutputXML(false), nil + } +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_convert_text_to_elements_xml.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_convert_text_to_elements_xml.go new file mode 100644 index 0000000000..a0fb108c40 --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_convert_text_to_elements_xml.go @@ -0,0 +1,107 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + + "github.com/antchfx/xmlquery" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type ConvertTextToElementsXMLArguments[K any] struct { + Target ottl.StringGetter[K] + XPath ottl.Optional[string] + ElementName ottl.Optional[string] +} + +func NewConvertTextToElementsXMLFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("ConvertTextToElementsXML", &ConvertTextToElementsXMLArguments[K]{}, createConvertTextToElementsXMLFunction[K]) +} + +func createConvertTextToElementsXMLFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*ConvertTextToElementsXMLArguments[K]) + + if !ok { + return nil, fmt.Errorf("ConvertTextToElementsXML args must be of type *ConvertTextToElementsXMLAguments[K]") + } + + xPath := args.XPath.Get() + if xPath == "" { + xPath = "/" + } else if err := validateXPath(xPath); err != nil { + return nil, err + } + + elementName := args.ElementName.Get() + if elementName == "" { + elementName = "value" + } + + return convertTextToElementsXML(args.Target, xPath, elementName), nil +} + +// convertTextToElementsXML returns a string that is a result of wrapping any extraneous text nodes with a dedicated element. +func convertTextToElementsXML[K any](target ottl.StringGetter[K], xPath string, elementName string) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + var doc *xmlquery.Node + if targetVal, err := target.Get(ctx, tCtx); err != nil { + return nil, err + } else if doc, err = parseNodesXML(targetVal); err != nil { + return nil, err + } + for _, n := range xmlquery.Find(doc, xPath) { + convertTextToElementsForNode(n, elementName) + } + return doc.OutputXML(false), nil + } +} + +func convertTextToElementsForNode(parent *xmlquery.Node, elementName string) { + switch parent.Type { + case xmlquery.ElementNode: // ok + case xmlquery.DocumentNode: // ok + default: + return + } + + if parent.FirstChild == nil { + return + } + + // Convert any child nodes and count text and element nodes. + var valueCount, elementCount int + for child := parent.FirstChild; child != nil; child = child.NextSibling { + if child.Type == xmlquery.ElementNode { + convertTextToElementsForNode(child, elementName) + elementCount++ + } else if child.Type == xmlquery.TextNode { + valueCount++ + } + } + + // If there are no values to wrap, or if there is exactly one value OR one element, this node is all set. + if valueCount == 0 || elementCount+valueCount <= 1 { + return + } + + // At this point, we either have multiple values, or a mix of values and elements. + // Either way, we need to wrap the values. + for child := parent.FirstChild; child != nil; child = child.NextSibling { + if child.Type != xmlquery.TextNode { + continue + } + newTextNode := &xmlquery.Node{ + Type: xmlquery.TextNode, + Data: child.Data, + } + // Change this node into an element + child.Type = xmlquery.ElementNode + child.Data = elementName + child.FirstChild = newTextNode + child.LastChild = newTextNode + } +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_duration.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_duration.go index e125ff2b90..27138583fa 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_duration.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_duration.go @@ -18,6 +18,7 @@ type DurationArguments[K any] struct { func NewDurationFactory[K any]() ottl.Factory[K] { return ottl.NewFactory("Duration", &DurationArguments[K]{}, createDurationFunction[K]) } + func createDurationFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { args, ok := oArgs.(*DurationArguments[K]) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_flatten.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_flatten.go index 44a97b8095..709eb1bef7 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_flatten.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_flatten.go @@ -37,8 +37,8 @@ func flatten[K any](target ottl.PMapGetter[K], p ottl.Optional[string], d ottl.O depth := int64(math.MaxInt64) if !d.IsEmpty() { depth = d.Get() - if depth < 0 { - return nil, fmt.Errorf("invalid depth for flatten function, %d cannot be negative", depth) + if depth < 1 { + return nil, fmt.Errorf("invalid depth '%d' for flatten function, must be greater than 0", depth) } } @@ -55,7 +55,7 @@ func flatten[K any](target ottl.PMapGetter[K], p ottl.Optional[string], d ottl.O result := pcommon.NewMap() flattenHelper(m, result, prefix, 0, depth) - result.CopyTo(m) + result.MoveTo(m) return nil, nil }, nil @@ -69,7 +69,7 @@ func flattenHelper(m pcommon.Map, result pcommon.Map, prefix string, currentDept switch { case v.Type() == pcommon.ValueTypeMap && currentDepth < maxDepth: flattenHelper(v.Map(), result, prefix+k, currentDepth+1, maxDepth) - case v.Type() == pcommon.ValueTypeSlice: + case v.Type() == pcommon.ValueTypeSlice && currentDepth < maxDepth: for i := 0; i < v.Slice().Len(); i++ { v.Slice().At(i).CopyTo(result.PutEmpty(fmt.Sprintf("%v.%v", prefix+k, i))) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_fnv.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_fnv.go index 5df53a4737..c9a29ca573 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_fnv.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_fnv.go @@ -30,7 +30,6 @@ func createFnvFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ott } func FNVHashString[K any](target ottl.StringGetter[K]) (ottl.ExprFunc[K], error) { - return func(ctx context.Context, tCtx K) (any, error) { val, err := target.Get(ctx, tCtx) if err != nil { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_get_xml.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_get_xml.go new file mode 100644 index 0000000000..d5390b62da --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_get_xml.go @@ -0,0 +1,62 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + + "github.com/antchfx/xmlquery" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type GetXMLArguments[K any] struct { + Target ottl.StringGetter[K] + XPath string +} + +func NewGetXMLFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("GetXML", &GetXMLArguments[K]{}, createGetXMLFunction[K]) +} + +func createGetXMLFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*GetXMLArguments[K]) + + if !ok { + return nil, fmt.Errorf("GetXML args must be of type *GetXMLAguments[K]") + } + + if err := validateXPath(args.XPath); err != nil { + return nil, err + } + + return getXML(args.Target, args.XPath), nil +} + +// getXML returns a XML formatted string that is a result of matching elements from the target XML. +func getXML[K any](target ottl.StringGetter[K], xPath string) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + var doc *xmlquery.Node + if targetVal, err := target.Get(ctx, tCtx); err != nil { + return nil, err + } else if doc, err = parseNodesXML(targetVal); err != nil { + return nil, err + } + + nodes, err := xmlquery.QueryAll(doc, xPath) + if err != nil { + return nil, err + } + + result := &xmlquery.Node{Type: xmlquery.DocumentNode} + for _, n := range nodes { + if n.Type != xmlquery.ElementNode { + continue + } + xmlquery.AddChild(result, n) + } + return result.OutputXML(false), nil + } +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_hour.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_hour.go index 3e30fbd108..5bc3e89600 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_hour.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_hour.go @@ -17,6 +17,7 @@ type HourArguments[K any] struct { func NewHourFactory[K any]() ottl.Factory[K] { return ottl.NewFactory("Hour", &HourArguments[K]{}, createHourFunction[K]) } + func createHourFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { args, ok := oArgs.(*HourArguments[K]) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_hours.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_hours.go index 66ab2dbcad..580091ae4b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_hours.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_hours.go @@ -17,6 +17,7 @@ type HoursArguments[K any] struct { func NewHoursFactory[K any]() ottl.Factory[K] { return ottl.NewFactory("Hours", &HoursArguments[K]{}, createHoursFunction[K]) } + func createHoursFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { args, ok := oArgs.(*HoursArguments[K]) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_insert_xml.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_insert_xml.go new file mode 100644 index 0000000000..778b16938a --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_insert_xml.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "errors" + "fmt" + + "github.com/antchfx/xmlquery" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type InsertXMLArguments[K any] struct { + Target ottl.StringGetter[K] + XPath string + SubDocument ottl.StringGetter[K] +} + +func NewInsertXMLFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("InsertXML", &InsertXMLArguments[K]{}, createInsertXMLFunction[K]) +} + +func createInsertXMLFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*InsertXMLArguments[K]) + + if !ok { + return nil, fmt.Errorf("InsertXML args must be of type *InsertXMLAguments[K]") + } + + if err := validateXPath(args.XPath); err != nil { + return nil, err + } + + return insertXML(args.Target, args.XPath, args.SubDocument), nil +} + +// insertXML returns a XML formatted string that is a result of inserting another XML document into +// the content of each selected target element. +func insertXML[K any](target ottl.StringGetter[K], xPath string, subGetter ottl.StringGetter[K]) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + var doc *xmlquery.Node + if targetVal, err := target.Get(ctx, tCtx); err != nil { + return nil, err + } else if doc, err = parseNodesXML(targetVal); err != nil { + return nil, err + } + + var subDoc *xmlquery.Node + if subDocVal, err := subGetter.Get(ctx, tCtx); err != nil { + return nil, err + } else if subDoc, err = parseNodesXML(subDocVal); err != nil { + return nil, err + } + + nodes, errs := xmlquery.QueryAll(doc, xPath) + for _, n := range nodes { + switch n.Type { + case xmlquery.ElementNode, xmlquery.DocumentNode: + var nextSibling *xmlquery.Node + for c := subDoc.FirstChild; c != nil; c = nextSibling { + // AddChild updates c.NextSibling but not subDoc.FirstChild + // so we need to get the handle to it prior to the update. + nextSibling = c.NextSibling + xmlquery.AddChild(n, c) + } + default: + errs = errors.Join(errs, fmt.Errorf("InsertXML XPath selected non-element: %q", n.Data)) + } + } + return doc.OutputXML(false), errs + } +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_md5.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_md5.go index 4fce3da169..280ac5c8bc 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_md5.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_md5.go @@ -31,7 +31,6 @@ func createMD5Function[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ott } func MD5HashString[K any](target ottl.StringGetter[K]) (ottl.ExprFunc[K], error) { - return func(ctx context.Context, tCtx K) (any, error) { val, err := target.Get(ctx, tCtx) if err != nil { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_microseconds.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_microseconds.go index 0855efaca0..f76616782b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_microseconds.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_microseconds.go @@ -17,6 +17,7 @@ type MicrosecondsArguments[K any] struct { func NewMicrosecondsFactory[K any]() ottl.Factory[K] { return ottl.NewFactory("Microseconds", &MicrosecondsArguments[K]{}, createMicrosecondsFunction[K]) } + func createMicrosecondsFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { args, ok := oArgs.(*MicrosecondsArguments[K]) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_milliseconds.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_milliseconds.go index da787e0e15..f0d605d5ee 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_milliseconds.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_milliseconds.go @@ -17,6 +17,7 @@ type MillisecondsArguments[K any] struct { func NewMillisecondsFactory[K any]() ottl.Factory[K] { return ottl.NewFactory("Milliseconds", &MillisecondsArguments[K]{}, createMillisecondsFunction[K]) } + func createMillisecondsFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { args, ok := oArgs.(*MillisecondsArguments[K]) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_minutes.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_minutes.go index 5048befc57..557fa972ed 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_minutes.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_minutes.go @@ -17,6 +17,7 @@ type MinutesArguments[K any] struct { func NewMinutesFactory[K any]() ottl.Factory[K] { return ottl.NewFactory("Minutes", &MinutesArguments[K]{}, createMinutesFunction[K]) } + func createMinutesFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { args, ok := oArgs.(*MinutesArguments[K]) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_nanoseconds.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_nanoseconds.go index 2bb2cd7d1d..3276962675 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_nanoseconds.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_nanoseconds.go @@ -17,6 +17,7 @@ type NanosecondsArguments[K any] struct { func NewNanosecondsFactory[K any]() ottl.Factory[K] { return ottl.NewFactory("Nanoseconds", &NanosecondsArguments[K]{}, createNanosecondsFunction[K]) } + func createNanosecondsFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { args, ok := oArgs.(*NanosecondsArguments[K]) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_parse_json.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_parse_json.go index 637390177e..011437424c 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_parse_json.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_parse_json.go @@ -7,7 +7,7 @@ import ( "context" "fmt" - jsoniter "github.com/json-iterator/go" + "github.com/goccy/go-json" "go.opentelemetry.io/collector/pdata/pcommon" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" @@ -47,7 +47,7 @@ func parseJSON[K any](target ottl.StringGetter[K]) ottl.ExprFunc[K] { return nil, err } var parsedValue any - err = jsoniter.UnmarshalFromString(targetVal, &parsedValue) + err = json.Unmarshal([]byte(targetVal), &parsedValue) if err != nil { return nil, err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_parse_simplified_xml.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_parse_simplified_xml.go new file mode 100644 index 0000000000..7e4f1e2753 --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_parse_simplified_xml.go @@ -0,0 +1,134 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + + "github.com/antchfx/xmlquery" + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type ParseSimplifiedXMLArguments[K any] struct { + Target ottl.StringGetter[K] +} + +func NewParseSimplifiedXMLFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("ParseSimplifiedXML", &ParseSimplifiedXMLArguments[K]{}, createParseSimplifiedXMLFunction[K]) +} + +func createParseSimplifiedXMLFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*ParseSimplifiedXMLArguments[K]) + + if !ok { + return nil, fmt.Errorf("ParseSimplifiedXML args must be of type *ParseSimplifiedXMLAguments[K]") + } + + return parseSimplifiedXML(args.Target), nil +} + +// The `ParseSimplifiedXML` Converter returns a `pcommon.Map` struct that is the result of parsing the target +// string without preservation of attributes or extraneous text content. +func parseSimplifiedXML[K any](target ottl.StringGetter[K]) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + var doc *xmlquery.Node + if targetVal, err := target.Get(ctx, tCtx); err != nil { + return nil, err + } else if doc, err = parseNodesXML(targetVal); err != nil { + return nil, err + } + + docMap := pcommon.NewMap() + parseElement(doc, &docMap) + return docMap, nil + } +} + +func parseElement(parent *xmlquery.Node, parentMap *pcommon.Map) { + // Count the number of each element tag so we know whether it will be a member of a slice or not + childTags := make(map[string]int) + for child := parent.FirstChild; child != nil; child = child.NextSibling { + if child.Type != xmlquery.ElementNode { + continue + } + childTags[child.Data]++ + } + if len(childTags) == 0 { + return + } + + // Convert the children, now knowing whether they will be a member of a slice or not + for child := parent.FirstChild; child != nil; child = child.NextSibling { + if child.Type != xmlquery.ElementNode || child.FirstChild == nil { + continue + } + + leafValue := leafValueFromElement(child) + + // Slice of the same element + if childTags[child.Data] > 1 { + // Get or create the slice of children + var childrenSlice pcommon.Slice + childrenValue, ok := parentMap.Get(child.Data) + if ok { + childrenSlice = childrenValue.Slice() + } else { + childrenSlice = parentMap.PutEmptySlice(child.Data) + } + + // Add the child's text content to the slice + if leafValue != "" { + childrenSlice.AppendEmpty().SetStr(leafValue) + continue + } + + // Parse the child to make sure there's something to add + childMap := pcommon.NewMap() + parseElement(child, &childMap) + if childMap.Len() == 0 { + continue + } + + sliceValue := childrenSlice.AppendEmpty() + sliceMap := sliceValue.SetEmptyMap() + childMap.CopyTo(sliceMap) + continue + } + + if leafValue != "" { + parentMap.PutStr(child.Data, leafValue) + continue + } + + // Child will be a map + childMap := pcommon.NewMap() + parseElement(child, &childMap) + if childMap.Len() == 0 { + continue + } + + childMap.CopyTo(parentMap.PutEmptyMap(child.Data)) + } +} + +func leafValueFromElement(node *xmlquery.Node) string { + // First check if there are any child elements. If there are, ignore any extraneous text. + for child := node.FirstChild; child != nil; child = child.NextSibling { + if child.Type == xmlquery.ElementNode { + return "" + } + } + + // No child elements, so return the first text or CDATA content + for child := node.FirstChild; child != nil; child = child.NextSibling { + switch child.Type { + case xmlquery.TextNode, xmlquery.CharDataNode: + return child.Data + } + } + return "" +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_remove_xml.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_remove_xml.go new file mode 100644 index 0000000000..b45ee74fcd --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_remove_xml.go @@ -0,0 +1,95 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + "strings" + + "github.com/antchfx/xmlquery" + "github.com/antchfx/xpath" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type RemoveXMLArguments[K any] struct { + Target ottl.StringGetter[K] + XPath string +} + +func NewRemoveXMLFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("RemoveXML", &RemoveXMLArguments[K]{}, createRemoveXMLFunction[K]) +} + +func createRemoveXMLFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*RemoveXMLArguments[K]) + + if !ok { + return nil, fmt.Errorf("RemoveXML args must be of type *RemoveXMLAguments[K]") + } + + if err := validateXPath(args.XPath); err != nil { + return nil, err + } + + return removeXML(args.Target, args.XPath), nil +} + +// removeXML returns a XML formatted string that is a result of removing all matching nodes from the target XML. +// This currently supports removal of elements, attributes, text values, comments, and CharData. +func removeXML[K any](target ottl.StringGetter[K], xPath string) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + var doc *xmlquery.Node + if targetVal, err := target.Get(ctx, tCtx); err != nil { + return nil, err + } else if doc, err = parseNodesXML(targetVal); err != nil { + return nil, err + } + + nodes, err := xmlquery.QueryAll(doc, xPath) + if err != nil { + return nil, err + } + + for _, n := range nodes { + switch n.Type { + case xmlquery.ElementNode: + xmlquery.RemoveFromTree(n) + case xmlquery.AttributeNode: + n.Parent.RemoveAttr(n.Data) + case xmlquery.TextNode: + n.Data = "" + case xmlquery.CommentNode: + xmlquery.RemoveFromTree(n) + case xmlquery.CharDataNode: + xmlquery.RemoveFromTree(n) + } + } + return doc.OutputXML(false), nil + } +} + +func validateXPath(xPath string) error { + _, err := xpath.Compile(xPath) + if err != nil { + return fmt.Errorf("invalid xpath: %w", err) + } + return nil +} + +// Aside from parsing the XML document, this function also ensures that +// the XML declaration is included in the result only if it was present in +// the original document. +func parseNodesXML(targetVal string) (*xmlquery.Node, error) { + preserveDeclearation := strings.HasPrefix(targetVal, " len(statement) { + return statement, fmt.Errorf(`failed to insert context "%s" into statement "%s": offset %d is out of range`, context, statement, offset) + } + sb.WriteString(statement[left:offset]) + sb.WriteString(contextPrefix) + left = offset + } + sb.WriteString(statement[left:]) + + return sb.String(), nil +} + // newParser returns a parser that can be used to read a string into a parsedStatement. An error will be returned if the string // is not formatted for the DSL. func newParser[G any]() *participle.Parser[G] { @@ -279,10 +339,9 @@ func NewStatementSequence[K any](statements []*Statement[K], telemetrySettings c // When the ErrorMode of the StatementSequence is `ignore`, errors are logged and execution continues to the next statement. // When the ErrorMode of the StatementSequence is `silent`, errors are not logged and execution continues to the next statement. func (s *StatementSequence[K]) Execute(ctx context.Context, tCtx K) error { - s.telemetrySettings.Logger.Debug("initial TransformContext", zap.Any("TransformContext", tCtx)) + s.telemetrySettings.Logger.Debug("initial TransformContext before executing StatementSequence", zap.Any("TransformContext", tCtx)) for _, statement := range s.statements { - _, condition, err := statement.Execute(ctx, tCtx) - s.telemetrySettings.Logger.Debug("TransformContext after statement execution", zap.String("statement", statement.origText), zap.Bool("condition matched", condition), zap.Any("TransformContext", tCtx)) + _, _, err := statement.Execute(ctx, tCtx) if err != nil { if s.errorMode == PropagateError { err = fmt.Errorf("failed to execute statement: %v, %w", statement.origText, err) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/paths.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/paths.go new file mode 100644 index 0000000000..dbb66ee7c9 --- /dev/null +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/paths.go @@ -0,0 +1,32 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottl // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + +// grammarPathVisitor is used to extract all path from a parsedStatement or booleanExpression +type grammarPathVisitor struct { + paths []path +} + +func (v *grammarPathVisitor) visitEditor(_ *editor) {} +func (v *grammarPathVisitor) visitValue(_ *value) {} +func (v *grammarPathVisitor) visitMathExprLiteral(_ *mathExprLiteral) {} + +func (v *grammarPathVisitor) visitPath(value *path) { + v.paths = append(v.paths, *value) +} + +func getParsedStatementPaths(ps *parsedStatement) []path { + visitor := &grammarPathVisitor{} + ps.Editor.accept(visitor) + if ps.WhereClause != nil { + ps.WhereClause.accept(visitor) + } + return visitor.paths +} + +func getBooleanExpressionPaths(be *booleanExpression) []path { + visitor := &grammarPathVisitor{} + be.accept(visitor) + return visitor.paths +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling/common.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling/common.go index ad94bac763..d97c070872 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling/common.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling/common.go @@ -17,11 +17,9 @@ type KV struct { Value string } -var ( - // ErrTraceStateSize is returned when a TraceState is over its - // size limit, as specified by W3C. - ErrTraceStateSize = errors.New("invalid tracestate size") -) +// ErrTraceStateSize is returned when a TraceState is over its +// size limit, as specified by W3C. +var ErrTraceStateSize = errors.New("invalid tracestate size") // keyValueScanner defines distinct scanner behaviors for lists of // key-values. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/converter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/converter.go index 2f8c3540cf..3ab508745b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/converter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/converter.go @@ -155,44 +155,46 @@ func (c *Converter) workerLoop() { defer c.wg.Done() for entries := range c.workerChan { + // Send plogs directly to flushChan + c.flushChan <- ConvertEntries(entries) + } +} - resourceHashToIdx := make(map[uint64]int) - scopeIdxByResource := make(map[uint64]map[string]int) +func ConvertEntries(entries []*entry.Entry) plog.Logs { + resourceHashToIdx := make(map[uint64]int) + scopeIdxByResource := make(map[uint64]map[string]int) - pLogs := plog.NewLogs() - var sl plog.ScopeLogs + pLogs := plog.NewLogs() + var sl plog.ScopeLogs - for _, e := range entries { - resourceID := HashResource(e.Resource) - var rl plog.ResourceLogs + for _, e := range entries { + resourceID := HashResource(e.Resource) + var rl plog.ResourceLogs - resourceIdx, ok := resourceHashToIdx[resourceID] - if !ok { - resourceHashToIdx[resourceID] = pLogs.ResourceLogs().Len() + resourceIdx, ok := resourceHashToIdx[resourceID] + if !ok { + resourceHashToIdx[resourceID] = pLogs.ResourceLogs().Len() - rl = pLogs.ResourceLogs().AppendEmpty() - upsertToMap(e.Resource, rl.Resource().Attributes()) + rl = pLogs.ResourceLogs().AppendEmpty() + upsertToMap(e.Resource, rl.Resource().Attributes()) - scopeIdxByResource[resourceID] = map[string]int{e.ScopeName: 0} + scopeIdxByResource[resourceID] = map[string]int{e.ScopeName: 0} + sl = rl.ScopeLogs().AppendEmpty() + sl.Scope().SetName(e.ScopeName) + } else { + rl = pLogs.ResourceLogs().At(resourceIdx) + scopeIdxInResource, ok := scopeIdxByResource[resourceID][e.ScopeName] + if !ok { + scopeIdxByResource[resourceID][e.ScopeName] = rl.ScopeLogs().Len() sl = rl.ScopeLogs().AppendEmpty() sl.Scope().SetName(e.ScopeName) } else { - rl = pLogs.ResourceLogs().At(resourceIdx) - scopeIdxInResource, ok := scopeIdxByResource[resourceID][e.ScopeName] - if !ok { - scopeIdxByResource[resourceID][e.ScopeName] = rl.ScopeLogs().Len() - sl = rl.ScopeLogs().AppendEmpty() - sl.Scope().SetName(e.ScopeName) - } else { - sl = pLogs.ResourceLogs().At(resourceIdx).ScopeLogs().At(scopeIdxInResource) - } + sl = pLogs.ResourceLogs().At(resourceIdx).ScopeLogs().At(scopeIdxInResource) } - convertInto(e, sl.LogRecords().AppendEmpty()) } - - // Send plogs directly to flushChan - c.flushChan <- pLogs + convertInto(e, sl.LogRecords().AppendEmpty()) } + return pLogs } func (c *Converter) flushLoop() { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/factory.go index 2f42a1480b..e4b8c83eca 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/factory.go @@ -46,6 +46,21 @@ func createLogsReceiver(logReceiverType LogReceiverType) rcvr.CreateLogsFunc { operators := append([]operator.Config{inputCfg}, baseCfg.Operators...) + obsrecv, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ + ReceiverID: params.ID, + ReceiverCreateSettings: params, + }) + if err != nil { + return nil, err + } + rcv := &receiver{ + set: params.TelemetrySettings, + id: params.ID, + consumer: consumerretry.NewLogs(baseCfg.RetryOnFailure, params.Logger, nextConsumer), + obsrecv: obsrecv, + storageID: baseCfg.StorageID, + } + var emitterOpts []helper.EmitterOption if baseCfg.maxBatchSize > 0 { emitterOpts = append(emitterOpts, helper.WithMaxBatchSize(baseCfg.maxBatchSize)) @@ -53,7 +68,8 @@ func createLogsReceiver(logReceiverType LogReceiverType) rcvr.CreateLogsFunc { if baseCfg.flushInterval > 0 { emitterOpts = append(emitterOpts, helper.WithFlushInterval(baseCfg.flushInterval)) } - emitter := helper.NewLogEmitter(params.TelemetrySettings, emitterOpts...) + + emitter := helper.NewLogEmitter(params.TelemetrySettings, rcv.consumeEntries, emitterOpts...) pipe, err := pipeline.Config{ Operators: operators, DefaultOutput: emitter, @@ -62,27 +78,9 @@ func createLogsReceiver(logReceiverType LogReceiverType) rcvr.CreateLogsFunc { return nil, err } - var converterOpts []converterOption - if baseCfg.numWorkers > 0 { - converterOpts = append(converterOpts, withWorkerCount(baseCfg.numWorkers)) - } - converter := NewConverter(params.TelemetrySettings, converterOpts...) - obsrecv, err := receiverhelper.NewObsReport(receiverhelper.ObsReportSettings{ - ReceiverID: params.ID, - ReceiverCreateSettings: params, - }) - if err != nil { - return nil, err - } - return &receiver{ - set: params.TelemetrySettings, - id: params.ID, - pipe: pipe, - emitter: emitter, - consumer: consumerretry.NewLogs(baseCfg.RetryOnFailure, params.Logger, nextConsumer), - converter: converter, - obsrecv: obsrecv, - storageID: baseCfg.StorageID, - }, nil + rcv.emitter = emitter + rcv.pipe = pipe + + return rcv, nil } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/receiver.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/receiver.go index bacef52533..5b77609921 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/receiver.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/receiver.go @@ -6,7 +6,6 @@ package adapter // import "github.com/open-telemetry/opentelemetry-collector-con import ( "context" "fmt" - "sync" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" @@ -16,22 +15,19 @@ import ( "go.uber.org/multierr" "go.uber.org/zap" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/pipeline" ) type receiver struct { - set component.TelemetrySettings - id component.ID - emitWg sync.WaitGroup - consumeWg sync.WaitGroup - cancel context.CancelFunc - - pipe pipeline.Pipeline - emitter *helper.LogEmitter - consumer consumer.Logs - converter *Converter - obsrecv *receiverhelper.ObsReport + set component.TelemetrySettings + id component.ID + + pipe pipeline.Pipeline + emitter *helper.LogEmitter + consumer consumer.Logs + obsrecv *receiverhelper.ObsReport storageID *component.ID storageClient storage.Client @@ -42,8 +38,6 @@ var _ rcvr.Logs = (*receiver)(nil) // Start tells the receiver to start func (r *receiver) Start(ctx context.Context, host component.Host) error { - rctx, cancel := context.WithCancel(ctx) - r.cancel = cancel r.set.Logger.Info("Starting stanza receiver") if err := r.setStorageClient(ctx, host); err != nil { @@ -54,86 +48,26 @@ func (r *receiver) Start(ctx context.Context, host component.Host) error { return fmt.Errorf("start stanza: %w", err) } - r.converter.Start() - - // Below we're starting 2 loops: - // * one which reads all the logs produced by the emitter and then forwards - // them to converter - // ... - r.emitWg.Add(1) - go r.emitterLoop() - - // ... - // * second one which reads all the logs produced by the converter - // (aggregated by Resource) and then calls consumer to consumer them. - r.consumeWg.Add(1) - go r.consumerLoop(rctx) - - // Those 2 loops are started in separate goroutines because batching in - // the emitter loop can cause a flush, caused by either reaching the max - // flush size or by the configurable ticker which would in turn cause - // a set of log entries to be available for reading in converter's out - // channel. In order to prevent backpressure, reading from the converter - // channel and batching are done in those 2 goroutines. - return nil } -// emitterLoop reads the log entries produced by the emitter and batches them -// in converter. -func (r *receiver) emitterLoop() { - defer r.emitWg.Done() - - // Don't create done channel on every iteration. - // emitter.OutChannel is closed on ctx.Done(), no need to handle ctx here - // instead we should drain and process the channel to let emitter cancel properly - for e := range r.emitter.OutChannel() { - if err := r.converter.Batch(e); err != nil { - r.set.Logger.Error("Could not add entry to batch", zap.Error(err)) - } - } +func (r *receiver) consumeEntries(ctx context.Context, entries []*entry.Entry) { + obsrecvCtx := r.obsrecv.StartLogsOp(ctx) + pLogs := ConvertEntries(entries) + logRecordCount := pLogs.LogRecordCount() - r.set.Logger.Debug("Emitter loop stopped") -} - -// consumerLoop reads converter log entries and calls the consumer to consumer them. -func (r *receiver) consumerLoop(ctx context.Context) { - defer r.consumeWg.Done() - - // Don't create done channel on every iteration. - // converter.OutChannel is closed on Shutdown before context is cancelled. - // Drain the channel and process events before exiting - for pLogs := range r.converter.OutChannel() { - obsrecvCtx := r.obsrecv.StartLogsOp(ctx) - logRecordCount := pLogs.LogRecordCount() - - cErr := r.consumer.ConsumeLogs(ctx, pLogs) - if cErr != nil { - r.set.Logger.Error("ConsumeLogs() failed", zap.Error(cErr)) - } - r.obsrecv.EndLogsOp(obsrecvCtx, "stanza", logRecordCount, cErr) + cErr := r.consumer.ConsumeLogs(ctx, pLogs) + if cErr != nil { + r.set.Logger.Error("ConsumeLogs() failed", zap.Error(cErr)) } - - r.set.Logger.Debug("Consumer loop stopped") + r.obsrecv.EndLogsOp(obsrecvCtx, "stanza", logRecordCount, cErr) } // Shutdown is invoked during service shutdown func (r *receiver) Shutdown(ctx context.Context) error { - if r.cancel == nil { - return nil - } - r.set.Logger.Info("Stopping stanza receiver") pipelineErr := r.pipe.Stop() - // wait for emitter to finish batching and let consumers catch up - r.emitWg.Wait() - - r.converter.Stop() - r.cancel() - // wait for consumers to catch up - r.consumeWg.Wait() - if r.storageClient != nil { clientErr := r.storageClient.Close(ctx) return multierr.Combine(pipelineErr, clientErr) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/storage.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/storage.go index 56b933a13e..86d0b7d596 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/storage.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter/storage.go @@ -27,7 +27,6 @@ func GetStorageClient(ctx context.Context, host component.Host, storageID *compo } return storageExtension.GetClient(ctx, component.KindReceiver, componentID, "") - } func (r *receiver) setStorageClient(ctx context.Context, host component.Host) error { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry/body_field.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry/body_field.go index 4db2363b49..534231b73e 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry/body_field.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry/body_field.go @@ -55,7 +55,7 @@ func (f BodyField) String() string { // Get will retrieve a value from an entry's body using the field. // It will return the value and whether the field existed. func (f BodyField) Get(entry *Entry) (any, bool) { - var currentValue = entry.Body + currentValue := entry.Body for _, key := range f.Keys { currentMap, ok := currentValue.(map[string]any) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs/attrs.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs/attrs.go index 20a96a158f..5c953c443e 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs/attrs.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/attrs/attrs.go @@ -30,7 +30,7 @@ type Resolver struct { } func (r *Resolver) Resolve(file *os.File) (attributes map[string]any, err error) { - var path = file.Name() + path := file.Name() // size 2 is sufficient if not resolving symlinks. This optimizes for the most performant cases. attributes = make(map[string]any, 2) if r.IncludeFileName { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/config.go index 2eec1b6b2e..bd0daf2d3e 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/config.go @@ -25,7 +25,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/metadata" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/scanner" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" @@ -87,6 +86,7 @@ type Config struct { DeleteAfterRead bool `mapstructure:"delete_after_read,omitempty"` IncludeFileRecordNumber bool `mapstructure:"include_file_record_number,omitempty"` Compression string `mapstructure:"compression,omitempty"` + PollsToArchive int `mapstructure:"-"` // TODO: activate this config once archiving is set up AcquireFSLock bool `mapstructure:"acquire_fs_lock,omitempty"` } @@ -174,13 +174,6 @@ func (c Config) Build(set component.TelemetrySettings, emit emit.Callback, opts AcquireFSLock: c.AcquireFSLock, } - var t tracker.Tracker - if o.noTracking { - t = tracker.NewNoStateTracker(set, c.MaxConcurrentFiles/2) - } else { - t = tracker.NewFileTracker(set, c.MaxConcurrentFiles/2) - } - telemetryBuilder, err := metadata.NewTelemetryBuilder(set) if err != nil { return nil, err @@ -192,8 +185,8 @@ func (c Config) Build(set component.TelemetrySettings, emit emit.Callback, opts pollInterval: c.PollInterval, maxBatchFiles: c.MaxConcurrentFiles / 2, maxBatches: c.MaxBatches, - tracker: t, telemetryBuilder: telemetryBuilder, + noTracking: o.noTracking, }, nil } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/emit/emit.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/emit/emit.go index 6585944422..6c27a3c72a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/emit/emit.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/emit/emit.go @@ -7,4 +7,16 @@ import ( "context" ) -type Callback func(ctx context.Context, token []byte, attrs map[string]any) error +type Callback func(ctx context.Context, token Token) error + +type Token struct { + Body []byte + Attributes map[string]any +} + +func NewToken(body []byte, attrs map[string]any) Token { + return Token{ + Body: body, + Attributes: attrs, + } +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/file.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/file.go index d46507ecf3..c5675a90a0 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/file.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/file.go @@ -30,11 +30,13 @@ type Manager struct { readerFactory reader.Factory fileMatcher *matcher.Matcher tracker tracker.Tracker + noTracking bool - pollInterval time.Duration - persister operator.Persister - maxBatches int - maxBatchFiles int + pollInterval time.Duration + persister operator.Persister + maxBatches int + maxBatchFiles int + pollsToArchive int telemetryBuilder *metadata.TelemetryBuilder } @@ -47,6 +49,9 @@ func (m *Manager) Start(persister operator.Persister) error { m.set.Logger.Warn("finding files", zap.Error(err)) } + // instantiate the tracker + m.instantiateTracker(persister) + if persister != nil { m.persister = persister offsets, err := checkpoint.Load(ctx, m.persister) @@ -58,6 +63,8 @@ func (m *Manager) Start(persister operator.Persister) error { m.readerFactory.FromBeginning = true m.tracker.LoadMetadata(offsets) } + } else if m.pollsToArchive > 0 { + m.set.Logger.Error("archiving is not supported in memory, please use a storage extension") } // Start polling goroutine @@ -73,7 +80,9 @@ func (m *Manager) Stop() error { m.cancel = nil } m.wg.Wait() - m.telemetryBuilder.FileconsumerOpenFiles.Add(context.TODO(), int64(0-m.tracker.ClosePreviousFiles())) + if m.tracker != nil { + m.telemetryBuilder.FileconsumerOpenFiles.Add(context.TODO(), int64(0-m.tracker.ClosePreviousFiles())) + } if m.persister != nil { if err := checkpoint.Save(context.Background(), m.persister, m.tracker.GetMetadata()); err != nil { m.set.Logger.Error("save offsets", zap.Error(err)) @@ -261,3 +270,13 @@ func (m *Manager) newReader(ctx context.Context, file *os.File, fp *fingerprint. m.telemetryBuilder.FileconsumerOpenFiles.Add(ctx, 1) return r, nil } + +func (m *Manager) instantiateTracker(persister operator.Persister) { + var t tracker.Tracker + if m.noTracking { + t = tracker.NewNoStateTracker(m.set, m.maxBatchFiles) + } else { + t = tracker.NewFileTracker(m.set, m.maxBatchFiles, m.pollsToArchive, persister) + } + m.tracker = t +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint.go index b75933abcc..b9476fb3d5 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/checkpoint/checkpoint.go @@ -18,6 +18,10 @@ const knownFilesKey = "knownFiles" // Save syncs the most recent set of files to the database func Save(ctx context.Context, persister operator.Persister, rmds []*reader.Metadata) error { + return SaveKey(ctx, persister, rmds, knownFilesKey) +} + +func SaveKey(ctx context.Context, persister operator.Persister, rmds []*reader.Metadata, key string) error { var buf bytes.Buffer enc := json.NewEncoder(&buf) @@ -34,7 +38,7 @@ func Save(ctx context.Context, persister operator.Persister, rmds []*reader.Meta } } - if err := persister.Set(ctx, knownFilesKey, buf.Bytes()); err != nil { + if err := persister.Set(ctx, key, buf.Bytes()); err != nil { errs = append(errs, fmt.Errorf("persist known files: %w", err)) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/header/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/header/config.go index 768fc1611d..41c8b30c82 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/header/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/header/config.go @@ -39,7 +39,6 @@ func NewConfig(set component.TelemetrySettings, matchRegex string, metadataOpera Operators: metadataOperators, DefaultOutput: newPipelineOutput(set), }.Build(set) - if err != nil { return nil, fmt.Errorf("failed to build pipelines: %w", err) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go index a856257fda..718505df04 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go @@ -6,21 +6,17 @@ import ( "errors" "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" ) -// Deprecated: [v0.108.0] use LeveledMeter instead. func Meter(settings component.TelemetrySettings) metric.Meter { return settings.MeterProvider.Meter("github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer") } -func LeveledMeter(settings component.TelemetrySettings, level configtelemetry.Level) metric.Meter { - return settings.LeveledMeterProvider(level).Meter("github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer") -} - func Tracer(settings component.TelemetrySettings) trace.Tracer { return settings.TracerProvider.Tracer("github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer") } @@ -31,28 +27,35 @@ type TelemetryBuilder struct { meter metric.Meter FileconsumerOpenFiles metric.Int64UpDownCounter FileconsumerReadingFiles metric.Int64UpDownCounter - meters map[configtelemetry.Level]metric.Meter } -// telemetryBuilderOption applies changes to default builder. -type telemetryBuilderOption func(*TelemetryBuilder) +// TelemetryBuilderOption applies changes to default builder. +type TelemetryBuilderOption interface { + apply(*TelemetryBuilder) +} + +type telemetryBuilderOptionFunc func(mb *TelemetryBuilder) + +func (tbof telemetryBuilderOptionFunc) apply(mb *TelemetryBuilder) { + tbof(mb) +} // NewTelemetryBuilder provides a struct with methods to update all internal telemetry // for a component -func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { - builder := TelemetryBuilder{meters: map[configtelemetry.Level]metric.Meter{}} +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...TelemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{} for _, op := range options { - op(&builder) + op.apply(&builder) } - builder.meters[configtelemetry.LevelBasic] = LeveledMeter(settings, configtelemetry.LevelBasic) + builder.meter = Meter(settings) var err, errs error - builder.FileconsumerOpenFiles, err = builder.meters[configtelemetry.LevelBasic].Int64UpDownCounter( + builder.FileconsumerOpenFiles, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64UpDownCounter( "otelcol_fileconsumer_open_files", metric.WithDescription("Number of open files"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.FileconsumerReadingFiles, err = builder.meters[configtelemetry.LevelBasic].Int64UpDownCounter( + builder.FileconsumerReadingFiles, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64UpDownCounter( "otelcol_fileconsumer_reading_files", metric.WithDescription("Number of open files that are being read"), metric.WithUnit("1"), @@ -60,3 +63,10 @@ func NewTelemetryBuilder(settings component.TelemetrySettings, options ...teleme errs = errors.Join(errs, err) return &builder, errs } + +func getLeveledMeter(meter metric.Meter, cfgLevel, srvLevel configtelemetry.Level) metric.Meter { + if cfgLevel <= srvLevel { + return meter + } + return noop.Meter{} +} diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/factory.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/factory.go index 7287ca40da..f314e4aaca 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/factory.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/factory.go @@ -64,7 +64,6 @@ func (f *Factory) NewReader(file *os.File, fp *fingerprint.Fingerprint) (*Reader } func (f *Factory) NewReaderFromMetadata(file *os.File, m *Metadata) (r *Reader, err error) { - r = &Reader{ Metadata: m, set: f.TelemetrySettings, @@ -74,7 +73,6 @@ func (f *Factory) NewReaderFromMetadata(file *os.File, m *Metadata) (r *Reader, initialBufferSize: f.InitialBufferSize, maxLogSize: f.MaxLogSize, decoder: decode.New(f.Encoding), - lineSplitFunc: f.SplitFunc, deleteAtEOF: f.DeleteAtEOF, includeFileRecordNum: f.IncludeFileRecordNumber, compression: f.Compression, @@ -103,18 +101,14 @@ func (f *Factory) NewReaderFromMetadata(file *os.File, m *Metadata) (r *Reader, } flushFunc := m.FlushState.Func(f.SplitFunc, f.FlushTimeout) - r.lineSplitFunc = trim.WithFunc(trim.ToLength(flushFunc, f.MaxLogSize), f.TrimFunc) + r.contentSplitFunc = trim.WithFunc(trim.ToLength(flushFunc, f.MaxLogSize), f.TrimFunc) r.emitFunc = f.EmitFunc - if f.HeaderConfig == nil || m.HeaderFinalized { - r.splitFunc = r.lineSplitFunc - r.processFunc = r.emitFunc - } else { + if f.HeaderConfig != nil && !m.HeaderFinalized { + r.headerSplitFunc = f.HeaderConfig.SplitFunc r.headerReader, err = header.NewReader(f.TelemetrySettings, *f.HeaderConfig) if err != nil { return nil, err } - r.splitFunc = f.HeaderConfig.SplitFunc - r.processFunc = r.headerReader.Process } attributes, err := f.Attributes.Resolve(file) diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader.go index a0c93a63a0..3a591574fb 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader.go @@ -42,11 +42,10 @@ type Reader struct { fingerprintSize int initialBufferSize int maxLogSize int - lineSplitFunc bufio.SplitFunc - splitFunc bufio.SplitFunc + headerSplitFunc bufio.SplitFunc + contentSplitFunc bufio.SplitFunc decoder *decode.Decoder headerReader *header.Reader - processFunc emit.Callback emitFunc emit.Callback deleteAtEOF bool needsUpdateFingerprint bool @@ -70,7 +69,7 @@ func (r *Reader) ReadToEnd(ctx context.Context) { // SectionReader can only read a fixed window (from previous offset to EOF). info, err := r.file.Stat() if err != nil { - r.set.Logger.Error("Failed to stat", zap.Error(err)) + r.set.Logger.Error("failed to stat", zap.Error(err)) return } currentEOF := info.Size() @@ -80,7 +79,7 @@ func (r *Reader) ReadToEnd(ctx context.Context) { gzipReader, err := gzip.NewReader(io.NewSectionReader(r.file, r.Offset, currentEOF)) if err != nil { if !errors.Is(err, io.EOF) { - r.set.Logger.Error("Failed to create gzip reader", zap.Error(err)) + r.set.Logger.Error("failed to create gzip reader", zap.Error(err)) } return } else { @@ -96,7 +95,7 @@ func (r *Reader) ReadToEnd(ctx context.Context) { } if _, err := r.file.Seek(r.Offset, 0); err != nil { - r.set.Logger.Error("Failed to seek", zap.Error(err)) + r.set.Logger.Error("failed to seek", zap.Error(err)) return } @@ -106,9 +105,81 @@ func (r *Reader) ReadToEnd(ctx context.Context) { } }() - s := scanner.New(r, r.maxLogSize, r.initialBufferSize, r.Offset, r.splitFunc) + if r.headerReader != nil { + if r.readHeader(ctx) { + return + } + } + + r.readContents(ctx) +} + +func (r *Reader) readHeader(ctx context.Context) (doneReadingFile bool) { + s := scanner.New(r, r.maxLogSize, r.initialBufferSize, r.Offset, r.headerSplitFunc) + + // Read the tokens from the file until no more header tokens are found or the end of file is reached. + for { + select { + case <-ctx.Done(): + return true + default: + } + + ok := s.Scan() + if !ok { + if err := s.Error(); err != nil { + r.set.Logger.Error("failed during header scan", zap.Error(err)) + } else { + r.set.Logger.Debug("end of file reached", zap.Bool("delete_at_eof", r.deleteAtEOF)) + if r.deleteAtEOF { + r.delete() + } + } + // Either end of file was reached, or file cannot be scanned. + return true + } + + token, err := r.decoder.Decode(s.Bytes()) + if err != nil { + r.set.Logger.Error("failed to decode header token", zap.Error(err)) + r.Offset = s.Pos() // move past the bad token or we may be stuck + continue + } - // Iterate over the tokenized file, emitting entries as we go + err = r.headerReader.Process(ctx, token, r.FileAttributes) + if err != nil { + if errors.Is(err, header.ErrEndOfHeader) { + // End of header reached. + break + } + r.set.Logger.Error("failed to process header token", zap.Error(err)) + } + + r.Offset = s.Pos() + } + + // Clean up the header machinery + if err := r.headerReader.Stop(); err != nil { + r.set.Logger.Error("failed to stop header pipeline during finalization", zap.Error(err)) + } + r.headerReader = nil + r.HeaderFinalized = true + r.initialBufferSize = scanner.DefaultBufferSize + + // Reset position in file to r.Offest after the header scanner might have moved it past a content token. + if _, err := r.file.Seek(r.Offset, 0); err != nil { + r.set.Logger.Error("failed to seek post-header", zap.Error(err)) + return true + } + + return false +} + +func (r *Reader) readContents(ctx context.Context) { + // Create the scanner to read the contents of the file. + s := scanner.New(r, r.maxLogSize, r.initialBufferSize, r.Offset, r.contentSplitFunc) + + // Iterate over the contents of the file. for { select { case <-ctx.Done(): @@ -119,7 +190,7 @@ func (r *Reader) ReadToEnd(ctx context.Context) { ok := s.Scan() if !ok { if err := s.Error(); err != nil { - r.set.Logger.Error("Failed during scan", zap.Error(err)) + r.set.Logger.Error("failed during scan", zap.Error(err)) } else if r.deleteAtEOF { r.delete() } @@ -128,7 +199,7 @@ func (r *Reader) ReadToEnd(ctx context.Context) { token, err := r.decoder.Decode(s.Bytes()) if err != nil { - r.set.Logger.Error("decode: %w", zap.Error(err)) + r.set.Logger.Error("failed to decode token", zap.Error(err)) r.Offset = s.Pos() // move past the bad token or we may be stuck continue } @@ -138,37 +209,12 @@ func (r *Reader) ReadToEnd(ctx context.Context) { r.FileAttributes[attrs.LogFileRecordNumber] = r.RecordNum } - err = r.processFunc(ctx, token, r.FileAttributes) - if err == nil { - r.Offset = s.Pos() // successful emit, update offset - continue - } - - if !errors.Is(err, header.ErrEndOfHeader) { - r.set.Logger.Error("process: %w", zap.Error(err)) - r.Offset = s.Pos() // move past the bad token or we may be stuck - continue + err = r.emitFunc(ctx, emit.NewToken(token, r.FileAttributes)) + if err != nil { + r.set.Logger.Error("failed to process token", zap.Error(err)) } - // Clean up the header machinery - if err = r.headerReader.Stop(); err != nil { - r.set.Logger.Error("Failed to stop header pipeline during finalization", zap.Error(err)) - } - r.headerReader = nil - r.HeaderFinalized = true - - // Switch to the normal split and process functions. - r.splitFunc = r.lineSplitFunc - r.processFunc = r.emitFunc - - // Recreate the scanner with the normal split func. - // Do not use the updated offset from the old scanner, as the most recent token - // could be split differently with the new splitter. - if _, err = r.file.Seek(r.Offset, 0); err != nil { - r.set.Logger.Error("Failed to seek post-header", zap.Error(err)) - return - } - s = scanner.New(r, r.maxLogSize, scanner.DefaultBufferSize, r.Offset, r.splitFunc) + r.Offset = s.Pos() } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader_other.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader_other.go index 56f28e64c4..a0d5927cd4 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader_other.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader_other.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -//go:build !unix +//go:build !unix || aix || solaris package reader // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader_unix.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader_unix.go index 1fb7d6d982..65b80b995a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader_unix.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader/reader_unix.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -//go:build unix +//go:build unix && !aix && !solaris package reader // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" @@ -25,6 +25,10 @@ func (r *Reader) tryLockFile() bool { func (r *Reader) unlockFile() { if err := unix.Flock(int(r.file.Fd()), unix.LOCK_UN); err != nil { - r.set.Logger.Error("Failed to unlock", zap.Error(err)) + // If delete_after_read is set then the file may already have been deleted by this point, + // in which case we'll get EBADF. This is harmless and not worth logging. + if !errors.Is(err, unix.EBADF) { + r.set.Logger.Error("Failed to unlock", zap.Error(err)) + } } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker/tracker.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker/tracker.go index 5039003a36..54bf5e9e12 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker/tracker.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker/tracker.go @@ -4,12 +4,17 @@ package tracker // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/tracker" import ( + "context" + "fmt" + "go.opentelemetry.io/collector/component" "go.uber.org/zap" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/checkpoint" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fileset" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/fingerprint" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/internal/reader" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" ) // Interface for tracking files that are being consumed. @@ -37,9 +42,16 @@ type fileTracker struct { currentPollFiles *fileset.Fileset[*reader.Reader] previousPollFiles *fileset.Fileset[*reader.Reader] knownFiles []*fileset.Fileset[*reader.Metadata] + + // persister is to be used to store offsets older than 3 poll cycles. + // These offsets will be stored on disk + persister operator.Persister + + pollsToArchive int + archiveIndex int } -func NewFileTracker(set component.TelemetrySettings, maxBatchFiles int) Tracker { +func NewFileTracker(set component.TelemetrySettings, maxBatchFiles int, pollsToArchive int, persister operator.Persister) Tracker { knownFiles := make([]*fileset.Fileset[*reader.Metadata], 3) for i := 0; i < len(knownFiles); i++ { knownFiles[i] = fileset.New[*reader.Metadata](maxBatchFiles) @@ -51,6 +63,9 @@ func NewFileTracker(set component.TelemetrySettings, maxBatchFiles int) Tracker currentPollFiles: fileset.New[*reader.Reader](maxBatchFiles), previousPollFiles: fileset.New[*reader.Reader](maxBatchFiles), knownFiles: knownFiles, + pollsToArchive: pollsToArchive, + persister: persister, + archiveIndex: 0, } } @@ -113,6 +128,9 @@ func (t *fileTracker) ClosePreviousFiles() (filesClosed int) { func (t *fileTracker) EndPoll() { // shift the filesets at end of every poll() call // t.knownFiles[0] -> t.knownFiles[1] -> t.knownFiles[2] + + // Instead of throwing it away, archive it. + t.archive(t.knownFiles[2]) copy(t.knownFiles[1:], t.knownFiles) t.knownFiles[0] = fileset.New[*reader.Metadata](t.maxBatchFiles) } @@ -125,6 +143,34 @@ func (t *fileTracker) TotalReaders() int { return total } +func (t *fileTracker) archive(metadata *fileset.Fileset[*reader.Metadata]) { + // We make use of a ring buffer, where each set of files is stored under a specific index. + // Instead of discarding knownFiles[2], write it to the next index and eventually roll over. + // Separate storage keys knownFilesArchive0, knownFilesArchive1, ..., knownFilesArchiveN, roll over back to knownFilesArchive0 + + // Archiving: ┌─────────────────────on-disk archive─────────────────────────┐ + // | ┌───┐ ┌───┐ ┌──────────────────┐ | + // index | ▶ │ 0 │ ▶ │ 1 │ ▶ ... ▶ │ polls_to_archive │ | + // | ▲ └───┘ └───┘ └──────────────────┘ | + // | ▲ ▲ ▼ | + // | ▲ │ Roll over overriting older offsets, if any ◀ | + // └──────│──────────────────────────────────────────────────────┘ + // │ + // │ + // │ + // start + // index + + if t.pollsToArchive <= 0 || t.persister == nil { + return + } + key := fmt.Sprintf("knownFiles%d", t.archiveIndex) + if err := checkpoint.SaveKey(context.Background(), t.persister, metadata.Get(), key); err != nil { + t.set.Logger.Error("error faced while saving to the archive", zap.Error(err)) + } + t.archiveIndex = (t.archiveIndex + 1) % t.pollsToArchive // increment the index +} + // noStateTracker only tracks the current polled files. Once the poll is // complete and telemetry is consumed, the tracked files are closed. The next // poll will create fresh readers with no previously tracked offsets. diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher/matcher.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher/matcher.go index 948f18852a..0377bfab3a 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher/matcher.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/matcher/matcher.go @@ -44,9 +44,10 @@ type Criteria struct { } type OrderingCriteria struct { - Regex string `mapstructure:"regex,omitempty"` - TopN int `mapstructure:"top_n,omitempty"` - SortBy []Sort `mapstructure:"sort_by,omitempty"` + Regex string `mapstructure:"regex,omitempty"` + TopN int `mapstructure:"top_n,omitempty"` + SortBy []Sort `mapstructure:"sort_by,omitempty"` + GroupBy string `mapstructure:"group_by,omitempty"` } type Sort struct { @@ -80,6 +81,14 @@ func New(c Criteria) (*Matcher, error) { m.filterOpts = append(m.filterOpts, filter.ExcludeOlderThan(c.ExcludeOlderThan)) } + if c.OrderingCriteria.GroupBy != "" { + r, err := regexp.Compile(c.OrderingCriteria.GroupBy) + if err != nil { + return nil, fmt.Errorf("compile group_by regex: %w", err) + } + m.groupBy = r + } + if len(c.OrderingCriteria.SortBy) == 0 { return m, nil } @@ -92,14 +101,13 @@ func New(c Criteria) (*Matcher, error) { c.OrderingCriteria.TopN = defaultOrderingCriteriaTopN } - var regex *regexp.Regexp if orderingCriteriaNeedsRegex(c.OrderingCriteria.SortBy) { if c.OrderingCriteria.Regex == "" { return nil, fmt.Errorf("'regex' must be specified when 'sort_by' is specified") } var err error - regex, err = regexp.Compile(c.OrderingCriteria.Regex) + regex, err := regexp.Compile(c.OrderingCriteria.Regex) if err != nil { return nil, fmt.Errorf("compile regex: %w", err) } @@ -158,6 +166,7 @@ type Matcher struct { exclude []string regex *regexp.Regexp filterOpts []filter.Option + groupBy *regexp.Regexp } // MatchFiles gets a list of paths given an array of glob patterns to include and exclude @@ -174,9 +183,27 @@ func (m Matcher) MatchFiles() ([]string, error) { return files, errs } - result, err := filter.Filter(files, m.regex, m.filterOpts...) - if len(result) == 0 { - return result, errors.Join(err, errs) + groups := make(map[string][]string) + if m.groupBy != nil { + for _, f := range files { + matches := m.groupBy.FindStringSubmatch(f) + if len(matches) > 1 { + group := matches[1] + groups[group] = append(groups[group], f) + } + } + } else { + groups["1"] = files + } + + var result []string + for _, groupedFiles := range groups { + groupResult, err := filter.Filter(groupedFiles, m.regex, m.filterOpts...) + if len(groupResult) == 0 { + return groupResult, errors.Join(err, errs) + } + result = append(result, groupResult...) } + return result, errs } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/time/time.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/time/time.go index 79562212c8..34269bbf3f 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/time/time.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/time/time.go @@ -9,8 +9,10 @@ import ( "github.com/jonboulle/clockwork" ) -var Now = time.Now -var Since = time.Since +var ( + Now = time.Now + Since = time.Since +) // Clock where Now() always returns a greater value than the previous return value type AlwaysIncreasingClock struct { diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/emitter.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/emitter.go index 4abf25474f..aa91b85c92 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/emitter.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/emitter.go @@ -14,17 +14,17 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" ) -// LogEmitter is a stanza operator that emits log entries to a channel +// LogEmitter is a stanza operator that emits log entries to the consumer callback function `consumerFunc` type LogEmitter struct { OutputOperator - logChan chan []*entry.Entry + closeChan chan struct{} stopOnce sync.Once - cancel context.CancelFunc batchMux sync.Mutex batch []*entry.Entry wg sync.WaitGroup maxBatchSize uint flushInterval time.Duration + consumerFunc func(context.Context, []*entry.Entry) } var ( @@ -61,15 +61,15 @@ func (o flushIntervalOption) apply(e *LogEmitter) { } // NewLogEmitter creates a new receiver output -func NewLogEmitter(set component.TelemetrySettings, opts ...EmitterOption) *LogEmitter { +func NewLogEmitter(set component.TelemetrySettings, consumerFunc func(context.Context, []*entry.Entry), opts ...EmitterOption) *LogEmitter { op, _ := NewOutputConfig("log_emitter", "log_emitter").Build(set) e := &LogEmitter{ OutputOperator: op, - logChan: make(chan []*entry.Entry), + closeChan: make(chan struct{}), maxBatchSize: defaultMaxBatchSize, batch: make([]*entry.Entry, 0, defaultMaxBatchSize), flushInterval: defaultFlushInterval, - cancel: func() {}, + consumerFunc: consumerFunc, } for _, opt := range opts { opt.apply(e) @@ -79,40 +79,25 @@ func NewLogEmitter(set component.TelemetrySettings, opts ...EmitterOption) *LogE // Start starts the goroutine(s) required for this operator func (e *LogEmitter) Start(_ operator.Persister) error { - ctx, cancel := context.WithCancel(context.Background()) - e.cancel = cancel - e.wg.Add(1) - go e.flusher(ctx) + go e.flusher() return nil } // Stop will close the log channel and stop running goroutines func (e *LogEmitter) Stop() error { e.stopOnce.Do(func() { - e.cancel() + close(e.closeChan) e.wg.Wait() - - close(e.logChan) }) return nil } -// OutChannel returns the channel on which entries will be sent to. -func (e *LogEmitter) OutChannel() <-chan []*entry.Entry { - return e.logChan -} - -// OutChannelForWrite returns the channel on which entries can be sent to. -func (e *LogEmitter) OutChannelForWrite() chan []*entry.Entry { - return e.logChan -} - // Process will emit an entry to the output channel func (e *LogEmitter) Process(ctx context.Context, ent *entry.Entry) error { if oldBatch := e.appendEntry(ent); len(oldBatch) > 0 { - e.flush(ctx, oldBatch) + e.consumerFunc(ctx, oldBatch) } return nil @@ -135,7 +120,7 @@ func (e *LogEmitter) appendEntry(ent *entry.Entry) []*entry.Entry { } // flusher flushes the current batch every flush interval. Intended to be run as a goroutine -func (e *LogEmitter) flusher(ctx context.Context) { +func (e *LogEmitter) flusher() { defer e.wg.Done() ticker := time.NewTicker(e.flushInterval) @@ -145,26 +130,18 @@ func (e *LogEmitter) flusher(ctx context.Context) { select { case <-ticker.C: if oldBatch := e.makeNewBatch(); len(oldBatch) > 0 { - e.flush(context.Background(), oldBatch) + e.consumerFunc(context.Background(), oldBatch) } - case <-ctx.Done(): + case <-e.closeChan: // flush currently batched entries - for oldBatch := e.makeNewBatch(); len(oldBatch) > 0; oldBatch = e.makeNewBatch() { - e.flush(context.Background(), oldBatch) + if oldBatch := e.makeNewBatch(); len(oldBatch) > 0 { + e.consumerFunc(context.Background(), oldBatch) } return } } } -// flush flushes the provided batch to the log channel. -func (e *LogEmitter) flush(ctx context.Context, batch []*entry.Entry) { - select { - case e.logChan <- batch: - case <-ctx.Done(): - } -} - // makeNewBatch replaces the current batch on the log emitter with a new batch, returning the old one func (e *LogEmitter) makeNewBatch() []*entry.Entry { e.batchMux.Lock() diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/parser.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/parser.go index 56b2eaccd1..f46c55f970 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/parser.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/parser.go @@ -109,12 +109,16 @@ func (p *ParserOperator) ProcessWithCallback(ctx context.Context, entry *entry.E } if err = p.ParseWith(ctx, entry, parse); err != nil { + if p.OnError == DropOnErrorQuiet || p.OnError == SendOnErrorQuiet { + return nil + } + return err } if cb != nil { err = cb(entry) if err != nil { - return err + return p.HandleEntryError(ctx, entry, err) } } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/transformer.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/transformer.go index e1b9faf69c..a8b5a8709b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/transformer.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/transformer.go @@ -106,10 +106,6 @@ func (t *TransformerOperator) HandleEntryError(ctx context.Context, entry *entry } } - if t.OnError == SendOnErrorQuiet || t.OnError == DropOnErrorQuiet { - return nil - } - return err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file/input.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file/input.go index fd845499ae..39f721ad57 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file/input.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file/input.go @@ -11,6 +11,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/fileconsumer/emit" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" ) @@ -36,17 +37,17 @@ func (i *Input) Stop() error { return i.fileConsumer.Stop() } -func (i *Input) emit(ctx context.Context, token []byte, attrs map[string]any) error { - if len(token) == 0 { +func (i *Input) emit(ctx context.Context, token emit.Token) error { + if len(token.Body) == 0 { return nil } - ent, err := i.NewEntry(i.toBody(token)) + ent, err := i.NewEntry(i.toBody(token.Body)) if err != nil { return fmt.Errorf("create entry: %w", err) } - for k, v := range attrs { + for k, v := range token.Attributes { if err := ent.Set(entry.NewAttributeField(k), v); err != nil { i.Logger().Error("set attribute", zap.Error(err)) } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file/config.go index 510b95c49a..f27ac156fb 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file/config.go @@ -5,7 +5,7 @@ package file // import "github.com/open-telemetry/opentelemetry-collector-contri import ( "fmt" - "html/template" + "text/template" "go.opentelemetry.io/collector/component" diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file/output.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file/output.go index 6f98c3a091..157a0d3414 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file/output.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/output/file/output.go @@ -6,9 +6,9 @@ package file // import "github.com/open-telemetry/opentelemetry-collector-contri import ( "context" "encoding/json" - "html/template" "os" "sync" + "text/template" "go.uber.org/zap" @@ -31,7 +31,7 @@ type Output struct { // Start will open the output file. func (o *Output) Start(_ operator.Persister) error { var err error - o.file, err = os.OpenFile(o.path, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0600) + o.file, err = os.OpenFile(o.path, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0o600) if err != nil { return err } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/container/config.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/container/config.go index 63fabfe8e8..81e6f2339b 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/container/config.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/container/config.go @@ -27,7 +27,7 @@ const ( var removeOriginalTimeField = featuregate.GlobalRegistry().MustRegister( removeOriginalTimeFieldFeatureFlag, - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("When enabled, deletes the original `time` field from the Log Attributes. Time is parsed to Timestamp field, which should be used instead."), featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33389"), ) @@ -67,14 +67,6 @@ func (c Config) Build(set component.TelemetrySettings) (operator.Operator, error return nil, err } - cLogEmitter := helper.NewLogEmitter(set) - recombineParser, err := createRecombine(set, c, cLogEmitter) - if err != nil { - return nil, fmt.Errorf("failed to create internal recombine config: %w", err) - } - - wg := sync.WaitGroup{} - if c.Format != "" { switch c.Format { case dockerFormat, crioFormat, containerdFormat: @@ -95,14 +87,24 @@ func (c Config) Build(set component.TelemetrySettings) (operator.Operator, error ) } + wg := sync.WaitGroup{} + p := &Parser{ ParserOperator: parserOperator, - recombineParser: recombineParser, format: c.Format, addMetadataFromFilepath: c.AddMetadataFromFilePath, - criLogEmitter: cLogEmitter, criConsumers: &wg, } + + cLogEmitter := helper.NewLogEmitter(set, p.consumeEntries) + p.criLogEmitter = cLogEmitter + recombineParser, err := createRecombine(set, c, cLogEmitter) + if err != nil { + return nil, fmt.Errorf("failed to create internal recombine config: %w", err) + } + + p.recombineParser = recombineParser + return p, nil } diff --git a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/container/parser.go b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/container/parser.go index ebeb186440..4e111360d3 100644 --- a/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/container/parser.go +++ b/vendor/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/parser/container/parser.go @@ -21,17 +21,19 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" ) -const dockerFormat = "docker" -const crioFormat = "crio" -const containerdFormat = "containerd" -const recombineInternalID = "recombine_container_internal" -const dockerPattern = "^\\{" -const crioPattern = "^(?P