├── .github └── workflows │ ├── codeql-analysis.yml │ └── run-test-pyramid.yml ├── .gitignore ├── LICENCE ├── Makefile ├── NOTICE ├── README.md ├── backup ├── artifact_identifier.go ├── artifact_suite_test.go ├── backup_directory.go ├── backup_directory_manager.go ├── backup_directory_manager_test.go ├── backup_directory_test.go └── metadata.go ├── bosh ├── bosh_suite_test.go ├── build_client.go ├── build_client_test.go ├── client.go ├── client_test.go ├── deployed_instance.go ├── deployed_instance_test.go ├── deployment_manager.go ├── deployment_manager_test.go ├── fakes │ ├── fake_bosh_client.go │ └── fake_logger.go ├── manifest_querier.go └── manifest_querier_test.go ├── ci ├── configure.sh ├── images │ ├── backup-and-restore-minimal │ │ ├── Dockerfile │ │ └── README │ └── backup-and-restore │ │ ├── Dockerfile │ │ └── README ├── pipeline-values.yml ├── pipeline.yml └── tasks │ ├── allow-connections-to-bosh-director-on-port-25555 │ ├── task.sh │ └── task.yml │ ├── bbr-build │ ├── task.sh │ └── task.yml │ ├── bbr-s3-config-validator-build │ ├── task.sh │ └── task.yml │ ├── bbr-s3-config-validator-e2e-test │ ├── task.sh │ └── task.yml │ ├── bbr-s3-config-validator-enable-aws-s3-filestore │ ├── task.sh │ └── task.yml │ ├── bbr-s3-config-validator-enable-backup-prepare-pas │ ├── task.sh │ └── task.yml │ ├── bbr-s3-config-validator-unit-test │ ├── task.sh │ └── task.yml │ ├── bbr-s3-config-validator-validate-aws-s3-config │ ├── task.sh │ └── task.yml │ ├── bbr-system-deployment │ ├── task.sh │ └── task.yml │ ├── bbr-system-director │ ├── task.sh │ └── task.yml │ ├── bbr-update-homebrew-formula │ ├── task.sh │ └── task.yml │ ├── bbr-upload-system-test-releases │ ├── task.sh │ └── task.yml │ ├── bosh-deployment-resource-source-file-adapter │ ├── task.sh │ └── task.yml │ ├── build-binaries │ ├── task.sh │ └── task.yml │ ├── check-for-changes │ ├── task.sh │ └── task.yml │ ├── check-terraform-version │ ├── task.sh │ └── task.yml │ ├── generate-docs │ ├── task.sh │ └── task.yml │ ├── package-release │ ├── task.sh │ └── task.yml │ ├── prepare-artefacts-for-github │ ├── task.sh │ └── task.yml │ ├── prepare-artefacts-for-pivnet │ ├── release.yml.erb │ ├── task.sh │ └── task.yml │ ├── setup-drats-integration-config │ ├── task.sh │ └── task.yml │ ├── test-unit-s3-config-validator │ ├── task.sh │ └── task.yml │ └── test-unit │ ├── task.sh │ └── task.yml ├── cli ├── command │ ├── all_deployments.go │ ├── command_suite_test.go │ ├── command_test.go │ ├── deployment_backup.go │ ├── deployment_backup_cleanup.go │ ├── deployment_pre_backup_check.go │ ├── deployment_restore.go │ ├── deployment_restore_cleanup.go │ ├── director_backup.go │ ├── director_backup_cleanup.go │ ├── director_pre_backup_check.go │ ├── director_restore.go │ ├── director_restore_cleanup.go │ ├── messages.go │ └── utils.go └── flags │ └── validate.go ├── cmd └── bbr │ ├── main.go │ └── messages.go ├── executor ├── deployment │ ├── error.go │ ├── executor.go │ ├── parallel.go │ └── serial.go ├── executor.go ├── executor_suite_test.go ├── executor_test.go ├── fakes │ ├── fake_executable.go │ └── fake_executor.go ├── parallel.go └── serial.go ├── factory ├── bosh_deployment_manager.go ├── deployment_backup_cleanuper.go ├── deployment_backuper.go ├── deployment_pre_backup_checker.go ├── deployment_restore_cleanuper.go ├── deployment_restorer.go ├── director_backup_checker.go ├── director_backup_cleaner.go ├── director_backuper.go ├── director_restore_cleaner.go ├── director_restorer.go └── logger.go ├── fixtures ├── another-redis.yml ├── backup.tar ├── create_user_with_key ├── director-backup-integration │ ├── backup │ ├── bosh-0-bosh.tar │ └── metadata ├── director-backup │ ├── bosh-0-amazing-backup-and-restore.tar │ ├── bosh-0-remarkable-backup-and-restore.tar │ ├── bosh-0-test-backup-and-restore.tar │ └── metadata ├── fake-director.yml ├── jumpbox-windows-ci.yml ├── jumpbox.yml ├── many-bbr-jobs.yml ├── many-bbr-scripts.yml ├── redis-backup-with-disabled-job │ ├── metadata │ └── redis-0-redis-server.tar ├── redis-backup │ ├── manifest.yml │ ├── metadata │ ├── other-redis-0-redis-server.tar │ ├── redis-0-redis-server.tar │ └── redis-1-redis-server.tar ├── redis-maru-lite.yml ├── redis-windows-ci.yml ├── redis-with-backup-one-restore-all.yml ├── redis-with-disabled-bbr-job.yml ├── redis-with-locking-order.yml ├── redis-with-slow-backup.tar ├── redis-with-slow-backup.yml ├── redis.yml ├── redis │ └── redis-backup ├── redis_test_commands ├── test_rsa └── test_rsa.pub ├── go.mod ├── go.sum ├── instance ├── artifact.go ├── artifact_test.go ├── deployed_instance.go ├── deployed_instance_test.go ├── export_test.go ├── fakes │ ├── fake_job_finder.go │ ├── fake_logger.go │ ├── fake_manifest_querier.go │ └── fake_manifest_querier_creator.go ├── instance_suite_test.go ├── job.go ├── job_finder.go ├── job_finder_test.go ├── job_test.go ├── manifest_querier.go ├── metadata.go ├── metadata_test.go ├── script.go ├── script_test.go ├── scripts.go └── scripts_test.go ├── integration ├── cli_test.go ├── deployment │ ├── backup_cleanup_test.go │ ├── backup_test.go │ ├── cli_test.go │ ├── deployment_suite_test.go │ ├── pre_backup_check_test.go │ ├── restore_cleanup_test.go │ ├── restore_test.go │ └── web_mock_helpers.go ├── director │ ├── backup_cleanup_test.go │ ├── backup_test.go │ ├── cli_test.go │ ├── director_suite_test.go │ ├── pre_backup_check_test.go │ ├── restore_cleanup_test.go │ └── restore_test.go ├── integration_suite_test.go └── util.go ├── internal └── cf-webmock │ ├── README.md │ ├── mockbosh │ ├── delete_deployment.go │ ├── deploy.go │ ├── errand.go │ ├── get_deployments.go │ ├── info.go │ ├── manifest.go │ ├── mockbosh.go │ ├── ssh.go │ ├── task.go │ ├── task_output.go │ ├── tasks.go │ └── vms.go │ ├── mockhttp │ ├── http_mock.go │ └── server.go │ └── mockuaa │ └── mockuaa.go ├── orchestrator ├── add_finish_time_step.go ├── artifact.go ├── artifact_copier.go ├── artifact_copier_test.go ├── backup_checker.go ├── backup_checker_test.go ├── backup_cleaner.go ├── backup_cleaner_test.go ├── backup_download_executable.go ├── backup_download_executable_test.go ├── backup_executable.go ├── backup_executable_test.go ├── backup_step.go ├── backup_upload_executable.go ├── backup_upload_executable_test.go ├── backupable_step.go ├── backuper.go ├── backuper_test.go ├── checksum.go ├── checksum_test.go ├── cleanup_previous_step.go ├── cleanup_step.go ├── copy_to_remote_step.go ├── create_artifact_step.go ├── deployment.go ├── deployment_manager.go ├── deployment_test.go ├── drain_step.go ├── error.go ├── error_test.go ├── fakes │ ├── fake_artifact_copier.go │ ├── fake_backup.go │ ├── fake_backup_artifact.go │ ├── fake_backup_manager.go │ ├── fake_deployment.go │ ├── fake_deployment_manager.go │ ├── fake_instance.go │ ├── fake_job.go │ ├── fake_lock_orderer.go │ ├── fake_logger.go │ └── fake_write_closer.go ├── find_deployment_step.go ├── instance.go ├── job_executables.go ├── job_executables_test.go ├── jobs.go ├── jobs_test.go ├── lock_step.go ├── logger.go ├── orchestrator_suite_test.go ├── post_backup_unlock_step.go ├── post_restore_unlock_step.go ├── pre_restore_lock_step.go ├── restorable_step.go ├── restore_cleaner.go ├── restore_cleaner_test.go ├── restore_step.go ├── restorer.go ├── restorer_test.go ├── reverse.go ├── reverse_test.go ├── session.go ├── skip_step.go ├── skip_step_test.go ├── validate_artifact_step.go └── workflow.go ├── orderer ├── backup_lock_constraint_specifier.go ├── backup_lock_constraint_specifier_test.go ├── kahn_lock_orderer.go ├── kahn_lock_orderer_test.go ├── orderer_suite_test.go ├── restore_lock_constraint_specifier.go └── restore_lock_constraint_specifier_test.go ├── readwriter ├── fakes │ ├── fake_logger.go │ └── fake_readwriter.go ├── log_percentage.go ├── log_percentage_test.go ├── pausable_writer.go ├── pausable_writer_test.go └── writer_suite_test.go ├── s3-config-validator ├── .gitignore ├── Makefile ├── README.md ├── build_all.sh └── src │ ├── cmd │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── internal │ ├── config │ │ ├── config.go │ │ ├── config_suite_test.go │ │ └── config_test.go │ ├── configPrinter │ │ ├── configPrinter.go │ │ ├── configPrinter_suite_test.go │ │ └── configPrinter_test.go │ ├── flags │ │ └── flags.go │ ├── probe │ │ ├── probe.go │ │ ├── probe_suite_test.go │ │ └── probe_test.go │ ├── runner │ │ ├── export_test.go │ │ ├── runner.go │ │ ├── runner_suite_test.go │ │ └── runner_test.go │ └── s3 │ │ ├── client.go │ │ ├── s3_suite_test.go │ │ ├── s3client.go │ │ ├── s3client_test.go │ │ └── s3fakes │ │ └── fake_client.go │ ├── test │ └── binary │ │ ├── binary_suite_test.go │ │ └── binary_test.go │ ├── tools │ └── tools.go │ └── vendor │ ├── github.com │ ├── aws │ │ ├── aws-sdk-go-v2 │ │ │ ├── LICENSE.txt │ │ │ ├── NOTICE.txt │ │ │ ├── aws │ │ │ │ ├── accountid_endpoint_mode.go │ │ │ │ ├── arn │ │ │ │ │ └── arn.go │ │ │ │ ├── checksum.go │ │ │ │ ├── config.go │ │ │ │ ├── context.go │ │ │ │ ├── credential_cache.go │ │ │ │ ├── credentials.go │ │ │ │ ├── defaults │ │ │ │ │ ├── auto.go │ │ │ │ │ ├── configuration.go │ │ │ │ │ ├── defaults.go │ │ │ │ │ └── doc.go │ │ │ │ ├── defaultsmode.go │ │ │ │ ├── doc.go │ │ │ │ ├── endpoints.go │ │ │ │ ├── errors.go │ │ │ │ ├── from_ptr.go │ │ │ │ ├── go_module_metadata.go │ │ │ │ ├── logging.go │ │ │ │ ├── logging_generate.go │ │ │ │ ├── middleware │ │ │ │ │ ├── metadata.go │ │ │ │ │ ├── middleware.go │ │ │ │ │ ├── osname.go │ │ │ │ │ ├── osname_go115.go │ │ │ │ │ ├── recursion_detection.go │ │ │ │ │ ├── request_id.go │ │ │ │ │ ├── request_id_retriever.go │ │ │ │ │ └── user_agent.go │ │ │ │ ├── protocol │ │ │ │ │ ├── eventstream │ │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ │ ├── debug.go │ │ │ │ │ │ ├── decode.go │ │ │ │ │ │ ├── encode.go │ │ │ │ │ │ ├── error.go │ │ │ │ │ │ ├── eventstreamapi │ │ │ │ │ │ │ ├── headers.go │ │ │ │ │ │ │ ├── middleware.go │ │ │ │ │ │ │ ├── transport.go │ │ │ │ │ │ │ └── transport_go117.go │ │ │ │ │ │ ├── go_module_metadata.go │ │ │ │ │ │ ├── header.go │ │ │ │ │ │ ├── header_value.go │ │ │ │ │ │ └── message.go │ │ │ │ │ ├── query │ │ │ │ │ │ ├── array.go │ │ │ │ │ │ ├── encoder.go │ │ │ │ │ │ ├── map.go │ │ │ │ │ │ ├── middleware.go │ │ │ │ │ │ ├── object.go │ │ │ │ │ │ └── value.go │ │ │ │ │ └── xml │ │ │ │ │ │ └── error_utils.go │ │ │ │ ├── ratelimit │ │ │ │ │ ├── none.go │ │ │ │ │ ├── token_bucket.go │ │ │ │ │ └── token_rate_limit.go │ │ │ │ ├── request.go │ │ │ │ ├── retry │ │ │ │ │ ├── adaptive.go │ │ │ │ │ ├── adaptive_ratelimit.go │ │ │ │ │ ├── adaptive_token_bucket.go │ │ │ │ │ ├── attempt_metrics.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── jitter_backoff.go │ │ │ │ │ ├── metadata.go │ │ │ │ │ ├── middleware.go │ │ │ │ │ ├── retry.go │ │ │ │ │ ├── retryable_error.go │ │ │ │ │ ├── standard.go │ │ │ │ │ ├── throttle_error.go │ │ │ │ │ └── timeout_error.go │ │ │ │ ├── retryer.go │ │ │ │ ├── runtime.go │ │ │ │ ├── signer │ │ │ │ │ ├── internal │ │ │ │ │ │ └── v4 │ │ │ │ │ │ │ ├── cache.go │ │ │ │ │ │ │ ├── const.go │ │ │ │ │ │ │ ├── header_rules.go │ │ │ │ │ │ │ ├── headers.go │ │ │ │ │ │ │ ├── hmac.go │ │ │ │ │ │ │ ├── host.go │ │ │ │ │ │ │ ├── scope.go │ │ │ │ │ │ │ ├── time.go │ │ │ │ │ │ │ └── util.go │ │ │ │ │ └── v4 │ │ │ │ │ │ ├── middleware.go │ │ │ │ │ │ ├── presign_middleware.go │ │ │ │ │ │ ├── stream.go │ │ │ │ │ │ └── v4.go │ │ │ │ ├── to_ptr.go │ │ │ │ ├── transport │ │ │ │ │ └── http │ │ │ │ │ │ ├── client.go │ │ │ │ │ │ ├── content_type.go │ │ │ │ │ │ ├── response_error.go │ │ │ │ │ │ ├── response_error_middleware.go │ │ │ │ │ │ └── timeout_read_closer.go │ │ │ │ ├── types.go │ │ │ │ └── version.go │ │ │ ├── credentials │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── doc.go │ │ │ │ ├── ec2rolecreds │ │ │ │ │ ├── doc.go │ │ │ │ │ └── provider.go │ │ │ │ ├── go_module_metadata.go │ │ │ │ ├── static_provider.go │ │ │ │ └── stscreds │ │ │ │ │ ├── assume_role_provider.go │ │ │ │ │ └── web_identity_provider.go │ │ │ ├── feature │ │ │ │ └── ec2 │ │ │ │ │ └── imds │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── api_client.go │ │ │ │ │ ├── api_op_GetDynamicData.go │ │ │ │ │ ├── api_op_GetIAMInfo.go │ │ │ │ │ ├── api_op_GetInstanceIdentityDocument.go │ │ │ │ │ ├── api_op_GetMetadata.go │ │ │ │ │ ├── api_op_GetRegion.go │ │ │ │ │ ├── api_op_GetToken.go │ │ │ │ │ ├── api_op_GetUserData.go │ │ │ │ │ ├── auth.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── endpoints.go │ │ │ │ │ ├── go_module_metadata.go │ │ │ │ │ ├── internal │ │ │ │ │ └── config │ │ │ │ │ │ └── resolvers.go │ │ │ │ │ ├── request_middleware.go │ │ │ │ │ └── token_provider.go │ │ │ ├── internal │ │ │ │ ├── auth │ │ │ │ │ ├── auth.go │ │ │ │ │ ├── scheme.go │ │ │ │ │ └── smithy │ │ │ │ │ │ ├── bearer_token_adapter.go │ │ │ │ │ │ ├── bearer_token_signer_adapter.go │ │ │ │ │ │ ├── credentials_adapter.go │ │ │ │ │ │ ├── smithy.go │ │ │ │ │ │ └── v4signer_adapter.go │ │ │ │ ├── configsources │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── config.go │ │ │ │ │ ├── endpoints.go │ │ │ │ │ └── go_module_metadata.go │ │ │ │ ├── context │ │ │ │ │ └── context.go │ │ │ │ ├── endpoints │ │ │ │ │ ├── awsrulesfn │ │ │ │ │ │ ├── arn.go │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── generate.go │ │ │ │ │ │ ├── host.go │ │ │ │ │ │ ├── partition.go │ │ │ │ │ │ ├── partitions.go │ │ │ │ │ │ └── partitions.json │ │ │ │ │ ├── endpoints.go │ │ │ │ │ └── v2 │ │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ │ ├── endpoints.go │ │ │ │ │ │ └── go_module_metadata.go │ │ │ │ ├── middleware │ │ │ │ │ └── middleware.go │ │ │ │ ├── rand │ │ │ │ │ └── rand.go │ │ │ │ ├── sdk │ │ │ │ │ ├── interfaces.go │ │ │ │ │ └── time.go │ │ │ │ ├── strings │ │ │ │ │ └── strings.go │ │ │ │ ├── sync │ │ │ │ │ └── singleflight │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── docs.go │ │ │ │ │ │ └── singleflight.go │ │ │ │ ├── timeconv │ │ │ │ │ └── duration.go │ │ │ │ └── v4a │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── credentials.go │ │ │ │ │ ├── error.go │ │ │ │ │ ├── go_module_metadata.go │ │ │ │ │ ├── internal │ │ │ │ │ ├── crypto │ │ │ │ │ │ ├── compare.go │ │ │ │ │ │ └── ecc.go │ │ │ │ │ └── v4 │ │ │ │ │ │ ├── const.go │ │ │ │ │ │ ├── header_rules.go │ │ │ │ │ │ ├── headers.go │ │ │ │ │ │ ├── hmac.go │ │ │ │ │ │ ├── host.go │ │ │ │ │ │ ├── time.go │ │ │ │ │ │ └── util.go │ │ │ │ │ ├── middleware.go │ │ │ │ │ ├── presign_middleware.go │ │ │ │ │ ├── smithy.go │ │ │ │ │ └── v4a.go │ │ │ └── service │ │ │ │ ├── internal │ │ │ │ ├── accept-encoding │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── accept_encoding_gzip.go │ │ │ │ │ ├── doc.go │ │ │ │ │ └── go_module_metadata.go │ │ │ │ ├── checksum │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── algorithms.go │ │ │ │ │ ├── aws_chunked_encoding.go │ │ │ │ │ ├── go_module_metadata.go │ │ │ │ │ ├── middleware_add.go │ │ │ │ │ ├── middleware_checksum_metrics_tracking.go │ │ │ │ │ ├── middleware_compute_input_checksum.go │ │ │ │ │ ├── middleware_setup_context.go │ │ │ │ │ └── middleware_validate_output.go │ │ │ │ ├── presigned-url │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── context.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── go_module_metadata.go │ │ │ │ │ └── middleware.go │ │ │ │ └── s3shared │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── arn │ │ │ │ │ ├── accesspoint_arn.go │ │ │ │ │ ├── arn.go │ │ │ │ │ ├── arn_member.go │ │ │ │ │ ├── outpost_arn.go │ │ │ │ │ └── s3_object_lambda_arn.go │ │ │ │ │ ├── arn_lookup.go │ │ │ │ │ ├── config │ │ │ │ │ └── config.go │ │ │ │ │ ├── endpoint_error.go │ │ │ │ │ ├── go_module_metadata.go │ │ │ │ │ ├── host_id.go │ │ │ │ │ ├── metadata.go │ │ │ │ │ ├── metadata_retriever.go │ │ │ │ │ ├── resource_request.go │ │ │ │ │ ├── response_error.go │ │ │ │ │ ├── response_error_middleware.go │ │ │ │ │ ├── s3100continue.go │ │ │ │ │ ├── update_endpoint.go │ │ │ │ │ └── xml_utils.go │ │ │ │ ├── s3 │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── api_client.go │ │ │ │ ├── api_op_AbortMultipartUpload.go │ │ │ │ ├── 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 │ │ │ │ ├── api_op_DeleteBucketAnalyticsConfiguration.go │ │ │ │ ├── api_op_DeleteBucketCors.go │ │ │ │ ├── api_op_DeleteBucketEncryption.go │ │ │ │ ├── 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 │ │ │ │ ├── api_op_DeleteBucketReplication.go │ │ │ │ ├── api_op_DeleteBucketTagging.go │ │ │ │ ├── api_op_DeleteBucketWebsite.go │ │ │ │ ├── api_op_DeleteObject.go │ │ │ │ ├── api_op_DeleteObjectTagging.go │ │ │ │ ├── api_op_DeleteObjects.go │ │ │ │ ├── api_op_DeletePublicAccessBlock.go │ │ │ │ ├── api_op_GetBucketAccelerateConfiguration.go │ │ │ │ ├── api_op_GetBucketAcl.go │ │ │ │ ├── api_op_GetBucketAnalyticsConfiguration.go │ │ │ │ ├── api_op_GetBucketCors.go │ │ │ │ ├── api_op_GetBucketEncryption.go │ │ │ │ ├── api_op_GetBucketIntelligentTieringConfiguration.go │ │ │ │ ├── api_op_GetBucketInventoryConfiguration.go │ │ │ │ ├── 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 │ │ │ │ ├── api_op_GetBucketPolicy.go │ │ │ │ ├── api_op_GetBucketPolicyStatus.go │ │ │ │ ├── api_op_GetBucketReplication.go │ │ │ │ ├── api_op_GetBucketRequestPayment.go │ │ │ │ ├── api_op_GetBucketTagging.go │ │ │ │ ├── api_op_GetBucketVersioning.go │ │ │ │ ├── api_op_GetBucketWebsite.go │ │ │ │ ├── api_op_GetObject.go │ │ │ │ ├── api_op_GetObjectAcl.go │ │ │ │ ├── api_op_GetObjectAttributes.go │ │ │ │ ├── api_op_GetObjectLegalHold.go │ │ │ │ ├── api_op_GetObjectLockConfiguration.go │ │ │ │ ├── api_op_GetObjectRetention.go │ │ │ │ ├── api_op_GetObjectTagging.go │ │ │ │ ├── api_op_GetObjectTorrent.go │ │ │ │ ├── api_op_GetPublicAccessBlock.go │ │ │ │ ├── api_op_HeadBucket.go │ │ │ │ ├── api_op_HeadObject.go │ │ │ │ ├── api_op_ListBucketAnalyticsConfigurations.go │ │ │ │ ├── api_op_ListBucketIntelligentTieringConfigurations.go │ │ │ │ ├── api_op_ListBucketInventoryConfigurations.go │ │ │ │ ├── api_op_ListBucketMetricsConfigurations.go │ │ │ │ ├── api_op_ListBuckets.go │ │ │ │ ├── api_op_ListDirectoryBuckets.go │ │ │ │ ├── api_op_ListMultipartUploads.go │ │ │ │ ├── api_op_ListObjectVersions.go │ │ │ │ ├── api_op_ListObjects.go │ │ │ │ ├── api_op_ListObjectsV2.go │ │ │ │ ├── api_op_ListParts.go │ │ │ │ ├── api_op_PutBucketAccelerateConfiguration.go │ │ │ │ ├── api_op_PutBucketAcl.go │ │ │ │ ├── api_op_PutBucketAnalyticsConfiguration.go │ │ │ │ ├── api_op_PutBucketCors.go │ │ │ │ ├── api_op_PutBucketEncryption.go │ │ │ │ ├── api_op_PutBucketIntelligentTieringConfiguration.go │ │ │ │ ├── api_op_PutBucketInventoryConfiguration.go │ │ │ │ ├── api_op_PutBucketLifecycleConfiguration.go │ │ │ │ ├── api_op_PutBucketLogging.go │ │ │ │ ├── api_op_PutBucketMetricsConfiguration.go │ │ │ │ ├── api_op_PutBucketNotificationConfiguration.go │ │ │ │ ├── api_op_PutBucketOwnershipControls.go │ │ │ │ ├── api_op_PutBucketPolicy.go │ │ │ │ ├── api_op_PutBucketReplication.go │ │ │ │ ├── api_op_PutBucketRequestPayment.go │ │ │ │ ├── api_op_PutBucketTagging.go │ │ │ │ ├── api_op_PutBucketVersioning.go │ │ │ │ ├── api_op_PutBucketWebsite.go │ │ │ │ ├── api_op_PutObject.go │ │ │ │ ├── api_op_PutObjectAcl.go │ │ │ │ ├── api_op_PutObjectLegalHold.go │ │ │ │ ├── api_op_PutObjectLockConfiguration.go │ │ │ │ ├── api_op_PutObjectRetention.go │ │ │ │ ├── api_op_PutObjectTagging.go │ │ │ │ ├── api_op_PutPublicAccessBlock.go │ │ │ │ ├── api_op_RestoreObject.go │ │ │ │ ├── api_op_SelectObjectContent.go │ │ │ │ ├── api_op_UploadPart.go │ │ │ │ ├── api_op_UploadPartCopy.go │ │ │ │ ├── api_op_WriteGetObjectResponse.go │ │ │ │ ├── auth.go │ │ │ │ ├── bucket_context.go │ │ │ │ ├── bucketer.go │ │ │ │ ├── create_mpu_checksum.go │ │ │ │ ├── deserializers.go │ │ │ │ ├── doc.go │ │ │ │ ├── endpoint_auth_resolver.go │ │ │ │ ├── endpoints.go │ │ │ │ ├── eventstream.go │ │ │ │ ├── express.go │ │ │ │ ├── express_default.go │ │ │ │ ├── express_resolve.go │ │ │ │ ├── express_user_agent.go │ │ │ │ ├── generated.json │ │ │ │ ├── go_module_metadata.go │ │ │ │ ├── handwritten_paginators.go │ │ │ │ ├── internal │ │ │ │ │ ├── arn │ │ │ │ │ │ └── arn_parser.go │ │ │ │ │ ├── customizations │ │ │ │ │ │ ├── context.go │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── express.go │ │ │ │ │ │ ├── express_config.go │ │ │ │ │ │ ├── express_default_checksum.go │ │ │ │ │ │ ├── express_properties.go │ │ │ │ │ │ ├── express_signer.go │ │ │ │ │ │ ├── express_signer_smithy.go │ │ │ │ │ │ ├── handle_200_error.go │ │ │ │ │ │ ├── host.go │ │ │ │ │ │ ├── presigned_expires.go │ │ │ │ │ │ ├── process_arn_resource.go │ │ │ │ │ │ ├── remove_bucket_middleware.go │ │ │ │ │ │ ├── s3_object_lambda.go │ │ │ │ │ │ ├── signer_wrapper.go │ │ │ │ │ │ └── update_endpoint.go │ │ │ │ │ └── endpoints │ │ │ │ │ │ └── endpoints.go │ │ │ │ ├── options.go │ │ │ │ ├── presign_post.go │ │ │ │ ├── serialize_immutable_hostname_bucket.go │ │ │ │ ├── serializers.go │ │ │ │ ├── types │ │ │ │ │ ├── enums.go │ │ │ │ │ ├── errors.go │ │ │ │ │ └── types.go │ │ │ │ ├── uri_context.go │ │ │ │ └── validators.go │ │ │ │ └── sts │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── api_client.go │ │ │ │ ├── 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 │ │ │ │ ├── api_op_GetFederationToken.go │ │ │ │ ├── api_op_GetSessionToken.go │ │ │ │ ├── auth.go │ │ │ │ ├── deserializers.go │ │ │ │ ├── doc.go │ │ │ │ ├── endpoints.go │ │ │ │ ├── generated.json │ │ │ │ ├── go_module_metadata.go │ │ │ │ ├── internal │ │ │ │ └── endpoints │ │ │ │ │ └── endpoints.go │ │ │ │ ├── options.go │ │ │ │ ├── serializers.go │ │ │ │ ├── types │ │ │ │ ├── errors.go │ │ │ │ └── types.go │ │ │ │ └── validators.go │ │ └── smithy-go │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── NOTICE │ │ │ ├── README.md │ │ │ ├── auth │ │ │ ├── auth.go │ │ │ ├── bearer │ │ │ │ ├── docs.go │ │ │ │ ├── middleware.go │ │ │ │ ├── token.go │ │ │ │ └── token_cache.go │ │ │ ├── identity.go │ │ │ ├── option.go │ │ │ └── scheme_id.go │ │ │ ├── changelog-template.json │ │ │ ├── container │ │ │ └── private │ │ │ │ └── cache │ │ │ │ ├── cache.go │ │ │ │ └── lru │ │ │ │ └── lru.go │ │ │ ├── context │ │ │ └── suppress_expired.go │ │ │ ├── doc.go │ │ │ ├── document.go │ │ │ ├── document │ │ │ ├── doc.go │ │ │ ├── document.go │ │ │ └── errors.go │ │ │ ├── encoding │ │ │ ├── doc.go │ │ │ ├── encoding.go │ │ │ ├── httpbinding │ │ │ │ ├── encode.go │ │ │ │ ├── header.go │ │ │ │ ├── path_replace.go │ │ │ │ ├── query.go │ │ │ │ └── uri.go │ │ │ └── xml │ │ │ │ ├── array.go │ │ │ │ ├── constants.go │ │ │ │ ├── doc.go │ │ │ │ ├── element.go │ │ │ │ ├── encoder.go │ │ │ │ ├── error_utils.go │ │ │ │ ├── escape.go │ │ │ │ ├── map.go │ │ │ │ ├── value.go │ │ │ │ └── xml_decoder.go │ │ │ ├── endpoints │ │ │ ├── endpoint.go │ │ │ └── private │ │ │ │ └── rulesfn │ │ │ │ ├── doc.go │ │ │ │ ├── strings.go │ │ │ │ └── uri.go │ │ │ ├── errors.go │ │ │ ├── go_module_metadata.go │ │ │ ├── internal │ │ │ └── sync │ │ │ │ └── singleflight │ │ │ │ ├── LICENSE │ │ │ │ ├── docs.go │ │ │ │ └── singleflight.go │ │ │ ├── io │ │ │ ├── byte.go │ │ │ ├── doc.go │ │ │ ├── reader.go │ │ │ └── ringbuffer.go │ │ │ ├── local-mod-replace.sh │ │ │ ├── logging │ │ │ └── logger.go │ │ │ ├── metrics │ │ │ ├── metrics.go │ │ │ └── nop.go │ │ │ ├── middleware │ │ │ ├── context.go │ │ │ ├── doc.go │ │ │ ├── logging.go │ │ │ ├── metadata.go │ │ │ ├── middleware.go │ │ │ ├── ordered_group.go │ │ │ ├── stack.go │ │ │ ├── stack_values.go │ │ │ ├── step_build.go │ │ │ ├── step_deserialize.go │ │ │ ├── step_finalize.go │ │ │ ├── step_initialize.go │ │ │ └── step_serialize.go │ │ │ ├── modman.toml │ │ │ ├── properties.go │ │ │ ├── ptr │ │ │ ├── doc.go │ │ │ ├── from_ptr.go │ │ │ ├── gen_scalars.go │ │ │ └── to_ptr.go │ │ │ ├── rand │ │ │ ├── doc.go │ │ │ ├── rand.go │ │ │ └── uuid.go │ │ │ ├── sync │ │ │ └── error.go │ │ │ ├── time │ │ │ └── time.go │ │ │ ├── tracing │ │ │ ├── context.go │ │ │ ├── nop.go │ │ │ └── tracing.go │ │ │ ├── transport │ │ │ └── http │ │ │ │ ├── auth.go │ │ │ │ ├── auth_schemes.go │ │ │ │ ├── checksum_middleware.go │ │ │ │ ├── client.go │ │ │ │ ├── doc.go │ │ │ │ ├── headerlist.go │ │ │ │ ├── host.go │ │ │ │ ├── internal │ │ │ │ └── io │ │ │ │ │ └── safe.go │ │ │ │ ├── md5_checksum.go │ │ │ │ ├── metrics.go │ │ │ │ ├── middleware_close_response_body.go │ │ │ │ ├── middleware_content_length.go │ │ │ │ ├── middleware_header_comment.go │ │ │ │ ├── middleware_headers.go │ │ │ │ ├── middleware_http_logging.go │ │ │ │ ├── middleware_metadata.go │ │ │ │ ├── middleware_min_proto.go │ │ │ │ ├── properties.go │ │ │ │ ├── request.go │ │ │ │ ├── response.go │ │ │ │ ├── time.go │ │ │ │ ├── url.go │ │ │ │ └── user_agent.go │ │ │ ├── validation.go │ │ │ └── waiter │ │ │ ├── logger.go │ │ │ └── waiter.go │ ├── go-logr │ │ └── logr │ │ │ ├── .golangci.yaml │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── SECURITY.md │ │ │ ├── context.go │ │ │ ├── context_noslog.go │ │ │ ├── context_slog.go │ │ │ ├── discard.go │ │ │ ├── funcr │ │ │ ├── funcr.go │ │ │ └── slogsink.go │ │ │ ├── logr.go │ │ │ ├── sloghandler.go │ │ │ ├── slogr.go │ │ │ └── slogsink.go │ ├── go-task │ │ └── slim-sprig │ │ │ └── v3 │ │ │ ├── .editorconfig │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── Taskfile.yml │ │ │ ├── crypto.go │ │ │ ├── date.go │ │ │ ├── defaults.go │ │ │ ├── dict.go │ │ │ ├── doc.go │ │ │ ├── functions.go │ │ │ ├── list.go │ │ │ ├── network.go │ │ │ ├── numeric.go │ │ │ ├── reflect.go │ │ │ ├── regex.go │ │ │ ├── strings.go │ │ │ └── url.go │ ├── google │ │ ├── go-cmp │ │ │ ├── LICENSE │ │ │ └── cmp │ │ │ │ ├── compare.go │ │ │ │ ├── export.go │ │ │ │ ├── internal │ │ │ │ ├── diff │ │ │ │ │ ├── debug_disable.go │ │ │ │ │ ├── debug_enable.go │ │ │ │ │ └── diff.go │ │ │ │ ├── flags │ │ │ │ │ └── flags.go │ │ │ │ ├── function │ │ │ │ │ └── func.go │ │ │ │ └── value │ │ │ │ │ ├── name.go │ │ │ │ │ ├── pointer.go │ │ │ │ │ └── sort.go │ │ │ │ ├── options.go │ │ │ │ ├── path.go │ │ │ │ ├── report.go │ │ │ │ ├── report_compare.go │ │ │ │ ├── report_references.go │ │ │ │ ├── report_reflect.go │ │ │ │ ├── report_slices.go │ │ │ │ ├── report_text.go │ │ │ │ └── report_value.go │ │ └── pprof │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ └── profile │ │ │ ├── encode.go │ │ │ ├── filter.go │ │ │ ├── index.go │ │ │ ├── legacy_java_profile.go │ │ │ ├── legacy_profile.go │ │ │ ├── merge.go │ │ │ ├── profile.go │ │ │ ├── proto.go │ │ │ └── prune.go │ ├── maxbrunsfeld │ │ └── counterfeiter │ │ │ └── v6 │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── .golangci.yaml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── arguments │ │ │ ├── files.go │ │ │ ├── parser.go │ │ │ └── usage.go │ │ │ ├── command │ │ │ └── runner.go │ │ │ ├── generator │ │ │ ├── cache.go │ │ │ ├── ctx.go │ │ │ ├── ctx_old.go │ │ │ ├── fake.go │ │ │ ├── file_reader.go │ │ │ ├── function_loader.go │ │ │ ├── function_template.go │ │ │ ├── import.go │ │ │ ├── interface_loader.go │ │ │ ├── interface_template.go │ │ │ ├── loader.go │ │ │ ├── package_loader.go │ │ │ ├── package_template.go │ │ │ ├── param.go │ │ │ └── return.go │ │ │ └── main.go │ └── onsi │ │ ├── ginkgo │ │ └── v2 │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── RELEASING.md │ │ │ ├── config │ │ │ └── deprecated.go │ │ │ ├── core_dsl.go │ │ │ ├── decorator_dsl.go │ │ │ ├── deprecated_dsl.go │ │ │ ├── formatter │ │ │ ├── colorable_others.go │ │ │ ├── colorable_windows.go │ │ │ └── formatter.go │ │ │ ├── ginkgo │ │ │ ├── build │ │ │ │ └── build_command.go │ │ │ ├── command │ │ │ │ ├── abort.go │ │ │ │ ├── command.go │ │ │ │ └── program.go │ │ │ ├── generators │ │ │ │ ├── boostrap_templates.go │ │ │ │ ├── bootstrap_command.go │ │ │ │ ├── generate_command.go │ │ │ │ ├── generate_templates.go │ │ │ │ └── generators_common.go │ │ │ ├── internal │ │ │ │ ├── compile.go │ │ │ │ ├── gocovmerge.go │ │ │ │ ├── profiles_and_reports.go │ │ │ │ ├── run.go │ │ │ │ ├── test_suite.go │ │ │ │ ├── utils.go │ │ │ │ └── verify_version.go │ │ │ ├── labels │ │ │ │ └── labels_command.go │ │ │ ├── main.go │ │ │ ├── outline │ │ │ │ ├── ginkgo.go │ │ │ │ ├── import.go │ │ │ │ ├── outline.go │ │ │ │ └── outline_command.go │ │ │ ├── run │ │ │ │ └── run_command.go │ │ │ ├── unfocus │ │ │ │ └── unfocus_command.go │ │ │ └── watch │ │ │ │ ├── delta.go │ │ │ │ ├── delta_tracker.go │ │ │ │ ├── dependencies.go │ │ │ │ ├── package_hash.go │ │ │ │ ├── package_hashes.go │ │ │ │ ├── suite.go │ │ │ │ └── watch_command.go │ │ │ ├── ginkgo_cli_dependencies.go │ │ │ ├── ginkgo_t_dsl.go │ │ │ ├── internal │ │ │ ├── counter.go │ │ │ ├── failer.go │ │ │ ├── focus.go │ │ │ ├── global │ │ │ │ └── init.go │ │ │ ├── group.go │ │ │ ├── interrupt_handler │ │ │ │ ├── interrupt_handler.go │ │ │ │ ├── sigquit_swallower_unix.go │ │ │ │ └── sigquit_swallower_windows.go │ │ │ ├── node.go │ │ │ ├── ordering.go │ │ │ ├── output_interceptor.go │ │ │ ├── output_interceptor_unix.go │ │ │ ├── output_interceptor_wasm.go │ │ │ ├── output_interceptor_win.go │ │ │ ├── parallel_support │ │ │ │ ├── client_server.go │ │ │ │ ├── http_client.go │ │ │ │ ├── http_server.go │ │ │ │ ├── rpc_client.go │ │ │ │ ├── rpc_server.go │ │ │ │ └── server_handler.go │ │ │ ├── progress_report.go │ │ │ ├── progress_report_bsd.go │ │ │ ├── progress_report_unix.go │ │ │ ├── progress_report_wasm.go │ │ │ ├── progress_report_win.go │ │ │ ├── progress_reporter_manager.go │ │ │ ├── report_entry.go │ │ │ ├── spec.go │ │ │ ├── spec_context.go │ │ │ ├── suite.go │ │ │ ├── testingtproxy │ │ │ │ └── testing_t_proxy.go │ │ │ ├── tree.go │ │ │ └── writer.go │ │ │ ├── reporters │ │ │ ├── default_reporter.go │ │ │ ├── deprecated_reporter.go │ │ │ ├── json_report.go │ │ │ ├── junit_report.go │ │ │ ├── reporter.go │ │ │ └── teamcity_report.go │ │ │ ├── reporting_dsl.go │ │ │ ├── table_dsl.go │ │ │ └── types │ │ │ ├── code_location.go │ │ │ ├── config.go │ │ │ ├── deprecated_types.go │ │ │ ├── deprecation_support.go │ │ │ ├── enum_support.go │ │ │ ├── errors.go │ │ │ ├── file_filter.go │ │ │ ├── flags.go │ │ │ ├── label_filter.go │ │ │ ├── report_entry.go │ │ │ ├── types.go │ │ │ └── version.go │ │ └── gomega │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── RELEASING.md │ │ ├── format │ │ └── format.go │ │ ├── gbytes │ │ ├── buffer.go │ │ ├── io_wrappers.go │ │ └── say_matcher.go │ │ ├── gexec │ │ ├── build.go │ │ ├── exit_matcher.go │ │ ├── prefixed_writer.go │ │ └── session.go │ │ ├── ghttp │ │ ├── handlers.go │ │ └── test_server.go │ │ ├── gomega_dsl.go │ │ ├── internal │ │ ├── assertion.go │ │ ├── async_assertion.go │ │ ├── duration_bundle.go │ │ ├── gomega.go │ │ ├── gutil │ │ │ ├── post_ioutil.go │ │ │ └── using_ioutil.go │ │ ├── polling_signal_error.go │ │ └── vetoptdesc.go │ │ ├── matchers.go │ │ ├── matchers │ │ ├── and.go │ │ ├── assignable_to_type_of_matcher.go │ │ ├── attributes_slice.go │ │ ├── be_a_directory.go │ │ ├── be_a_regular_file.go │ │ ├── be_an_existing_file.go │ │ ├── be_closed_matcher.go │ │ ├── be_comparable_to_matcher.go │ │ ├── be_element_of_matcher.go │ │ ├── be_empty_matcher.go │ │ ├── be_equivalent_to_matcher.go │ │ ├── be_false_matcher.go │ │ ├── be_identical_to.go │ │ ├── be_key_of_matcher.go │ │ ├── be_nil_matcher.go │ │ ├── be_numerically_matcher.go │ │ ├── be_sent_matcher.go │ │ ├── be_temporally_matcher.go │ │ ├── be_true_matcher.go │ │ ├── be_zero_matcher.go │ │ ├── consist_of.go │ │ ├── contain_element_matcher.go │ │ ├── contain_elements_matcher.go │ │ ├── contain_substring_matcher.go │ │ ├── equal_matcher.go │ │ ├── have_cap_matcher.go │ │ ├── have_each_matcher.go │ │ ├── have_exact_elements.go │ │ ├── have_existing_field_matcher.go │ │ ├── have_field.go │ │ ├── have_http_body_matcher.go │ │ ├── have_http_header_with_value_matcher.go │ │ ├── have_http_status_matcher.go │ │ ├── have_key_matcher.go │ │ ├── have_key_with_value_matcher.go │ │ ├── have_len_matcher.go │ │ ├── have_occurred_matcher.go │ │ ├── have_prefix_matcher.go │ │ ├── have_suffix_matcher.go │ │ ├── have_value.go │ │ ├── internal │ │ │ └── miter │ │ │ │ ├── type_support_iter.go │ │ │ │ └── type_support_noiter.go │ │ ├── match_error_matcher.go │ │ ├── match_json_matcher.go │ │ ├── match_regexp_matcher.go │ │ ├── match_xml_matcher.go │ │ ├── match_yaml_matcher.go │ │ ├── not.go │ │ ├── or.go │ │ ├── panic_matcher.go │ │ ├── receive_matcher.go │ │ ├── satisfy_matcher.go │ │ ├── semi_structured_data_support.go │ │ ├── succeed_matcher.go │ │ ├── support │ │ │ └── goraph │ │ │ │ ├── bipartitegraph │ │ │ │ ├── bipartitegraph.go │ │ │ │ └── bipartitegraphmatching.go │ │ │ │ ├── edge │ │ │ │ └── edge.go │ │ │ │ ├── node │ │ │ │ └── node.go │ │ │ │ └── util │ │ │ │ └── util.go │ │ ├── type_support.go │ │ └── with_transform.go │ │ └── types │ │ └── types.go │ ├── golang.org │ └── x │ │ ├── mod │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── internal │ │ │ └── lazyregexp │ │ │ │ └── lazyre.go │ │ ├── module │ │ │ ├── module.go │ │ │ └── pseudo.go │ │ └── semver │ │ │ └── semver.go │ │ ├── net │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── context │ │ │ └── context.go │ │ └── html │ │ │ ├── atom │ │ │ ├── atom.go │ │ │ └── table.go │ │ │ ├── charset │ │ │ └── charset.go │ │ │ ├── const.go │ │ │ ├── doc.go │ │ │ ├── doctype.go │ │ │ ├── entity.go │ │ │ ├── escape.go │ │ │ ├── foreign.go │ │ │ ├── iter.go │ │ │ ├── node.go │ │ │ ├── parse.go │ │ │ ├── render.go │ │ │ └── token.go │ │ ├── sync │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── errgroup │ │ │ └── errgroup.go │ │ ├── sys │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── unix │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── affinity_linux.go │ │ │ ├── aliases.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── asm_bsd_386.s │ │ │ ├── asm_bsd_amd64.s │ │ │ ├── asm_bsd_arm.s │ │ │ ├── asm_bsd_arm64.s │ │ │ ├── asm_bsd_ppc64.s │ │ │ ├── asm_bsd_riscv64.s │ │ │ ├── asm_linux_386.s │ │ │ ├── asm_linux_amd64.s │ │ │ ├── asm_linux_arm.s │ │ │ ├── asm_linux_arm64.s │ │ │ ├── asm_linux_loong64.s │ │ │ ├── asm_linux_mips64x.s │ │ │ ├── asm_linux_mipsx.s │ │ │ ├── asm_linux_ppc64x.s │ │ │ ├── asm_linux_riscv64.s │ │ │ ├── asm_linux_s390x.s │ │ │ ├── asm_openbsd_mips64.s │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── asm_zos_s390x.s │ │ │ ├── auxv.go │ │ │ ├── auxv_unsupported.go │ │ │ ├── bluetooth_linux.go │ │ │ ├── bpxsvc_zos.go │ │ │ ├── bpxsvc_zos.s │ │ │ ├── cap_freebsd.go │ │ │ ├── constants.go │ │ │ ├── dev_aix_ppc.go │ │ │ ├── dev_aix_ppc64.go │ │ │ ├── dev_darwin.go │ │ │ ├── dev_dragonfly.go │ │ │ ├── dev_freebsd.go │ │ │ ├── dev_linux.go │ │ │ ├── dev_netbsd.go │ │ │ ├── dev_openbsd.go │ │ │ ├── dev_zos.go │ │ │ ├── dirent.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── env_unix.go │ │ │ ├── fcntl.go │ │ │ ├── fcntl_darwin.go │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── fdset.go │ │ │ ├── gccgo.go │ │ │ ├── gccgo_c.c │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── ifreq_linux.go │ │ │ ├── ioctl_linux.go │ │ │ ├── ioctl_signed.go │ │ │ ├── ioctl_unsigned.go │ │ │ ├── ioctl_zos.go │ │ │ ├── mkall.sh │ │ │ ├── mkerrors.sh │ │ │ ├── mmap_nomremap.go │ │ │ ├── mremap.go │ │ │ ├── pagesize_unix.go │ │ │ ├── pledge_openbsd.go │ │ │ ├── ptrace_darwin.go │ │ │ ├── ptrace_ios.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── readdirent_getdents.go │ │ │ ├── readdirent_getdirentries.go │ │ │ ├── sockcmsg_dragonfly.go │ │ │ ├── sockcmsg_linux.go │ │ │ ├── sockcmsg_unix.go │ │ │ ├── sockcmsg_unix_other.go │ │ │ ├── sockcmsg_zos.go │ │ │ ├── symaddr_zos_s390x.s │ │ │ ├── syscall.go │ │ │ ├── syscall_aix.go │ │ │ ├── syscall_aix_ppc.go │ │ │ ├── syscall_aix_ppc64.go │ │ │ ├── syscall_bsd.go │ │ │ ├── syscall_darwin.go │ │ │ ├── syscall_darwin_amd64.go │ │ │ ├── syscall_darwin_arm64.go │ │ │ ├── syscall_darwin_libSystem.go │ │ │ ├── syscall_dragonfly.go │ │ │ ├── syscall_dragonfly_amd64.go │ │ │ ├── syscall_freebsd.go │ │ │ ├── syscall_freebsd_386.go │ │ │ ├── syscall_freebsd_amd64.go │ │ │ ├── syscall_freebsd_arm.go │ │ │ ├── syscall_freebsd_arm64.go │ │ │ ├── syscall_freebsd_riscv64.go │ │ │ ├── syscall_hurd.go │ │ │ ├── syscall_hurd_386.go │ │ │ ├── syscall_illumos.go │ │ │ ├── syscall_linux.go │ │ │ ├── syscall_linux_386.go │ │ │ ├── syscall_linux_alarm.go │ │ │ ├── syscall_linux_amd64.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── syscall_linux_arm.go │ │ │ ├── syscall_linux_arm64.go │ │ │ ├── syscall_linux_gc.go │ │ │ ├── syscall_linux_gc_386.go │ │ │ ├── syscall_linux_gc_arm.go │ │ │ ├── syscall_linux_gccgo_386.go │ │ │ ├── syscall_linux_gccgo_arm.go │ │ │ ├── syscall_linux_loong64.go │ │ │ ├── syscall_linux_mips64x.go │ │ │ ├── syscall_linux_mipsx.go │ │ │ ├── syscall_linux_ppc.go │ │ │ ├── syscall_linux_ppc64x.go │ │ │ ├── syscall_linux_riscv64.go │ │ │ ├── syscall_linux_s390x.go │ │ │ ├── syscall_linux_sparc64.go │ │ │ ├── syscall_netbsd.go │ │ │ ├── syscall_netbsd_386.go │ │ │ ├── syscall_netbsd_amd64.go │ │ │ ├── syscall_netbsd_arm.go │ │ │ ├── syscall_netbsd_arm64.go │ │ │ ├── syscall_openbsd.go │ │ │ ├── syscall_openbsd_386.go │ │ │ ├── syscall_openbsd_amd64.go │ │ │ ├── syscall_openbsd_arm.go │ │ │ ├── syscall_openbsd_arm64.go │ │ │ ├── syscall_openbsd_libc.go │ │ │ ├── syscall_openbsd_mips64.go │ │ │ ├── syscall_openbsd_ppc64.go │ │ │ ├── syscall_openbsd_riscv64.go │ │ │ ├── syscall_solaris.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── syscall_unix_gc_ppc64x.go │ │ │ ├── syscall_zos_s390x.go │ │ │ ├── sysvshm_linux.go │ │ │ ├── sysvshm_unix.go │ │ │ ├── sysvshm_unix_other.go │ │ │ ├── timestruct.go │ │ │ ├── unveil_openbsd.go │ │ │ ├── vgetrandom_linux.go │ │ │ ├── vgetrandom_unsupported.go │ │ │ ├── xattr_bsd.go │ │ │ ├── zerrors_aix_ppc.go │ │ │ ├── zerrors_aix_ppc64.go │ │ │ ├── zerrors_darwin_amd64.go │ │ │ ├── zerrors_darwin_arm64.go │ │ │ ├── zerrors_dragonfly_amd64.go │ │ │ ├── zerrors_freebsd_386.go │ │ │ ├── zerrors_freebsd_amd64.go │ │ │ ├── zerrors_freebsd_arm.go │ │ │ ├── zerrors_freebsd_arm64.go │ │ │ ├── zerrors_freebsd_riscv64.go │ │ │ ├── zerrors_linux.go │ │ │ ├── zerrors_linux_386.go │ │ │ ├── zerrors_linux_amd64.go │ │ │ ├── zerrors_linux_arm.go │ │ │ ├── zerrors_linux_arm64.go │ │ │ ├── zerrors_linux_loong64.go │ │ │ ├── zerrors_linux_mips.go │ │ │ ├── zerrors_linux_mips64.go │ │ │ ├── zerrors_linux_mips64le.go │ │ │ ├── zerrors_linux_mipsle.go │ │ │ ├── zerrors_linux_ppc.go │ │ │ ├── zerrors_linux_ppc64.go │ │ │ ├── zerrors_linux_ppc64le.go │ │ │ ├── zerrors_linux_riscv64.go │ │ │ ├── zerrors_linux_s390x.go │ │ │ ├── zerrors_linux_sparc64.go │ │ │ ├── zerrors_netbsd_386.go │ │ │ ├── zerrors_netbsd_amd64.go │ │ │ ├── zerrors_netbsd_arm.go │ │ │ ├── zerrors_netbsd_arm64.go │ │ │ ├── zerrors_openbsd_386.go │ │ │ ├── zerrors_openbsd_amd64.go │ │ │ ├── zerrors_openbsd_arm.go │ │ │ ├── zerrors_openbsd_arm64.go │ │ │ ├── zerrors_openbsd_mips64.go │ │ │ ├── zerrors_openbsd_ppc64.go │ │ │ ├── zerrors_openbsd_riscv64.go │ │ │ ├── zerrors_solaris_amd64.go │ │ │ ├── zerrors_zos_s390x.go │ │ │ ├── zptrace_armnn_linux.go │ │ │ ├── zptrace_linux_arm64.go │ │ │ ├── zptrace_mipsnn_linux.go │ │ │ ├── zptrace_mipsnnle_linux.go │ │ │ ├── zptrace_x86_linux.go │ │ │ ├── zsymaddr_zos_s390x.s │ │ │ ├── zsyscall_aix_ppc.go │ │ │ ├── zsyscall_aix_ppc64.go │ │ │ ├── zsyscall_aix_ppc64_gc.go │ │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ │ ├── zsyscall_darwin_amd64.go │ │ │ ├── zsyscall_darwin_amd64.s │ │ │ ├── zsyscall_darwin_arm64.go │ │ │ ├── zsyscall_darwin_arm64.s │ │ │ ├── zsyscall_dragonfly_amd64.go │ │ │ ├── zsyscall_freebsd_386.go │ │ │ ├── zsyscall_freebsd_amd64.go │ │ │ ├── zsyscall_freebsd_arm.go │ │ │ ├── zsyscall_freebsd_arm64.go │ │ │ ├── zsyscall_freebsd_riscv64.go │ │ │ ├── zsyscall_illumos_amd64.go │ │ │ ├── zsyscall_linux.go │ │ │ ├── zsyscall_linux_386.go │ │ │ ├── zsyscall_linux_amd64.go │ │ │ ├── zsyscall_linux_arm.go │ │ │ ├── zsyscall_linux_arm64.go │ │ │ ├── zsyscall_linux_loong64.go │ │ │ ├── zsyscall_linux_mips.go │ │ │ ├── zsyscall_linux_mips64.go │ │ │ ├── zsyscall_linux_mips64le.go │ │ │ ├── zsyscall_linux_mipsle.go │ │ │ ├── zsyscall_linux_ppc.go │ │ │ ├── zsyscall_linux_ppc64.go │ │ │ ├── zsyscall_linux_ppc64le.go │ │ │ ├── zsyscall_linux_riscv64.go │ │ │ ├── zsyscall_linux_s390x.go │ │ │ ├── zsyscall_linux_sparc64.go │ │ │ ├── zsyscall_netbsd_386.go │ │ │ ├── zsyscall_netbsd_amd64.go │ │ │ ├── zsyscall_netbsd_arm.go │ │ │ ├── zsyscall_netbsd_arm64.go │ │ │ ├── zsyscall_openbsd_386.go │ │ │ ├── zsyscall_openbsd_386.s │ │ │ ├── zsyscall_openbsd_amd64.go │ │ │ ├── zsyscall_openbsd_amd64.s │ │ │ ├── zsyscall_openbsd_arm.go │ │ │ ├── zsyscall_openbsd_arm.s │ │ │ ├── zsyscall_openbsd_arm64.go │ │ │ ├── zsyscall_openbsd_arm64.s │ │ │ ├── zsyscall_openbsd_mips64.go │ │ │ ├── zsyscall_openbsd_mips64.s │ │ │ ├── zsyscall_openbsd_ppc64.go │ │ │ ├── zsyscall_openbsd_ppc64.s │ │ │ ├── zsyscall_openbsd_riscv64.go │ │ │ ├── zsyscall_openbsd_riscv64.s │ │ │ ├── zsyscall_solaris_amd64.go │ │ │ ├── zsyscall_zos_s390x.go │ │ │ ├── zsysctl_openbsd_386.go │ │ │ ├── zsysctl_openbsd_amd64.go │ │ │ ├── zsysctl_openbsd_arm.go │ │ │ ├── zsysctl_openbsd_arm64.go │ │ │ ├── zsysctl_openbsd_mips64.go │ │ │ ├── zsysctl_openbsd_ppc64.go │ │ │ ├── zsysctl_openbsd_riscv64.go │ │ │ ├── zsysnum_darwin_amd64.go │ │ │ ├── zsysnum_darwin_arm64.go │ │ │ ├── zsysnum_dragonfly_amd64.go │ │ │ ├── zsysnum_freebsd_386.go │ │ │ ├── zsysnum_freebsd_amd64.go │ │ │ ├── zsysnum_freebsd_arm.go │ │ │ ├── zsysnum_freebsd_arm64.go │ │ │ ├── zsysnum_freebsd_riscv64.go │ │ │ ├── zsysnum_linux_386.go │ │ │ ├── zsysnum_linux_amd64.go │ │ │ ├── zsysnum_linux_arm.go │ │ │ ├── zsysnum_linux_arm64.go │ │ │ ├── zsysnum_linux_loong64.go │ │ │ ├── zsysnum_linux_mips.go │ │ │ ├── zsysnum_linux_mips64.go │ │ │ ├── zsysnum_linux_mips64le.go │ │ │ ├── zsysnum_linux_mipsle.go │ │ │ ├── zsysnum_linux_ppc.go │ │ │ ├── zsysnum_linux_ppc64.go │ │ │ ├── zsysnum_linux_ppc64le.go │ │ │ ├── zsysnum_linux_riscv64.go │ │ │ ├── zsysnum_linux_s390x.go │ │ │ ├── zsysnum_linux_sparc64.go │ │ │ ├── zsysnum_netbsd_386.go │ │ │ ├── zsysnum_netbsd_amd64.go │ │ │ ├── zsysnum_netbsd_arm.go │ │ │ ├── zsysnum_netbsd_arm64.go │ │ │ ├── zsysnum_openbsd_386.go │ │ │ ├── zsysnum_openbsd_amd64.go │ │ │ ├── zsysnum_openbsd_arm.go │ │ │ ├── zsysnum_openbsd_arm64.go │ │ │ ├── zsysnum_openbsd_mips64.go │ │ │ ├── zsysnum_openbsd_ppc64.go │ │ │ ├── zsysnum_openbsd_riscv64.go │ │ │ ├── zsysnum_zos_s390x.go │ │ │ ├── ztypes_aix_ppc.go │ │ │ ├── ztypes_aix_ppc64.go │ │ │ ├── ztypes_darwin_amd64.go │ │ │ ├── ztypes_darwin_arm64.go │ │ │ ├── ztypes_dragonfly_amd64.go │ │ │ ├── ztypes_freebsd_386.go │ │ │ ├── ztypes_freebsd_amd64.go │ │ │ ├── ztypes_freebsd_arm.go │ │ │ ├── ztypes_freebsd_arm64.go │ │ │ ├── ztypes_freebsd_riscv64.go │ │ │ ├── ztypes_linux.go │ │ │ ├── ztypes_linux_386.go │ │ │ ├── ztypes_linux_amd64.go │ │ │ ├── ztypes_linux_arm.go │ │ │ ├── ztypes_linux_arm64.go │ │ │ ├── ztypes_linux_loong64.go │ │ │ ├── ztypes_linux_mips.go │ │ │ ├── ztypes_linux_mips64.go │ │ │ ├── ztypes_linux_mips64le.go │ │ │ ├── ztypes_linux_mipsle.go │ │ │ ├── ztypes_linux_ppc.go │ │ │ ├── ztypes_linux_ppc64.go │ │ │ ├── ztypes_linux_ppc64le.go │ │ │ ├── ztypes_linux_riscv64.go │ │ │ ├── ztypes_linux_s390x.go │ │ │ ├── ztypes_linux_sparc64.go │ │ │ ├── ztypes_netbsd_386.go │ │ │ ├── ztypes_netbsd_amd64.go │ │ │ ├── ztypes_netbsd_arm.go │ │ │ ├── ztypes_netbsd_arm64.go │ │ │ ├── ztypes_openbsd_386.go │ │ │ ├── ztypes_openbsd_amd64.go │ │ │ ├── ztypes_openbsd_arm.go │ │ │ ├── ztypes_openbsd_arm64.go │ │ │ ├── ztypes_openbsd_mips64.go │ │ │ ├── ztypes_openbsd_ppc64.go │ │ │ ├── ztypes_openbsd_riscv64.go │ │ │ ├── ztypes_solaris_amd64.go │ │ │ └── ztypes_zos_s390x.go │ │ ├── text │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── cases │ │ │ ├── cases.go │ │ │ ├── context.go │ │ │ ├── fold.go │ │ │ ├── icu.go │ │ │ ├── info.go │ │ │ ├── map.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables12.0.0.go │ │ │ ├── tables13.0.0.go │ │ │ ├── tables15.0.0.go │ │ │ ├── tables9.0.0.go │ │ │ └── trieval.go │ │ ├── encoding │ │ │ ├── charmap │ │ │ │ ├── charmap.go │ │ │ │ └── tables.go │ │ │ ├── encoding.go │ │ │ ├── htmlindex │ │ │ │ ├── htmlindex.go │ │ │ │ ├── map.go │ │ │ │ └── tables.go │ │ │ ├── internal │ │ │ │ ├── identifier │ │ │ │ │ ├── identifier.go │ │ │ │ │ └── mib.go │ │ │ │ └── internal.go │ │ │ ├── japanese │ │ │ │ ├── all.go │ │ │ │ ├── eucjp.go │ │ │ │ ├── iso2022jp.go │ │ │ │ ├── shiftjis.go │ │ │ │ └── tables.go │ │ │ ├── korean │ │ │ │ ├── euckr.go │ │ │ │ └── tables.go │ │ │ ├── simplifiedchinese │ │ │ │ ├── all.go │ │ │ │ ├── gbk.go │ │ │ │ ├── hzgb2312.go │ │ │ │ └── tables.go │ │ │ ├── traditionalchinese │ │ │ │ ├── big5.go │ │ │ │ └── tables.go │ │ │ └── unicode │ │ │ │ ├── override.go │ │ │ │ └── unicode.go │ │ ├── internal │ │ │ ├── internal.go │ │ │ ├── language │ │ │ │ ├── common.go │ │ │ │ ├── compact.go │ │ │ │ ├── compact │ │ │ │ │ ├── compact.go │ │ │ │ │ ├── language.go │ │ │ │ │ ├── parents.go │ │ │ │ │ ├── tables.go │ │ │ │ │ └── tags.go │ │ │ │ ├── compose.go │ │ │ │ ├── coverage.go │ │ │ │ ├── language.go │ │ │ │ ├── lookup.go │ │ │ │ ├── match.go │ │ │ │ ├── parse.go │ │ │ │ ├── tables.go │ │ │ │ └── tags.go │ │ │ ├── match.go │ │ │ ├── tag │ │ │ │ └── tag.go │ │ │ └── utf8internal │ │ │ │ └── utf8internal.go │ │ ├── language │ │ │ ├── coverage.go │ │ │ ├── doc.go │ │ │ ├── language.go │ │ │ ├── match.go │ │ │ ├── parse.go │ │ │ ├── tables.go │ │ │ └── tags.go │ │ ├── runes │ │ │ ├── cond.go │ │ │ └── runes.go │ │ ├── transform │ │ │ └── transform.go │ │ └── unicode │ │ │ └── norm │ │ │ ├── composition.go │ │ │ ├── forminfo.go │ │ │ ├── input.go │ │ │ ├── iter.go │ │ │ ├── normalize.go │ │ │ ├── readwriter.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables12.0.0.go │ │ │ ├── tables13.0.0.go │ │ │ ├── tables15.0.0.go │ │ │ ├── tables9.0.0.go │ │ │ ├── transform.go │ │ │ └── trie.go │ │ └── tools │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── cover │ │ └── profile.go │ │ ├── go │ │ ├── ast │ │ │ ├── astutil │ │ │ │ ├── enclosing.go │ │ │ │ ├── imports.go │ │ │ │ ├── rewrite.go │ │ │ │ └── util.go │ │ │ └── inspector │ │ │ │ ├── inspector.go │ │ │ │ ├── iter.go │ │ │ │ ├── typeof.go │ │ │ │ └── walk.go │ │ ├── gcexportdata │ │ │ ├── gcexportdata.go │ │ │ └── importer.go │ │ ├── packages │ │ │ ├── doc.go │ │ │ ├── external.go │ │ │ ├── golist.go │ │ │ ├── golist_overlay.go │ │ │ ├── loadmode_string.go │ │ │ ├── packages.go │ │ │ └── visit.go │ │ └── types │ │ │ ├── objectpath │ │ │ └── objectpath.go │ │ │ └── typeutil │ │ │ ├── callee.go │ │ │ ├── imports.go │ │ │ ├── map.go │ │ │ ├── methodsetcache.go │ │ │ └── ui.go │ │ ├── imports │ │ └── forward.go │ │ └── internal │ │ ├── aliases │ │ ├── aliases.go │ │ └── aliases_go122.go │ │ ├── astutil │ │ └── edge │ │ │ └── edge.go │ │ ├── event │ │ ├── core │ │ │ ├── event.go │ │ │ ├── export.go │ │ │ └── fast.go │ │ ├── doc.go │ │ ├── event.go │ │ ├── keys │ │ │ ├── keys.go │ │ │ ├── standard.go │ │ │ └── util.go │ │ └── label │ │ │ └── label.go │ │ ├── gcimporter │ │ ├── bimport.go │ │ ├── exportdata.go │ │ ├── gcimporter.go │ │ ├── iexport.go │ │ ├── iimport.go │ │ ├── iimport_go122.go │ │ ├── predeclared.go │ │ ├── support.go │ │ └── ureader_yes.go │ │ ├── gocommand │ │ ├── invoke.go │ │ ├── invoke_notunix.go │ │ ├── invoke_unix.go │ │ ├── vendor.go │ │ └── version.go │ │ ├── gopathwalk │ │ └── walk.go │ │ ├── imports │ │ ├── fix.go │ │ ├── imports.go │ │ ├── mod.go │ │ ├── mod_cache.go │ │ ├── sortimports.go │ │ ├── source.go │ │ ├── source_env.go │ │ └── source_modindex.go │ │ ├── modindex │ │ ├── directories.go │ │ ├── index.go │ │ ├── lookup.go │ │ ├── modindex.go │ │ ├── symbols.go │ │ └── types.go │ │ ├── packagesinternal │ │ └── packages.go │ │ ├── pkgbits │ │ ├── codes.go │ │ ├── decoder.go │ │ ├── doc.go │ │ ├── encoder.go │ │ ├── flags.go │ │ ├── reloc.go │ │ ├── support.go │ │ ├── sync.go │ │ ├── syncmarker_string.go │ │ └── version.go │ │ ├── stdlib │ │ ├── deps.go │ │ ├── import.go │ │ ├── manifest.go │ │ └── stdlib.go │ │ ├── typeparams │ │ ├── common.go │ │ ├── coretype.go │ │ ├── free.go │ │ ├── normalize.go │ │ ├── termlist.go │ │ └── typeterm.go │ │ ├── typesinternal │ │ ├── classify_call.go │ │ ├── element.go │ │ ├── errorcode.go │ │ ├── errorcode_string.go │ │ ├── qualifier.go │ │ ├── recv.go │ │ ├── toonew.go │ │ ├── types.go │ │ ├── varkind.go │ │ └── zerovalue.go │ │ └── versions │ │ ├── features.go │ │ ├── gover.go │ │ ├── types.go │ │ └── versions.go │ ├── google.golang.org │ └── protobuf │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── encoding │ │ ├── prototext │ │ │ ├── decode.go │ │ │ ├── doc.go │ │ │ └── encode.go │ │ └── protowire │ │ │ └── wire.go │ │ ├── internal │ │ ├── descfmt │ │ │ └── stringer.go │ │ ├── descopts │ │ │ └── options.go │ │ ├── detrand │ │ │ └── rand.go │ │ ├── editiondefaults │ │ │ ├── defaults.go │ │ │ └── editions_defaults.binpb │ │ ├── encoding │ │ │ ├── defval │ │ │ │ └── default.go │ │ │ ├── messageset │ │ │ │ └── messageset.go │ │ │ ├── tag │ │ │ │ └── tag.go │ │ │ └── text │ │ │ │ ├── decode.go │ │ │ │ ├── decode_number.go │ │ │ │ ├── decode_string.go │ │ │ │ ├── decode_token.go │ │ │ │ ├── doc.go │ │ │ │ └── encode.go │ │ ├── errors │ │ │ ├── errors.go │ │ │ ├── is_go112.go │ │ │ └── is_go113.go │ │ ├── filedesc │ │ │ ├── build.go │ │ │ ├── desc.go │ │ │ ├── desc_init.go │ │ │ ├── desc_lazy.go │ │ │ ├── desc_list.go │ │ │ ├── desc_list_gen.go │ │ │ ├── editions.go │ │ │ └── placeholder.go │ │ ├── filetype │ │ │ └── build.go │ │ ├── flags │ │ │ ├── flags.go │ │ │ ├── proto_legacy_disable.go │ │ │ └── proto_legacy_enable.go │ │ ├── genid │ │ │ ├── any_gen.go │ │ │ ├── api_gen.go │ │ │ ├── descriptor_gen.go │ │ │ ├── doc.go │ │ │ ├── duration_gen.go │ │ │ ├── empty_gen.go │ │ │ ├── field_mask_gen.go │ │ │ ├── go_features_gen.go │ │ │ ├── goname.go │ │ │ ├── map_entry.go │ │ │ ├── source_context_gen.go │ │ │ ├── struct_gen.go │ │ │ ├── timestamp_gen.go │ │ │ ├── type_gen.go │ │ │ ├── wrappers.go │ │ │ └── wrappers_gen.go │ │ ├── impl │ │ │ ├── api_export.go │ │ │ ├── checkinit.go │ │ │ ├── codec_extension.go │ │ │ ├── codec_field.go │ │ │ ├── codec_gen.go │ │ │ ├── codec_map.go │ │ │ ├── codec_map_go111.go │ │ │ ├── codec_map_go112.go │ │ │ ├── codec_message.go │ │ │ ├── codec_messageset.go │ │ │ ├── codec_tables.go │ │ │ ├── codec_unsafe.go │ │ │ ├── convert.go │ │ │ ├── convert_list.go │ │ │ ├── convert_map.go │ │ │ ├── decode.go │ │ │ ├── encode.go │ │ │ ├── enum.go │ │ │ ├── equal.go │ │ │ ├── extension.go │ │ │ ├── legacy_enum.go │ │ │ ├── legacy_export.go │ │ │ ├── legacy_extension.go │ │ │ ├── legacy_file.go │ │ │ ├── legacy_message.go │ │ │ ├── merge.go │ │ │ ├── merge_gen.go │ │ │ ├── message.go │ │ │ ├── message_reflect.go │ │ │ ├── message_reflect_field.go │ │ │ ├── message_reflect_gen.go │ │ │ ├── pointer_unsafe.go │ │ │ ├── validate.go │ │ │ └── weak.go │ │ ├── order │ │ │ ├── order.go │ │ │ └── range.go │ │ ├── pragma │ │ │ └── pragma.go │ │ ├── set │ │ │ └── ints.go │ │ ├── strs │ │ │ ├── strings.go │ │ │ ├── strings_unsafe_go120.go │ │ │ └── strings_unsafe_go121.go │ │ └── version │ │ │ └── version.go │ │ ├── proto │ │ ├── checkinit.go │ │ ├── decode.go │ │ ├── decode_gen.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── encode_gen.go │ │ ├── equal.go │ │ ├── extension.go │ │ ├── merge.go │ │ ├── messageset.go │ │ ├── proto.go │ │ ├── proto_methods.go │ │ ├── proto_reflect.go │ │ ├── reset.go │ │ ├── size.go │ │ ├── size_gen.go │ │ └── wrappers.go │ │ ├── protoadapt │ │ └── convert.go │ │ ├── reflect │ │ ├── protoreflect │ │ │ ├── methods.go │ │ │ ├── proto.go │ │ │ ├── source.go │ │ │ ├── source_gen.go │ │ │ ├── type.go │ │ │ ├── value.go │ │ │ ├── value_equal.go │ │ │ ├── value_union.go │ │ │ ├── value_unsafe_go120.go │ │ │ └── value_unsafe_go121.go │ │ └── protoregistry │ │ │ └── registry.go │ │ └── runtime │ │ ├── protoiface │ │ ├── legacy.go │ │ └── methods.go │ │ └── protoimpl │ │ ├── impl.go │ │ └── version.go │ ├── gopkg.in │ └── yaml.v3 │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── README.md │ │ ├── apic.go │ │ ├── decode.go │ │ ├── emitterc.go │ │ ├── encode.go │ │ ├── parserc.go │ │ ├── readerc.go │ │ ├── resolve.go │ │ ├── scannerc.go │ │ ├── sorter.go │ │ ├── writerc.go │ │ ├── yaml.go │ │ ├── yamlh.go │ │ └── yamlprivateh.go │ └── modules.txt ├── ssh ├── connection.go ├── connection_test.go ├── export_test.go ├── fakes │ ├── fake_logger.go │ ├── fake_opts_generator.go │ ├── fake_remote_runner.go │ ├── fake_remote_runner_factory.go │ ├── fake_ssh_connection.go │ └── fake_ssh_session.go ├── opts_generator.go ├── remote_runner.go ├── remote_runner_factory.go ├── remote_runner_test.go └── ssh_suite_test.go ├── standalone ├── deployed_instance.go ├── deployment_manager.go ├── deployment_manager_test.go └── standalone_suite_test.go ├── system ├── all_deployments │ ├── all_deployments_suite_test.go │ └── all_deployments_test.go ├── deployment.go ├── deployment │ ├── backup_cleanup_test.go │ ├── backup_test.go │ ├── lifecycle_with_backup_one_restore_all_test.go │ ├── lifecycle_with_locking_order_test.go │ ├── pre_backup_check_test.go │ ├── restore_cleanup_test.go │ ├── restore_test.go │ └── system_suite_test.go ├── director │ ├── backup_cleanup_test.go │ ├── backup_test.go │ ├── director_suite_test.go │ ├── pre_backup_check_test.go │ ├── restore_cleanup_test.go │ └── restore_test.go ├── util.go └── windows │ ├── .envrc │ ├── pre_backup_check_test.go │ └── windows_suite_test.go ├── testcluster └── instance.go └── tools └── tools.go /.github/workflows/run-test-pyramid.yml: -------------------------------------------------------------------------------- 1 | on: 2 | pull_request: 3 | types: [ assigned, synchronize ] 4 | branches: 5 | - master 6 | 7 | concurrency: 8 | group: ${{ github.workflow }}-${{ github.ref }} 9 | cancel-in-progress: true 10 | 11 | jobs: 12 | run-bbr-unit: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | - uses: actions/setup-go@v5 17 | with: 18 | go-version: '1.23' 19 | - run: make test 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode/* 3 | /bbr 4 | vendor/* 5 | releases/* 6 | .idea 7 | bbr-*.err.log 8 | integration/deployment/backup-workspace-* -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. 2 | 3 | This project is licensed to you under the Apache License, Version 2.0 (the "License"). 4 | You may not use this project except in compliance with the License. 5 | 6 | This project may include a number of subcomponents with separate copyright notices 7 | and license terms. Your use of these subcomponents is subject to the terms and 8 | conditions of the subcomponent's license, as noted in the LICENSE file. 9 | -------------------------------------------------------------------------------- /backup/artifact_suite_test.go: -------------------------------------------------------------------------------- 1 | package backup_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestArtifact(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Backup Suite") 13 | } 14 | -------------------------------------------------------------------------------- /bosh/bosh_suite_test.go: -------------------------------------------------------------------------------- 1 | package bosh_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestBosh(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Bosh Suite") 13 | } 14 | -------------------------------------------------------------------------------- /ci/configure.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | REPO_ROOT="$( cd "$( dirname "${0}" )/.." && pwd )" 5 | 6 | fly -t "${CONCOURSE_TARGET:=bosh-ecosystem}" set-pipeline \ 7 | -p bbr-cli \ 8 | -c <(ytt -f "${REPO_ROOT}/ci/pipeline.yml" --data-values-file "${REPO_ROOT}/ci/pipeline-values.yml") 9 | -------------------------------------------------------------------------------- /ci/images/backup-and-restore-minimal/README: -------------------------------------------------------------------------------- 1 | Unbuild as of 2024/03/28 2 | 3 | was used exclusively in p-drats ci. This was replaced by usage of cryo-essentials image in 4 | p-drats pipeline. 5 | 6 | -------------------------------------------------------------------------------- /ci/images/backup-and-restore/README: -------------------------------------------------------------------------------- 1 | Unbuild as of 2024/03/28 2 | 3 | I have found no evidence for usage of this image in cryo ci. It could be that it is used by "someone" 4 | on the internet but we do not. I'm leaving the Dockerfiles in case we at some point need to 5 | republish this. But from what it looks the only usage is in p-drats tasks.yml used in p-drats 6 | ci. Since that is internal, I guess we can share cryo essentials image with those teams instead. 7 | Leaving the dockerfiles in if someone should require the original images. 8 | -------------------------------------------------------------------------------- /ci/pipeline-values.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Automatically generated file. DO NOT EDIT. 3 | tas_versions: 4 | - {'version_slug': '2-11', 'pool_name': 'tas-2_11' , 'pivnet_ert_windows': '^2\.11\.\d+((-alpha|-beta|-rc)\.\d+)?(\+LTS-T)?$' } 5 | - {'version_slug': '2-13', 'pool_name': 'tas-2_13' , 'pivnet_ert_windows': '^2\.13\.\d+((-alpha|-beta|-rc)\.\d+)?(\+LTS-T)?$' } 6 | - {'version_slug': '4-0', 'pool_name': 'tas_four' , 'pivnet_ert_windows': '^4\.0\.\d+((-alpha|-beta|-rc)\.\d+)?(\+LTS-T)?$' } 7 | - {'version_slug': '5-0', 'pool_name': 'tas-5_0' , 'pivnet_ert_windows': '^5\.0\.\d+((-alpha|-beta|-rc)\.\d+)?(\+LTS-T)?$' } 8 | - {'version_slug': '6-0', 'pool_name': 'tas-6_0' , 'pivnet_ert_windows': '^6\.0\.\d+((-alpha|-beta|-rc)\.\d+)?(\+LTS-T)?$' } 9 | -------------------------------------------------------------------------------- /ci/tasks/allow-connections-to-bosh-director-on-port-25555/task.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | gcloud -q auth activate-service-account --key-file=<(echo "$GCP_SERVICE_ACCOUNT_KEY") 5 | env_name="$(cat additional-environment/name)" 6 | project_id=$(echo ${GCP_SERVICE_ACCOUNT_KEY} | jq .project_id -r) 7 | gcloud config set project ${project_id} 8 | echo 'Y' | gcloud compute firewall-rules delete "${env_name}-custom-jumpbox-to-director-ingress-allow" || true 9 | gcloud compute firewall-rules create "${env_name}-custom-jumpbox-to-director-ingress-allow" \ 10 | --network="${env_name}-network" \ 11 | --direction=ingress \ 12 | --target-tags="${env_name}-bosh-director" \ 13 | --action=allow \ 14 | --rules=tcp:22,tcp:6868,tcp:8443,tcp:8844,tcp:25555 \ 15 | --source-tags=jumpbox \ 16 | --priority=999 17 | -------------------------------------------------------------------------------- /ci/tasks/allow-connections-to-bosh-director-on-port-25555/task.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | source: 4 | repository: cryogenics/essentials 5 | tag: 0.1.111 6 | type: registry-image 7 | params: 8 | GCP_SERVICE_ACCOUNT_KEY: ((gcp/service_accounts/owner.json_key)) 9 | inputs: 10 | - name: additional-environment 11 | - name: bosh-backup-and-restore 12 | run: 13 | path: bosh-backup-and-restore/ci/tasks/allow-connections-to-bosh-director-on-port-25555/task.sh 14 | -------------------------------------------------------------------------------- /ci/tasks/bbr-build/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: bosh-backup-and-restore 10 | - name: version 11 | optional: true 12 | 13 | outputs: 14 | - name: bbr-build 15 | - name: bbr-release 16 | 17 | run: 18 | path: bosh-backup-and-restore/ci/tasks/bbr-build/task.sh 19 | -------------------------------------------------------------------------------- /ci/tasks/bbr-s3-config-validator-build/task.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | set -x 5 | 6 | if [ -d version ]; then 7 | export VERSION=$(cat version/version) 8 | else 9 | export VERSION=$(date +%s) 10 | fi 11 | 12 | ROOT_DIR=$PWD 13 | 14 | cd bosh-backup-and-restore/s3-config-validator 15 | 16 | make artifact 17 | 18 | cp -r \ 19 | build/* \ 20 | "${ROOT_DIR}/bbr-s3-config-validator-build/" 21 | -------------------------------------------------------------------------------- /ci/tasks/bbr-s3-config-validator-build/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: docker-image 6 | source: 7 | repository: pcfplatformrecovery/backup-and-restore-minimal 8 | 9 | inputs: 10 | - name: bosh-backup-and-restore 11 | - name: version 12 | optional: true 13 | 14 | outputs: 15 | - name: bbr-s3-config-validator-build 16 | 17 | run: 18 | path: bosh-backup-and-restore/ci/tasks/bbr-s3-config-validator-build/task.sh 19 | -------------------------------------------------------------------------------- /ci/tasks/bbr-s3-config-validator-e2e-test/task.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | cd bosh-backup-and-restore/s3-config-validator/src 6 | go mod tidy 7 | go mod vendor 8 | go run github.com/onsi/ginkgo/v2/ginkgo \ 9 | -r \ 10 | --randomize-all \ 11 | --keep-going \ 12 | --fail-on-pending \ 13 | --cover \ 14 | --race \ 15 | --show-node-events \ 16 | test \ 17 | | sed 's/"\(aws_.*\)"\: "\(.*\)"/"\1": ""/g' 18 | 19 | -------------------------------------------------------------------------------- /ci/tasks/bbr-s3-config-validator-e2e-test/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: docker-image 6 | source: 7 | repository: pcfplatformrecovery/backup-and-restore-minimal 8 | 9 | inputs: 10 | - name: bosh-backup-and-restore 11 | 12 | params: 13 | AWS_SECRET_KEY: 14 | AWS_ACCESS_KEY: 15 | AWS_ASSUMED_ROLE_ARN: 16 | 17 | run: 18 | path: bosh-backup-and-restore/ci/tasks/bbr-s3-config-validator-e2e-test/task.sh 19 | -------------------------------------------------------------------------------- /ci/tasks/bbr-s3-config-validator-enable-aws-s3-filestore/task.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | type: docker-image 4 | source: 5 | repository: cryogenics/essentials 6 | tag: 0.1.111 7 | inputs: 8 | - name: env-pool 9 | - name: bosh-backup-and-restore 10 | params: 11 | ENDPOINT: 12 | BUILDPACKS_BUCKET: 13 | DROPLETS_BUCKET: 14 | PACKAGES_BUCKET: 15 | RESOURCES_BUCKET: 16 | BACKUP_REGION: 17 | BACKUP_BUCKET: 18 | ACCESS_KEY: 19 | SECRET_KEY: 20 | REGION: 21 | SKIP_APPLY_CHANGES: false 22 | run: 23 | path: bosh-backup-and-restore/ci/tasks/bbr-s3-config-validator-enable-aws-s3-filestore/task.sh 24 | -------------------------------------------------------------------------------- /ci/tasks/bbr-s3-config-validator-enable-backup-prepare-pas/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: docker-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore-minimal} 7 | 8 | inputs: 9 | - name: env-pool 10 | - name: bosh-backup-and-restore 11 | 12 | params: 13 | SKIP_APPLY_CHANGES: false 14 | 15 | run: 16 | path: bosh-backup-and-restore/ci/tasks/bbr-s3-config-validator-enable-backup-prepare-pas/task.sh 17 | -------------------------------------------------------------------------------- /ci/tasks/bbr-s3-config-validator-unit-test/task.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | cd bosh-backup-and-restore/s3-config-validator/src 6 | go mod tidy 7 | go mod vendor 8 | go run github.com/onsi/ginkgo/v2/ginkgo \ 9 | -r \ 10 | --randomize-all \ 11 | --randomize-suites \ 12 | --fail-on-pending \ 13 | --keep-going \ 14 | --cover \ 15 | --race \ 16 | --progress \ 17 | --skip="unreadable file" \ 18 | internal 19 | -------------------------------------------------------------------------------- /ci/tasks/bbr-s3-config-validator-unit-test/task.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | type: docker-image 4 | source: 5 | repository: cryogenics/essentials 6 | tag: 0.1.111 7 | inputs: 8 | - name: bosh-backup-and-restore 9 | params: 10 | AWS_SECRET_KEY: 11 | AWS_ACCESS_KEY: 12 | run: 13 | path: bosh-backup-and-restore/ci/tasks/bbr-s3-config-validator-unit-test/task.sh 14 | -------------------------------------------------------------------------------- /ci/tasks/bbr-s3-config-validator-validate-aws-s3-config/task.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | type: registry-image 4 | source: 5 | repository: cryogenics/essentials 6 | tag: 0.1.111 7 | inputs: 8 | - name: s3-config-validator-dev-release 9 | - name: bosh-backup-and-restore 10 | params: 11 | ACCESS_KEY: 12 | SECRET_KEY: 13 | ROLE_ARN: 14 | run: 15 | path: bosh-backup-and-restore/ci/tasks/bbr-s3-config-validator-validate-aws-s3-config/task.sh 16 | -------------------------------------------------------------------------------- /ci/tasks/bbr-system-deployment/task.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | echo -e "${BOSH_GW_PRIVATE_KEY}" > "${PWD}/ssh.key" 6 | chmod 0600 "${PWD}/ssh.key" 7 | export BOSH_GW_PRIVATE_KEY="${PWD}/ssh.key" 8 | export BOSH_ALL_PROXY="ssh+socks5://${BOSH_GW_USER}@${BOSH_GW_HOST}?private-key=${BOSH_GW_PRIVATE_KEY}" 9 | 10 | cd bosh-backup-and-restore 11 | make sys-test-deployment-ci 12 | -------------------------------------------------------------------------------- /ci/tasks/bbr-system-deployment/task.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | type: registry-image 4 | source: 5 | repository: cryogenics/essentials 6 | tag: 0.1.111 7 | inputs: 8 | - name: bosh-backup-and-restore 9 | params: 10 | BOSH_ENVIRONMENT: 11 | BOSH_CLIENT: 12 | BOSH_CLIENT_SECRET: 13 | BOSH_CA_CERT: 14 | BOSH_GW_HOST: 15 | BOSH_GW_PRIVATE_KEY: 16 | BOSH_GW_USER: 17 | run: 18 | path: bosh-backup-and-restore/ci/tasks/bbr-system-deployment/task.sh 19 | -------------------------------------------------------------------------------- /ci/tasks/bbr-system-director/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: bosh-backup-and-restore 10 | 11 | params: 12 | BOSH_DEPLOYMENT: 13 | BOSH_GW_HOST: 14 | BOSH_GW_PRIVATE_KEY: 15 | BOSH_GW_USER: 16 | 17 | DIRECTOR_HOST: 18 | DIRECTOR_SSH_USERNAME: 19 | DIRECTOR_SSH_KEY: 20 | 21 | USE_SHUTTLE: true 22 | run: 23 | path: bosh-backup-and-restore/ci/tasks/bbr-system-director/task.sh 24 | -------------------------------------------------------------------------------- /ci/tasks/bbr-update-homebrew-formula/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: homebrew-tap 10 | - name: bbr-release 11 | - name: bosh-backup-and-restore 12 | 13 | outputs: 14 | - name: updated-homebrew-tap 15 | 16 | run: 17 | path: bosh-backup-and-restore/ci/tasks/bbr-update-homebrew-formula/task.sh 18 | -------------------------------------------------------------------------------- /ci/tasks/bbr-upload-system-test-releases/task.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | echo -e "${BOSH_GW_PRIVATE_KEY}" > "${PWD}/ssh.key" 6 | chmod 0600 "${PWD}/ssh.key" 7 | export BOSH_GW_PRIVATE_KEY="${PWD}/ssh.key" 8 | export BOSH_ALL_PROXY="ssh+socks5://${BOSH_GW_USER}@${BOSH_GW_HOST}?private-key=${BOSH_GW_PRIVATE_KEY}" 9 | 10 | cd "bbr-deployment-test-releases/${RELEASE_NAME}" 11 | 12 | bosh -n create-release --force 13 | bosh upload-release --rebase 14 | -------------------------------------------------------------------------------- /ci/tasks/bbr-upload-system-test-releases/task.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | type: registry-image 4 | source: 5 | repository: cryogenics/essentials 6 | tag: 0.1.111 7 | inputs: 8 | - name: bbr-deployment-test-releases 9 | - name: bosh-backup-and-restore 10 | params: 11 | RELEASE_NAME: 12 | BOSH_ENVIRONMENT: 13 | BOSH_CLIENT: 14 | BOSH_CLIENT_SECRET: 15 | BOSH_CA_CERT: 16 | BOSH_GW_HOST: 17 | BOSH_GW_PRIVATE_KEY: 18 | BOSH_GW_USER: 19 | run: 20 | path: bosh-backup-and-restore/ci/tasks/bbr-upload-system-test-releases/task.sh 21 | -------------------------------------------------------------------------------- /ci/tasks/bosh-deployment-resource-source-file-adapter/task.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cat < source-file/source-file.yml 5 | --- 6 | jumpbox_username: ${BOSH_GW_USER} 7 | jumpbox_url: ${BOSH_GW_HOST} 8 | target: ${BOSH_ENVIRONMENT} 9 | client: ${BOSH_CLIENT} 10 | client_secret: ${BOSH_CLIENT_SECRET} 11 | ca_cert: 12 | EOF 13 | yq -iy ".ca_cert=\"$BOSH_CA_CERT\"" source-file/source-file.yml 14 | yq -iy ".jumpbox_ssh_key=\"$BOSH_GW_PRIVATE_KEY\"" source-file/source-file.yml 15 | -------------------------------------------------------------------------------- /ci/tasks/bosh-deployment-resource-source-file-adapter/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: bosh-backup-and-restore 10 | 11 | outputs: 12 | - name: source-file 13 | 14 | params: 15 | BOSH_ENVIRONMENT: 16 | BOSH_CLIENT: 17 | BOSH_CLIENT_SECRET: 18 | BOSH_CA_CERT: 19 | BOSH_GW_HOST: 20 | BOSH_GW_USER: 21 | BOSH_GW_PRIVATE_KEY: 22 | 23 | run: 24 | path: bosh-backup-and-restore/ci/tasks/bosh-deployment-resource-source-file-adapter/task.sh 25 | -------------------------------------------------------------------------------- /ci/tasks/build-binaries/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: bosh-backup-and-restore-master 10 | - name: bbr-final-release-version 11 | - name: bbr-s3-config-validator-artifact 12 | - name: ci 13 | 14 | outputs: 15 | - name: bbr-release 16 | - name: bbr-build 17 | 18 | run: 19 | path: ci/ci/tasks/build-binaries/task.sh 20 | -------------------------------------------------------------------------------- /ci/tasks/check-for-changes/task.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | pushd repo 6 | latest_tag=$(git describe --abbrev=0 --tags) 7 | has_changes=$(git log "${latest_tag}"..HEAD) 8 | 9 | echo "Running: git log ${latest_tag}..HEAD" 10 | echo "Changes are:" 11 | echo "$has_changes" 12 | 13 | if [[ -z "$has_changes" ]]; then 14 | echo "There are no changes to publish in a new release!" 15 | exit 1 16 | fi 17 | popd 18 | -------------------------------------------------------------------------------- /ci/tasks/check-for-changes/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: repo 10 | 11 | run: 12 | path: repo/ci/tasks/check-for-changes/task.sh 13 | -------------------------------------------------------------------------------- /ci/tasks/check-terraform-version/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: 7 | repository: harbor-repo.vmware.com/dockerhub-proxy-cache/pcfplatformrecovery/backup-and-restore 8 | 9 | inputs: 10 | - name: terraform-github-release 11 | - name: ci 12 | 13 | outputs: 14 | - name: dockerbuild-env 15 | 16 | run: 17 | path: ci/ci/tasks/check-terraform-version/task.sh 18 | 19 | -------------------------------------------------------------------------------- /ci/tasks/generate-docs/task.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | ROOT_DIR="$PWD" 6 | export VERSION=$(cat "version-folder/${VERSION_PATH}") 7 | 8 | pushd repo 9 | latest_tag=$(git describe --abbrev=0 --tags) 10 | export COMMITS=$(git log ${latest_tag}..HEAD --oneline | grep -v "Merge" | cut -d ' ' -f2-| uniq -u) 11 | popd 12 | 13 | erb -r date -T- template-folder/${TEMPLATE_PATH} > "${ROOT_DIR}/generated-release-notes.txt" 14 | 15 | pushd docs-repo 16 | sed -i "/Releases/ r ${ROOT_DIR}/generated-release-notes.txt" bbr-rn.html.md.erb 17 | echo -e "\n > Generated Release Notes:" 18 | cat bbr-rn.html.md.erb 19 | 20 | git add bbr-rn.html.md.erb 21 | git config --global user.name "Cryogenics CI" 22 | git config --global user.email "mapbu-cryogenics@groups.vmware.com" 23 | git commit -m "Release Notes for version: ${VERSION}" 24 | popd 25 | 26 | cp -r docs-repo/. updated-docs-repo/ 27 | -------------------------------------------------------------------------------- /ci/tasks/generate-docs/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: repo 10 | - name: docs-repo 11 | - name: template-folder 12 | - name: version-folder 13 | 14 | outputs: 15 | - name: updated-docs-repo 16 | 17 | params: 18 | TEMPLATE_PATH: 19 | VERSION_PATH: 20 | 21 | run: 22 | path: repo/ci/tasks/generate-docs/task.sh 23 | -------------------------------------------------------------------------------- /ci/tasks/package-release/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: version 10 | - name: bbr-build 11 | - name: bbr-s3-config-validator-build 12 | - name: bosh-backup-and-restore 13 | 14 | outputs: 15 | - name: packaged-release 16 | - name: release_metadata 17 | 18 | run: 19 | path: bosh-backup-and-restore/ci/tasks/package-release/task.sh 20 | -------------------------------------------------------------------------------- /ci/tasks/prepare-artefacts-for-github/task.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | ROOT_DIR="$PWD" 6 | GITHUB_FOLDER="${ROOT_DIR}/github-release-with-metadata" 7 | RELEASE_FOLDER="${ROOT_DIR}/release" 8 | RELEASE_TAR_FOLDER="${ROOT_DIR}/release-tar" 9 | VERSION=$(cat "version-folder/${VERSION_PATH}") 10 | 11 | function main { 12 | create_tarball 13 | copy_tarball_to_folder "${GITHUB_FOLDER}" 14 | copy_release_files_to_folder "${GITHUB_FOLDER}" 15 | delete_sha256_files 16 | export_release_metadata_variables 17 | } 18 | 19 | function create_tarball { 20 | echo "Creating release tarball..." 21 | export TAR_NAME="bbr-${VERSION}.tar" 22 | tar -cf "${TAR_NAME}" -C "${RELEASE_TAR_FOLDER}" . 23 | } 24 | 25 | function copy_tarball_to_folder { 26 | echo "Adding tarball to: $1" 27 | cp "${TAR_NAME}" "$1" 28 | } 29 | 30 | function copy_release_files_to_folder { 31 | cp -r "${RELEASE_FOLDER}/." "$1" 32 | } 33 | 34 | main 35 | -------------------------------------------------------------------------------- /ci/tasks/prepare-artefacts-for-github/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: release 10 | - name: release-tar 11 | - name: version-folder 12 | - name: bosh-backup-and-restore-master 13 | 14 | params: 15 | VERSION_PATH: 16 | 17 | outputs: 18 | - name: github-release-with-metadata 19 | 20 | run: 21 | path: bosh-backup-and-restore-master/ci/tasks/prepare-artefacts-for-github/task.sh 22 | -------------------------------------------------------------------------------- /ci/tasks/prepare-artefacts-for-pivnet/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: {repository: pcfplatformrecovery/backup-and-restore} 7 | 8 | inputs: 9 | - name: version 10 | - name: promoted-artefacts 11 | - name: repo 12 | 13 | params: 14 | TEMPLATE_PATH: 15 | RELEASE_TYPE: Maintenance 16 | 17 | outputs: 18 | - name: pivnet-artefacts 19 | 20 | run: 21 | path: repo/ci/tasks/prepare-artefacts-for-pivnet/task.sh 22 | -------------------------------------------------------------------------------- /ci/tasks/setup-drats-integration-config/task.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | inputs: 3 | - name: bosh-backup-and-restore 4 | - name: integration-configs 5 | - name: cf-deployment-env 6 | outputs: 7 | - name: updated-integration-configs 8 | params: 9 | CF_DEPLOYMENT_NAME: cf 10 | INTEGRATION_CONFIG_FILE_PATH: ci/integration_config.json 11 | SYSTEM_DOMAIN: 12 | JUMPBOX_PRIVATE_KEY: 13 | CREDHUB_CLIENT: 14 | CREDHUB_SECRET: 15 | CREDHUB_CA_CERT: 16 | CREDHUB_SERVER: 17 | CREDHUB_PROXY: 18 | BOSH_ENVIRONMENT: 19 | BOSH_CA_CERT: 20 | BOSH_ALL_PROXY: 21 | BOSH_CLIENT: 22 | BOSH_CLIENT_SECRET: 23 | run: 24 | path: bosh-backup-and-restore/ci/tasks/setup-drats-integration-config/task.sh 25 | -------------------------------------------------------------------------------- /ci/tasks/test-unit-s3-config-validator/task.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | set -x 5 | 6 | cd bosh-backup-and-restore/s3-config-validator/ 7 | 8 | make test-unit 9 | -------------------------------------------------------------------------------- /ci/tasks/test-unit-s3-config-validator/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: 7 | repository: golang-image 8 | 9 | inputs: 10 | - name: bosh-backup-and-restore 11 | 12 | run: 13 | path: bosh-backup-and-restore/ci/tasks/test-unit-s3-config-validator/task.sh 14 | -------------------------------------------------------------------------------- /ci/tasks/test-unit/task.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | set -x 5 | 6 | cd bosh-backup-and-restore/ 7 | 8 | make test-unit 9 | -------------------------------------------------------------------------------- /ci/tasks/test-unit/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: 7 | repository: golang-image 8 | 9 | inputs: 10 | - name: bosh-backup-and-restore 11 | 12 | run: 13 | path: bosh-backup-and-restore/ci/tasks/test-unit/task.sh 14 | -------------------------------------------------------------------------------- /cli/command/command_suite_test.go: -------------------------------------------------------------------------------- 1 | package command 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestBbr(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "BBR Cmd Suite") 13 | } 14 | -------------------------------------------------------------------------------- /executor/deployment/executor.go: -------------------------------------------------------------------------------- 1 | package deployment 2 | 3 | type DeploymentExecutor interface { 4 | Run([]Executable) []DeploymentError 5 | } 6 | 7 | type Executable interface { 8 | Execute() DeploymentError 9 | } 10 | -------------------------------------------------------------------------------- /executor/deployment/parallel.go: -------------------------------------------------------------------------------- 1 | package deployment 2 | 3 | func NewParallelExecutor() ParallelExecutor { 4 | return ParallelExecutor{} 5 | } 6 | 7 | type ParallelExecutor struct { 8 | } 9 | 10 | func (s ParallelExecutor) Run(executables []Executable) []DeploymentError { 11 | var errors []DeploymentError 12 | 13 | guard := make(chan bool, 10) 14 | errs := make(chan DeploymentError, len(executables)) 15 | 16 | for _, executable := range executables { 17 | guard <- true 18 | go func(executable Executable) { 19 | errs <- executable.Execute() 20 | <-guard 21 | }(executable) 22 | } 23 | 24 | for range executables { 25 | err := <-errs 26 | if err.Errs != nil { 27 | errors = append(errors, err) 28 | } 29 | } 30 | 31 | return errors 32 | } 33 | -------------------------------------------------------------------------------- /executor/deployment/serial.go: -------------------------------------------------------------------------------- 1 | package deployment 2 | 3 | func NewSerialExecutor() SerialExecutor { 4 | return SerialExecutor{} 5 | } 6 | 7 | type SerialExecutor struct { 8 | } 9 | 10 | func (s SerialExecutor) Run(executables []Executable) []DeploymentError { 11 | var errors []DeploymentError 12 | 13 | for _, executable := range executables { 14 | if err := executable.Execute(); err.Errs != nil { 15 | errors = append(errors, err) 16 | } 17 | } 18 | return errors 19 | } 20 | -------------------------------------------------------------------------------- /executor/executor.go: -------------------------------------------------------------------------------- 1 | package executor 2 | 3 | //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate 4 | //counterfeiter:generate -o fakes/fake_executor.go . Executor 5 | type Executor interface { 6 | Run([][]Executable) []error 7 | } 8 | 9 | //counterfeiter:generate -o fakes/fake_executable.go . Executable 10 | type Executable interface { 11 | Execute() error 12 | } 13 | -------------------------------------------------------------------------------- /executor/executor_suite_test.go: -------------------------------------------------------------------------------- 1 | package executor_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestExecutor(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Executor Suite") 13 | } 14 | -------------------------------------------------------------------------------- /executor/parallel.go: -------------------------------------------------------------------------------- 1 | package executor 2 | 3 | func NewParallelExecutor() ParallelExecutor { 4 | return ParallelExecutor{ 5 | maxInFlight: 10, 6 | } 7 | } 8 | 9 | type ParallelExecutor struct { 10 | maxInFlight int 11 | } 12 | 13 | func (s ParallelExecutor) SetMaxInFlight(maxInFlight int) { 14 | s.maxInFlight = maxInFlight 15 | } 16 | 17 | func (s ParallelExecutor) Run(executablesList [][]Executable) []error { 18 | var errors []error 19 | for _, executables := range executablesList { 20 | guard := make(chan bool, s.maxInFlight) 21 | errs := make(chan error, len(executables)) 22 | 23 | for _, executable := range executables { 24 | guard <- true 25 | go func(executable Executable) { 26 | errs <- executable.Execute() 27 | <-guard 28 | }(executable) 29 | } 30 | 31 | for range executables { 32 | err := <-errs 33 | if err != nil { 34 | errors = append(errors, err) 35 | } 36 | } 37 | } 38 | 39 | return errors 40 | } 41 | -------------------------------------------------------------------------------- /executor/serial.go: -------------------------------------------------------------------------------- 1 | package executor 2 | 3 | func NewSerialExecutor() SerialExecutor { 4 | return SerialExecutor{} 5 | } 6 | 7 | type SerialExecutor struct { 8 | } 9 | 10 | func (s SerialExecutor) Run(executablesList [][]Executable) []error { 11 | var errors []error 12 | for _, executables := range executablesList { 13 | for _, executable := range executables { 14 | if err := executable.Execute(); err != nil { 15 | errors = append(errors, err) 16 | } 17 | } 18 | } 19 | 20 | return errors 21 | } 22 | -------------------------------------------------------------------------------- /factory/bosh_deployment_manager.go: -------------------------------------------------------------------------------- 1 | package factory 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/bosh" 5 | boshlog "github.com/cloudfoundry/bosh-utils/logger" 6 | 7 | boshcmd "github.com/cloudfoundry/bosh-cli/v7/cmd/opts" 8 | boshsys "github.com/cloudfoundry/bosh-utils/system" 9 | ) 10 | 11 | func BuildBoshClient(targetUrl, username, password, caCertPathOrValue, bbrVersion string, logger boshlog.Logger) (bosh.Client, error) { 12 | var boshClient bosh.Client 13 | var err error 14 | fs := boshsys.NewOsFileSystem(logger) 15 | 16 | caCertArg := boshcmd.CACertArg{FS: fs} 17 | 18 | err = caCertArg.UnmarshalFlag(caCertPathOrValue) 19 | if err != nil { 20 | return boshClient, err 21 | } 22 | 23 | boshClient, err = bosh.BuildClient(targetUrl, username, password, caCertArg.Content, bbrVersion, logger) 24 | if err != nil { 25 | return boshClient, err 26 | } 27 | 28 | return boshClient, nil 29 | } 30 | -------------------------------------------------------------------------------- /factory/deployment_pre_backup_checker.go: -------------------------------------------------------------------------------- 1 | package factory 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/bosh" 5 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator" 6 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orderer" 7 | ) 8 | 9 | func BuildDeploymentBackupChecker(boshClient bosh.Client, 10 | logger bosh.Logger, 11 | withManifest bool) *orchestrator.BackupChecker { 12 | return orchestrator.NewBackupChecker(logger, 13 | bosh.NewDeploymentManager(boshClient, logger, withManifest), orderer.NewKahnBackupLockOrderer()) 14 | } 15 | -------------------------------------------------------------------------------- /factory/director_backup_checker.go: -------------------------------------------------------------------------------- 1 | package factory 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/instance" 5 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator" 6 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orderer" 7 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/ssh" 8 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/standalone" 9 | ) 10 | 11 | func BuildDirectorBackupChecker(host, username, privateKeyPath, bbrVersion string, hasDebug bool) *orchestrator.BackupChecker { 12 | logger := BuildLogger(hasDebug) 13 | deploymentManager := standalone.NewDeploymentManager(logger, 14 | host, 15 | username, 16 | privateKeyPath, 17 | instance.NewJobFinderOmitMetadataReleases(bbrVersion, logger), 18 | ssh.NewSshRemoteRunner, 19 | ) 20 | 21 | return orchestrator.NewBackupChecker(logger, deploymentManager, orderer.NewKahnBackupLockOrderer()) 22 | } 23 | -------------------------------------------------------------------------------- /fixtures/another-redis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: ((deployment-name)) 3 | releases: 4 | - name: redis-test 5 | version: latest 6 | 7 | stemcells: 8 | - alias: jammy 9 | os: ubuntu-jammy 10 | version: latest 11 | 12 | instance_groups: 13 | - name: another-redis 14 | instances: 1 15 | jobs: 16 | - name: redis-server 17 | release: redis-test 18 | properties: 19 | redis: 20 | password: redis 21 | persistence: 'yes' 22 | maxclients: 1000 23 | vm_type: minimal 24 | persistent_disk_type: 5GB 25 | stemcell: jammy 26 | azs: [z1] 27 | networks: 28 | - name: default 29 | 30 | 31 | update: 32 | canaries: 2 33 | canary_watch_time: 30000-180000 34 | update_watch_time: 30000-180000 35 | max_in_flight: 4 36 | -------------------------------------------------------------------------------- /fixtures/create_user_with_key: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | username=$1 6 | key=$2 7 | 8 | groupadd -f vcap 9 | useradd --shell /bin/bash --create-home "$username" 10 | usermod -aG sudo,vcap,bosh_sshers "$username" 11 | 12 | mkdir -p "/home/$1/.ssh" 13 | echo "$key" > "/home/$1/.ssh/authorized_keys" -------------------------------------------------------------------------------- /fixtures/director-backup-integration/backup: -------------------------------------------------------------------------------- 1 | this is a backup 2 | -------------------------------------------------------------------------------- /fixtures/director-backup-integration/metadata: -------------------------------------------------------------------------------- 1 | instances: 2 | - name: bosh 3 | index: "0" 4 | artifacts: 5 | - name: bosh 6 | checksums: 7 | ./backup: 26e17765aa93724bebd8675aeaef0dc27ac7b778003a8094dffdf9b0ffe2deba -------------------------------------------------------------------------------- /fixtures/director-backup/metadata: -------------------------------------------------------------------------------- 1 | instances: 2 | - name: bosh 3 | index: "0" 4 | artifacts: 5 | - name: test-backup-and-restore 6 | checksums: 7 | ./backup: 26e17765aa93724bebd8675aeaef0dc27ac7b778003a8094dffdf9b0ffe2deba 8 | - name: remarkable-backup-and-restore 9 | checksums: 10 | ./backup: 26e17765aa93724bebd8675aeaef0dc27ac7b778003a8094dffdf9b0ffe2deba 11 | - name: amazing-backup-and-restore 12 | checksums: 13 | ./backup: 26e17765aa93724bebd8675aeaef0dc27ac7b778003a8094dffdf9b0ffe2deba 14 | -------------------------------------------------------------------------------- /fixtures/jumpbox-windows-ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: jumpbox-windows-ci 3 | 4 | releases: [] 5 | 6 | stemcells: 7 | - alias: default 8 | os: ubuntu-jammy 9 | version: latest 10 | 11 | instance_groups: 12 | - name: jumpbox 13 | instances: 1 14 | jobs: [] 15 | vm_type: g1-small 16 | vm_extensions: 17 | - bosh-director-access 18 | persistent_disk_type: 1GB 19 | azs: [z1] 20 | networks: 21 | - name: default 22 | stemcell: default 23 | 24 | update: 25 | canaries: 1 26 | canary_watch_time: 1000 27 | update_watch_time: 1000 28 | max_in_flight: 4 29 | -------------------------------------------------------------------------------- /fixtures/jumpbox.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: ((deployment-name)) 3 | 4 | releases: [] 5 | 6 | stemcells: 7 | - alias: jammy 8 | os: ubuntu-jammy 9 | version: latest 10 | 11 | instance_groups: 12 | - name: jumpbox 13 | instances: 1 14 | jobs: [] 15 | vm_type: minimal 16 | persistent_disk_type: 5GB 17 | stemcell: jammy 18 | azs: [z1] 19 | networks: 20 | - name: default 21 | 22 | update: 23 | canaries: 1 24 | canary_watch_time: 1000 25 | update_watch_time: 1000 26 | max_in_flight: 4 27 | -------------------------------------------------------------------------------- /fixtures/redis-backup-with-disabled-job/metadata: -------------------------------------------------------------------------------- 1 | instances: 2 | - name: redis 3 | index: "0" 4 | artifacts: 5 | - name: redis-server 6 | checksums: 7 | ./redis-server/appendonly.aof: be1b7e4e577b7cbcd556ec75f2f4b2e2d3afca1e40f8ce5a2b748b462cf4bd53 8 | ./redis-server/dump.rdb: ba3589985f5f4869fe62d155faee8e59c328b42875cb7e3fbb18c7b8152a92d2 -------------------------------------------------------------------------------- /fixtures/redis-backup-with-disabled-job/redis-0-redis-server.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry/bosh-backup-and-restore/94bdfbc1922cc55ca0596c9c1ff37e9bdda88c44/fixtures/redis-backup-with-disabled-job/redis-0-redis-server.tar -------------------------------------------------------------------------------- /fixtures/redis-backup/metadata: -------------------------------------------------------------------------------- 1 | instances: 2 | - name: other-redis 3 | index: "0" 4 | artifacts: 5 | - name: redis-server 6 | checksums: 7 | ./redis-server/appendonly.aof: be1b7e4e577b7cbcd556ec75f2f4b2e2d3afca1e40f8ce5a2b748b462cf4bd53 8 | ./redis-server/dump.rdb: 3f1baf2147d8e9bc91fdbf21f7d384601d0c20130064a1f02d5d096ccf94a3fe 9 | - name: redis 10 | index: "0" 11 | artifacts: 12 | - name: redis-server 13 | checksums: 14 | ./redis-server/appendonly.aof: be1b7e4e577b7cbcd556ec75f2f4b2e2d3afca1e40f8ce5a2b748b462cf4bd53 15 | ./redis-server/dump.rdb: ba3589985f5f4869fe62d155faee8e59c328b42875cb7e3fbb18c7b8152a92d2 16 | - name: redis 17 | index: "1" 18 | artifacts: 19 | - name: redis-server 20 | checksums: 21 | ./redis-server/appendonly.aof: be1b7e4e577b7cbcd556ec75f2f4b2e2d3afca1e40f8ce5a2b748b462cf4bd53 22 | ./redis-server/dump.rdb: 66f7f1c19210f601eb7e087f510cbf6c045ca70654dc4c323902204dc4c38108 -------------------------------------------------------------------------------- /fixtures/redis-backup/other-redis-0-redis-server.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry/bosh-backup-and-restore/94bdfbc1922cc55ca0596c9c1ff37e9bdda88c44/fixtures/redis-backup/other-redis-0-redis-server.tar -------------------------------------------------------------------------------- /fixtures/redis-backup/redis-0-redis-server.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry/bosh-backup-and-restore/94bdfbc1922cc55ca0596c9c1ff37e9bdda88c44/fixtures/redis-backup/redis-0-redis-server.tar -------------------------------------------------------------------------------- /fixtures/redis-backup/redis-1-redis-server.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry/bosh-backup-and-restore/94bdfbc1922cc55ca0596c9c1ff37e9bdda88c44/fixtures/redis-backup/redis-1-redis-server.tar -------------------------------------------------------------------------------- /fixtures/redis-maru-lite.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: ((deployment-name)) 3 | 4 | releases: 5 | - name: redis-test 6 | version: latest 7 | 8 | stemcells: 9 | - alias: jammy 10 | os: ubuntu-jammy 11 | version: latest 12 | 13 | instance_groups: 14 | - name: redis 15 | instances: 1 16 | jobs: 17 | - name: redis-server 18 | release: redis-test 19 | properties: 20 | redis: 21 | password: redis 22 | persistence: 'yes' 23 | maxclients: 1000 24 | vm_type: minimal 25 | persistent_disk_type: 5GB 26 | stemcell: jammy 27 | azs: 28 | - z1 29 | networks: 30 | - name: default 31 | 32 | update: 33 | canaries: 1 34 | canary_watch_time: 30000-180000 35 | update_watch_time: 30000-180000 36 | max_in_flight: 4 37 | -------------------------------------------------------------------------------- /fixtures/redis-with-backup-one-restore-all.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: ((deployment-name)) 3 | 4 | releases: 5 | - name: redis-test 6 | version: latest 7 | 8 | stemcells: 9 | - alias: jammy 10 | os: ubuntu-jammy 11 | version: latest 12 | 13 | instance_groups: 14 | - name: redis 15 | instances: 2 16 | jobs: 17 | - name: redis-server 18 | release: redis-test 19 | properties: 20 | bbr: 21 | backup_one_restore_all: true 22 | redis: 23 | password: redis 24 | persistence: 'yes' 25 | maxclients: 1000 26 | vm_type: minimal 27 | persistent_disk_type: 5GB 28 | stemcell: jammy 29 | azs: [z1] 30 | networks: 31 | - name: default 32 | 33 | update: 34 | canaries: 2 35 | canary_watch_time: 30000-180000 36 | update_watch_time: 30000-180000 37 | max_in_flight: 4 38 | -------------------------------------------------------------------------------- /fixtures/redis-with-slow-backup.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: ((deployment-name)) 3 | 4 | releases: 5 | - name: redis-test 6 | version: latest 7 | 8 | stemcells: 9 | - alias: jammy 10 | os: ubuntu-jammy 11 | version: latest 12 | 13 | instance_groups: 14 | - name: redis 15 | instances: 1 16 | jobs: 17 | - name: slow-backup 18 | release: redis-test 19 | properties: 20 | redis: 21 | password: redis 22 | persistence: 'yes' 23 | maxclients: 1000 24 | vm_type: minimal 25 | persistent_disk_type: 5GB 26 | stemcell: jammy 27 | azs: 28 | - z1 29 | networks: 30 | - name: default 31 | 32 | update: 33 | canaries: 2 34 | canary_watch_time: 30000-180000 35 | update_watch_time: 30000-180000 36 | max_in_flight: 4 37 | -------------------------------------------------------------------------------- /fixtures/redis/redis-backup: -------------------------------------------------------------------------------- 1 | the time has come, the walrus said, to talk of many things 2 | -------------------------------------------------------------------------------- /fixtures/test_rsa.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLj9SWBmRr+nxOD1R5J8N5FyhFI83XUmoKVs1veQJVri+rOzYzSA1ATNWqPifs8DkXkdR4kFmGQ3er5Pk3GFtwTFR5LwCxq6gKiyGIWSTic+zLw7hYUAFBVzs77oDHZd4ZPwWHMOMJOuB6KE95Kk/rrfmBddDl+Rhtk04gYKmZ5cHAHFJvA2YGfxbmwV9hPNnq3DIp19s4n1i0MAMOYH1VsxTrNFd9ZImDfW1/uQHuG+1Gb2xVNjeMBnSV3qSWJcu8Db8J+edt1sJMOrBLF0o7rTX5QwRgiSIp4Wg0Aj7Izs39lXHyGF6PbmNDoaC5ERiHbqVb9z5xCUYsy9CgLmlz pivotal@iMac-5.local 2 | -------------------------------------------------------------------------------- /instance/export_test.go: -------------------------------------------------------------------------------- 1 | package instance 2 | 3 | func (b *Artifact) SetArtifactDirectory(dir string) { 4 | b.artifactDirectory = dir 5 | } 6 | -------------------------------------------------------------------------------- /integration/integration_suite_test.go: -------------------------------------------------------------------------------- 1 | package integration 2 | 3 | import ( 4 | "testing" 5 | 6 | "fmt" 7 | 8 | . "github.com/onsi/ginkgo/v2" 9 | . "github.com/onsi/gomega" 10 | "github.com/onsi/gomega/gexec" 11 | ) 12 | 13 | func TestIntegration(t *testing.T) { 14 | RegisterFailHandler(Fail) 15 | RunSpecs(t, "CLI Integration Suite") 16 | } 17 | 18 | var binary Binary 19 | 20 | const version = "2.0" 21 | 22 | var _ = BeforeSuite(func() { 23 | commandPath, err := gexec.Build( 24 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/cmd/bbr", 25 | "-ldflags", 26 | fmt.Sprintf("-X main.version=%s", version), 27 | ) 28 | Expect(err).NotTo(HaveOccurred()) 29 | binary = NewBinary(commandPath) 30 | }) 31 | 32 | var _ = AfterSuite(func() { 33 | gexec.CleanupBuildArtifacts() 34 | }) 35 | -------------------------------------------------------------------------------- /internal/cf-webmock/README.md: -------------------------------------------------------------------------------- 1 | The cf-webmock code was once hosted at https://github.com/pivotal-cf-experimental/cf-webmock 2 | But this was not maintained and was archived. 3 | So the relevant bits have been moved into this repo. 4 | The license of the original was Apache 2, which is the same as the license of this repo. -------------------------------------------------------------------------------- /internal/cf-webmock/mockbosh/delete_deployment.go: -------------------------------------------------------------------------------- 1 | package mockbosh 2 | 3 | import "github.com/cloudfoundry-incubator/bosh-backup-and-restore/internal/cf-webmock/mockhttp" 4 | 5 | type deleteDeployMock struct { 6 | *mockhttp.MockHttp 7 | } 8 | 9 | func DeleteDeployment(deploymentName string) *deleteDeployMock { 10 | return &deleteDeployMock{ 11 | MockHttp: mockhttp.NewMockedHttpRequest("DELETE", "/deployments/"+deploymentName), 12 | } 13 | } 14 | 15 | func (d *deleteDeployMock) RedirectsToTask(taskID int) *mockhttp.MockHttp { 16 | return d.RedirectsTo(taskURL(taskID)) 17 | } 18 | -------------------------------------------------------------------------------- /internal/cf-webmock/mockbosh/errand.go: -------------------------------------------------------------------------------- 1 | package mockbosh 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/internal/cf-webmock/mockhttp" 7 | ) 8 | 9 | type errandMock struct { 10 | *mockhttp.MockHttp 11 | } 12 | 13 | func Errand(deploymentName, errandName string) *errandMock { 14 | return &errandMock{ 15 | MockHttp: mockhttp.NewMockedHttpRequest("POST", fmt.Sprintf("/deployments/%s/errands/%s/runs", deploymentName, errandName)), 16 | } 17 | } 18 | 19 | func (e *errandMock) RedirectsToTask(taskID int) *mockhttp.MockHttp { 20 | return e.RedirectsTo(taskURL(taskID)) 21 | } 22 | -------------------------------------------------------------------------------- /internal/cf-webmock/mockbosh/get_deployments.go: -------------------------------------------------------------------------------- 1 | package mockbosh 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/internal/cf-webmock/mockhttp" 5 | ) 6 | 7 | type getDeploymentMock struct { 8 | *mockhttp.MockHttp 9 | } 10 | 11 | type deployment struct { 12 | Name string `json:"name"` 13 | } 14 | 15 | func GetDeployments() *getDeploymentMock { 16 | return &getDeploymentMock{ 17 | MockHttp: mockhttp.NewMockedHttpRequest("GET", "/deployments"), 18 | } 19 | } 20 | 21 | func (d *getDeploymentMock) RespondsWithListOfDeployments(deployments []string) *mockhttp.MockHttp { 22 | var deps []deployment 23 | 24 | for _, dep := range deployments { 25 | deps = append(deps, deployment{Name: dep}) 26 | } 27 | return d.RespondsWithJson(deps) 28 | } 29 | -------------------------------------------------------------------------------- /internal/cf-webmock/mockbosh/info.go: -------------------------------------------------------------------------------- 1 | package mockbosh 2 | 3 | import "github.com/cloudfoundry-incubator/bosh-backup-and-restore/internal/cf-webmock/mockhttp" 4 | 5 | type infoMock struct { 6 | *mockhttp.MockHttp 7 | } 8 | 9 | func Info() *infoMock { 10 | return &infoMock{ 11 | MockHttp: mockhttp.NewMockedHttpRequest("GET", "/info").SkipAuthentication(), 12 | } 13 | } 14 | 15 | func (m *infoMock) RespondsWithSufficientAPIVersion() *mockhttp.MockHttp { 16 | return m.RespondsWith(`{"version":"1.3262.0.0 (00000000)"}`) 17 | } 18 | 19 | func (m *infoMock) WithAuthTypeBasic() *mockhttp.MockHttp { 20 | return m.RespondsWithJson(map[string]interface{}{"user_authentication": map[string]string{"type": "basic"}}) 21 | } 22 | 23 | func (m *infoMock) WithAuthTypeUAA(url string) *mockhttp.MockHttp { 24 | return m.RespondsWithJson(map[string]interface{}{"user_authentication": map[string]interface{}{ 25 | "type": "uaa", "options": map[string]string{"url": url}, 26 | }}) 27 | } 28 | -------------------------------------------------------------------------------- /internal/cf-webmock/mockbosh/mockbosh.go: -------------------------------------------------------------------------------- 1 | package mockbosh 2 | 3 | import ( 4 | "crypto/tls" 5 | "net/http" 6 | "net/http/httptest" 7 | 8 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/internal/cf-webmock/mockhttp" 9 | ) 10 | 11 | func New() *mockhttp.Server { 12 | return mockhttp.StartServer("mock-bosh", httptest.NewServer) 13 | } 14 | 15 | func NewTLS() *mockhttp.Server { 16 | return mockhttp.StartServer("mock-bosh", httptest.NewTLSServer) 17 | } 18 | 19 | func NewTLSWithCert(cert tls.Certificate) *mockhttp.Server { 20 | return mockhttp.StartServer("mock-bosh", func(handler http.Handler) *httptest.Server { 21 | ts := httptest.NewUnstartedServer(handler) 22 | 23 | ts.TLS = &tls.Config{ 24 | Certificates: []tls.Certificate{cert}, 25 | } 26 | ts.StartTLS() 27 | return ts 28 | }) 29 | } 30 | -------------------------------------------------------------------------------- /internal/cf-webmock/mockbosh/task.go: -------------------------------------------------------------------------------- 1 | package mockbosh 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/internal/cf-webmock/mockhttp" 7 | ) 8 | 9 | const ( 10 | TaskQueued = "queued" 11 | TaskProcessing = "processing" 12 | TaskDone = "done" 13 | TaskError = "error" 14 | ) 15 | 16 | type taskMock struct { 17 | *mockhttp.MockHttp 18 | taskID int 19 | } 20 | 21 | func Task(taskID int) *taskMock { 22 | return &taskMock{ 23 | MockHttp: mockhttp.NewMockedHttpRequest("GET", fmt.Sprintf("/tasks/%d", taskID)), 24 | taskID: taskID, 25 | } 26 | } 27 | 28 | func (t *taskMock) RespondsWithTaskContainingState(provisioningTaskState string) *mockhttp.MockHttp { 29 | return t.RespondsWithJson(map[string]interface{}{ 30 | "id": t.taskID, 31 | "state": provisioningTaskState, 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /internal/cf-webmock/mockbosh/vms.go: -------------------------------------------------------------------------------- 1 | package mockbosh 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/internal/cf-webmock/mockhttp" 7 | ) 8 | 9 | type vmsForDeploymentMock struct { 10 | *mockhttp.MockHttp 11 | deploymentName string 12 | } 13 | 14 | func VMsForDeployment(deploymentName string) *vmsForDeploymentMock { 15 | mock := &vmsForDeploymentMock{ 16 | MockHttp: mockhttp.NewMockedHttpRequest("GET", fmt.Sprintf("/deployments/%s/vms?format=full", deploymentName)), 17 | deploymentName: deploymentName, 18 | } 19 | return mock 20 | } 21 | 22 | func (t *vmsForDeploymentMock) RedirectsToTask(taskID int) *mockhttp.MockHttp { 23 | return t.RedirectsTo(taskURL(taskID)) 24 | } 25 | -------------------------------------------------------------------------------- /orchestrator/add_finish_time_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | type AddFinishTimeStep struct { 8 | nowFunc func() time.Time 9 | } 10 | 11 | func NewAddFinishTimeStep(nowFunc func() time.Time) Step { 12 | return &AddFinishTimeStep{ 13 | nowFunc: nowFunc, 14 | } 15 | } 16 | 17 | func (s *AddFinishTimeStep) Run(session *Session) error { 18 | if session.CurrentArtifact() != nil { 19 | return session.CurrentArtifact().AddFinishTime(s.nowFunc()) 20 | } 21 | 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /orchestrator/backup_checker.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | type BackupChecker struct { 4 | *Workflow 5 | } 6 | 7 | func NewBackupChecker(logger Logger, deploymentManager DeploymentManager, lockOrderer LockOrderer) *BackupChecker { 8 | checkDeployment := NewFindDeploymentStep(deploymentManager, logger) 9 | backupable := NewBackupableStep(lockOrderer, logger) 10 | cleanup := NewCleanupStep() 11 | workflow := NewWorkflow() 12 | 13 | workflow.StartWith(checkDeployment).OnSuccess(backupable) 14 | workflow.Add(backupable).OnSuccessOrFailure(cleanup) 15 | workflow.Add(cleanup) 16 | 17 | return &BackupChecker{ 18 | Workflow: workflow, 19 | } 20 | } 21 | 22 | func (b BackupChecker) Check(deploymentName string) Error { 23 | session := NewSession(deploymentName) 24 | 25 | err := b.Workflow.Run(session) 26 | 27 | return err 28 | } 29 | -------------------------------------------------------------------------------- /orchestrator/backup_executable.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | type BackupExecutable struct { 4 | Job 5 | } 6 | 7 | func NewBackupExecutable(j Job) BackupExecutable { 8 | return BackupExecutable{j} 9 | } 10 | 11 | func (e BackupExecutable) Execute() error { 12 | return e.Job.Backup() 13 | } 14 | -------------------------------------------------------------------------------- /orchestrator/backup_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import "github.com/cloudfoundry-incubator/bosh-backup-and-restore/executor" 4 | 5 | type BackupStep struct { 6 | executor executor.Executor 7 | } 8 | 9 | func (s *BackupStep) Run(session *Session) error { 10 | err := session.CurrentDeployment().Backup(s.executor) 11 | if err != nil { 12 | return NewBackupError(err.Error()) 13 | } 14 | return nil 15 | } 16 | 17 | func NewBackupStep(executor executor.Executor) Step { 18 | return &BackupStep{ 19 | executor: executor, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /orchestrator/backupable_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import ( 4 | "github.com/pkg/errors" 5 | ) 6 | 7 | type BackupableStep struct { 8 | lockOrderer LockOrderer 9 | logger Logger 10 | } 11 | 12 | func NewBackupableStep(lockOrderer LockOrderer, logger Logger) Step { 13 | return &BackupableStep{lockOrderer: lockOrderer, logger: logger} 14 | } 15 | 16 | func (s *BackupableStep) Run(session *Session) error { 17 | s.logger.Info("bbr", "Running pre-checks for backup of %s...\n", session.DeploymentName()) 18 | 19 | deployment := session.CurrentDeployment() 20 | if !deployment.IsBackupable() { 21 | return errors.Errorf("Deployment '%s' has no backup scripts", session.DeploymentName()) 22 | } 23 | 24 | err := deployment.CheckArtifactDir() 25 | if err != nil { 26 | return NewArtifactDirError(err.Error()) 27 | } 28 | 29 | if err := deployment.ValidateLockingDependencies(s.lockOrderer); err != nil { 30 | return err 31 | } 32 | return nil 33 | } 34 | -------------------------------------------------------------------------------- /orchestrator/checksum.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | type BackupChecksum map[string]string 4 | 5 | func (b BackupChecksum) Match(other BackupChecksum) (bool, []string) { 6 | if len(b) != len(other) { 7 | return false, b.getMismatchedFiles(other) 8 | } 9 | 10 | for key := range b { 11 | if b[key] != other[key] { 12 | return false, b.getMismatchedFiles(other) 13 | } 14 | } 15 | 16 | return true, []string{} 17 | } 18 | 19 | func (b BackupChecksum) getMismatchedFiles(other BackupChecksum) []string { 20 | var files []string 21 | 22 | for key := range b { 23 | if b[key] != other[key] { 24 | files = append(files, key) 25 | } 26 | } 27 | 28 | return files 29 | } 30 | -------------------------------------------------------------------------------- /orchestrator/cleanup_previous_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | type CleanupPreviousStep struct{} 4 | 5 | func NewCleanupPreviousStep() Step { 6 | return &CleanupPreviousStep{} 7 | } 8 | 9 | func (s *CleanupPreviousStep) Run(session *Session) error { 10 | return session.CurrentDeployment().CleanupPrevious() 11 | } 12 | -------------------------------------------------------------------------------- /orchestrator/cleanup_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import "fmt" 4 | 5 | type CleanupStep struct{} 6 | 7 | func NewCleanupStep() Step { 8 | return &CleanupStep{} 9 | } 10 | 11 | func (s *CleanupStep) Run(session *Session) error { 12 | 13 | if err := session.CurrentDeployment().Cleanup(); err != nil { 14 | return NewCleanupError( 15 | fmt.Sprintf("Deployment '%s' failed while cleaning up with error: %v", session.DeploymentName(), err)) 16 | } 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /orchestrator/copy_to_remote_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import ( 4 | "github.com/pkg/errors" 5 | ) 6 | 7 | type CopyToRemoteStep struct { 8 | artifactCopier ArtifactCopier 9 | } 10 | 11 | func NewCopyToRemoteStep(artifactCopier ArtifactCopier) Step { 12 | return &CopyToRemoteStep{ 13 | artifactCopier: artifactCopier, 14 | } 15 | } 16 | 17 | func (s *CopyToRemoteStep) Run(session *Session) error { 18 | err := s.artifactCopier.UploadBackupToDeployment(session.CurrentArtifact(), session.CurrentDeployment()) 19 | if err != nil { 20 | return errors.Errorf("Unable to send backup to remote machine. Got error: %s", err) 21 | } 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /orchestrator/deployment_manager.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate 4 | //counterfeiter:generate -o fakes/fake_deployment_manager.go . DeploymentManager 5 | type DeploymentManager interface { 6 | Find(deploymentName string) (Deployment, error) 7 | SaveManifest(deploymentName string, artifact Backup) error 8 | } 9 | -------------------------------------------------------------------------------- /orchestrator/drain_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | type DrainStep struct { 8 | logger Logger 9 | artifactCopier ArtifactCopier 10 | } 11 | 12 | func NewDrainStep(logger Logger, artifactCopier ArtifactCopier) Step { 13 | return &DrainStep{ 14 | logger: logger, 15 | artifactCopier: artifactCopier, 16 | } 17 | } 18 | 19 | func (s *DrainStep) Run(session *Session) error { 20 | err := s.artifactCopier.DownloadBackupFromDeployment(session.CurrentArtifact(), session.CurrentDeployment()) 21 | if err != nil { 22 | s.logger.Info("bbr", "Failed to create backup of %s on %v, failed during drain step\n", session.DeploymentName(), time.Now()) 23 | return NewDrainError(err.Error()) 24 | } 25 | s.logger.Info("bbr", "Backup created of %s on %v\n", session.DeploymentName(), time.Now()) 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /orchestrator/find_deployment_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | type FindDeploymentStep struct { 4 | deploymentManager DeploymentManager 5 | logger Logger 6 | } 7 | 8 | func NewFindDeploymentStep(deploymentManager DeploymentManager, logger Logger) Step { 9 | return &FindDeploymentStep{deploymentManager: deploymentManager, logger: logger} 10 | } 11 | 12 | func (s *FindDeploymentStep) Run(session *Session) error { 13 | s.logger.Info("bbr", "Looking for scripts") 14 | deployment, err := s.deploymentManager.Find(session.DeploymentName()) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | session.SetCurrentDeployment(deployment) 20 | 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /orchestrator/lock_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import "github.com/cloudfoundry-incubator/bosh-backup-and-restore/executor" 4 | 5 | type LockStep struct { 6 | lockOrderer LockOrderer 7 | executor executor.Executor 8 | } 9 | 10 | func (s *LockStep) Run(session *Session) error { 11 | err := session.CurrentDeployment().PreBackupLock(s.lockOrderer, s.executor) 12 | if err != nil { 13 | return NewLockError(err.Error()) 14 | } 15 | return nil 16 | } 17 | 18 | func NewLockStep(lockOrderer LockOrderer, executor executor.Executor) Step { 19 | return &LockStep{lockOrderer: lockOrderer, executor: executor} 20 | } 21 | -------------------------------------------------------------------------------- /orchestrator/logger.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate 4 | //counterfeiter:generate -o fakes/fake_logger.go . Logger 5 | type Logger interface { 6 | Debug(tag, msg string, args ...interface{}) 7 | Info(tag, msg string, args ...interface{}) 8 | Warn(tag, msg string, args ...interface{}) 9 | Error(tag, msg string, args ...interface{}) 10 | } 11 | -------------------------------------------------------------------------------- /orchestrator/orchestrator_suite_test.go: -------------------------------------------------------------------------------- 1 | package orchestrator_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestBackuper(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Orchestrator Suite") 13 | } 14 | -------------------------------------------------------------------------------- /orchestrator/post_backup_unlock_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import "github.com/cloudfoundry-incubator/bosh-backup-and-restore/executor" 4 | 5 | type PostBackupUnlockStep struct { 6 | afterSuccessfulBackup bool 7 | lockOrderer LockOrderer 8 | executor executor.Executor 9 | } 10 | 11 | func NewPostBackupUnlockStep(afterSuccessfulBackup bool, lockOrderer LockOrderer, executor executor.Executor) Step { 12 | return &PostBackupUnlockStep{ 13 | afterSuccessfulBackup: afterSuccessfulBackup, 14 | lockOrderer: lockOrderer, 15 | executor: executor, 16 | } 17 | } 18 | 19 | func (s *PostBackupUnlockStep) Run(session *Session) error { 20 | err := session.CurrentDeployment().PostBackupUnlock(s.afterSuccessfulBackup, s.lockOrderer, s.executor) 21 | if err != nil { 22 | return NewPostUnlockError(err.Error()) 23 | } 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /orchestrator/post_restore_unlock_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import "github.com/cloudfoundry-incubator/bosh-backup-and-restore/executor" 4 | 5 | type PostRestoreUnlockStep struct { 6 | lockOrderer LockOrderer 7 | executor executor.Executor 8 | } 9 | 10 | func NewPostRestoreUnlockStep(lockOrderer LockOrderer, executor executor.Executor) Step { 11 | return &PostRestoreUnlockStep{ 12 | lockOrderer: lockOrderer, 13 | executor: executor, 14 | } 15 | } 16 | 17 | func (s *PostRestoreUnlockStep) Run(session *Session) error { 18 | err := session.CurrentDeployment().PostRestoreUnlock(s.lockOrderer, s.executor) 19 | 20 | if err != nil { 21 | return NewPostUnlockError(err.Error()) 22 | } 23 | 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /orchestrator/pre_restore_lock_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/executor" 5 | "github.com/pkg/errors" 6 | ) 7 | 8 | type PreRestoreLockStep struct { 9 | lockOrderer LockOrderer 10 | executor executor.Executor 11 | } 12 | 13 | func NewPreRestoreLockStep(lockOrderer LockOrderer, executor executor.Executor) Step { 14 | return &PreRestoreLockStep{ 15 | lockOrderer: lockOrderer, 16 | executor: executor, 17 | } 18 | } 19 | 20 | func (s *PreRestoreLockStep) Run(session *Session) error { 21 | err := session.CurrentDeployment().PreRestoreLock(s.lockOrderer, s.executor) 22 | 23 | if err != nil { 24 | return errors.Wrap(err, "pre-restore-lock failed") 25 | } 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /orchestrator/restore_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | import "github.com/pkg/errors" 4 | 5 | type RestoreStep struct { 6 | logger Logger 7 | } 8 | 9 | func NewRestoreStep(logger Logger) Step { 10 | return &RestoreStep{logger: logger} 11 | } 12 | 13 | func (s *RestoreStep) Run(session *Session) error { 14 | err := session.CurrentDeployment().Restore() 15 | 16 | if err != nil { 17 | return errors.Wrap(err, "Failed to restore") 18 | } 19 | 20 | s.logger.Info("bbr", "Completed restore of %s\n", session.DeploymentName()) 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /orchestrator/reverse.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | func Reverse(jobsSliceOfSlices [][]Job) [][]Job { 4 | reversedJobs := [][]Job{} 5 | for _, jobSlice := range jobsSliceOfSlices { 6 | reversedJobs = append([][]Job{jobSlice}, reversedJobs...) 7 | } 8 | return reversedJobs 9 | } 10 | -------------------------------------------------------------------------------- /orchestrator/skip_step.go: -------------------------------------------------------------------------------- 1 | package orchestrator 2 | 3 | func NewSkipStep(logger Logger, name string) *SkipStep { 4 | return &SkipStep{ 5 | logger: logger, 6 | name: name, 7 | } 8 | } 9 | 10 | type SkipStep struct { 11 | name string 12 | logger Logger 13 | } 14 | 15 | func (s *SkipStep) Run(session *Session) error { 16 | s.logger.Info("bbr", "Skipping %s for deployment", s.name) 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /orchestrator/skip_step_test.go: -------------------------------------------------------------------------------- 1 | package orchestrator_test 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator" 7 | 8 | . "github.com/onsi/ginkgo/v2" 9 | . "github.com/onsi/gomega" 10 | 11 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator/fakes" 12 | ) 13 | 14 | var _ = Describe("SkipStep", func() { 15 | var ( 16 | logger *fakes.FakeLogger 17 | ) 18 | 19 | BeforeEach(func() { 20 | logger = new(fakes.FakeLogger) 21 | }) 22 | 23 | It("logs skipping a step", func() { 24 | skipStep := orchestrator.NewSkipStep(logger, "foo") 25 | 26 | err := skipStep.Run(nil) 27 | 28 | Expect(err).NotTo(HaveOccurred()) 29 | Expect(logger.InfoCallCount()).To(Equal(1)) 30 | _, message, params := logger.InfoArgsForCall(0) 31 | Expect(fmt.Sprintf(message, params...)).To(Equal("Skipping foo for deployment")) 32 | }) 33 | }) 34 | -------------------------------------------------------------------------------- /orderer/backup_lock_constraint_specifier.go: -------------------------------------------------------------------------------- 1 | package orderer 2 | 3 | import "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator" 4 | 5 | type BackupLockOrderConstraintSpecifier struct{} 6 | 7 | func NewBackupOrderConstraintSpecifier() orderConstraintSpecifier { 8 | return BackupLockOrderConstraintSpecifier{} 9 | } 10 | 11 | func (BackupLockOrderConstraintSpecifier) Before(job orchestrator.Job) []orchestrator.JobSpecifier { 12 | return job.BackupShouldBeLockedBefore() 13 | } 14 | -------------------------------------------------------------------------------- /orderer/backup_lock_constraint_specifier_test.go: -------------------------------------------------------------------------------- 1 | package orderer 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator" 5 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator/fakes" 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | var _ = Describe("PreBackupLockConstraintSpecifier", func() { 11 | It("returns the job specifier for pre backup lock", func() { 12 | backupLockBeforeSpecifier := []orchestrator.JobSpecifier{{Name: "name1", Release: "release1"}} 13 | 14 | fakeJob := new(fakes.FakeJob) 15 | fakeJob.BackupShouldBeLockedBeforeReturns(backupLockBeforeSpecifier) 16 | 17 | Expect(NewBackupOrderConstraintSpecifier().Before(fakeJob)).To(Equal(backupLockBeforeSpecifier)) 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /orderer/orderer_suite_test.go: -------------------------------------------------------------------------------- 1 | package orderer_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestOrderer(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Orderer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /orderer/restore_lock_constraint_specifier.go: -------------------------------------------------------------------------------- 1 | package orderer 2 | 3 | import "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator" 4 | 5 | type RestoreLockOrderConstraintSpecifier struct{} 6 | 7 | func NewRestoreOrderConstraintSpecifier() orderConstraintSpecifier { 8 | return RestoreLockOrderConstraintSpecifier{} 9 | } 10 | 11 | func (RestoreLockOrderConstraintSpecifier) Before(job orchestrator.Job) []orchestrator.JobSpecifier { 12 | return job.RestoreShouldBeLockedBefore() 13 | } 14 | -------------------------------------------------------------------------------- /orderer/restore_lock_constraint_specifier_test.go: -------------------------------------------------------------------------------- 1 | package orderer 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator" 5 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/orchestrator/fakes" 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | var _ = Describe("PreRestoreLockConstraintSpecifier", func() { 11 | It("returns the job specifier for pre restore lock", func() { 12 | restoreLockBeforeSpecifier := []orchestrator.JobSpecifier{{Name: "name1", Release: "release1"}} 13 | 14 | fakeJob := new(fakes.FakeJob) 15 | fakeJob.RestoreShouldBeLockedBeforeReturns(restoreLockBeforeSpecifier) 16 | 17 | Expect(NewRestoreOrderConstraintSpecifier().Before(fakeJob)).To(Equal(restoreLockBeforeSpecifier)) 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /readwriter/writer_suite_test.go: -------------------------------------------------------------------------------- 1 | package readwriter_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestWriter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Writer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /s3-config-validator/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: artifact build test-e2e test-unit 2 | 3 | SHELL=/usr/bin/env bash -o pipefail 4 | 5 | all: test-unit test-e2e artifact 6 | 7 | artifact: build 8 | cd build && \ 9 | cp ../README.md . && \ 10 | tar cf artifact.tgz * 11 | 12 | build: 13 | ./build_all.sh 14 | 15 | ifeq ($(shell whoami), root) 16 | NON_ROOT_USER='bbr' 17 | test-unit: 18 | cd src/ \ 19 | && chmod -R g+w . \ 20 | && useradd --groups root --create-home $(NON_ROOT_USER) \ 21 | && set +x; \ 22 | su $(NON_ROOT_USER) -c 'go run github.com/onsi/ginkgo/v2/ginkgo -r --keep-going internal'; \ 23 | status=$$?; \ 24 | userdel --remove bbr \ 25 | && exit $${status} 26 | else 27 | test-unit: 28 | cd src/ \ 29 | && go run github.com/onsi/ginkgo/v2/ginkgo -r --keep-going internal 30 | endif 31 | 32 | test-e2e: 33 | cd src/test && \ 34 | go run github.com/onsi/ginkgo/v2/ginkgo -r --keep-going . \ 35 | | sed 's/"\(aws_.*\)"\: "\(.*\)"/"\1": ""/g' 36 | -------------------------------------------------------------------------------- /s3-config-validator/build_all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | cd "$(dirname "$0")" 6 | 7 | main() { 8 | rm -rf build 9 | mkdir -p build 10 | 11 | build linux amd64 12 | create_hash 13 | } 14 | 15 | build() { 16 | local os=$1 17 | local arch=$2 18 | 19 | echo "building bbr-s3-config-validator with os=${os},arch=${arch} ..." 20 | 21 | pushd src/ > /dev/null 22 | GOOS=$os GOARCH=$arch go build -o "../build/bbr-s3-config-validator" cmd/main.go 23 | popd > /dev/null 24 | 25 | } 26 | 27 | create_hash() { 28 | pushd build 29 | shasum -a 256 bbr-s3-config-validator | awk '{print $1}' > bbr-s3-config-validator.sha256 30 | popd 31 | } 32 | 33 | main 34 | 35 | -------------------------------------------------------------------------------- /s3-config-validator/src/internal/config/config_suite_test.go: -------------------------------------------------------------------------------- 1 | package config_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestConfig(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Config Suite") 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/internal/configPrinter/configPrinter.go: -------------------------------------------------------------------------------- 1 | package configPrinter 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "io" 7 | 8 | "github.com/cloudfoundry-incubator/bosh-backup-and-restore/s3-config-validator/src/internal/config" 9 | ) 10 | 11 | func PrintConfig(writer io.Writer, config config.Config) { 12 | fmt.Fprintf(writer, "Configuration:\n\n") 13 | 14 | if config.Buckets == nil { 15 | fmt.Fprintf(writer, " {}\n\n") 16 | } 17 | 18 | jsonOutput, _ := json.MarshalIndent(config.Buckets, " ", " ") 19 | 20 | fmt.Fprintf(writer, " %s\n\n", string(jsonOutput)) 21 | } 22 | -------------------------------------------------------------------------------- /s3-config-validator/src/internal/configPrinter/configPrinter_suite_test.go: -------------------------------------------------------------------------------- 1 | package configPrinter_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestConfigPrinter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "ConfigPrinter Suite") 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/internal/probe/probe_suite_test.go: -------------------------------------------------------------------------------- 1 | package probe_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestProbe(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Probe Suite") 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/internal/runner/export_test.go: -------------------------------------------------------------------------------- 1 | package runner 2 | 3 | import "github.com/cloudfoundry-incubator/bosh-backup-and-restore/s3-config-validator/src/internal/s3" 4 | 5 | var NewS3ClientImpl = newS3Client 6 | 7 | type NewS3Client func(region, endpoint, id, secret, role string, useIAMProfile bool) (*s3.S3Client, error) 8 | 9 | func SetNewS3Client(s3Client NewS3Client) { 10 | injectableS3Client = s3Client 11 | } 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/internal/runner/runner_suite_test.go: -------------------------------------------------------------------------------- 1 | package runner_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestRunner(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Runner Suite") 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/internal/s3/client.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Client 4 | 5 | type Client interface { 6 | IsUnversioned(bucket string) error 7 | IsVersioned(bucket string) error 8 | CanListObjects(bucket string) error 9 | CanListObjectVersions(bucket string) error 10 | CanGetObjects(bucket string) error 11 | CanGetObjectVersions(bucket string) error 12 | CanPutObjects(bucket string) error 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/internal/s3/s3_suite_test.go: -------------------------------------------------------------------------------- 1 | package s3_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestS3probe(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "S3 Suite") 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/tools/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | package tools 5 | 6 | import ( 7 | _ "github.com/maxbrunsfeld/counterfeiter/v6" 8 | ) 9 | 10 | // This file imports packages that are used when running go generate, or used 11 | // during the development process but not otherwise depended on by built code. 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Go 2 | Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | Copyright 2014-2015 Stripe, Inc. 4 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | // AccountIDEndpointMode controls how a resolved AWS account ID is handled for endpoint routing. 4 | type AccountIDEndpointMode string 5 | 6 | const ( 7 | // AccountIDEndpointModeUnset indicates the AWS account ID will not be used for endpoint routing 8 | AccountIDEndpointModeUnset AccountIDEndpointMode = "" 9 | 10 | // AccountIDEndpointModePreferred indicates the AWS account ID will be used for endpoint routing if present 11 | AccountIDEndpointModePreferred = "preferred" 12 | 13 | // AccountIDEndpointModeRequired indicates an error will be returned if the AWS account ID is not resolved from identity 14 | AccountIDEndpointModeRequired = "required" 15 | 16 | // AccountIDEndpointModeDisabled indicates the AWS account ID will be ignored during endpoint routing 17 | AccountIDEndpointModeDisabled = "disabled" 18 | ) 19 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import ( 4 | "context" 5 | "time" 6 | ) 7 | 8 | type suppressedContext struct { 9 | context.Context 10 | } 11 | 12 | func (s *suppressedContext) Deadline() (deadline time.Time, ok bool) { 13 | return time.Time{}, false 14 | } 15 | 16 | func (s *suppressedContext) Done() <-chan struct{} { 17 | return nil 18 | } 19 | 20 | func (s *suppressedContext) Err() error { 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go: -------------------------------------------------------------------------------- 1 | // Package defaults provides recommended configuration values for AWS SDKs and CLIs. 2 | package defaults 3 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | // MissingRegionError is an error that is returned if region configuration 4 | // value was not found. 5 | type MissingRegionError struct{} 6 | 7 | func (*MissingRegionError) Error() string { 8 | return "an AWS region is required, but was not found" 9 | } 10 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package aws 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.36.3" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go: -------------------------------------------------------------------------------- 1 | //go:build go1.16 2 | // +build go1.16 3 | 4 | package middleware 5 | 6 | import "runtime" 7 | 8 | func getNormalizedOSName() (os string) { 9 | switch runtime.GOOS { 10 | case "android": 11 | os = "android" 12 | case "linux": 13 | os = "linux" 14 | case "windows": 15 | os = "windows" 16 | case "darwin": 17 | os = "macos" 18 | case "ios": 19 | os = "ios" 20 | default: 21 | os = "other" 22 | } 23 | return os 24 | } 25 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.16 2 | // +build !go1.16 3 | 4 | package middleware 5 | 6 | import "runtime" 7 | 8 | func getNormalizedOSName() (os string) { 9 | switch runtime.GOOS { 10 | case "android": 11 | os = "android" 12 | case "linux": 13 | os = "linux" 14 | case "windows": 15 | os = "windows" 16 | case "darwin": 17 | // Due to Apple M1 we can't distinguish between macOS and iOS when GOOS/GOARCH is darwin/amd64 18 | // For now declare this as "other" until we have a better detection mechanism. 19 | fallthrough 20 | default: 21 | os = "other" 22 | } 23 | return os 24 | } 25 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/aws/smithy-go/middleware" 5 | ) 6 | 7 | // requestIDKey is used to retrieve request id from response metadata 8 | type requestIDKey struct{} 9 | 10 | // SetRequestIDMetadata sets the provided request id over middleware metadata 11 | func SetRequestIDMetadata(metadata *middleware.Metadata, id string) { 12 | metadata.Set(requestIDKey{}, id) 13 | } 14 | 15 | // GetRequestIDMetadata retrieves the request id from middleware metadata 16 | // returns string and bool indicating value of request id, whether request id was set. 17 | func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool) { 18 | if !metadata.Has(requestIDKey{}) { 19 | return "", false 20 | } 21 | 22 | v, ok := metadata.Get(requestIDKey{}).(string) 23 | if !ok { 24 | return "", true 25 | } 26 | return v, true 27 | } 28 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go: -------------------------------------------------------------------------------- 1 | package eventstream 2 | 3 | import "fmt" 4 | 5 | // LengthError provides the error for items being larger than a maximum length. 6 | type LengthError struct { 7 | Part string 8 | Want int 9 | Have int 10 | Value interface{} 11 | } 12 | 13 | func (e LengthError) Error() string { 14 | return fmt.Sprintf("%s length invalid, %d/%d, %v", 15 | e.Part, e.Want, e.Have, e.Value) 16 | } 17 | 18 | // ChecksumError provides the error for message checksum invalidation errors. 19 | type ChecksumError struct{} 20 | 21 | func (e ChecksumError) Error() string { 22 | return "message checksum mismatch" 23 | } 24 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/headers.go: -------------------------------------------------------------------------------- 1 | package eventstreamapi 2 | 3 | // EventStream headers with specific meaning to async API functionality. 4 | const ( 5 | ChunkSignatureHeader = `:chunk-signature` // chunk signature for message 6 | DateHeader = `:date` // Date header for signature 7 | ContentTypeHeader = ":content-type" // message payload content-type 8 | 9 | // Message header and values 10 | MessageTypeHeader = `:message-type` // Identifies type of message. 11 | EventMessageType = `event` 12 | ErrorMessageType = `error` 13 | ExceptionMessageType = `exception` 14 | 15 | // Message Events 16 | EventTypeHeader = `:event-type` // Identifies message event type e.g. "Stats". 17 | 18 | // Message Error 19 | ErrorCodeHeader = `:error-code` 20 | ErrorMessageHeader = `:error-message` 21 | 22 | // Message Exception 23 | ExceptionTypeHeader = `:exception-type` 24 | ) 25 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/transport.go: -------------------------------------------------------------------------------- 1 | //go:build go1.18 2 | // +build go1.18 3 | 4 | package eventstreamapi 5 | 6 | import smithyhttp "github.com/aws/smithy-go/transport/http" 7 | 8 | // ApplyHTTPTransportFixes applies fixes to the HTTP request for proper event stream functionality. 9 | // 10 | // This operation is a no-op for Go 1.18 and above. 11 | func ApplyHTTPTransportFixes(r *smithyhttp.Request) error { 12 | return nil 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/transport_go117.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.18 2 | // +build !go1.18 3 | 4 | package eventstreamapi 5 | 6 | import smithyhttp "github.com/aws/smithy-go/transport/http" 7 | 8 | // ApplyHTTPTransportFixes applies fixes to the HTTP request for proper event stream functionality. 9 | func ApplyHTTPTransportFixes(r *smithyhttp.Request) error { 10 | r.Header.Set("Expect", "100-continue") 11 | return nil 12 | } 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package eventstream 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.6.10" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/none.go: -------------------------------------------------------------------------------- 1 | package ratelimit 2 | 3 | import "context" 4 | 5 | // None implements a no-op rate limiter which effectively disables client-side 6 | // rate limiting (also known as "retry quotas"). 7 | // 8 | // GetToken does nothing and always returns a nil error. The returned 9 | // token-release function does nothing, and always returns a nil error. 10 | // 11 | // AddTokens does nothing and always returns a nil error. 12 | var None = &none{} 13 | 14 | type none struct{} 15 | 16 | func (*none) GetToken(ctx context.Context, cost uint) (func() error, error) { 17 | return func() error { return nil }, nil 18 | } 19 | 20 | func (*none) AddTokens(v uint) error { return nil } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // TODO remove replace with smithy.CanceledError 8 | 9 | // RequestCanceledError is the error that will be returned by an API request 10 | // that was canceled. Requests given a Context may return this error when 11 | // canceled. 12 | type RequestCanceledError struct { 13 | Err error 14 | } 15 | 16 | // CanceledError returns true to satisfy interfaces checking for canceled errors. 17 | func (*RequestCanceledError) CanceledError() bool { return true } 18 | 19 | // Unwrap returns the underlying error, if there was one. 20 | func (e *RequestCanceledError) Unwrap() error { 21 | return e.Err 22 | } 23 | func (e *RequestCanceledError) Error() string { 24 | return fmt.Sprintf("request canceled, %v", e.Err) 25 | } 26 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go: -------------------------------------------------------------------------------- 1 | package retry 2 | 3 | import "fmt" 4 | 5 | // MaxAttemptsError provides the error when the maximum number of attempts have 6 | // been exceeded. 7 | type MaxAttemptsError struct { 8 | Attempt int 9 | Err error 10 | } 11 | 12 | func (e *MaxAttemptsError) Error() string { 13 | return fmt.Sprintf("exceeded maximum number of attempts, %d, %v", e.Attempt, e.Err) 14 | } 15 | 16 | // Unwrap returns the nested error causing the max attempts error. Provides the 17 | // implementation for errors.Is and errors.As to unwrap nested errors. 18 | func (e *MaxAttemptsError) Unwrap() error { 19 | return e.Err 20 | } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | // ExecutionEnvironmentID is the AWS execution environment runtime identifier. 4 | type ExecutionEnvironmentID string 5 | 6 | // RuntimeEnvironment is a collection of values that are determined at runtime 7 | // based on the environment that the SDK is executing in. Some of these values 8 | // may or may not be present based on the executing environment and certain SDK 9 | // configuration properties that drive whether these values are populated.. 10 | type RuntimeEnvironment struct { 11 | EnvironmentIdentifier ExecutionEnvironmentID 12 | Region string 13 | EC2InstanceMetadataRegion string 14 | } 15 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go: -------------------------------------------------------------------------------- 1 | package v4 2 | 3 | import ( 4 | "crypto/hmac" 5 | "crypto/sha256" 6 | ) 7 | 8 | // HMACSHA256 computes a HMAC-SHA256 of data given the provided key. 9 | func HMACSHA256(key []byte, data []byte) []byte { 10 | hash := hmac.New(sha256.New, key) 11 | hash.Write(data) 12 | return hash.Sum(nil) 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go: -------------------------------------------------------------------------------- 1 | package v4 2 | 3 | import "strings" 4 | 5 | // BuildCredentialScope builds the Signature Version 4 (SigV4) signing scope 6 | func BuildCredentialScope(signingTime SigningTime, region, service string) string { 7 | return strings.Join([]string{ 8 | signingTime.ShortTimeFormat(), 9 | region, 10 | service, 11 | "aws4_request", 12 | }, "/") 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go: -------------------------------------------------------------------------------- 1 | // Package aws provides core functionality for making requests to AWS services. 2 | package aws 3 | 4 | // SDKName is the name of this AWS SDK 5 | const SDKName = "aws-sdk-go-v2" 6 | 7 | // SDKVersion is the version of this SDK 8 | const SDKVersion = goModuleVersion 9 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package credentials provides types for retrieving credentials from credentials sources. 3 | */ 4 | package credentials 5 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package credentials 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.17.67" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go: -------------------------------------------------------------------------------- 1 | // Package imds provides the API client for interacting with the Amazon EC2 2 | // Instance Metadata Service. 3 | // 4 | // All Client operation calls have a default timeout. If the operation is not 5 | // completed before this timeout expires, the operation will be canceled. This 6 | // timeout can be overridden through the following: 7 | // - Set the options flag DisableDefaultTimeout 8 | // - Provide a Context with a timeout or deadline with calling the client's operations. 9 | // 10 | // See the EC2 IMDS user guide for more information on using the API. 11 | // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html 12 | package imds 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/endpoints.go: -------------------------------------------------------------------------------- 1 | package imds 2 | 3 | import ( 4 | "context" 5 | "github.com/aws/smithy-go/middleware" 6 | ) 7 | 8 | type resolveEndpointV2Middleware struct { 9 | options Options 10 | } 11 | 12 | func (*resolveEndpointV2Middleware) ID() string { 13 | return "ResolveEndpointV2" 14 | } 15 | 16 | func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( 17 | out middleware.FinalizeOutput, metadata middleware.Metadata, err error, 18 | ) { 19 | return next.HandleFinalize(ctx, in) 20 | } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package imds 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.16.30" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go: -------------------------------------------------------------------------------- 1 | // Package smithy adapts concrete AWS auth and signing types to the generic smithy versions. 2 | package smithy 3 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package configsources 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.3.34" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go: -------------------------------------------------------------------------------- 1 | // Package awsrulesfn provides AWS focused endpoint rule functions for 2 | // evaluating endpoint resolution rules. 3 | package awsrulesfn 4 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go: -------------------------------------------------------------------------------- 1 | //go:build codegen 2 | // +build codegen 3 | 4 | package awsrulesfn 5 | 6 | //go:generate go run -tags codegen ./internal/partition/codegen.go -model partitions.json -output partitions.go 7 | //go:generate gofmt -w -s . 8 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package endpoints 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "2.6.34" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go: -------------------------------------------------------------------------------- 1 | package rand 2 | 3 | import ( 4 | "crypto/rand" 5 | "fmt" 6 | "io" 7 | "math/big" 8 | ) 9 | 10 | func init() { 11 | Reader = rand.Reader 12 | } 13 | 14 | // Reader provides a random reader that can reset during testing. 15 | var Reader io.Reader 16 | 17 | var floatMaxBigInt = big.NewInt(1 << 53) 18 | 19 | // Float64 returns a float64 read from an io.Reader source. The returned float will be between [0.0, 1.0). 20 | func Float64(reader io.Reader) (float64, error) { 21 | bi, err := rand.Int(reader, floatMaxBigInt) 22 | if err != nil { 23 | return 0, fmt.Errorf("failed to read random value, %v", err) 24 | } 25 | 26 | return float64(bi.Int64()) / (1 << 53), nil 27 | } 28 | 29 | // CryptoRandFloat64 returns a random float64 obtained from the crypto rand 30 | // source. 31 | func CryptoRandFloat64() (float64, error) { 32 | return Float64(Reader) 33 | } 34 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go: -------------------------------------------------------------------------------- 1 | package sdk 2 | 3 | // Invalidator provides access to a type's invalidate method to make it 4 | // invalidate it cache. 5 | // 6 | // e.g aws.SafeCredentialsProvider's Invalidate method. 7 | type Invalidator interface { 8 | Invalidate() 9 | } 10 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go: -------------------------------------------------------------------------------- 1 | package strings 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // HasPrefixFold tests whether the string s begins with prefix, interpreted as UTF-8 strings, 8 | // under Unicode case-folding. 9 | func HasPrefixFold(s, prefix string) bool { 10 | return len(s) >= len(prefix) && strings.EqualFold(s[0:len(prefix)], prefix) 11 | } 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go: -------------------------------------------------------------------------------- 1 | // Package singleflight provides a duplicate function call suppression 2 | // mechanism. This package is a fork of the Go golang.org/x/sync/singleflight 3 | // package. The package is forked, because the package a part of the unstable 4 | // and unversioned golang.org/x/sync module. 5 | // 6 | // https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight 7 | package singleflight 8 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go: -------------------------------------------------------------------------------- 1 | package timeconv 2 | 3 | import "time" 4 | 5 | // FloatSecondsDur converts a fractional seconds to duration. 6 | func FloatSecondsDur(v float64) time.Duration { 7 | return time.Duration(v * float64(time.Second)) 8 | } 9 | 10 | // DurSecondsFloat converts a duration into fractional seconds. 11 | func DurSecondsFloat(d time.Duration) float64 { 12 | return float64(d) / float64(time.Second) 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/error.go: -------------------------------------------------------------------------------- 1 | package v4a 2 | 3 | import "fmt" 4 | 5 | // SigningError indicates an error condition occurred while performing SigV4a signing 6 | type SigningError struct { 7 | Err error 8 | } 9 | 10 | func (e *SigningError) Error() string { 11 | return fmt.Sprintf("failed to sign request: %v", e.Err) 12 | } 13 | 14 | // Unwrap returns the underlying error cause 15 | func (e *SigningError) Unwrap() error { 16 | return e.Err 17 | } 18 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package v4a 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.3.34" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto/compare.go: -------------------------------------------------------------------------------- 1 | package crypto 2 | 3 | import "fmt" 4 | 5 | // ConstantTimeByteCompare is a constant-time byte comparison of x and y. This function performs an absolute comparison 6 | // if the two byte slices assuming they represent a big-endian number. 7 | // 8 | // error if len(x) != len(y) 9 | // -1 if x < y 10 | // 0 if x == y 11 | // +1 if x > y 12 | func ConstantTimeByteCompare(x, y []byte) (int, error) { 13 | if len(x) != len(y) { 14 | return 0, fmt.Errorf("slice lengths do not match") 15 | } 16 | 17 | xLarger, yLarger := 0, 0 18 | 19 | for i := 0; i < len(x); i++ { 20 | xByte, yByte := int(x[i]), int(y[i]) 21 | 22 | x := ((yByte - xByte) >> 8) & 1 23 | y := ((xByte - yByte) >> 8) & 1 24 | 25 | xLarger |= x &^ yLarger 26 | yLarger |= y &^ xLarger 27 | } 28 | 29 | return xLarger - yLarger, nil 30 | } 31 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4/hmac.go: -------------------------------------------------------------------------------- 1 | package v4 2 | 3 | import ( 4 | "crypto/hmac" 5 | "crypto/sha256" 6 | ) 7 | 8 | // HMACSHA256 computes a HMAC-SHA256 of data given the provided key. 9 | func HMACSHA256(key []byte, data []byte) []byte { 10 | hash := hmac.New(sha256.New, key) 11 | hash.Write(data) 12 | return hash.Sum(nil) 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package acceptencoding 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.12.3" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package checksum 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.7.2" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go: -------------------------------------------------------------------------------- 1 | // Package presignedurl provides the customizations for API clients to fill in 2 | // presigned URLs into input parameters. 3 | package presignedurl 4 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package presignedurl 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.12.15" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/s3_object_lambda_arn.go: -------------------------------------------------------------------------------- 1 | package arn 2 | 3 | // S3ObjectLambdaARN represents an ARN for the s3-object-lambda service 4 | type S3ObjectLambdaARN interface { 5 | Resource 6 | 7 | isS3ObjectLambdasARN() 8 | } 9 | 10 | // S3ObjectLambdaAccessPointARN is an S3ObjectLambdaARN for the Access Point resource type 11 | type S3ObjectLambdaAccessPointARN struct { 12 | AccessPointARN 13 | } 14 | 15 | func (s S3ObjectLambdaAccessPointARN) isS3ObjectLambdasARN() {} 16 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package s3shared 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.18.15" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go: -------------------------------------------------------------------------------- 1 | package s3shared 2 | 3 | import ( 4 | "github.com/aws/smithy-go/middleware" 5 | ) 6 | 7 | // hostID is used to retrieve host id from response metadata 8 | type hostID struct { 9 | } 10 | 11 | // SetHostIDMetadata sets the provided host id over middleware metadata 12 | func SetHostIDMetadata(metadata *middleware.Metadata, id string) { 13 | metadata.Set(hostID{}, id) 14 | } 15 | 16 | // GetHostIDMetadata retrieves the host id from middleware metadata 17 | // returns host id as string along with a boolean indicating presence of 18 | // hostId on middleware metadata. 19 | func GetHostIDMetadata(metadata middleware.Metadata) (string, bool) { 20 | if !metadata.Has(hostID{}) { 21 | return "", false 22 | } 23 | 24 | v, ok := metadata.Get(hostID{}).(string) 25 | if !ok { 26 | return "", true 27 | } 28 | return v, true 29 | } 30 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucketer.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | // implemented by all S3 input structures 4 | type bucketer interface { 5 | bucket() (string, bool) 6 | } 7 | 8 | func bucketFromInput(params interface{}) (string, bool) { 9 | v, ok := params.(bucketer) 10 | if !ok { 11 | return "", false 12 | } 13 | 14 | return v.bucket() 15 | } 16 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/doc.go: -------------------------------------------------------------------------------- 1 | // Code generated by smithy-go-codegen DO NOT EDIT. 2 | 3 | // Package s3 provides the API client, operations, and parameter types for Amazon 4 | // Simple Storage Service. 5 | package s3 6 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations" 5 | ) 6 | 7 | // ExpressCredentialsProvider retrieves credentials for operations against the 8 | // S3Express storage class. 9 | type ExpressCredentialsProvider = customizations.S3ExpressCredentialsProvider 10 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package s3 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.80.0" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/context.go: -------------------------------------------------------------------------------- 1 | package customizations 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/aws/smithy-go/middleware" 7 | ) 8 | 9 | type bucketKey struct{} 10 | 11 | // SetBucket stores a bucket name within the request context, which is required 12 | // for a variety of custom S3 behaviors. 13 | func SetBucket(ctx context.Context, bucket string) context.Context { 14 | return middleware.WithStackValue(ctx, bucketKey{}, bucket) 15 | } 16 | 17 | // GetBucket retrieves a stored bucket name within a context. 18 | func GetBucket(ctx context.Context) string { 19 | v, _ := middleware.GetStackValue(ctx, bucketKey{}).(string) 20 | return v 21 | } 22 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_config.go: -------------------------------------------------------------------------------- 1 | package customizations 2 | 3 | type s3DisableExpressAuthProvider interface { 4 | GetS3DisableExpressAuth() (bool, bool) 5 | } 6 | 7 | // ResolveDisableExpressAuth pulls S3DisableExpressAuth setting from config 8 | // sources. 9 | func ResolveDisableExpressAuth(configs []interface{}) (value bool, exists bool) { 10 | for _, cfg := range configs { 11 | if p, ok := cfg.(s3DisableExpressAuthProvider); ok { 12 | if value, exists = p.GetS3DisableExpressAuth(); exists { 13 | break 14 | } 15 | } 16 | } 17 | return 18 | } 19 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/express_properties.go: -------------------------------------------------------------------------------- 1 | package customizations 2 | 3 | import "github.com/aws/smithy-go" 4 | 5 | // GetPropertiesBackend returns a resolved endpoint backend from the property 6 | // set. 7 | func GetPropertiesBackend(p *smithy.Properties) string { 8 | v, _ := p.Get("backend").(string) 9 | return v 10 | } 11 | 12 | // GetIdentityPropertiesBucket returns the S3 bucket from identity properties. 13 | func GetIdentityPropertiesBucket(ip *smithy.Properties) (string, bool) { 14 | v, ok := ip.Get(bucketKey{}).(string) 15 | return v, ok 16 | } 17 | 18 | // SetIdentityPropertiesBucket sets the S3 bucket to identity properties. 19 | func SetIdentityPropertiesBucket(ip *smithy.Properties, bucket string) { 20 | ip.Set(bucketKey{}, bucket) 21 | } 22 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/host.go: -------------------------------------------------------------------------------- 1 | package customizations 2 | 3 | import ( 4 | "github.com/aws/smithy-go/transport/http" 5 | "strings" 6 | ) 7 | 8 | func updateS3HostForS3AccessPoint(req *http.Request) { 9 | updateHostPrefix(req, "s3", s3AccessPoint) 10 | } 11 | 12 | func updateS3HostForS3ObjectLambda(req *http.Request) { 13 | updateHostPrefix(req, "s3", s3ObjectLambda) 14 | } 15 | 16 | func updateHostPrefix(req *http.Request, oldEndpointPrefix, newEndpointPrefix string) { 17 | host := req.URL.Host 18 | if strings.HasPrefix(host, oldEndpointPrefix) { 19 | // For example if oldEndpointPrefix=s3 would replace to newEndpointPrefix 20 | req.URL.Host = newEndpointPrefix + host[len(oldEndpointPrefix):] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/uri_context.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | // This contains helper methods to set resolver URI into the context object. If they are ever used for 4 | // something other than S3, they should be moved to internal/context/context.go 5 | 6 | import ( 7 | "context" 8 | 9 | "github.com/aws/smithy-go/middleware" 10 | ) 11 | 12 | type s3resolvedURI struct{} 13 | 14 | // setS3ResolvedURI sets the URI as resolved by the EndpointResolverV2 15 | func setS3ResolvedURI(ctx context.Context, value string) context.Context { 16 | return middleware.WithStackValue(ctx, s3resolvedURI{}, value) 17 | } 18 | 19 | // getS3ResolvedURI gets the URI as resolved by EndpointResolverV2 20 | func getS3ResolvedURI(ctx context.Context) string { 21 | v, _ := middleware.GetStackValue(ctx, s3resolvedURI{}).(string) 22 | return v 23 | } 24 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go: -------------------------------------------------------------------------------- 1 | // Code generated by smithy-go-codegen DO NOT EDIT. 2 | 3 | // Package sts provides the API client, operations, and parameter types for AWS 4 | // Security Token Service. 5 | // 6 | // # Security Token Service 7 | // 8 | // Security Token Service (STS) enables you to request temporary, 9 | // limited-privilege credentials for users. This guide provides descriptions of the 10 | // STS API. For more information about using this service, see [Temporary Security Credentials]. 11 | // 12 | // [Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html 13 | package sts 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package sts 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.33.19" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .classpath 3 | .project 4 | .settings/ 5 | 6 | # Intellij 7 | .idea/ 8 | *.iml 9 | *.iws 10 | 11 | # Mac 12 | .DS_Store 13 | 14 | # Maven 15 | target/ 16 | **/dependency-reduced-pom.xml 17 | 18 | # Gradle 19 | /.gradle 20 | build/ 21 | */out/ 22 | */*/out/ 23 | 24 | # VS Code 25 | bin/ 26 | .vscode/ 27 | 28 | # make 29 | c.out 30 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: true 3 | dist: bionic 4 | 5 | branches: 6 | only: 7 | - main 8 | 9 | os: 10 | - linux 11 | - osx 12 | # Travis doesn't work with windows and Go tip 13 | #- windows 14 | 15 | go: 16 | - tip 17 | 18 | matrix: 19 | allow_failures: 20 | - go: tip 21 | 22 | before_install: 23 | - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi 24 | - (cd /tmp/; go get golang.org/x/lint/golint) 25 | 26 | script: 27 | - make go test -v ./...; 28 | 29 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/auth/auth.go: -------------------------------------------------------------------------------- 1 | // Package auth defines protocol-agnostic authentication types for smithy 2 | // clients. 3 | package auth 4 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/auth/bearer/docs.go: -------------------------------------------------------------------------------- 1 | // Package bearer provides middleware and utilities for authenticating API 2 | // operation calls with a Bearer Token. 3 | package bearer 4 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/auth/option.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | import "github.com/aws/smithy-go" 4 | 5 | type ( 6 | authOptionsKey struct{} 7 | ) 8 | 9 | // Option represents a possible authentication method for an operation. 10 | type Option struct { 11 | SchemeID string 12 | IdentityProperties smithy.Properties 13 | SignerProperties smithy.Properties 14 | } 15 | 16 | // GetAuthOptions gets auth Options from Properties. 17 | func GetAuthOptions(p *smithy.Properties) ([]*Option, bool) { 18 | v, ok := p.Get(authOptionsKey{}).([]*Option) 19 | return v, ok 20 | } 21 | 22 | // SetAuthOptions sets auth Options on Properties. 23 | func SetAuthOptions(p *smithy.Properties, options []*Option) { 24 | p.Set(authOptionsKey{}, options) 25 | } 26 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/auth/scheme_id.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | // Anonymous 4 | const ( 5 | SchemeIDAnonymous = "smithy.api#noAuth" 6 | ) 7 | 8 | // HTTP auth schemes 9 | const ( 10 | SchemeIDHTTPBasic = "smithy.api#httpBasicAuth" 11 | SchemeIDHTTPDigest = "smithy.api#httpDigestAuth" 12 | SchemeIDHTTPBearer = "smithy.api#httpBearerAuth" 13 | SchemeIDHTTPAPIKey = "smithy.api#httpApiKeyAuth" 14 | ) 15 | 16 | // AWS auth schemes 17 | const ( 18 | SchemeIDSigV4 = "aws.auth#sigv4" 19 | SchemeIDSigV4A = "aws.auth#sigv4a" 20 | ) 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/changelog-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "00000000-0000-0000-0000-000000000000", 3 | "type": "feature|bugfix|dependency", 4 | "description": "Description of your changes", 5 | "collapse": false, 6 | "modules": [ 7 | "." 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/container/private/cache/cache.go: -------------------------------------------------------------------------------- 1 | // Package cache defines the interface for a key-based data store. 2 | // 3 | // This package is designated as private and is intended for use only by the 4 | // smithy client runtime. The exported API therein is not considered stable and 5 | // is subject to breaking changes without notice. 6 | package cache 7 | 8 | // Cache defines the interface for an opaquely-typed, key-based data store. 9 | // 10 | // The thread-safety of this interface is undefined and is dictated by 11 | // implementations. 12 | type Cache interface { 13 | // Retrieve the value associated with the given key. The returned boolean 14 | // indicates whether the cache held a value for the given key. 15 | Get(k interface{}) (interface{}, bool) 16 | 17 | // Store a value under the given key. 18 | Put(k interface{}, v interface{}) 19 | } 20 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/doc.go: -------------------------------------------------------------------------------- 1 | // Package smithy provides the core components for a Smithy SDK. 2 | package smithy 3 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/document.go: -------------------------------------------------------------------------------- 1 | package smithy 2 | 3 | // Document provides access to loosely structured data in a document-like 4 | // format. 5 | // 6 | // Deprecated: See the github.com/aws/smithy-go/document package. 7 | type Document interface { 8 | UnmarshalDocument(interface{}) error 9 | GetValue() (interface{}, error) 10 | } 11 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/document/doc.go: -------------------------------------------------------------------------------- 1 | // Package document provides interface definitions and error types for document types. 2 | // 3 | // A document is a protocol-agnostic type which supports a JSON-like data-model. You can use this type to send 4 | // UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 5 | // strings to these values. 6 | // 7 | // API Clients expose document constructors in their respective client document packages which must be used to 8 | // Marshal and Unmarshal Go types to and from their respective protocol representations. 9 | // 10 | // See the Marshaler and Unmarshaler type documentation for more details on how to Go types can be converted to and from 11 | // document types. 12 | package document 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/encoding/doc.go: -------------------------------------------------------------------------------- 1 | // Package encoding provides utilities for encoding values for specific 2 | // document encodings. 3 | 4 | package encoding 5 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/encoding/xml/constants.go: -------------------------------------------------------------------------------- 1 | package xml 2 | 3 | const ( 4 | leftAngleBracket = '<' 5 | rightAngleBracket = '>' 6 | forwardSlash = '/' 7 | colon = ':' 8 | equals = '=' 9 | quote = '"' 10 | ) 11 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/endpoints/endpoint.go: -------------------------------------------------------------------------------- 1 | package transport 2 | 3 | import ( 4 | "net/http" 5 | "net/url" 6 | 7 | "github.com/aws/smithy-go" 8 | ) 9 | 10 | // Endpoint is the endpoint object returned by Endpoint resolution V2 11 | type Endpoint struct { 12 | // The complete URL minimally specfiying the scheme and host. 13 | // May optionally specify the port and base path component. 14 | URI url.URL 15 | 16 | // An optional set of headers to be sent using transport layer headers. 17 | Headers http.Header 18 | 19 | // A grab-bag property map of endpoint attributes. The 20 | // values present here are subject to change, or being add/removed at any 21 | // time. 22 | Properties smithy.Properties 23 | } 24 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/doc.go: -------------------------------------------------------------------------------- 1 | // Package rulesfn provides endpoint rule functions for evaluating endpoint 2 | // resolution rules. 3 | 4 | package rulesfn 5 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/endpoints/private/rulesfn/strings.go: -------------------------------------------------------------------------------- 1 | package rulesfn 2 | 3 | // Substring returns the substring of the input provided. If the start or stop 4 | // indexes are not valid for the input nil will be returned. If errors occur 5 | // they will be added to the provided [ErrorCollector]. 6 | func SubString(input string, start, stop int, reverse bool) *string { 7 | if start < 0 || stop < 1 || start >= stop || len(input) < stop { 8 | return nil 9 | } 10 | 11 | for _, r := range input { 12 | if r > 127 { 13 | return nil 14 | } 15 | } 16 | 17 | if !reverse { 18 | v := input[start:stop] 19 | return &v 20 | } 21 | 22 | rStart := len(input) - stop 23 | rStop := len(input) - start 24 | return SubString(input, rStart, rStop, false) 25 | } 26 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/go_module_metadata.go: -------------------------------------------------------------------------------- 1 | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. 2 | 3 | package smithy 4 | 5 | // goModuleVersion is the tagged release for this module 6 | const goModuleVersion = "1.22.3" 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go: -------------------------------------------------------------------------------- 1 | // Package singleflight provides a duplicate function call suppression 2 | // mechanism. This package is a fork of the Go golang.org/x/sync/singleflight 3 | // package. The package is forked, because the package a part of the unstable 4 | // and unversioned golang.org/x/sync module. 5 | // 6 | // https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight 7 | 8 | package singleflight 9 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/io/byte.go: -------------------------------------------------------------------------------- 1 | package io 2 | 3 | const ( 4 | // Byte is 8 bits 5 | Byte int64 = 1 6 | // KibiByte (KiB) is 1024 Bytes 7 | KibiByte = Byte * 1024 8 | // MebiByte (MiB) is 1024 KiB 9 | MebiByte = KibiByte * 1024 10 | // GibiByte (GiB) is 1024 MiB 11 | GibiByte = MebiByte * 1024 12 | ) 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/io/doc.go: -------------------------------------------------------------------------------- 1 | // Package io provides utilities for Smithy generated API clients. 2 | package io 3 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/io/reader.go: -------------------------------------------------------------------------------- 1 | package io 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // ReadSeekNopCloser wraps an io.ReadSeeker with an additional Close method 8 | // that does nothing. 9 | type ReadSeekNopCloser struct { 10 | io.ReadSeeker 11 | } 12 | 13 | // Close does nothing. 14 | func (ReadSeekNopCloser) Close() error { 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/modman.toml: -------------------------------------------------------------------------------- 1 | [dependencies] 2 | "github.com/jmespath/go-jmespath" = "v0.4.0" 3 | 4 | [modules] 5 | 6 | [modules.codegen] 7 | no_tag = true 8 | 9 | [modules."codegen/smithy-go-codegen/build/test-generated/go/internal/testmodule"] 10 | no_tag = true 11 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/ptr/doc.go: -------------------------------------------------------------------------------- 1 | // Package ptr provides utilities for converting scalar literal type values to and from pointers inline. 2 | package ptr 3 | 4 | //go:generate go run -tags codegen generate.go 5 | //go:generate gofmt -w -s . 6 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/rand/doc.go: -------------------------------------------------------------------------------- 1 | // Package rand provides utilities for creating and working with random value 2 | // generators. 3 | package rand 4 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/rand/rand.go: -------------------------------------------------------------------------------- 1 | package rand 2 | 3 | import ( 4 | "crypto/rand" 5 | "fmt" 6 | "io" 7 | "math/big" 8 | ) 9 | 10 | func init() { 11 | Reader = rand.Reader 12 | } 13 | 14 | // Reader provides a random reader that can reset during testing. 15 | var Reader io.Reader 16 | 17 | // Int63n returns a int64 between zero and value of max, read from an io.Reader source. 18 | func Int63n(reader io.Reader, max int64) (int64, error) { 19 | bi, err := rand.Int(reader, big.NewInt(max)) 20 | if err != nil { 21 | return 0, fmt.Errorf("failed to read random value, %w", err) 22 | } 23 | 24 | return bi.Int64(), nil 25 | } 26 | 27 | // CryptoRandInt63n returns a random int64 between zero and value of max 28 | // obtained from the crypto rand source. 29 | func CryptoRandInt63n(max int64) (int64, error) { 30 | return Int63n(Reader, max) 31 | } 32 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/transport/http/auth.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "context" 5 | 6 | smithy "github.com/aws/smithy-go" 7 | "github.com/aws/smithy-go/auth" 8 | ) 9 | 10 | // AuthScheme defines an HTTP authentication scheme. 11 | type AuthScheme interface { 12 | SchemeID() string 13 | IdentityResolver(auth.IdentityResolverOptions) auth.IdentityResolver 14 | Signer() Signer 15 | } 16 | 17 | // Signer defines the interface through which HTTP requests are supplemented 18 | // with an Identity. 19 | type Signer interface { 20 | SignRequest(context.Context, *Request, auth.Identity, smithy.Properties) error 21 | } 22 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/transport/http/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package http provides the HTTP transport client and request/response types 3 | needed to round trip API operation calls with an service. 4 | */ 5 | package http 6 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "crypto/md5" 5 | "encoding/base64" 6 | "fmt" 7 | "io" 8 | ) 9 | 10 | // computeMD5Checksum computes base64 md5 checksum of an io.Reader's contents. 11 | // Returns the byte slice of md5 checksum and an error. 12 | func computeMD5Checksum(r io.Reader) ([]byte, error) { 13 | h := md5.New() 14 | // copy errors may be assumed to be from the body. 15 | _, err := io.Copy(h, r) 16 | if err != nil { 17 | return nil, fmt.Errorf("failed to read body: %w", err) 18 | } 19 | 20 | // encode the md5 checksum in base64. 21 | sum := h.Sum(nil) 22 | sum64 := make([]byte, base64.StdEncoding.EncodedLen(len(sum))) 23 | base64.StdEncoding.Encode(sum64, sum) 24 | return sum64, nil 25 | } 26 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/aws/smithy-go/transport/http/time.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "time" 5 | 6 | smithytime "github.com/aws/smithy-go/time" 7 | ) 8 | 9 | // ParseTime parses a time string like the HTTP Date header. This uses a more 10 | // relaxed rule set for date parsing compared to the standard library. 11 | func ParseTime(text string) (t time.Time, err error) { 12 | return smithytime.ParseHTTPDate(text) 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-logr/logr/.golangci.yaml: -------------------------------------------------------------------------------- 1 | run: 2 | timeout: 1m 3 | tests: true 4 | 5 | linters: 6 | disable-all: true 7 | enable: 8 | - asciicheck 9 | - errcheck 10 | - forcetypeassert 11 | - gocritic 12 | - gofmt 13 | - goimports 14 | - gosimple 15 | - govet 16 | - ineffassign 17 | - misspell 18 | - revive 19 | - staticcheck 20 | - typecheck 21 | - unused 22 | 23 | issues: 24 | exclude-use-default: false 25 | max-issues-per-linter: 0 26 | max-same-issues: 10 27 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-logr/logr/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | ## v1.0.0-rc1 4 | 5 | This is the first logged release. Major changes (including breaking changes) 6 | have occurred since earlier tags. 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-logr/logr/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Logr is open to pull-requests, provided they fit within the intended scope of 4 | the project. Specifically, this library aims to be VERY small and minimalist, 5 | with no external dependencies. 6 | 7 | ## Compatibility 8 | 9 | This project intends to follow [semantic versioning](http://semver.org) and 10 | is very strict about compatibility. Any proposed changes MUST follow those 11 | rules. 12 | 13 | ## Performance 14 | 15 | As a logging library, logr must be as light-weight as possible. Any proposed 16 | code change must include results of running the [benchmark](./benchmark) 17 | before and after the change. 18 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-logr/logr/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | If you have discovered a security vulnerability in this project, please report it 4 | privately. **Do not disclose it as a public issue.** This gives us time to work with you 5 | to fix the issue before public exposure, reducing the chance that the exploit will be 6 | used before a patch is released. 7 | 8 | You may submit the report in the following ways: 9 | 10 | - send an email to go-logr-security@googlegroups.com 11 | - send us a [private vulnerability report](https://github.com/go-logr/logr/security/advisories/new) 12 | 13 | Please provide the following information in your report: 14 | 15 | - A description of the vulnerability and its impact 16 | - How to reproduce the issue 17 | 18 | We ask that you give us 90 days to work on a fix before public exposure. 19 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-logr/logr/discard.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 The logr Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package logr 18 | 19 | // Discard returns a Logger that discards all messages logged to it. It can be 20 | // used whenever the caller is not interested in the logs. Logger instances 21 | // produced by this function always compare as equal. 22 | func Discard() Logger { 23 | return New(nil) 24 | } 25 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-task/slim-sprig/v3/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | insert_final_newline = true 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | indent_style = tab 10 | indent_size = 8 11 | 12 | [*.{md,yml,yaml,json}] 13 | indent_style = space 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-task/slim-sprig/v3/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-task/slim-sprig/v3/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | /.glide 3 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-task/slim-sprig/v3/Taskfile.yml: -------------------------------------------------------------------------------- 1 | # https://taskfile.dev 2 | 3 | version: '3' 4 | 5 | tasks: 6 | default: 7 | cmds: 8 | - task: test 9 | 10 | test: 11 | cmds: 12 | - go test -v . 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-task/slim-sprig/v3/crypto.go: -------------------------------------------------------------------------------- 1 | package sprig 2 | 3 | import ( 4 | "crypto/sha1" 5 | "crypto/sha256" 6 | "encoding/hex" 7 | "fmt" 8 | "hash/adler32" 9 | ) 10 | 11 | func sha256sum(input string) string { 12 | hash := sha256.Sum256([]byte(input)) 13 | return hex.EncodeToString(hash[:]) 14 | } 15 | 16 | func sha1sum(input string) string { 17 | hash := sha1.Sum([]byte(input)) 18 | return hex.EncodeToString(hash[:]) 19 | } 20 | 21 | func adler32sum(input string) string { 22 | hash := adler32.Checksum([]byte(input)) 23 | return fmt.Sprintf("%d", hash) 24 | } 25 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-task/slim-sprig/v3/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package sprig provides template functions for Go. 3 | 4 | This package contains a number of utility functions for working with data 5 | inside of Go `html/template` and `text/template` files. 6 | 7 | To add these functions, use the `template.Funcs()` method: 8 | 9 | t := templates.New("foo").Funcs(sprig.FuncMap()) 10 | 11 | Note that you should add the function map before you parse any template files. 12 | 13 | In several cases, Sprig reverses the order of arguments from the way they 14 | appear in the standard library. This is to make it easier to pipe 15 | arguments into functions. 16 | 17 | See http://masterminds.github.io/sprig/ for more detailed documentation on each of the available functions. 18 | */ 19 | package sprig 20 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-task/slim-sprig/v3/network.go: -------------------------------------------------------------------------------- 1 | package sprig 2 | 3 | import ( 4 | "math/rand" 5 | "net" 6 | ) 7 | 8 | func getHostByName(name string) string { 9 | addrs, _ := net.LookupHost(name) 10 | //TODO: add error handing when release v3 comes out 11 | return addrs[rand.Intn(len(addrs))] 12 | } 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/go-task/slim-sprig/v3/reflect.go: -------------------------------------------------------------------------------- 1 | package sprig 2 | 3 | import ( 4 | "fmt" 5 | "reflect" 6 | ) 7 | 8 | // typeIs returns true if the src is the type named in target. 9 | func typeIs(target string, src interface{}) bool { 10 | return target == typeOf(src) 11 | } 12 | 13 | func typeIsLike(target string, src interface{}) bool { 14 | t := typeOf(src) 15 | return target == t || "*"+target == t 16 | } 17 | 18 | func typeOf(src interface{}) string { 19 | return fmt.Sprintf("%T", src) 20 | } 21 | 22 | func kindIs(target string, src interface{}) bool { 23 | return target == kindOf(src) 24 | } 25 | 26 | func kindOf(src interface{}) string { 27 | return reflect.ValueOf(src).Kind().String() 28 | } 29 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !cmp_debug 6 | // +build !cmp_debug 7 | 8 | package diff 9 | 10 | var debug debugger 11 | 12 | type debugger struct{} 13 | 14 | func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc { 15 | return f 16 | } 17 | func (debugger) Update() {} 18 | func (debugger) Finish() {} 19 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package flags 6 | 7 | // Deterministic controls whether the output of Diff should be deterministic. 8 | // This is only used for testing. 9 | var Deterministic bool 10 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/google/pprof/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of pprof authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | # Names should be added to this file as: 5 | # Name or Organization 6 | # The email address is not required for organizations. 7 | Google Inc. -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/google/pprof/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # People who have agreed to one of the CLAs and can contribute patches. 2 | # The AUTHORS file lists the copyright holders; this file 3 | # lists people. For example, Google employees are listed here 4 | # but not in AUTHORS, because Google holds the copyright. 5 | # 6 | # https://developers.google.com/open-source/cla/individual 7 | # https://developers.google.com/open-source/cla/corporate 8 | # 9 | # Names should be added to this file as: 10 | # Name 11 | Raul Silvera 12 | Tipp Moseley 13 | Hyoun Kyu Cho 14 | Martin Spier 15 | Taco de Wolff 16 | Andrew Hunter 17 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.iml 25 | .idea 26 | .envrc 27 | 28 | /counterfeiter 29 | integration/testdata/output 30 | *.profile 31 | *.bench 32 | /.vscode 33 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/.golangci.yaml: -------------------------------------------------------------------------------- 1 | run: 2 | skip-dirs: 3 | - fixtures -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/arguments/files.go: -------------------------------------------------------------------------------- 1 | package arguments 2 | 3 | import "os" 4 | 5 | type Evaler func(string) (string, error) 6 | type Stater func(string) (os.FileInfo, error) 7 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/generator/ctx.go: -------------------------------------------------------------------------------- 1 | //go:build go1.14 2 | 3 | package generator 4 | 5 | import "go/build" 6 | 7 | func getBuildContext(workingDir string) build.Context { 8 | ctx := build.Default 9 | ctx.Dir = workingDir 10 | return ctx 11 | } 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/generator/ctx_old.go: -------------------------------------------------------------------------------- 1 | //go:build !go1.14 2 | 3 | package generator 4 | 5 | import "go/build" 6 | 7 | func getBuildContext(workingDir string) build.Context { 8 | ctx := build.Default 9 | return ctx 10 | } 11 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/generator/function_loader.go: -------------------------------------------------------------------------------- 1 | package generator 2 | 3 | import ( 4 | "errors" 5 | "go/types" 6 | ) 7 | 8 | func (f *Fake) loadMethodForFunction() error { 9 | t, ok := f.Target.Type().(*types.Named) 10 | if !ok { 11 | return errors.New("target is not a named type") 12 | } 13 | sig, ok := t.Underlying().(*types.Signature) 14 | if !ok { 15 | return errors.New("target does not have an underlying function signature") 16 | } 17 | f.addTypesForMethod(sig) 18 | f.Function = methodForSignature(sig, f.TargetName, f.Imports) 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | TODO 3 | tmp/**/* 4 | *.coverprofile 5 | .vscode 6 | .idea/ 7 | *.log -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/Makefile: -------------------------------------------------------------------------------- 1 | # default task since it's first 2 | .PHONY: all 3 | all: vet test 4 | 5 | .PHONY: test 6 | test: 7 | go run github.com/onsi/ginkgo/v2/ginkgo -r -p -randomize-all -keep-going 8 | 9 | .PHONY: vet 10 | vet: 11 | go vet ./... 12 | 13 | .PHONY: update-deps 14 | update-deps: 15 | go get -u ./... 16 | go mod tidy -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta.go: -------------------------------------------------------------------------------- 1 | package watch 2 | 3 | import "sort" 4 | 5 | type Delta struct { 6 | ModifiedPackages []string 7 | 8 | NewSuites []*Suite 9 | RemovedSuites []*Suite 10 | modifiedSuites []*Suite 11 | } 12 | 13 | type DescendingByDelta []*Suite 14 | 15 | func (a DescendingByDelta) Len() int { return len(a) } 16 | func (a DescendingByDelta) Swap(i, j int) { a[i], a[j] = a[j], a[i] } 17 | func (a DescendingByDelta) Less(i, j int) bool { return a[i].Delta() > a[j].Delta() } 18 | 19 | func (d Delta) ModifiedSuites() []*Suite { 20 | sort.Sort(DescendingByDelta(d.modifiedSuites)) 21 | return d.modifiedSuites 22 | } 23 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/ginkgo_cli_dependencies.go: -------------------------------------------------------------------------------- 1 | //go:build ginkgoclidependencies 2 | // +build ginkgoclidependencies 3 | 4 | package ginkgo 5 | 6 | import ( 7 | _ "github.com/onsi/ginkgo/v2/ginkgo" 8 | ) 9 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/counter.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | func MakeIncrementingIndexCounter() func() (int, error) { 4 | idx := -1 5 | return func() (int, error) { 6 | idx += 1 7 | return idx, nil 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/global/init.go: -------------------------------------------------------------------------------- 1 | package global 2 | 3 | import ( 4 | "github.com/onsi/ginkgo/v2/internal" 5 | ) 6 | 7 | var Suite *internal.Suite 8 | var Failer *internal.Failer 9 | var backupSuite *internal.Suite 10 | 11 | func init() { 12 | InitializeGlobals() 13 | } 14 | 15 | func InitializeGlobals() { 16 | Failer = internal.NewFailer() 17 | Suite = internal.NewSuite() 18 | } 19 | 20 | func PushClone() error { 21 | var err error 22 | backupSuite, err = Suite.Clone() 23 | return err 24 | } 25 | 26 | func PopClone() { 27 | Suite = backupSuite 28 | } 29 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_unix.go: -------------------------------------------------------------------------------- 1 | //go:build freebsd || openbsd || netbsd || dragonfly || darwin || linux || solaris 2 | // +build freebsd openbsd netbsd dragonfly darwin linux solaris 3 | 4 | package interrupt_handler 5 | 6 | import ( 7 | "os" 8 | "os/signal" 9 | "syscall" 10 | ) 11 | 12 | func SwallowSigQuit() { 13 | c := make(chan os.Signal, 1024) 14 | signal.Notify(c, syscall.SIGQUIT) 15 | } 16 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package interrupt_handler 5 | 6 | func SwallowSigQuit() { 7 | //noop 8 | } 9 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go: -------------------------------------------------------------------------------- 1 | //go:build wasm 2 | 3 | package internal 4 | 5 | func NewOutputInterceptor() OutputInterceptor { 6 | return &NoopOutputInterceptor{} 7 | } 8 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package internal 4 | 5 | func NewOutputInterceptor() OutputInterceptor { 6 | return NewOSGlobalReassigningOutputInterceptor() 7 | } 8 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_bsd.go: -------------------------------------------------------------------------------- 1 | //go:build freebsd || openbsd || netbsd || darwin || dragonfly 2 | // +build freebsd openbsd netbsd darwin dragonfly 3 | 4 | package internal 5 | 6 | import ( 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | var PROGRESS_SIGNALS = []os.Signal{syscall.SIGINFO, syscall.SIGUSR1} 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_unix.go: -------------------------------------------------------------------------------- 1 | //go:build linux || solaris 2 | // +build linux solaris 3 | 4 | package internal 5 | 6 | import ( 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | var PROGRESS_SIGNALS = []os.Signal{syscall.SIGUSR1} 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go: -------------------------------------------------------------------------------- 1 | //go:build wasm 2 | 3 | package internal 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | var PROGRESS_SIGNALS = []os.Signal{syscall.SIGUSR1} 11 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/internal/progress_report_win.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package internal 5 | 6 | import "os" 7 | 8 | var PROGRESS_SIGNALS = []os.Signal{} 9 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/ginkgo/v2/types/version.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | const VERSION = "2.20.2" 4 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/gomega/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.test 3 | . 4 | .idea 5 | gomega.iml 6 | TODO 7 | .vscode -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/gomega/internal/vetoptdesc.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/onsi/gomega/types" 7 | ) 8 | 9 | // vetOptionalDescription vets the optional description args: if it finds any 10 | // Gomega matcher at the beginning it panics. This allows for rendering Gomega 11 | // matchers as part of an optional Description, as long as they're not in the 12 | // first slot. 13 | func vetOptionalDescription(assertion string, optionalDescription ...interface{}) { 14 | if len(optionalDescription) == 0 { 15 | return 16 | } 17 | if _, isGomegaMatcher := optionalDescription[0].(types.GomegaMatcher); isGomegaMatcher { 18 | panic(fmt.Sprintf("%s has a GomegaMatcher as the first element of optionalDescription.\n\t"+ 19 | "Do you mean to use And/Or/SatisfyAll/SatisfyAny to combine multiple matchers?", 20 | assertion)) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/gomega/matchers/attributes_slice.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "encoding/xml" 5 | "strings" 6 | ) 7 | 8 | type attributesSlice []xml.Attr 9 | 10 | func (attrs attributesSlice) Len() int { return len(attrs) } 11 | func (attrs attributesSlice) Less(i, j int) bool { 12 | return strings.Compare(attrs[i].Name.Local, attrs[j].Name.Local) == -1 13 | } 14 | func (attrs attributesSlice) Swap(i, j int) { attrs[i], attrs[j] = attrs[j], attrs[i] } 15 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go: -------------------------------------------------------------------------------- 1 | // untested sections: 2 2 | 3 | package matchers 4 | 5 | import "github.com/onsi/gomega/format" 6 | 7 | type BeNilMatcher struct { 8 | } 9 | 10 | func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) { 11 | return isNil(actual), nil 12 | } 13 | 14 | func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) { 15 | return format.Message(actual, "to be nil") 16 | } 17 | 18 | func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) { 19 | return format.Message(actual, "not to be nil") 20 | } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "reflect" 5 | 6 | "github.com/onsi/gomega/format" 7 | ) 8 | 9 | type BeZeroMatcher struct { 10 | } 11 | 12 | func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error) { 13 | if actual == nil { 14 | return true, nil 15 | } 16 | zeroValue := reflect.Zero(reflect.TypeOf(actual)).Interface() 17 | 18 | return reflect.DeepEqual(zeroValue, actual), nil 19 | 20 | } 21 | 22 | func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (message string) { 23 | return format.Message(actual, "to be zero-valued") 24 | } 25 | 26 | func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}) (message string) { 27 | return format.Message(actual, "not to be zero-valued") 28 | } 29 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/onsi/gomega/format" 7 | ) 8 | 9 | type HaveLenMatcher struct { 10 | Count int 11 | } 12 | 13 | func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool, err error) { 14 | length, ok := lengthOf(actual) 15 | if !ok { 16 | return false, fmt.Errorf("HaveLen matcher expects a string/array/map/channel/slice/iterator. Got:\n%s", format.Object(actual, 1)) 17 | } 18 | 19 | return length == matcher.Count, nil 20 | } 21 | 22 | func (matcher *HaveLenMatcher) FailureMessage(actual interface{}) (message string) { 23 | return fmt.Sprintf("Expected\n%s\nto have length %d", format.Object(actual, 1), matcher.Count) 24 | } 25 | 26 | func (matcher *HaveLenMatcher) NegatedFailureMessage(actual interface{}) (message string) { 27 | return fmt.Sprintf("Expected\n%s\nnot to have length %d", format.Object(actual, 1), matcher.Count) 28 | } 29 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/gomega/matchers/not.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "github.com/onsi/gomega/types" 5 | ) 6 | 7 | type NotMatcher struct { 8 | Matcher types.GomegaMatcher 9 | } 10 | 11 | func (m *NotMatcher) Match(actual interface{}) (bool, error) { 12 | success, err := m.Matcher.Match(actual) 13 | if err != nil { 14 | return false, err 15 | } 16 | return !success, nil 17 | } 18 | 19 | func (m *NotMatcher) FailureMessage(actual interface{}) (message string) { 20 | return m.Matcher.NegatedFailureMessage(actual) // works beautifully 21 | } 22 | 23 | func (m *NotMatcher) NegatedFailureMessage(actual interface{}) (message string) { 24 | return m.Matcher.FailureMessage(actual) // works beautifully 25 | } 26 | 27 | func (m *NotMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { 28 | return types.MatchMayChangeInTheFuture(m.Matcher, actual) // just return m.Matcher's value 29 | } 30 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go: -------------------------------------------------------------------------------- 1 | package node 2 | 3 | type Node struct { 4 | ID int 5 | Value interface{} 6 | } 7 | 8 | type NodeOrderedSet []Node 9 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "math" 4 | 5 | func Odd(n int) bool { 6 | return math.Mod(float64(n), 2.0) == 1.0 7 | } 8 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for 386 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for AMD64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | B syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | B syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | B syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ppc64, BSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for RISCV64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/auxv_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Auxv() ([][2]uintptr, error) { 12 | return nil, syscall.ENOTSUP 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | import "unsafe" 15 | 16 | func ioctl(fd int, req uint, arg uintptr) (err error) { 17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 18 | if r0 == -1 && er != nil { 19 | err = er 20 | } 21 | return 22 | } 23 | 24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 26 | if r0 == -1 && er != nil { 27 | err = er 28 | } 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && hurd 6 | 7 | package unix 8 | 9 | const ( 10 | TIOCGETA = 0x62251713 11 | ) 12 | 13 | type Winsize struct { 14 | Row uint16 15 | Col uint16 16 | Xpixel uint16 17 | Ypixel uint16 18 | } 19 | 20 | type Termios struct { 21 | Iflag uint32 22 | Oflag uint32 23 | Cflag uint32 24 | Lflag uint32 25 | Cc [20]uint8 26 | Ispeed int32 27 | Ospeed int32 28 | } 29 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64le || ppc64) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 12 | return syscall.Syscall(trap, a1, a2, a3) 13 | } 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 16 | } 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.RawSyscall(trap, a1, a2, a3) 19 | } 20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 22 | } 23 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/vgetrandom_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && go1.24 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | //go:linkname vgetrandom runtime.vgetrandom 12 | //go:noescape 13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux || !go1.24 6 | 7 | package unix 8 | 9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { 10 | return -1, false 11 | } 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/text/encoding/japanese/all.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package japanese 6 | 7 | import ( 8 | "golang.org/x/text/encoding" 9 | ) 10 | 11 | // All is a list of all defined encodings in this package. 12 | var All = []encoding.Encoding{EUCJP, ISO2022JP, ShiftJIS} 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/text/encoding/simplifiedchinese/all.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package simplifiedchinese 6 | 7 | import ( 8 | "golang.org/x/text/encoding" 9 | ) 10 | 11 | // All is a list of all defined encodings in this package. 12 | var All = []encoding.Encoding{GB18030, GBK, HZGB2312} 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/text/internal/language/common.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package language 4 | 5 | // This file contains code common to the maketables.go and the package code. 6 | 7 | // AliasType is the type of an alias in AliasMap. 8 | type AliasType int8 9 | 10 | const ( 11 | Deprecated AliasType = iota 12 | Macro 13 | Legacy 14 | 15 | AliasTypeUnknown AliasType = -1 16 | ) 17 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/text/internal/language/coverage.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package language 6 | 7 | // BaseLanguages returns the list of all supported base languages. It generates 8 | // the list by traversing the internal structures. 9 | func BaseLanguages() []Language { 10 | base := make([]Language, 0, NumLanguages) 11 | for i := 0; i < langNoIndexOffset; i++ { 12 | // We included "und" already for the value 0. 13 | if i != nonCanonicalUnd { 14 | base = append(base, Language(i)) 15 | } 16 | } 17 | i := langNoIndexOffset 18 | for _, v := range langNoIndex { 19 | for k := 0; k < 8; k++ { 20 | if v&1 == 1 { 21 | base = append(base, Language(i)) 22 | } 23 | v >>= 1 24 | i++ 25 | } 26 | } 27 | return base 28 | } 29 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/go/ast/astutil/util.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package astutil 6 | 7 | import "go/ast" 8 | 9 | // Unparen returns e with any enclosing parentheses stripped. 10 | // Deprecated: use [ast.Unparen]. 11 | // 12 | //go:fix inline 13 | func Unparen(e ast.Expr) ast.Expr { return ast.Unparen(e) } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/internal/event/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package event provides a set of packages that cover the main 6 | // concepts of telemetry in an implementation agnostic way. 7 | package event 8 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/internal/event/keys/util.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package keys 6 | 7 | import ( 8 | "sort" 9 | "strings" 10 | ) 11 | 12 | // Join returns a canonical join of the keys in S: 13 | // a sorted comma-separated string list. 14 | func Join[S ~[]T, T ~string](s S) string { 15 | strs := make([]string, 0, len(s)) 16 | for _, v := range s { 17 | strs = append(strs, string(v)) 18 | } 19 | sort.Strings(strs) 20 | return strings.Join(strs, ",") 21 | } 22 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/internal/gcimporter/support.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gcimporter 6 | 7 | import ( 8 | "bufio" 9 | "io" 10 | "strconv" 11 | "strings" 12 | ) 13 | 14 | // Copy of $GOROOT/src/cmd/internal/archive.ReadHeader. 15 | func readArchiveHeader(b *bufio.Reader, name string) int { 16 | // architecture-independent object file output 17 | const HeaderSize = 60 18 | 19 | var buf [HeaderSize]byte 20 | if _, err := io.ReadFull(b, buf[:]); err != nil { 21 | return -1 22 | } 23 | aname := strings.Trim(string(buf[0:16]), " ") 24 | if !strings.HasPrefix(aname, name) { 25 | return -1 26 | } 27 | asize := strings.Trim(string(buf[48:58]), " ") 28 | i, _ := strconv.Atoi(asize) 29 | return i 30 | } 31 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/internal/gocommand/invoke_notunix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !unix 6 | 7 | package gocommand 8 | 9 | import "os" 10 | 11 | // sigStuckProcess is the signal to send to kill a hanging subprocess. 12 | // On Unix we send SIGQUIT, but on non-Unix we only have os.Kill. 13 | var sigStuckProcess = os.Kill 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/internal/gocommand/invoke_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build unix 6 | 7 | package gocommand 8 | 9 | import "syscall" 10 | 11 | // Sigstuckprocess is the signal to send to kill a hanging subprocess. 12 | // Send SIGQUIT to get a stack trace. 13 | var sigStuckProcess = syscall.SIGQUIT 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/internal/modindex/types.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package modindex 6 | 7 | import ( 8 | "strings" 9 | ) 10 | 11 | // some special types to avoid confusions 12 | 13 | // distinguish various types of directory names. It's easy to get confused. 14 | type Abspath string // absolute paths 15 | type Relpath string // paths with GOMODCACHE prefix removed 16 | 17 | func toRelpath(cachedir Abspath, s string) Relpath { 18 | if strings.HasPrefix(s, string(cachedir)) { 19 | if s == string(cachedir) { 20 | return Relpath("") 21 | } 22 | return Relpath(s[len(cachedir)+1:]) 23 | } 24 | return Relpath(s) 25 | } 26 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/internal/packagesinternal/packages.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package packagesinternal exposes internal-only fields from go/packages. 6 | package packagesinternal 7 | 8 | var GetDepsErrors = func(p any) []*PackageError { return nil } 9 | 10 | type PackageError struct { 11 | ImportStack []string // shortest path from package named on command line to this one 12 | Pos string // position of error (if present, file:line:col) 13 | Err string // the error itself 14 | } 15 | 16 | var TypecheckCgo int 17 | var DepsErrors int // must be set as a LoadMode to call GetDepsErrors 18 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/internal/pkgbits/flags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package pkgbits 6 | 7 | const ( 8 | flagSyncMarkers = 1 << iota // file format contains sync markers 9 | ) 10 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/golang.org/x/tools/internal/pkgbits/support.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package pkgbits 6 | 7 | import "fmt" 8 | 9 | func assert(b bool) { 10 | if !b { 11 | panic("assertion failed") 12 | } 13 | } 14 | 15 | func panicf(format string, args ...any) { 16 | panic(fmt.Errorf(format, args...)) 17 | } 18 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/encoding/prototext/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package prototext marshals and unmarshals protocol buffer messages as the 6 | // textproto format. 7 | package prototext 8 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package editiondefaults contains the binary representation of the editions 6 | // defaults. 7 | package editiondefaults 8 | 9 | import _ "embed" 10 | 11 | //go:embed editions_defaults.binpb 12 | var Defaults []byte 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry/bosh-backup-and-restore/94bdfbc1922cc55ca0596c9c1ff37e9bdda88c44/s3-config-validator/src/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/errors/is_go113.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.13 6 | // +build go1.13 7 | 8 | package errors 9 | 10 | import "errors" 11 | 12 | // Is is errors.Is. 13 | func Is(err, target error) bool { return errors.Is(err, target) } 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !protolegacy 6 | // +build !protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = false 11 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build protolegacy 6 | // +build protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = true 11 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/genid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package genid contains constants for declarations in descriptor.proto 6 | // and the well-known types. 7 | package genid 8 | 9 | import "google.golang.org/protobuf/reflect/protoreflect" 10 | 11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" 12 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/genid/empty_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto" 14 | 15 | // Names for google.protobuf.Empty. 16 | const ( 17 | Empty_message_name protoreflect.Name = "Empty" 18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty" 19 | ) 20 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/genid/goname.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | // Go names of implementation-specific struct fields in generated messages. 8 | const ( 9 | State_goname = "state" 10 | 11 | SizeCache_goname = "sizeCache" 12 | SizeCacheA_goname = "XXX_sizecache" 13 | 14 | WeakFields_goname = "weakFields" 15 | WeakFieldsA_goname = "XXX_weak" 16 | 17 | UnknownFields_goname = "unknownFields" 18 | UnknownFieldsA_goname = "XXX_unrecognized" 19 | 20 | ExtensionFields_goname = "extensionFields" 21 | ExtensionFieldsA_goname = "XXX_InternalExtensions" 22 | ExtensionFieldsB_goname = "XXX_extensions" 23 | 24 | WeakFieldPrefix_goname = "XXX_weak_" 25 | ) 26 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/genid/map_entry.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field names and numbers for synthetic map entry messages. 10 | const ( 11 | MapEntry_Key_field_name protoreflect.Name = "key" 12 | MapEntry_Value_field_name protoreflect.Name = "value" 13 | 14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1 15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2 16 | ) 17 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/genid/wrappers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field name and number for messages in wrappers.proto. 10 | const ( 11 | WrapperValue_Value_field_name protoreflect.Name = "value" 12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1 13 | ) 14 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.12 6 | // +build !go1.12 7 | 8 | package impl 9 | 10 | import "reflect" 11 | 12 | type mapIter struct { 13 | v reflect.Value 14 | keys []reflect.Value 15 | } 16 | 17 | // mapRange provides a less-efficient equivalent to 18 | // the Go 1.12 reflect.Value.MapRange method. 19 | func mapRange(v reflect.Value) *mapIter { 20 | return &mapIter{v: v} 21 | } 22 | 23 | func (i *mapIter) Next() bool { 24 | if i.keys == nil { 25 | i.keys = i.v.MapKeys() 26 | } else { 27 | i.keys = i.keys[1:] 28 | } 29 | return len(i.keys) > 0 30 | } 31 | 32 | func (i *mapIter) Key() reflect.Value { 33 | return i.keys[0] 34 | } 35 | 36 | func (i *mapIter) Value() reflect.Value { 37 | return i.v.MapIndex(i.keys[0]) 38 | } 39 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.12 6 | // +build go1.12 7 | 8 | package impl 9 | 10 | import "reflect" 11 | 12 | func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() } 13 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package impl 6 | 7 | // When using unsafe pointers, we can just treat enum values as int32s. 8 | 9 | var ( 10 | coderEnumNoZero = coderInt32NoZero 11 | coderEnum = coderInt32 12 | coderEnumPtr = coderInt32Ptr 13 | coderEnumSlice = coderInt32Slice 14 | coderEnumPackedSlice = coderInt32PackedSlice 15 | ) 16 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/internal/impl/enum.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package impl 6 | 7 | import ( 8 | "reflect" 9 | 10 | "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | type EnumInfo struct { 14 | GoReflectType reflect.Type // int32 kind 15 | Desc protoreflect.EnumDescriptor 16 | } 17 | 18 | func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum { 19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum) 20 | } 21 | func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc } 22 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/proto/proto_methods.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build !protoreflect 7 | // +build !protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = true 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return m.ProtoMethods() 20 | } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/proto/proto_reflect.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build protoreflect 7 | // +build protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = false 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protoiface 6 | 7 | type MessageV1 interface { 8 | Reset() 9 | String() string 10 | ProtoMessage() 11 | } 12 | 13 | type ExtensionRangeV1 struct { 14 | Start, End int32 // both inclusive 15 | } 16 | -------------------------------------------------------------------------------- /s3-config-validator/src/vendor/gopkg.in/yaml.v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /ssh/export_test.go: -------------------------------------------------------------------------------- 1 | package ssh 2 | 3 | func InjectBuildSSHSession(builder SSHSessionBuilder) { 4 | buildSSHSession = builder 5 | } 6 | 7 | func ResetBuildSSHSession() { 8 | buildSSHSession = buildSSHSessionImpl 9 | } 10 | -------------------------------------------------------------------------------- /ssh/opts_generator.go: -------------------------------------------------------------------------------- 1 | package ssh 2 | 3 | import ( 4 | "github.com/cloudfoundry/bosh-cli/v7/director" 5 | "github.com/cloudfoundry/bosh-utils/uuid" 6 | ) 7 | 8 | //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate 9 | //counterfeiter:generate -o fakes/fake_opts_generator.go . SSHOptsGenerator 10 | type SSHOptsGenerator func(uuidGen uuid.Generator) (director.SSHOpts, string, error) 11 | -------------------------------------------------------------------------------- /ssh/remote_runner_factory.go: -------------------------------------------------------------------------------- 1 | package ssh 2 | 3 | import "golang.org/x/crypto/ssh" 4 | 5 | //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate 6 | //counterfeiter:generate -o fakes/fake_remote_runner_factory.go . RemoteRunnerFactory 7 | type RemoteRunnerFactory func(host, user, privateKey string, publicKeyCallback ssh.HostKeyCallback, publicKeyAlgorithm []string, logger Logger) (RemoteRunner, error) 8 | -------------------------------------------------------------------------------- /standalone/standalone_suite_test.go: -------------------------------------------------------------------------------- 1 | package standalone_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestStandalone(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Standalone Suite") 13 | } 14 | -------------------------------------------------------------------------------- /system/all_deployments/all_deployments_suite_test.go: -------------------------------------------------------------------------------- 1 | package all_deployments_tests 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | "time" 7 | 8 | "github.com/onsi/gomega/gexec" 9 | 10 | . "github.com/onsi/ginkgo/v2" 11 | . "github.com/onsi/gomega" 12 | ) 13 | 14 | var ( 15 | commandPath string 16 | err error 17 | artifactPath string 18 | workingDir string 19 | ) 20 | 21 | var _ = BeforeSuite(func() { 22 | SetDefaultEventuallyTimeout(15 * time.Minute) 23 | 24 | By("building bbr") 25 | commandPath, err = gexec.Build("github.com/cloudfoundry-incubator/bosh-backup-and-restore/cmd/bbr") 26 | Expect(err).NotTo(HaveOccurred()) 27 | 28 | workingDir, err = os.MkdirTemp("/tmp", "workingDir") 29 | 30 | }) 31 | 32 | func TestBoshTeam(t *testing.T) { 33 | RegisterFailHandler(Fail) 34 | RunSpecs(t, "All Deployments Suite") 35 | } 36 | -------------------------------------------------------------------------------- /system/director/pre_backup_check_test.go: -------------------------------------------------------------------------------- 1 | package director 2 | 3 | import ( 4 | "github.com/onsi/gomega/gbytes" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | "github.com/onsi/gomega/gexec" 9 | ) 10 | 11 | var _ = Describe("PreBackupCheck", func() { 12 | It("checks if the director is backupable", func() { 13 | session := runBBRDirector("pre-backup-check") 14 | 15 | Eventually(session).Should(gexec.Exit(0)) 16 | Expect(session.Out).To(gbytes.Say("Director can be backed up")) 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /system/director/restore_test.go: -------------------------------------------------------------------------------- 1 | package director 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo/v2" 5 | . "github.com/onsi/gomega" 6 | 7 | "github.com/onsi/gomega/gexec" 8 | ) 9 | 10 | var _ = Describe("Restores a director", func() { 11 | const restorePath = "/var/vcap/store/test-backup-and-restore" 12 | 13 | It("restores", func() { 14 | By("running restore") 15 | session := runBBRDirector("restore", "--artifact-path", directorBackupFixturePath) 16 | Eventually(session).Should(gexec.Exit(0)) 17 | 18 | By("ensuring data is restored") 19 | Eventually(runOnDirector("stat", restorePath+"/backup")).Should(gexec.Exit(0)) 20 | 21 | By("cleaning up the restored data on the director") 22 | Eventually(runOnDirector("rm", "-rf", restorePath)).Should(gexec.Exit(0)) 23 | }) 24 | }) 25 | -------------------------------------------------------------------------------- /system/windows/.envrc: -------------------------------------------------------------------------------- 1 | pushd $HOME/workspace/bosh-backup-and-restore-meta/maru 2 | eval "$(bbl print-env)" 3 | popd 4 | export TEST_ENV=ci 5 | -------------------------------------------------------------------------------- /tools/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | package tools 5 | 6 | import ( 7 | _ "github.com/maxbrunsfeld/counterfeiter/v6" 8 | _ "github.com/onsi/ginkgo/v2/ginkgo" 9 | ) 10 | 11 | // This file imports packages that are used when running go generate, or used 12 | // during the development process but not otherwise depended on by built code. 13 | --------------------------------------------------------------------------------