From 1de60643b55c0bd0cdf781afb2a656d5c344e486 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 17:29:30 +0000 Subject: [PATCH] Bump code.cloudfoundry.org/cli Bumps [code.cloudfoundry.org/cli](https://github.com/cloudfoundry/cli) from 0.0.0-20220602204915-eda2b7b2321c to 7.1.0+incompatible. - [Release notes](https://github.com/cloudfoundry/cli/releases) - [Changelog](https://github.com/cloudfoundry/cli/blob/main/doc/v7-plugin-api-changes.md) - [Commits](https://github.com/cloudfoundry/cli/commits/v7.1.0) --- updated-dependencies: - dependency-name: code.cloudfoundry.org/cli dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- go.mod | 31 +- go.sum | 102 +- .../application_instance_crashed_error.go | 12 + .../application_instance_flapping_error.go | 12 + .../application_instances_not_found_error.go | 13 + .../actionerror/buildpack_invalid_error.go | 9 + .../actionerror/missing_space_name_error.go | 7 + ...rganization_quotas_found_for_name_error.go | 15 + .../multiple_organizations_found_error.go | 19 + .../multiple_spaces_found_error.go | 15 + .../actor/actionerror/noaa_timeout_error.go | 7 + .../organization_name_taken_error.go | 13 + .../orphaned_routes_not_found_error.go | 10 + .../port_not_provided_for_query_error.go | 9 + .../resource_already_exists_error.go | 10 - .../actor/actionerror/revision_ambiguous.go | 13 - .../actor/actionerror/revision_not_found.go | 13 - .../route_binding_not_found_error.go | 7 - .../route_bound_to_multiple_apps_error.go | 2 +- .../actionerror/route_not_found_error.go | 28 +- .../security_group_not_bound_error.go | 18 + ..._and_broker_combination_not_found_error.go | 12 + .../service_broker_name_required_error.go | 16 - .../service_instance_already_shared_error.go | 10 + ...nce_params_fetching_not_supported_error.go | 11 - .../service_instance_type_error.go | 16 - .../service_instance_update_is_noop.go | 7 - .../service_key_not_found_error.go | 19 - .../service_plan_not_found_error.go | 10 +- .../service_upgrade_not_available_error.go | 6 +- .../actionerror/space_name_taken_error.go | 11 + .../actionerror/tcp_lookup_without_port.go | 8 + .../cli/actor/sharedaction/actor.go | 26 - .../cli/actor/sharedaction/auth.go | 31 - .../cli/actor/sharedaction/check_target.go | 51 - .../cli/actor/sharedaction/config.go | 16 - .../cli/actor/sharedaction/fix_mode_unix.go | 12 - .../actor/sharedaction/fix_mode_windows.go | 12 - .../cli/actor/sharedaction/help.go | 200 - .../cli/actor/sharedaction/is_org_targeted.go | 6 - .../actor/sharedaction/is_space_targeted.go | 6 - .../actor/sharedaction/log_cache_client.go | 21 - .../cli/actor/sharedaction/logging.go | 261 - .../cli/actor/sharedaction/resource.go | 516 - .../actor/sharedaction/secure_shell_client.go | 13 - .../cli/actor/sharedaction/ssh.go | 56 - .../cli/actor/v7action/actor.go | 63 - .../cli/actor/v7action/application.go | 464 - .../cli/actor/v7action/application_feature.go | 40 - .../actor/v7action/application_manifest.go | 70 - .../cli/actor/v7action/application_summary.go | 193 - .../cli/actor/v7action/auth.go | 113 - .../cli/actor/v7action/build.go | 177 - .../cli/actor/v7action/buildpack.go | 271 - .../actor/v7action/cloud_controller_client.go | 201 - .../cli/actor/v7action/config.go | 33 - .../cli/actor/v7action/curl.go | 69 - .../cli/actor/v7action/deployment.go | 44 - .../cli/actor/v7action/domain.go | 184 - .../cli/actor/v7action/droplet.go | 176 - .../actor/v7action/environment_variable.go | 110 - .../cli/actor/v7action/event.go | 104 - .../cli/actor/v7action/feature_flag.go | 48 - .../cli/actor/v7action/fix_mode_unix.go | 12 - .../cli/actor/v7action/fix_mode_windows.go | 12 - .../cli/actor/v7action/info.go | 13 - .../cli/actor/v7action/isolation_segment.go | 197 - .../cli/actor/v7action/job.go | 48 - .../cli/actor/v7action/k8s_auth.go | 89 - .../cli/actor/v7action/label.go | 180 - .../cli/actor/v7action/logging.go | 128 - .../cli/actor/v7action/marketplace.go | 56 - .../cli/actor/v7action/organization.go | 113 - .../cli/actor/v7action/organization_quota.go | 180 - .../actor/v7action/organization_summary.go | 75 - .../cli/actor/v7action/package.go | 259 - .../cli/actor/v7action/process.go | 62 - .../actor/v7action/process_health_check.go | 70 - .../cli/actor/v7action/process_instance.go | 77 - .../cli/actor/v7action/process_summary.go | 136 - .../cli/actor/v7action/progress_bar.go | 48 - .../cli/actor/v7action/resource_match.go | 59 - .../cli/actor/v7action/revisions.go | 104 - .../cli/actor/v7action/role.go | 227 - .../cli/actor/v7action/route.go | 437 - .../cli/actor/v7action/route_binding.go | 176 - .../cli/actor/v7action/router_group.go | 37 - .../cli/actor/v7action/routing_client.go | 10 - .../cli/actor/v7action/security_group.go | 386 - .../cli/actor/v7action/service_access.go | 343 - .../cli/actor/v7action/service_app_binding.go | 141 - .../cli/actor/v7action/service_broker.go | 69 - .../cli/actor/v7action/service_instance.go | 374 - .../v7action/service_instance_details.go | 300 - .../actor/v7action/service_instance_list.go | 131 - .../v7action/service_instance_sharing.go | 97 - .../cli/actor/v7action/service_key.go | 170 - .../cli/actor/v7action/service_offering.go | 25 - .../cli/actor/v7action/service_plan.go | 39 - .../cli/actor/v7action/shared_actor.go | 12 - .../cli/actor/v7action/space.go | 283 - .../cli/actor/v7action/space_feature.go | 49 - .../cli/actor/v7action/space_manifest.go | 38 - .../cli/actor/v7action/space_quota.go | 181 - .../cli/actor/v7action/ssh.go | 108 - .../cli/actor/v7action/ssh_actor.go | 9 - .../cli/actor/v7action/stack.go | 46 - .../cli/actor/v7action/target.go | 48 - .../cli/actor/v7action/task.go | 69 - .../cli/actor/v7action/token.go | 43 - .../cli/actor/v7action/uaa_client.go | 22 - .../cli/actor/v7action/user.go | 106 - .../cli/actor/v7action/version.go | 11 - .../versioncheck/minimum_version_check.go | 27 - .../ccerror/job_failed_no_error.go | 15 - .../ccerror/resource_alredy_exists_error.go | 11 - .../service_instance_not_found_error.go | 13 - ...ce_instance_operation_in_progress_error.go | 11 - ...ce_parameters_fetch_not_supported_error.go | 12 - .../ccerror/service_plan_not_found_error.go | 7 - .../ccv2/constant/application.go | 28 + .../ccv2/constant/application_instance.go | 25 + .../cloudcontroller/ccv2/constant/domain.go | 8 + .../cloudcontroller/ccv2/constant/event.go | 298 + .../ccv2/constant/feature_flag.go | 11 + .../cloudcontroller/ccv2/constant/filter.go | 59 + .../cloudcontroller/ccv2/constant/godoc.go | 19 + .../api/cloudcontroller/ccv2/constant/job.go | 18 + .../ccv2/constant/last_operation.go | 9 + .../cloudcontroller/ccv2/constant/package.go | 2 + .../ccv2/constant/router_group_type.go | 11 + .../ccv2/constant/security_group.go | 13 + .../ccv2/constant/service_instance.go | 11 + .../cloudcontroller/ccv3/api_links.go} | 20 +- .../cli/api/cloudcontroller/ccv3/build.go | 74 +- .../cli/api/cloudcontroller/ccv3/buildpack.go | 107 +- .../cli/api/cloudcontroller/ccv3/clock.go | 2 +- .../ccv3/connection_wrapper.go | 2 +- .../ccv3/constant/application.go | 3 - .../api/cloudcontroller/ccv3/constant/job.go | 2 - .../ccv3/constant/role_type.go | 1 - .../api/cloudcontroller/ccv3/deployment.go | 97 +- .../ccv3/environment_variables.go | 55 +- .../cli/api/cloudcontroller/ccv3/errors.go | 33 +- .../api/cloudcontroller/ccv3/feature_flag.go | 37 +- .../ccv3/included_resources.go | 3 - .../cli/api/cloudcontroller/ccv3/info.go | 42 +- .../ccv3/internal/api_resources.go | 32 + .../ccv3/internal/api_routes.go | 334 +- .../cloudcontroller/ccv3/internal/routing.go | 27 +- .../cloudcontroller/ccv3/isolation_segment.go | 27 +- .../cli/api/cloudcontroller/ccv3/job.go | 79 +- .../cli/api/cloudcontroller/ccv3/manifest.go | 15 - .../cli/api/cloudcontroller/ccv3/metadata.go | 6 - .../cli/api/cloudcontroller/ccv3/package.go | 147 +- .../cli/api/cloudcontroller/ccv3/paginate.go | 5 +- .../cli/api/cloudcontroller/ccv3/process.go | 168 +- .../cli/api/cloudcontroller/ccv3/query.go | 23 - .../api/cloudcontroller/ccv3/relationship.go | 11 + .../cloudcontroller/ccv3/relationship_list.go | 15 + .../cli/api/cloudcontroller/ccv3/request.go | 19 +- .../cli/api/cloudcontroller/ccv3/requester.go | 54 +- .../cli/api/cloudcontroller/ccv3/revisions.go | 15 - .../cli/api/cloudcontroller/ccv3/route.go | 31 +- .../api/cloudcontroller/ccv3/route_binding.go | 36 - .../ccv3/service_credential_binding.go | 60 - .../cloudcontroller/ccv3/service_instance.go | 154 +- .../cloudcontroller/ccv3/service_offering.go | 22 +- .../api/cloudcontroller/ccv3/service_plan.go | 46 +- .../cli/api/cloudcontroller/ccv3/sidecar.go | 19 +- .../api/cloudcontroller/ccv3/space_feature.go | 8 +- .../cli/api/cloudcontroller/ccv3/stack.go | 22 +- .../cli/api/cloudcontroller/ccv3/target.go | 18 +- .../cli/api/cloudcontroller/ccv3/task.go | 58 +- .../cli/api/cloudcontroller/ccv3/user.go | 11 - .../ccversion/maximum_version.go | 5 - .../ccversion/minimum_version.go | 16 - .../cli/api/cloudcontroller/connection.go | 2 +- .../wrapper/kubernetes_authentication.go | 67 - .../cloudcontroller/wrapper/request_logger.go | 2 +- .../wrapper/uaa_authentication.go | 17 +- .../cli/api/router/connection.go | 2 +- .../cli/api/router/connection_wrapper.go | 2 +- .../cli/api/router/wrapper/request_logger.go | 2 +- .../api/router/wrapper/uaa_authentication.go | 4 +- .../cli/api/shared/wrap_for_cf_on_k8s.go | 124 - .../cli/api/uaa/config.go | 2 +- .../cli/api/uaa/connection.go | 2 +- .../cli/api/uaa/connection_wrapper.go | 2 +- .../code.cloudfoundry.org/cli/api/uaa/info.go | 19 +- .../cli/api/uaa/prompts.go | 32 - .../cli/api/uaa/resources.go | 30 +- .../cli/api/uaa/version.go | 35 - .../cli/api/uaa/wrapper/request_logger.go | 2 +- .../cli/api/uaa/wrapper/uaa_authentication.go | 4 +- .../cf/configuration/config_disk_persistor.go | 90 - .../config_disk_persistor_unix.go | 13 - .../config_disk_persistor_win.go | 31 - .../configuration/coreconfig/access_token.go | 61 - .../coreconfig/api_config_refresher.go | 55 - .../configuration/coreconfig/config_data.go | 77 - .../coreconfig/config_repository.go | 607 - .../cli/cf/formatters/bools.go | 12 - .../cli/cf/formatters/bytes.go | 82 - .../cli/cf/formatters/memoryLimit.go | 11 - .../cli/cf/formatters/string.go | 16 - .../cli/cf/i18n/README-i18n.md | 48 - .../cli/cf/i18n/excluded.json | 41 - .../code.cloudfoundry.org/cli/cf/i18n/i18n.go | 14 - .../cli/cf/i18n/locale.go | 61 - .../cli/cf/models/app_event.go | 12 - .../cli/cf/models/app_file.go | 8 - .../cli/cf/models/app_instance.go | 24 - .../cli/cf/models/application.go | 222 - .../cli/cf/models/buildpack.go | 12 - .../cli/cf/models/docker.go | 6 - .../cli/cf/models/domain.go | 19 - .../cli/cf/models/environment.go | 19 - .../cli/cf/models/environment_variable.go | 22 - .../cli/cf/models/feature_flag.go | 7 - .../cli/cf/models/organization.go | 14 - .../cli/cf/models/plugin_repo.go | 6 - .../cli/cf/models/quota.go | 27 - .../cli/cf/models/role.go | 67 - .../cli/cf/models/route.go | 59 - .../cli/cf/models/route_summary.go | 18 - .../cli/cf/models/router_group.go | 9 - .../cli/cf/models/security_group.go | 22 - .../cli/cf/models/service_auth_token.go | 8 - .../cli/cf/models/service_binding.go | 13 - .../cli/cf/models/service_broker.go | 10 - .../cli/cf/models/service_instance.go | 48 - .../cli/cf/models/service_key.go | 20 - .../cli/cf/models/service_offering.go | 31 - .../cli/cf/models/service_plan.go | 34 - .../cli/cf/models/service_plan_visibility.go | 7 - .../cli/cf/models/space.go | 17 - .../cli/cf/models/space_quota.go | 75 - .../cli/cf/models/stack.go | 7 - .../cli/cf/models/user.go | 8 - .../cli/cf/models/user_provided_service.go | 19 - .../cli/cf/ssh/sigwinch/sigwinch.go | 10 - .../cli/cf/ssh/sigwinch/sigwinch_win.go | 10 - .../cli/command/api_version_warning.go | 75 - .../cli/command/config.go | 85 - .../cli/command/display_not_logged_in.go | 11 - .../cli/command/experimental_warning.go | 3 - .../cli/command/extended_commander.go | 11 - .../cli/command/godoc.go | 3 - .../cli/command/minimum_version_check.go | 53 - .../cli/command/shared_actor.go | 13 - .../convert_to_translatable_error.go | 19 +- .../translatableerror/curl_exit_22_error.go | 15 - .../translatableerror/job_failed_no_error.go | 17 - .../manifest_creation_error.go | 8 +- .../not_supported_on_k8s_error.go | 19 - .../request_creation_error.go | 15 - .../translatableerror/revision_ambiguous.go | 17 - .../translatableerror/revision_not_found.go | 17 - .../service_instance_not_found_error.go | 2 +- .../service_plan_not_found_error.go | 16 +- .../translatableerror/translatable_error.go | 2 +- .../code.cloudfoundry.org/cli/command/ui.go | 49 - .../cli/i18n/resources/README.md | 8 - .../cli/i18n/resources/de-de.all.json | 77 - .../cli/i18n/resources/en-us.all.json | 72 - .../cli/i18n/resources/es-es.all.json | 87 - .../cli/i18n/resources/fr-fr.all.json | 93 - .../cli/i18n/resources/i18n_resources.go | 444 - .../cli/i18n/resources/it-it.all.json | 72 - .../cli/i18n/resources/ja-jp.all.json | 72 - .../cli/i18n/resources/ko-kr.all.json | 72 - .../cli/i18n/resources/pt-br.all.json | 72 - .../cli/i18n/resources/zh-hans.all.json | 77 - .../cli/i18n/resources/zh-hant.all.json | 77 - .../cli/resources/application_resource.go | 3 +- .../cli/resources/build_resource.go | 69 - .../cli/resources/buildpack_resource.go | 94 - .../cli/resources/deployment_resource.go | 80 - .../environment_variables_resource.go | 47 - .../cli/resources/feature_flag_resource.go | 18 - .../resources/isolation_segment_resource.go | 9 - .../cli/resources/last_operation_resource.go | 34 - .../cli/resources/manifest_diff_resource.go | 18 - .../cli/resources/package_resource.go | 105 - .../cli/resources/process_resource.go | 131 - .../cli/resources/revision_resource.go | 13 +- .../cli/resources/route_binding.go | 23 - .../cli/resources/route_resource.go | 6 +- ...ice_credential_binding_details_resource.go | 5 - .../service_credential_binding_resource.go | 42 - .../resources/service_instance_resource.go | 24 - ...service_instance_usage_summary_resource.go | 22 - .../resources/service_offering_resource.go | 7 - .../cli/resources/service_plan_resource.go | 4 - .../resources/shared_to_spaces_resource.go | 15 - .../cli/resources/sidecar_resource.go | 9 - .../cli/resources/space_feature_resource.go | 6 - .../cli/resources/stack_resource.go | 13 - .../cli/resources/task_resource.go | 41 - .../cli/resources/user_resource.go | 5 - .../cli/types/json_object.go | 16 - .../cli/types/optional_boolean.go | 34 - .../cli/types/optional_object.go | 43 - .../cli/types/optional_string.go | 34 - .../cli/types/optional_string_slice.go | 52 - .../cli/util/batcher/batcher.go | 29 - .../cli/util/checksum.go | 2 +- .../cli/util/clissh/listener_factory.go | 19 - .../cli/util/clissh/secure_client.go | 41 - .../cli/util/clissh/secure_dialer.go | 33 - .../cli/util/clissh/secure_session.go | 21 - .../cli/util/clissh/ssh.go | 409 - .../cli/util/clissh/terminal_helper.go | 43 - .../cli/util/clissh/tty_request.go | 10 - .../cli/util/configv3/config.go | 13 - .../cli/util/configv3/default_user_config.go | 58 - .../cli/util/configv3/dynamic_user_config.go | 22 - .../cli/util/configv3/home_dir_unix.go | 1 - .../cli/util/configv3/home_dir_windows.go | 1 - .../cli/util/configv3/json_config.go | 79 +- .../cli/util/configv3/k8s.go | 10 - .../util/configv3/kubernetes_user_config.go | 17 - .../cli/util/configv3/load_config.go | 6 - .../cli/util/configv3/write_config.go | 9 - .../cli/util/download/http_client.go | 2 +- .../cli/util/download/progress_bar.go | 2 +- .../cli/util/extract/extract.go | 64 - .../cli/util/generic/architecture.go | 18 - .../util/generic/executable_filename_unix.go | 10 - .../generic/executable_filename_windows.go | 18 - .../cli/util/generic/map.go | 153 - .../cli/util/generic/merge_reduce.go | 52 - .../cli/util/generic/slice.go | 10 - .../cli/util/lookuptable/name_from_guid.go | 20 - .../util/lookuptable/resource_from_guid.go | 27 - .../cli/util/railway/railway.go | 19 - .../cli/util/sorting/alphabetic.go | 42 - .../cli/util/ui/config.go | 17 - .../cli/util/ui/display.go | 1 - .../code.cloudfoundry.org/cli/util/ui/i18n.go | 137 - .../cli/util/ui/log_message.go | 50 - .../cli/util/ui/prompt.go | 150 - .../cli/util/ui/redacted_value.go | 26 - .../cli/util/ui/request_logger_file_writer.go | 146 - .../ui/request_logger_terminal_display.go | 106 - .../cli/util/ui/sanitize_json.go | 66 - .../cli/util/ui/table.go | 97 - .../cli/util/ui/token_regexp.go | 3 - .../code.cloudfoundry.org/cli/util/ui/ui.go | 511 - .../cli/util/ui/ui_for_app.go | 31 - .../cli/util/ui/ui_for_push.go | 244 - .../cli/util/ui/ui_v7.go | 20 - .../cli/util/unique/string_slice.go | 13 - .../app_not_in_manifest_error.go | 11 + .../cli/util/v6manifestparser/application.go | 34 + .../v6manifestparser/interpolation_error.go | 14 + ...invalid_manifest_application_path_error.go | 9 + .../v6manifestparser/invalid_yaml_error.go | 11 + .../cli/util/v6manifestparser/locator.go | 56 + .../cli/util/v6manifestparser/manifest.go | 5 + .../cli/util/v6manifestparser/parser.go | 186 + .../cli/util/v6manifestparser/validation.go | 16 + vendor/code.cloudfoundry.org/clock/LICENSE | 201 - vendor/code.cloudfoundry.org/clock/NOTICE | 20 - vendor/code.cloudfoundry.org/clock/README.md | 13 - vendor/code.cloudfoundry.org/clock/clock.go | 53 - vendor/code.cloudfoundry.org/clock/package.go | 1 - vendor/code.cloudfoundry.org/clock/ticker.go | 20 - vendor/code.cloudfoundry.org/clock/timer.go | 25 - .../go-log-cache/.gitignore | 1 - .../go-log-cache/.travis.yml | 18 - .../go-log-cache/LICENSE | 176 - .../code.cloudfoundry.org/go-log-cache/NOTICE | 8 - .../go-log-cache/README.md | 18 - .../go-log-cache/client.go | 727 - .../go-log-cache/internal/marshaler.go | 453 - .../go-log-cache/oauth2_http_client.go | 200 - .../go-log-cache/rpc/logcache_v1/doc.go | 3 - .../go-log-cache/rpc/logcache_v1/egress.pb.go | 587 - .../rpc/logcache_v1/egress.pb.gw.go | 286 - .../rpc/logcache_v1/egress_grpc.pb.go | 137 - .../go-log-cache/rpc/logcache_v1/generate.sh | 60 - .../rpc/logcache_v1/ingress.pb.go | 217 - .../rpc/logcache_v1/ingress_grpc.pb.go | 105 - .../rpc/logcache_v1/orchestration.pb.go | 725 - .../rpc/logcache_v1/orchestration_grpc.pb.go | 209 - .../go-log-cache/rpc/logcache_v1/promql.pb.go | 969 -- .../rpc/logcache_v1/promql.pb.gw.go | 252 - .../rpc/logcache_v1/promql_grpc.pb.go | 137 - .../go-log-cache/walk.go | 318 - .../go-log-cache/window.go | 119 - .../go-loggregator/v8/LICENSE | 176 - .../go-loggregator/v8/NOTICE | 16 - .../go-loggregator/v8/rfc5424/README.md | 28 - .../go-loggregator/v8/rfc5424/marshal.go | 179 - .../go-loggregator/v8/rfc5424/message.go | 76 - .../go-loggregator/v8/rfc5424/rfc5424.go | 40 - .../go-loggregator/v8/rfc5424/stream.go | 63 - .../go-loggregator/v8/rfc5424/unmarshal.go | 452 - .../v8/rpc/loggregator_v2/doc.go | 3 - .../v8/rpc/loggregator_v2/egress.pb.go | 828 -- .../v8/rpc/loggregator_v2/envelope.pb.go | 875 -- .../v8/rpc/loggregator_v2/generate.sh | 25 - .../v8/rpc/loggregator_v2/ingress.pb.go | 346 - .../v8/rpc/loggregator_v2/syslog.go | 234 - vendor/code.cloudfoundry.org/ykk/LICENSE | 202 - vendor/code.cloudfoundry.org/ykk/NOTICE | 9 - vendor/code.cloudfoundry.org/ykk/README.md | 12 - vendor/code.cloudfoundry.org/ykk/reader.go | 71 - vendor/github.com/Azure/go-ansiterm/LICENSE | 21 - vendor/github.com/Azure/go-ansiterm/README.md | 12 - .../github.com/Azure/go-ansiterm/SECURITY.md | 41 - .../github.com/Azure/go-ansiterm/constants.go | 188 - .../github.com/Azure/go-ansiterm/context.go | 7 - .../Azure/go-ansiterm/csi_entry_state.go | 49 - .../Azure/go-ansiterm/csi_param_state.go | 38 - .../go-ansiterm/escape_intermediate_state.go | 36 - .../Azure/go-ansiterm/escape_state.go | 47 - .../Azure/go-ansiterm/event_handler.go | 90 - .../Azure/go-ansiterm/ground_state.go | 24 - .../Azure/go-ansiterm/osc_string_state.go | 31 - vendor/github.com/Azure/go-ansiterm/parser.go | 151 - .../go-ansiterm/parser_action_helpers.go | 99 - .../Azure/go-ansiterm/parser_actions.go | 119 - vendor/github.com/Azure/go-ansiterm/states.go | 71 - .../github.com/Azure/go-ansiterm/utilities.go | 21 - .../Azure/go-ansiterm/winterm/ansi.go | 196 - .../Azure/go-ansiterm/winterm/api.go | 327 - .../go-ansiterm/winterm/attr_translation.go | 100 - .../go-ansiterm/winterm/cursor_helpers.go | 101 - .../go-ansiterm/winterm/erase_helpers.go | 84 - .../go-ansiterm/winterm/scroll_helper.go | 118 - .../Azure/go-ansiterm/winterm/utilities.go | 9 - .../go-ansiterm/winterm/win_event_handler.go | 743 - vendor/github.com/davecgh/go-spew/LICENSE | 15 - .../github.com/davecgh/go-spew/spew/bypass.go | 145 - .../davecgh/go-spew/spew/bypasssafe.go | 38 - .../github.com/davecgh/go-spew/spew/common.go | 341 - .../github.com/davecgh/go-spew/spew/config.go | 306 - vendor/github.com/davecgh/go-spew/spew/doc.go | 211 - .../github.com/davecgh/go-spew/spew/dump.go | 509 - .../github.com/davecgh/go-spew/spew/format.go | 419 - .../github.com/davecgh/go-spew/spew/spew.go | 148 - vendor/github.com/fatih/color/LICENSE.md | 20 - vendor/github.com/fatih/color/README.md | 176 - vendor/github.com/fatih/color/color.go | 650 - .../github.com/fatih/color/color_windows.go | 19 - vendor/github.com/fatih/color/doc.go | 134 - vendor/github.com/go-logr/logr/.golangci.yaml | 26 - vendor/github.com/go-logr/logr/CHANGELOG.md | 6 - .../github.com/go-logr/logr/CONTRIBUTING.md | 17 - vendor/github.com/go-logr/logr/LICENSE | 201 - vendor/github.com/go-logr/logr/README.md | 406 - vendor/github.com/go-logr/logr/SECURITY.md | 18 - vendor/github.com/go-logr/logr/context.go | 33 - .../github.com/go-logr/logr/context_noslog.go | 49 - .../github.com/go-logr/logr/context_slog.go | 83 - vendor/github.com/go-logr/logr/discard.go | 24 - vendor/github.com/go-logr/logr/logr.go | 520 - vendor/github.com/go-logr/logr/sloghandler.go | 192 - vendor/github.com/go-logr/logr/slogr.go | 100 - vendor/github.com/go-logr/logr/slogr/slogr.go | 61 - vendor/github.com/go-logr/logr/slogsink.go | 120 - vendor/github.com/gogo/protobuf/AUTHORS | 15 - vendor/github.com/gogo/protobuf/CONTRIBUTORS | 23 - vendor/github.com/gogo/protobuf/LICENSE | 35 - .../github.com/gogo/protobuf/proto/Makefile | 43 - .../github.com/gogo/protobuf/proto/clone.go | 258 - .../gogo/protobuf/proto/custom_gogo.go | 39 - .../github.com/gogo/protobuf/proto/decode.go | 427 - .../gogo/protobuf/proto/deprecated.go | 63 - .../github.com/gogo/protobuf/proto/discard.go | 350 - .../gogo/protobuf/proto/duration.go | 100 - .../gogo/protobuf/proto/duration_gogo.go | 49 - .../github.com/gogo/protobuf/proto/encode.go | 205 - .../gogo/protobuf/proto/encode_gogo.go | 33 - .../github.com/gogo/protobuf/proto/equal.go | 300 - .../gogo/protobuf/proto/extensions.go | 605 - .../gogo/protobuf/proto/extensions_gogo.go | 389 - vendor/github.com/gogo/protobuf/proto/lib.go | 973 -- .../gogo/protobuf/proto/lib_gogo.go | 50 - .../gogo/protobuf/proto/message_set.go | 181 - .../gogo/protobuf/proto/pointer_reflect.go | 357 - .../protobuf/proto/pointer_reflect_gogo.go | 59 - .../gogo/protobuf/proto/pointer_unsafe.go | 308 - .../protobuf/proto/pointer_unsafe_gogo.go | 56 - .../gogo/protobuf/proto/properties.go | 610 - .../gogo/protobuf/proto/properties_gogo.go | 36 - .../gogo/protobuf/proto/skip_gogo.go | 119 - .../gogo/protobuf/proto/table_marshal.go | 3009 ---- .../gogo/protobuf/proto/table_marshal_gogo.go | 388 - .../gogo/protobuf/proto/table_merge.go | 676 - .../gogo/protobuf/proto/table_unmarshal.go | 2249 --- .../protobuf/proto/table_unmarshal_gogo.go | 385 - vendor/github.com/gogo/protobuf/proto/text.go | 930 -- .../gogo/protobuf/proto/text_gogo.go | 57 - .../gogo/protobuf/proto/text_parser.go | 1018 -- .../gogo/protobuf/proto/timestamp.go | 113 - .../gogo/protobuf/proto/timestamp_gogo.go | 49 - .../gogo/protobuf/proto/wrappers.go | 1888 --- .../gogo/protobuf/proto/wrappers_gogo.go | 113 - .../gogo/protobuf/sortkeys/sortkeys.go | 101 - vendor/github.com/golang/protobuf/AUTHORS | 3 - .../github.com/golang/protobuf/CONTRIBUTORS | 3 - vendor/github.com/golang/protobuf/LICENSE | 28 - .../golang/protobuf/jsonpb/decode.go | 530 - .../golang/protobuf/jsonpb/encode.go | 559 - .../github.com/golang/protobuf/jsonpb/json.go | 69 - .../golang/protobuf/proto/buffer.go | 324 - .../golang/protobuf/proto/defaults.go | 63 - .../golang/protobuf/proto/deprecated.go | 113 - .../golang/protobuf/proto/discard.go | 58 - .../golang/protobuf/proto/extensions.go | 356 - .../golang/protobuf/proto/properties.go | 306 - .../github.com/golang/protobuf/proto/proto.go | 167 - .../golang/protobuf/proto/registry.go | 317 - .../golang/protobuf/proto/text_decode.go | 801 -- .../golang/protobuf/proto/text_encode.go | 560 - .../github.com/golang/protobuf/proto/wire.go | 78 - .../golang/protobuf/proto/wrappers.go | 34 - .../github.com/golang/protobuf/ptypes/any.go | 179 - .../golang/protobuf/ptypes/any/any.pb.go | 62 - .../github.com/golang/protobuf/ptypes/doc.go | 10 - .../golang/protobuf/ptypes/duration.go | 76 - .../protobuf/ptypes/duration/duration.pb.go | 63 - .../golang/protobuf/ptypes/timestamp.go | 112 - .../protobuf/ptypes/timestamp/timestamp.pb.go | 64 - vendor/github.com/google/gofuzz/.travis.yml | 10 - .../github.com/google/gofuzz/CONTRIBUTING.md | 67 - vendor/github.com/google/gofuzz/LICENSE | 202 - vendor/github.com/google/gofuzz/README.md | 89 - .../google/gofuzz/bytesource/bytesource.go | 81 - vendor/github.com/google/gofuzz/doc.go | 18 - vendor/github.com/google/gofuzz/fuzz.go | 605 - .../grpc-ecosystem/grpc-gateway/v2/LICENSE | 27 - .../v2/internal/httprule/BUILD.bazel | 35 - .../v2/internal/httprule/compile.go | 121 - .../grpc-gateway/v2/internal/httprule/fuzz.go | 11 - .../v2/internal/httprule/parse.go | 368 - .../v2/internal/httprule/types.go | 60 - .../grpc-gateway/v2/runtime/BUILD.bazel | 97 - .../grpc-gateway/v2/runtime/context.go | 401 - .../grpc-gateway/v2/runtime/convert.go | 318 - .../grpc-gateway/v2/runtime/doc.go | 5 - .../grpc-gateway/v2/runtime/errors.go | 181 - .../grpc-gateway/v2/runtime/fieldmask.go | 166 - .../grpc-gateway/v2/runtime/handler.go | 227 - .../v2/runtime/marshal_httpbodyproto.go | 32 - .../grpc-gateway/v2/runtime/marshal_json.go | 45 - .../grpc-gateway/v2/runtime/marshal_jsonpb.go | 348 - .../grpc-gateway/v2/runtime/marshal_proto.go | 60 - .../grpc-gateway/v2/runtime/marshaler.go | 50 - .../v2/runtime/marshaler_registry.go | 109 - .../grpc-gateway/v2/runtime/mux.go | 486 - .../grpc-gateway/v2/runtime/pattern.go | 381 - .../grpc-gateway/v2/runtime/proto2_convert.go | 80 - .../grpc-gateway/v2/runtime/query.go | 338 - .../grpc-gateway/v2/utilities/BUILD.bazel | 31 - .../grpc-gateway/v2/utilities/doc.go | 2 - .../grpc-gateway/v2/utilities/pattern.go | 22 - .../v2/utilities/readerfactory.go | 19 - .../v2/utilities/string_array_flag.go | 33 - .../grpc-gateway/v2/utilities/trie.go | 174 - .../github.com/imdario/mergo/.deepsource.toml | 12 - vendor/github.com/imdario/mergo/.gitignore | 33 - vendor/github.com/imdario/mergo/.travis.yml | 12 - .../imdario/mergo/CODE_OF_CONDUCT.md | 46 - .../github.com/imdario/mergo/CONTRIBUTING.md | 112 - vendor/github.com/imdario/mergo/LICENSE | 28 - vendor/github.com/imdario/mergo/README.md | 236 - vendor/github.com/imdario/mergo/SECURITY.md | 14 - vendor/github.com/imdario/mergo/doc.go | 143 - vendor/github.com/imdario/mergo/map.go | 178 - vendor/github.com/imdario/mergo/merge.go | 409 - vendor/github.com/imdario/mergo/mergo.go | 81 - .../github.com/json-iterator/go/.codecov.yml | 3 - vendor/github.com/json-iterator/go/.gitignore | 4 - .../github.com/json-iterator/go/.travis.yml | 14 - vendor/github.com/json-iterator/go/Gopkg.lock | 21 - vendor/github.com/json-iterator/go/Gopkg.toml | 26 - vendor/github.com/json-iterator/go/LICENSE | 21 - vendor/github.com/json-iterator/go/README.md | 85 - vendor/github.com/json-iterator/go/adapter.go | 150 - vendor/github.com/json-iterator/go/any.go | 325 - .../github.com/json-iterator/go/any_array.go | 278 - .../github.com/json-iterator/go/any_bool.go | 137 - .../github.com/json-iterator/go/any_float.go | 83 - .../github.com/json-iterator/go/any_int32.go | 74 - .../github.com/json-iterator/go/any_int64.go | 74 - .../json-iterator/go/any_invalid.go | 82 - vendor/github.com/json-iterator/go/any_nil.go | 69 - .../github.com/json-iterator/go/any_number.go | 123 - .../github.com/json-iterator/go/any_object.go | 374 - vendor/github.com/json-iterator/go/any_str.go | 166 - .../github.com/json-iterator/go/any_uint32.go | 74 - .../github.com/json-iterator/go/any_uint64.go | 74 - vendor/github.com/json-iterator/go/build.sh | 12 - vendor/github.com/json-iterator/go/config.go | 375 - .../go/fuzzy_mode_convert_table.md | 7 - vendor/github.com/json-iterator/go/iter.go | 349 - .../github.com/json-iterator/go/iter_array.go | 64 - .../github.com/json-iterator/go/iter_float.go | 342 - .../github.com/json-iterator/go/iter_int.go | 346 - .../json-iterator/go/iter_object.go | 267 - .../github.com/json-iterator/go/iter_skip.go | 130 - .../json-iterator/go/iter_skip_sloppy.go | 163 - .../json-iterator/go/iter_skip_strict.go | 99 - .../github.com/json-iterator/go/iter_str.go | 215 - .../github.com/json-iterator/go/jsoniter.go | 18 - vendor/github.com/json-iterator/go/pool.go | 42 - vendor/github.com/json-iterator/go/reflect.go | 337 - .../json-iterator/go/reflect_array.go | 104 - .../json-iterator/go/reflect_dynamic.go | 70 - .../json-iterator/go/reflect_extension.go | 483 - .../json-iterator/go/reflect_json_number.go | 112 - .../go/reflect_json_raw_message.go | 76 - .../json-iterator/go/reflect_map.go | 346 - .../json-iterator/go/reflect_marshaler.go | 225 - .../json-iterator/go/reflect_native.go | 453 - .../json-iterator/go/reflect_optional.go | 129 - .../json-iterator/go/reflect_slice.go | 99 - .../go/reflect_struct_decoder.go | 1097 -- .../go/reflect_struct_encoder.go | 211 - vendor/github.com/json-iterator/go/stream.go | 210 - .../json-iterator/go/stream_float.go | 111 - .../github.com/json-iterator/go/stream_int.go | 190 - .../github.com/json-iterator/go/stream_str.go | 372 - vendor/github.com/json-iterator/go/test.sh | 12 - .../github.com/lunixbochs/vtclean/.travis.yml | 9 - vendor/github.com/lunixbochs/vtclean/LICENSE | 19 - .../github.com/lunixbochs/vtclean/README.md | 46 - vendor/github.com/lunixbochs/vtclean/io.go | 93 - vendor/github.com/lunixbochs/vtclean/line.go | 113 - .../github.com/lunixbochs/vtclean/vtclean.go | 95 - vendor/github.com/mattn/go-colorable/LICENSE | 21 - .../github.com/mattn/go-colorable/README.md | 48 - .../mattn/go-colorable/colorable_appengine.go | 38 - .../mattn/go-colorable/colorable_others.go | 38 - .../mattn/go-colorable/colorable_windows.go | 1047 -- .../github.com/mattn/go-colorable/go.test.sh | 12 - .../mattn/go-colorable/noncolorable.go | 57 - vendor/github.com/mattn/go-isatty/LICENSE | 9 - vendor/github.com/mattn/go-isatty/README.md | 50 - vendor/github.com/mattn/go-isatty/doc.go | 2 - vendor/github.com/mattn/go-isatty/go.test.sh | 12 - .../github.com/mattn/go-isatty/isatty_bsd.go | 20 - .../mattn/go-isatty/isatty_others.go | 17 - .../mattn/go-isatty/isatty_plan9.go | 23 - .../mattn/go-isatty/isatty_solaris.go | 21 - .../mattn/go-isatty/isatty_tcgets.go | 20 - .../mattn/go-isatty/isatty_windows.go | 125 - vendor/github.com/moby/moby/AUTHORS | 2175 --- vendor/github.com/moby/moby/LICENSE | 191 - vendor/github.com/moby/moby/NOTICE | 19 - .../moby/moby/pkg/term/deprecated.go | 84 - .../moby/moby/pkg/term/deprecated_unix.go | 21 - vendor/github.com/moby/term/.gitignore | 8 - vendor/github.com/moby/term/LICENSE | 191 - vendor/github.com/moby/term/README.md | 36 - vendor/github.com/moby/term/ascii.go | 66 - vendor/github.com/moby/term/doc.go | 3 - vendor/github.com/moby/term/proxy.go | 88 - vendor/github.com/moby/term/term.go | 85 - vendor/github.com/moby/term/term_unix.go | 98 - vendor/github.com/moby/term/term_windows.go | 176 - vendor/github.com/moby/term/termios_bsd.go | 13 - vendor/github.com/moby/term/termios_nonbsd.go | 13 - vendor/github.com/moby/term/termios_unix.go | 35 - .../github.com/moby/term/termios_windows.go | 37 - .../moby/term/windows/ansi_reader.go | 252 - .../moby/term/windows/ansi_writer.go | 57 - .../github.com/moby/term/windows/console.go | 43 - vendor/github.com/moby/term/windows/doc.go | 5 - .../modern-go/concurrent/.gitignore | 1 - .../modern-go/concurrent/.travis.yml | 14 - .../github.com/modern-go/concurrent/LICENSE | 201 - .../github.com/modern-go/concurrent/README.md | 49 - .../modern-go/concurrent/executor.go | 14 - .../modern-go/concurrent/go_above_19.go | 15 - .../modern-go/concurrent/go_below_19.go | 33 - vendor/github.com/modern-go/concurrent/log.go | 13 - .../github.com/modern-go/concurrent/test.sh | 12 - .../concurrent/unbounded_executor.go | 119 - .../github.com/modern-go/reflect2/.gitignore | 2 - .../github.com/modern-go/reflect2/.travis.yml | 15 - .../github.com/modern-go/reflect2/Gopkg.lock | 9 - .../github.com/modern-go/reflect2/Gopkg.toml | 31 - vendor/github.com/modern-go/reflect2/LICENSE | 201 - .../github.com/modern-go/reflect2/README.md | 71 - .../modern-go/reflect2/go_above_118.go | 23 - .../modern-go/reflect2/go_above_19.go | 17 - .../modern-go/reflect2/go_below_118.go | 21 - .../github.com/modern-go/reflect2/reflect2.go | 300 - .../modern-go/reflect2/reflect2_amd64.s | 0 .../modern-go/reflect2/reflect2_kind.go | 30 - .../modern-go/reflect2/relfect2_386.s | 0 .../modern-go/reflect2/relfect2_amd64p32.s | 0 .../modern-go/reflect2/relfect2_arm.s | 0 .../modern-go/reflect2/relfect2_arm64.s | 0 .../modern-go/reflect2/relfect2_mips64x.s | 0 .../modern-go/reflect2/relfect2_mipsx.s | 0 .../modern-go/reflect2/relfect2_ppc64x.s | 0 .../modern-go/reflect2/relfect2_s390x.s | 0 .../modern-go/reflect2/safe_field.go | 58 - .../github.com/modern-go/reflect2/safe_map.go | 101 - .../modern-go/reflect2/safe_slice.go | 92 - .../modern-go/reflect2/safe_struct.go | 29 - .../modern-go/reflect2/safe_type.go | 78 - .../github.com/modern-go/reflect2/type_map.go | 70 - .../modern-go/reflect2/unsafe_array.go | 65 - .../modern-go/reflect2/unsafe_eface.go | 59 - .../modern-go/reflect2/unsafe_field.go | 74 - .../modern-go/reflect2/unsafe_iface.go | 64 - .../modern-go/reflect2/unsafe_link.go | 76 - .../modern-go/reflect2/unsafe_map.go | 130 - .../modern-go/reflect2/unsafe_ptr.go | 46 - .../modern-go/reflect2/unsafe_slice.go | 177 - .../modern-go/reflect2/unsafe_struct.go | 59 - .../modern-go/reflect2/unsafe_type.go | 85 - .../sabhiram/go-gitignore/.gitignore | 28 - .../sabhiram/go-gitignore/.travis.yml | 18 - .../github.com/sabhiram/go-gitignore/LICENSE | 22 - .../sabhiram/go-gitignore/README.md | 15 - .../sabhiram/go-gitignore/ignore.go | 223 - .../sabhiram/go-gitignore/version_gen.go | 12 - vendor/github.com/spf13/pflag/.gitignore | 2 - vendor/github.com/spf13/pflag/.travis.yml | 22 - vendor/github.com/spf13/pflag/LICENSE | 28 - vendor/github.com/spf13/pflag/README.md | 296 - vendor/github.com/spf13/pflag/bool.go | 94 - vendor/github.com/spf13/pflag/bool_slice.go | 185 - vendor/github.com/spf13/pflag/bytes.go | 209 - vendor/github.com/spf13/pflag/count.go | 96 - vendor/github.com/spf13/pflag/duration.go | 86 - .../github.com/spf13/pflag/duration_slice.go | 166 - vendor/github.com/spf13/pflag/flag.go | 1239 -- vendor/github.com/spf13/pflag/float32.go | 88 - .../github.com/spf13/pflag/float32_slice.go | 174 - vendor/github.com/spf13/pflag/float64.go | 84 - .../github.com/spf13/pflag/float64_slice.go | 166 - vendor/github.com/spf13/pflag/golangflag.go | 105 - vendor/github.com/spf13/pflag/int.go | 84 - vendor/github.com/spf13/pflag/int16.go | 88 - vendor/github.com/spf13/pflag/int32.go | 88 - vendor/github.com/spf13/pflag/int32_slice.go | 174 - vendor/github.com/spf13/pflag/int64.go | 84 - vendor/github.com/spf13/pflag/int64_slice.go | 166 - vendor/github.com/spf13/pflag/int8.go | 88 - vendor/github.com/spf13/pflag/int_slice.go | 158 - vendor/github.com/spf13/pflag/ip.go | 94 - vendor/github.com/spf13/pflag/ip_slice.go | 186 - vendor/github.com/spf13/pflag/ipmask.go | 122 - vendor/github.com/spf13/pflag/ipnet.go | 98 - vendor/github.com/spf13/pflag/string.go | 80 - vendor/github.com/spf13/pflag/string_array.go | 129 - vendor/github.com/spf13/pflag/string_slice.go | 163 - .../github.com/spf13/pflag/string_to_int.go | 149 - .../github.com/spf13/pflag/string_to_int64.go | 149 - .../spf13/pflag/string_to_string.go | 160 - vendor/github.com/spf13/pflag/uint.go | 88 - vendor/github.com/spf13/pflag/uint16.go | 88 - vendor/github.com/spf13/pflag/uint32.go | 88 - vendor/github.com/spf13/pflag/uint64.go | 88 - vendor/github.com/spf13/pflag/uint8.go | 88 - vendor/github.com/spf13/pflag/uint_slice.go | 168 - vendor/github.com/vito/go-interact/LICENSE.md | 19 - .../vito/go-interact/interact/choice.go | 10 - .../vito/go-interact/interact/errors.go | 33 - .../vito/go-interact/interact/interaction.go | 317 - .../vito/go-interact/interact/password.go | 5 - .../vito/go-interact/interact/required.go | 13 - .../go-interact/interact/terminal/AUTHORS | 3 - .../interact/terminal/CONTRIBUTORS | 3 - .../go-interact/interact/terminal/LICENSE | 27 - .../go-interact/interact/terminal/PATENTS | 22 - .../vito/go-interact/interact/terminal/README | 1 - .../go-interact/interact/terminal/terminal.go | 958 -- .../go-interact/interact/terminal/util.go | 119 - .../go-interact/interact/terminal/util_bsd.go | 12 - .../interact/terminal/util_linux.go | 11 - .../interact/terminal/util_plan9.go | 58 - .../interact/terminal/util_solaris.go | 73 - .../interact/terminal/util_windows.go | 155 - .../vito/go-interact/interact/userio.go | 139 - vendor/golang.org/x/crypto/blowfish/block.go | 159 - vendor/golang.org/x/crypto/blowfish/cipher.go | 99 - vendor/golang.org/x/crypto/blowfish/const.go | 199 - .../x/crypto/chacha20/chacha_arm64.go | 16 - .../x/crypto/chacha20/chacha_arm64.s | 307 - .../x/crypto/chacha20/chacha_generic.go | 398 - .../x/crypto/chacha20/chacha_noasm.go | 13 - .../x/crypto/chacha20/chacha_ppc64le.go | 16 - .../x/crypto/chacha20/chacha_ppc64le.s | 449 - .../x/crypto/chacha20/chacha_s390x.go | 27 - .../x/crypto/chacha20/chacha_s390x.s | 224 - vendor/golang.org/x/crypto/chacha20/xor.go | 42 - .../x/crypto/curve25519/curve25519.go | 59 - .../x/crypto/curve25519/curve25519_compat.go | 105 - .../x/crypto/curve25519/curve25519_go120.go | 46 - .../x/crypto/curve25519/internal/field/README | 7 - .../x/crypto/curve25519/internal/field/fe.go | 416 - .../curve25519/internal/field/fe_amd64.go | 15 - .../curve25519/internal/field/fe_amd64.s | 378 - .../internal/field/fe_amd64_noasm.go | 11 - .../curve25519/internal/field/fe_arm64.go | 15 - .../curve25519/internal/field/fe_arm64.s | 42 - .../internal/field/fe_arm64_noasm.go | 11 - .../curve25519/internal/field/fe_generic.go | 264 - .../curve25519/internal/field/sync.checkpoint | 1 - .../crypto/curve25519/internal/field/sync.sh | 19 - .../x/crypto/internal/alias/alias.go | 31 - .../x/crypto/internal/alias/alias_purego.go | 34 - .../x/crypto/internal/poly1305/mac_noasm.go | 9 - .../x/crypto/internal/poly1305/poly1305.go | 99 - .../x/crypto/internal/poly1305/sum_amd64.go | 47 - .../x/crypto/internal/poly1305/sum_amd64.s | 108 - .../x/crypto/internal/poly1305/sum_generic.go | 312 - .../x/crypto/internal/poly1305/sum_ppc64le.go | 47 - .../x/crypto/internal/poly1305/sum_ppc64le.s | 181 - .../x/crypto/internal/poly1305/sum_s390x.go | 76 - .../x/crypto/internal/poly1305/sum_s390x.s | 503 - vendor/golang.org/x/crypto/ssh/buffer.go | 97 - vendor/golang.org/x/crypto/ssh/certs.go | 611 - vendor/golang.org/x/crypto/ssh/channel.go | 645 - vendor/golang.org/x/crypto/ssh/cipher.go | 789 -- vendor/golang.org/x/crypto/ssh/client.go | 282 - vendor/golang.org/x/crypto/ssh/client_auth.go | 779 -- vendor/golang.org/x/crypto/ssh/common.go | 476 - vendor/golang.org/x/crypto/ssh/connection.go | 143 - vendor/golang.org/x/crypto/ssh/doc.go | 23 - vendor/golang.org/x/crypto/ssh/handshake.go | 806 -- .../ssh/internal/bcrypt_pbkdf/bcrypt_pbkdf.go | 93 - vendor/golang.org/x/crypto/ssh/kex.go | 786 -- vendor/golang.org/x/crypto/ssh/keys.go | 1728 --- vendor/golang.org/x/crypto/ssh/mac.go | 68 - vendor/golang.org/x/crypto/ssh/messages.go | 891 -- vendor/golang.org/x/crypto/ssh/mux.go | 357 - vendor/golang.org/x/crypto/ssh/server.go | 802 -- vendor/golang.org/x/crypto/ssh/session.go | 647 - vendor/golang.org/x/crypto/ssh/ssh_gss.go | 139 - vendor/golang.org/x/crypto/ssh/streamlocal.go | 116 - vendor/golang.org/x/crypto/ssh/tcpip.go | 509 - vendor/golang.org/x/crypto/ssh/transport.go | 380 - vendor/golang.org/x/net/LICENSE | 27 - vendor/golang.org/x/net/PATENTS | 22 - vendor/golang.org/x/net/context/context.go | 56 - vendor/golang.org/x/net/context/go17.go | 72 - vendor/golang.org/x/net/context/go19.go | 20 - vendor/golang.org/x/net/context/pre_go17.go | 300 - vendor/golang.org/x/net/context/pre_go19.go | 109 - vendor/golang.org/x/net/http/httpguts/guts.go | 50 - .../golang.org/x/net/http/httpguts/httplex.go | 352 - vendor/golang.org/x/net/http2/.gitignore | 2 - vendor/golang.org/x/net/http2/ascii.go | 53 - vendor/golang.org/x/net/http2/ciphers.go | 641 - .../x/net/http2/client_conn_pool.go | 311 - vendor/golang.org/x/net/http2/databuffer.go | 149 - vendor/golang.org/x/net/http2/errors.go | 145 - vendor/golang.org/x/net/http2/flow.go | 120 - vendor/golang.org/x/net/http2/frame.go | 1658 --- vendor/golang.org/x/net/http2/gotrack.go | 170 - vendor/golang.org/x/net/http2/headermap.go | 105 - vendor/golang.org/x/net/http2/hpack/encode.go | 245 - vendor/golang.org/x/net/http2/hpack/hpack.go | 523 - .../golang.org/x/net/http2/hpack/huffman.go | 226 - .../x/net/http2/hpack/static_table.go | 188 - vendor/golang.org/x/net/http2/hpack/tables.go | 403 - vendor/golang.org/x/net/http2/http2.go | 385 - vendor/golang.org/x/net/http2/pipe.go | 175 - vendor/golang.org/x/net/http2/server.go | 3280 ----- vendor/golang.org/x/net/http2/transport.go | 3234 ----- vendor/golang.org/x/net/http2/write.go | 370 - vendor/golang.org/x/net/http2/writesched.go | 251 - .../x/net/http2/writesched_priority.go | 451 - .../x/net/http2/writesched_random.go | 77 - .../x/net/http2/writesched_roundrobin.go | 119 - vendor/golang.org/x/net/idna/go118.go | 13 - vendor/golang.org/x/net/idna/idna10.0.0.go | 769 - vendor/golang.org/x/net/idna/idna9.0.0.go | 717 - vendor/golang.org/x/net/idna/pre_go118.go | 11 - vendor/golang.org/x/net/idna/punycode.go | 217 - vendor/golang.org/x/net/idna/tables10.0.0.go | 4559 ------ vendor/golang.org/x/net/idna/tables11.0.0.go | 4653 ------- vendor/golang.org/x/net/idna/tables12.0.0.go | 4733 ------- vendor/golang.org/x/net/idna/tables13.0.0.go | 4959 ------- vendor/golang.org/x/net/idna/tables15.0.0.go | 5144 ------- vendor/golang.org/x/net/idna/tables9.0.0.go | 4486 ------ vendor/golang.org/x/net/idna/trie.go | 51 - vendor/golang.org/x/net/idna/trie12.0.0.go | 30 - vendor/golang.org/x/net/idna/trie13.0.0.go | 30 - vendor/golang.org/x/net/idna/trieval.go | 119 - .../golang.org/x/net/internal/socks/client.go | 168 - .../golang.org/x/net/internal/socks/socks.go | 317 - .../x/net/internal/timeseries/timeseries.go | 525 - vendor/golang.org/x/net/proxy/dial.go | 54 - vendor/golang.org/x/net/proxy/direct.go | 31 - vendor/golang.org/x/net/proxy/per_host.go | 155 - vendor/golang.org/x/net/proxy/proxy.go | 149 - vendor/golang.org/x/net/proxy/socks5.go | 42 - vendor/golang.org/x/net/trace/events.go | 532 - vendor/golang.org/x/net/trace/histogram.go | 365 - vendor/golang.org/x/net/trace/trace.go | 1130 -- vendor/golang.org/x/oauth2/.travis.yml | 13 - vendor/golang.org/x/oauth2/CONTRIBUTING.md | 26 - vendor/golang.org/x/oauth2/LICENSE | 27 - vendor/golang.org/x/oauth2/README.md | 40 - vendor/golang.org/x/oauth2/deviceauth.go | 198 - .../x/oauth2/internal/client_appengine.go | 13 - vendor/golang.org/x/oauth2/internal/doc.go | 6 - vendor/golang.org/x/oauth2/internal/oauth2.go | 37 - vendor/golang.org/x/oauth2/internal/token.go | 352 - .../golang.org/x/oauth2/internal/transport.go | 33 - vendor/golang.org/x/oauth2/oauth2.go | 421 - vendor/golang.org/x/oauth2/pkce.go | 68 - vendor/golang.org/x/oauth2/token.go | 205 - vendor/golang.org/x/oauth2/transport.go | 89 - vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s | 17 - vendor/golang.org/x/sys/cpu/byteorder.go | 66 - vendor/golang.org/x/sys/cpu/cpu.go | 290 - vendor/golang.org/x/sys/cpu/cpu_aix.go | 33 - vendor/golang.org/x/sys/cpu/cpu_arm.go | 73 - vendor/golang.org/x/sys/cpu/cpu_arm64.go | 172 - vendor/golang.org/x/sys/cpu/cpu_arm64.s | 31 - vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go | 11 - vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go | 21 - vendor/golang.org/x/sys/cpu/cpu_gc_x86.go | 15 - .../golang.org/x/sys/cpu/cpu_gccgo_arm64.go | 11 - .../golang.org/x/sys/cpu/cpu_gccgo_s390x.go | 22 - vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c | 37 - vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go | 31 - vendor/golang.org/x/sys/cpu/cpu_linux.go | 15 - vendor/golang.org/x/sys/cpu/cpu_linux_arm.go | 39 - .../golang.org/x/sys/cpu/cpu_linux_arm64.go | 111 - .../golang.org/x/sys/cpu/cpu_linux_mips64x.go | 22 - .../golang.org/x/sys/cpu/cpu_linux_noinit.go | 9 - .../golang.org/x/sys/cpu/cpu_linux_ppc64x.go | 30 - .../golang.org/x/sys/cpu/cpu_linux_s390x.go | 40 - vendor/golang.org/x/sys/cpu/cpu_loong64.go | 12 - vendor/golang.org/x/sys/cpu/cpu_mips64x.go | 15 - vendor/golang.org/x/sys/cpu/cpu_mipsx.go | 11 - .../golang.org/x/sys/cpu/cpu_netbsd_arm64.go | 173 - .../golang.org/x/sys/cpu/cpu_openbsd_arm64.go | 65 - .../golang.org/x/sys/cpu/cpu_openbsd_arm64.s | 11 - vendor/golang.org/x/sys/cpu/cpu_other_arm.go | 9 - .../golang.org/x/sys/cpu/cpu_other_arm64.go | 9 - .../golang.org/x/sys/cpu/cpu_other_mips64x.go | 11 - .../golang.org/x/sys/cpu/cpu_other_ppc64x.go | 12 - .../golang.org/x/sys/cpu/cpu_other_riscv64.go | 11 - vendor/golang.org/x/sys/cpu/cpu_ppc64x.go | 16 - vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 11 - vendor/golang.org/x/sys/cpu/cpu_s390x.go | 172 - vendor/golang.org/x/sys/cpu/cpu_s390x.s | 57 - vendor/golang.org/x/sys/cpu/cpu_wasm.go | 17 - vendor/golang.org/x/sys/cpu/cpu_x86.go | 151 - vendor/golang.org/x/sys/cpu/cpu_x86.s | 26 - vendor/golang.org/x/sys/cpu/cpu_zos.go | 10 - vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go | 25 - vendor/golang.org/x/sys/cpu/endian_big.go | 10 - vendor/golang.org/x/sys/cpu/endian_little.go | 10 - vendor/golang.org/x/sys/cpu/hwcap_linux.go | 71 - vendor/golang.org/x/sys/cpu/parse.go | 43 - .../x/sys/cpu/proc_cpuinfo_linux.go | 53 - vendor/golang.org/x/sys/cpu/runtime_auxv.go | 16 - .../x/sys/cpu/runtime_auxv_go121.go | 18 - .../golang.org/x/sys/cpu/syscall_aix_gccgo.go | 26 - .../x/sys/cpu/syscall_aix_ppc64_gc.go | 35 - vendor/golang.org/x/text/LICENSE | 27 - vendor/golang.org/x/text/PATENTS | 22 - .../x/text/internal/language/common.go | 16 - .../x/text/internal/language/compact.go | 29 - .../text/internal/language/compact/compact.go | 61 - .../internal/language/compact/language.go | 260 - .../text/internal/language/compact/parents.go | 120 - .../text/internal/language/compact/tables.go | 1015 -- .../x/text/internal/language/compact/tags.go | 91 - .../x/text/internal/language/compose.go | 167 - .../x/text/internal/language/coverage.go | 28 - .../x/text/internal/language/language.go | 627 - .../x/text/internal/language/lookup.go | 412 - .../x/text/internal/language/match.go | 226 - .../x/text/internal/language/parse.go | 608 - .../x/text/internal/language/tables.go | 3494 ----- .../x/text/internal/language/tags.go | 48 - vendor/golang.org/x/text/internal/tag/tag.go | 100 - vendor/golang.org/x/text/language/coverage.go | 187 - vendor/golang.org/x/text/language/doc.go | 98 - vendor/golang.org/x/text/language/language.go | 605 - vendor/golang.org/x/text/language/match.go | 735 - vendor/golang.org/x/text/language/parse.go | 256 - vendor/golang.org/x/text/language/tables.go | 298 - vendor/golang.org/x/text/language/tags.go | 145 - .../x/text/secure/bidirule/bidirule.go | 336 - .../x/text/secure/bidirule/bidirule10.0.0.go | 11 - .../x/text/secure/bidirule/bidirule9.0.0.go | 14 - .../golang.org/x/text/transform/transform.go | 709 - vendor/golang.org/x/text/unicode/bidi/bidi.go | 359 - .../golang.org/x/text/unicode/bidi/bracket.go | 335 - vendor/golang.org/x/text/unicode/bidi/core.go | 1071 -- vendor/golang.org/x/text/unicode/bidi/prop.go | 206 - .../x/text/unicode/bidi/tables10.0.0.go | 1815 --- .../x/text/unicode/bidi/tables11.0.0.go | 1887 --- .../x/text/unicode/bidi/tables12.0.0.go | 1923 --- .../x/text/unicode/bidi/tables13.0.0.go | 1955 --- .../x/text/unicode/bidi/tables15.0.0.go | 2042 --- .../x/text/unicode/bidi/tables9.0.0.go | 1781 --- .../golang.org/x/text/unicode/bidi/trieval.go | 48 - .../x/text/unicode/norm/composition.go | 512 - .../x/text/unicode/norm/forminfo.go | 279 - .../golang.org/x/text/unicode/norm/input.go | 109 - vendor/golang.org/x/text/unicode/norm/iter.go | 458 - .../x/text/unicode/norm/normalize.go | 610 - .../x/text/unicode/norm/readwriter.go | 125 - .../x/text/unicode/norm/tables10.0.0.go | 7657 ---------- .../x/text/unicode/norm/tables11.0.0.go | 7693 ---------- .../x/text/unicode/norm/tables12.0.0.go | 7710 ---------- .../x/text/unicode/norm/tables13.0.0.go | 7760 ----------- .../x/text/unicode/norm/tables15.0.0.go | 7907 ----------- .../x/text/unicode/norm/tables9.0.0.go | 7637 ---------- .../x/text/unicode/norm/transform.go | 88 - vendor/golang.org/x/text/unicode/norm/trie.go | 54 - vendor/golang.org/x/time/LICENSE | 27 - vendor/golang.org/x/time/PATENTS | 22 - vendor/golang.org/x/time/rate/rate.go | 430 - vendor/golang.org/x/time/rate/sometimes.go | 67 - vendor/google.golang.org/appengine/LICENSE | 202 - .../appengine/internal/api.go | 653 - .../appengine/internal/api_classic.go | 170 - .../appengine/internal/api_common.go | 141 - .../appengine/internal/app_id.go | 28 - .../appengine/internal/base/api_base.pb.go | 308 - .../appengine/internal/base/api_base.proto | 33 - .../internal/datastore/datastore_v3.pb.go | 4367 ------ .../internal/datastore/datastore_v3.proto | 551 - .../appengine/internal/identity.go | 54 - .../appengine/internal/identity_classic.go | 62 - .../appengine/internal/identity_flex.go | 12 - .../appengine/internal/identity_vm.go | 134 - .../appengine/internal/internal.go | 110 - .../appengine/internal/log/log_service.pb.go | 1313 -- .../appengine/internal/log/log_service.proto | 150 - .../appengine/internal/main.go | 17 - .../appengine/internal/main_common.go | 7 - .../appengine/internal/main_vm.go | 70 - .../appengine/internal/metadata.go | 60 - .../appengine/internal/net.go | 56 - .../appengine/internal/regen.sh | 40 - .../internal/remote_api/remote_api.pb.go | 361 - .../internal/remote_api/remote_api.proto | 44 - .../appengine/internal/transaction.go | 115 - .../internal/urlfetch/urlfetch_service.pb.go | 527 - .../internal/urlfetch/urlfetch_service.proto | 64 - .../appengine/urlfetch/urlfetch.go | 209 - vendor/google.golang.org/genproto/LICENSE | 202 - .../genproto/googleapis/api/LICENSE | 202 - .../api/annotations/annotations.pb.go | 119 - .../googleapis/api/annotations/client.pb.go | 1780 --- .../api/annotations/field_behavior.pb.go | 266 - .../api/annotations/field_info.pb.go | 295 - .../googleapis/api/annotations/http.pb.go | 782 -- .../googleapis/api/annotations/resource.pb.go | 655 - .../googleapis/api/annotations/routing.pb.go | 693 - .../googleapis/api/httpbody/httpbody.pb.go | 235 - .../googleapis/api/launch_stage.pb.go | 203 - .../genproto/googleapis/api/tidyfix.go | 23 - .../genproto/googleapis/rpc/LICENSE | 202 - .../googleapis/rpc/status/status.pb.go | 203 - .../genproto/internal/doc.go | 17 - vendor/google.golang.org/grpc/AUTHORS | 1 - .../google.golang.org/grpc/CODE-OF-CONDUCT.md | 3 - vendor/google.golang.org/grpc/CONTRIBUTING.md | 73 - vendor/google.golang.org/grpc/GOVERNANCE.md | 1 - vendor/google.golang.org/grpc/LICENSE | 202 - vendor/google.golang.org/grpc/MAINTAINERS.md | 28 - vendor/google.golang.org/grpc/Makefile | 46 - vendor/google.golang.org/grpc/NOTICE.txt | 13 - vendor/google.golang.org/grpc/README.md | 107 - vendor/google.golang.org/grpc/SECURITY.md | 3 - .../grpc/attributes/attributes.go | 141 - vendor/google.golang.org/grpc/backoff.go | 61 - .../google.golang.org/grpc/backoff/backoff.go | 52 - .../grpc/balancer/balancer.go | 442 - .../grpc/balancer/base/balancer.go | 264 - .../grpc/balancer/base/base.go | 71 - .../grpc/balancer/conn_state_evaluator.go | 74 - .../grpc/balancer/grpclb/state/state.go | 51 - .../grpc/balancer/roundrobin/roundrobin.go | 81 - .../grpc/balancer_wrapper.go | 380 - .../grpc_binarylog_v1/binarylog.pb.go | 1183 -- vendor/google.golang.org/grpc/call.go | 74 - .../grpc/channelz/channelz.go | 36 - vendor/google.golang.org/grpc/clientconn.go | 1888 --- vendor/google.golang.org/grpc/codec.go | 50 - vendor/google.golang.org/grpc/codegen.sh | 17 - .../grpc/codes/code_string.go | 111 - vendor/google.golang.org/grpc/codes/codes.go | 250 - .../grpc/connectivity/connectivity.go | 94 - .../grpc/credentials/credentials.go | 291 - .../grpc/credentials/insecure/insecure.go | 98 - .../google.golang.org/grpc/credentials/tls.go | 251 - vendor/google.golang.org/grpc/dialoptions.go | 718 - vendor/google.golang.org/grpc/doc.go | 26 - .../grpc/encoding/encoding.go | 130 - .../grpc/encoding/proto/proto.go | 58 - .../grpc/grpclog/component.go | 117 - .../google.golang.org/grpc/grpclog/grpclog.go | 132 - .../google.golang.org/grpc/grpclog/logger.go | 87 - .../grpc/grpclog/loggerv2.go | 258 - .../grpc/health/grpc_health_v1/health.pb.go | 308 - .../health/grpc_health_v1/health_grpc.pb.go | 237 - vendor/google.golang.org/grpc/interceptor.go | 104 - .../grpc/internal/backoff/backoff.go | 109 - .../balancer/gracefulswitch/gracefulswitch.go | 385 - .../grpc/internal/balancerload/load.go | 46 - .../grpc/internal/binarylog/binarylog.go | 192 - .../internal/binarylog/binarylog_testutil.go | 42 - .../grpc/internal/binarylog/env_config.go | 208 - .../grpc/internal/binarylog/method_logger.go | 445 - .../grpc/internal/binarylog/sink.go | 170 - .../grpc/internal/buffer/unbounded.go | 116 - .../grpc/internal/channelz/funcs.go | 763 - .../grpc/internal/channelz/id.go | 75 - .../grpc/internal/channelz/logging.go | 79 - .../grpc/internal/channelz/types.go | 727 - .../grpc/internal/channelz/types_linux.go | 51 - .../grpc/internal/channelz/types_nonlinux.go | 43 - .../grpc/internal/channelz/util_linux.go | 37 - .../grpc/internal/channelz/util_nonlinux.go | 27 - .../grpc/internal/credentials/credentials.go | 49 - .../grpc/internal/credentials/spiffe.go | 75 - .../grpc/internal/credentials/syscallconn.go | 58 - .../grpc/internal/credentials/util.go | 52 - .../grpc/internal/envconfig/envconfig.go | 69 - .../grpc/internal/envconfig/observability.go | 42 - .../grpc/internal/envconfig/xds.go | 56 - .../grpc/internal/experimental.go | 28 - .../grpc/internal/grpclog/grpclog.go | 126 - .../grpc/internal/grpclog/prefixLogger.go | 93 - .../grpc/internal/grpcrand/grpcrand.go | 95 - .../internal/grpcsync/callback_serializer.go | 100 - .../grpc/internal/grpcsync/event.go | 61 - .../grpc/internal/grpcsync/oncefunc.go | 32 - .../grpc/internal/grpcsync/pubsub.go | 121 - .../grpc/internal/grpcutil/compressor.go | 47 - .../grpc/internal/grpcutil/encode_duration.go | 63 - .../grpc/internal/grpcutil/grpcutil.go | 20 - .../grpc/internal/grpcutil/metadata.go | 40 - .../grpc/internal/grpcutil/method.go | 88 - .../grpc/internal/grpcutil/regex.go | 31 - .../grpc/internal/idle/idle.go | 278 - .../grpc/internal/internal.go | 218 - .../grpc/internal/metadata/metadata.go | 132 - .../grpc/internal/pretty/pretty.go | 82 - .../grpc/internal/resolver/config_selector.go | 167 - .../internal/resolver/dns/dns_resolver.go | 441 - .../resolver/dns/internal/internal.go | 70 - .../resolver/passthrough/passthrough.go | 64 - .../grpc/internal/resolver/unix/unix.go | 74 - .../grpc/internal/serviceconfig/duration.go | 130 - .../internal/serviceconfig/serviceconfig.go | 180 - .../grpc/internal/status/status.go | 204 - .../grpc/internal/syscall/syscall_linux.go | 112 - .../grpc/internal/syscall/syscall_nonlinux.go | 77 - .../grpc/internal/tcp_keepalive_nonunix.go | 29 - .../grpc/internal/tcp_keepalive_unix.go | 54 - .../grpc/internal/transport/bdp_estimator.go | 141 - .../grpc/internal/transport/controlbuf.go | 1007 -- .../grpc/internal/transport/defaults.go | 55 - .../grpc/internal/transport/flowcontrol.go | 215 - .../grpc/internal/transport/handler_server.go | 488 - .../grpc/internal/transport/http2_client.go | 1790 --- .../grpc/internal/transport/http2_server.go | 1441 -- .../grpc/internal/transport/http_util.go | 465 - .../grpc/internal/transport/logging.go | 40 - .../transport/networktype/networktype.go | 46 - .../grpc/internal/transport/proxy.go | 144 - .../grpc/internal/transport/transport.go | 851 -- .../grpc/internal/xds_handshake_cluster.go | 40 - .../grpc/keepalive/keepalive.go | 85 - .../grpc/metadata/metadata.go | 297 - vendor/google.golang.org/grpc/peer/peer.go | 53 - .../google.golang.org/grpc/picker_wrapper.go | 223 - vendor/google.golang.org/grpc/pickfirst.go | 249 - vendor/google.golang.org/grpc/preloader.go | 67 - vendor/google.golang.org/grpc/regenerate.sh | 123 - .../grpc/resolver/dns/dns_resolver.go | 36 - vendor/google.golang.org/grpc/resolver/map.go | 251 - .../grpc/resolver/resolver.go | 316 - .../grpc/resolver_wrapper.go | 197 - vendor/google.golang.org/grpc/rpc_util.go | 959 -- vendor/google.golang.org/grpc/server.go | 2191 --- .../google.golang.org/grpc/service_config.go | 347 - .../grpc/serviceconfig/serviceconfig.go | 44 - .../grpc/shared_buffer_pool.go | 154 - .../google.golang.org/grpc/stats/handlers.go | 63 - vendor/google.golang.org/grpc/stats/stats.go | 343 - .../google.golang.org/grpc/status/status.go | 162 - vendor/google.golang.org/grpc/stream.go | 1780 --- vendor/google.golang.org/grpc/tap/tap.go | 62 - vendor/google.golang.org/grpc/trace.go | 123 - vendor/google.golang.org/grpc/version.go | 22 - vendor/google.golang.org/grpc/vet.sh | 192 - vendor/google.golang.org/protobuf/LICENSE | 27 - vendor/google.golang.org/protobuf/PATENTS | 22 - .../protobuf/encoding/protojson/decode.go | 685 - .../protobuf/encoding/protojson/doc.go | 11 - .../protobuf/encoding/protojson/encode.go | 378 - .../encoding/protojson/well_known_types.go | 872 -- .../protobuf/encoding/prototext/decode.go | 772 -- .../protobuf/encoding/prototext/doc.go | 7 - .../protobuf/encoding/prototext/encode.go | 376 - .../protobuf/encoding/protowire/wire.go | 547 - .../protobuf/internal/descfmt/stringer.go | 413 - .../protobuf/internal/descopts/options.go | 29 - .../protobuf/internal/detrand/rand.go | 69 - .../internal/encoding/defval/default.go | 213 - .../protobuf/internal/encoding/json/decode.go | 340 - .../internal/encoding/json/decode_number.go | 254 - .../internal/encoding/json/decode_string.go | 91 - .../internal/encoding/json/decode_token.go | 192 - .../protobuf/internal/encoding/json/encode.go | 278 - .../encoding/messageset/messageset.go | 242 - .../protobuf/internal/encoding/tag/tag.go | 207 - .../protobuf/internal/encoding/text/decode.go | 686 - .../internal/encoding/text/decode_number.go | 211 - .../internal/encoding/text/decode_string.go | 161 - .../internal/encoding/text/decode_token.go | 373 - .../protobuf/internal/encoding/text/doc.go | 29 - .../protobuf/internal/encoding/text/encode.go | 272 - .../protobuf/internal/errors/errors.go | 89 - .../protobuf/internal/errors/is_go112.go | 40 - .../protobuf/internal/errors/is_go113.go | 13 - .../protobuf/internal/filedesc/build.go | 157 - .../protobuf/internal/filedesc/desc.go | 678 - .../protobuf/internal/filedesc/desc_init.go | 471 - .../protobuf/internal/filedesc/desc_lazy.go | 704 - .../protobuf/internal/filedesc/desc_list.go | 457 - .../internal/filedesc/desc_list_gen.go | 356 - .../protobuf/internal/filedesc/placeholder.go | 109 - .../protobuf/internal/filetype/build.go | 296 - .../protobuf/internal/flags/flags.go | 24 - .../internal/flags/proto_legacy_disable.go | 10 - .../internal/flags/proto_legacy_enable.go | 10 - .../protobuf/internal/genid/any_gen.go | 34 - .../protobuf/internal/genid/api_gen.go | 106 - .../protobuf/internal/genid/descriptor_gen.go | 1087 -- .../protobuf/internal/genid/doc.go | 11 - .../protobuf/internal/genid/duration_gen.go | 34 - .../protobuf/internal/genid/empty_gen.go | 19 - .../protobuf/internal/genid/field_mask_gen.go | 31 - .../protobuf/internal/genid/goname.go | 25 - .../protobuf/internal/genid/map_entry.go | 16 - .../internal/genid/source_context_gen.go | 31 - .../protobuf/internal/genid/struct_gen.go | 116 - .../protobuf/internal/genid/timestamp_gen.go | 34 - .../protobuf/internal/genid/type_gen.go | 190 - .../protobuf/internal/genid/wrappers.go | 13 - .../protobuf/internal/genid/wrappers_gen.go | 175 - .../protobuf/internal/impl/api_export.go | 177 - .../protobuf/internal/impl/checkinit.go | 141 - .../protobuf/internal/impl/codec_extension.go | 223 - .../protobuf/internal/impl/codec_field.go | 830 -- .../protobuf/internal/impl/codec_gen.go | 5724 -------- .../protobuf/internal/impl/codec_map.go | 388 - .../protobuf/internal/impl/codec_map_go111.go | 38 - .../protobuf/internal/impl/codec_map_go112.go | 12 - .../protobuf/internal/impl/codec_message.go | 217 - .../internal/impl/codec_messageset.go | 123 - .../protobuf/internal/impl/codec_reflect.go | 210 - .../protobuf/internal/impl/codec_tables.go | 557 - .../protobuf/internal/impl/codec_unsafe.go | 18 - .../protobuf/internal/impl/convert.go | 495 - .../protobuf/internal/impl/convert_list.go | 141 - .../protobuf/internal/impl/convert_map.go | 121 - .../protobuf/internal/impl/decode.go | 285 - .../protobuf/internal/impl/encode.go | 201 - .../protobuf/internal/impl/enum.go | 21 - .../protobuf/internal/impl/extension.go | 156 - .../protobuf/internal/impl/legacy_enum.go | 218 - .../protobuf/internal/impl/legacy_export.go | 92 - .../internal/impl/legacy_extension.go | 176 - .../protobuf/internal/impl/legacy_file.go | 81 - .../protobuf/internal/impl/legacy_message.go | 568 - .../protobuf/internal/impl/merge.go | 176 - .../protobuf/internal/impl/merge_gen.go | 209 - .../protobuf/internal/impl/message.go | 284 - .../protobuf/internal/impl/message_reflect.go | 463 - .../internal/impl/message_reflect_field.go | 543 - .../internal/impl/message_reflect_gen.go | 249 - .../protobuf/internal/impl/pointer_reflect.go | 215 - .../protobuf/internal/impl/pointer_unsafe.go | 215 - .../protobuf/internal/impl/validate.go | 576 - .../protobuf/internal/impl/weak.go | 74 - .../protobuf/internal/order/order.go | 89 - .../protobuf/internal/order/range.go | 115 - .../protobuf/internal/pragma/pragma.go | 29 - .../protobuf/internal/set/ints.go | 58 - .../protobuf/internal/strs/strings.go | 196 - .../protobuf/internal/strs/strings_pure.go | 28 - .../internal/strs/strings_unsafe_go120.go | 95 - .../internal/strs/strings_unsafe_go121.go | 74 - .../protobuf/internal/version/version.go | 79 - .../protobuf/proto/checkinit.go | 71 - .../protobuf/proto/decode.go | 294 - .../protobuf/proto/decode_gen.go | 603 - .../google.golang.org/protobuf/proto/doc.go | 86 - .../protobuf/proto/encode.go | 322 - .../protobuf/proto/encode_gen.go | 97 - .../google.golang.org/protobuf/proto/equal.go | 57 - .../protobuf/proto/extension.go | 92 - .../google.golang.org/protobuf/proto/merge.go | 139 - .../protobuf/proto/messageset.go | 93 - .../google.golang.org/protobuf/proto/proto.go | 45 - .../protobuf/proto/proto_methods.go | 20 - .../protobuf/proto/proto_reflect.go | 20 - .../google.golang.org/protobuf/proto/reset.go | 43 - .../google.golang.org/protobuf/proto/size.go | 101 - .../protobuf/proto/size_gen.go | 55 - .../protobuf/proto/wrappers.go | 29 - .../protobuf/reflect/protodesc/desc.go | 285 - .../protobuf/reflect/protodesc/desc_init.go | 272 - .../reflect/protodesc/desc_resolve.go | 286 - .../reflect/protodesc/desc_validate.go | 374 - .../protobuf/reflect/protodesc/editions.go | 177 - .../reflect/protodesc/editions_defaults.binpb | 4 - .../protobuf/reflect/protodesc/proto.go | 252 - .../protobuf/reflect/protoreflect/methods.go | 78 - .../protobuf/reflect/protoreflect/proto.go | 511 - .../protobuf/reflect/protoreflect/source.go | 129 - .../reflect/protoreflect/source_gen.go | 554 - .../protobuf/reflect/protoreflect/type.go | 666 - .../protobuf/reflect/protoreflect/value.go | 285 - .../reflect/protoreflect/value_equal.go | 168 - .../reflect/protoreflect/value_pure.go | 60 - .../reflect/protoreflect/value_union.go | 438 - .../protoreflect/value_unsafe_go120.go | 99 - .../protoreflect/value_unsafe_go121.go | 87 - .../reflect/protoregistry/registry.go | 882 -- .../protobuf/runtime/protoiface/legacy.go | 15 - .../protobuf/runtime/protoiface/methods.go | 168 - .../protobuf/runtime/protoimpl/impl.go | 44 - .../protobuf/runtime/protoimpl/version.go | 60 - .../types/descriptorpb/descriptor.pb.go | 5656 -------- .../protobuf/types/known/anypb/any.pb.go | 496 - .../types/known/durationpb/duration.pb.go | 374 - .../types/known/fieldmaskpb/field_mask.pb.go | 588 - .../types/known/structpb/struct.pb.go | 810 -- .../types/known/timestamppb/timestamp.pb.go | 383 - .../types/known/wrapperspb/wrappers.pb.go | 760 - vendor/gopkg.in/inf.v0/LICENSE | 28 - vendor/gopkg.in/inf.v0/dec.go | 615 - vendor/gopkg.in/inf.v0/rounder.go | 145 - vendor/k8s.io/apimachinery/LICENSE | 202 - .../k8s.io/apimachinery/pkg/api/errors/OWNERS | 16 - .../k8s.io/apimachinery/pkg/api/errors/doc.go | 18 - .../apimachinery/pkg/api/errors/errors.go | 857 -- .../apimachinery/pkg/api/resource/OWNERS | 10 - .../apimachinery/pkg/api/resource/amount.go | 337 - .../pkg/api/resource/generated.pb.go | 114 - .../pkg/api/resource/generated.proto | 111 - .../apimachinery/pkg/api/resource/math.go | 310 - .../apimachinery/pkg/api/resource/quantity.go | 818 -- .../pkg/api/resource/quantity_proto.go | 288 - .../pkg/api/resource/scale_int.go | 95 - .../apimachinery/pkg/api/resource/suffix.go | 198 - .../pkg/api/resource/zz_generated.deepcopy.go | 45 - .../apimachinery/pkg/apis/meta/v1/OWNERS | 16 - .../pkg/apis/meta/v1/controller_ref.go | 65 - .../pkg/apis/meta/v1/conversion.go | 355 - .../apimachinery/pkg/apis/meta/v1/deepcopy.go | 46 - .../apimachinery/pkg/apis/meta/v1/doc.go | 24 - .../apimachinery/pkg/apis/meta/v1/duration.go | 65 - .../pkg/apis/meta/v1/generated.pb.go | 11567 ---------------- .../pkg/apis/meta/v1/generated.proto | 1192 -- .../pkg/apis/meta/v1/group_version.go | 157 - .../apimachinery/pkg/apis/meta/v1/helpers.go | 298 - .../apimachinery/pkg/apis/meta/v1/labels.go | 55 - .../apimachinery/pkg/apis/meta/v1/meta.go | 176 - .../pkg/apis/meta/v1/micro_time.go | 181 - .../pkg/apis/meta/v1/micro_time_fuzz.go | 40 - .../pkg/apis/meta/v1/micro_time_proto.go | 86 - .../apimachinery/pkg/apis/meta/v1/register.go | 107 - .../apimachinery/pkg/apis/meta/v1/time.go | 182 - .../pkg/apis/meta/v1/time_fuzz.go | 40 - .../pkg/apis/meta/v1/time_proto.go | 100 - .../apimachinery/pkg/apis/meta/v1/types.go | 1543 --- .../meta/v1/types_swagger_doc_generated.go | 462 - .../pkg/apis/meta/v1/unstructured/helpers.go | 501 - .../apis/meta/v1/unstructured/unstructured.go | 489 - .../meta/v1/unstructured/unstructured_list.go | 219 - .../v1/unstructured/zz_generated.deepcopy.go | 56 - .../apimachinery/pkg/apis/meta/v1/watch.go | 89 - .../apis/meta/v1/zz_generated.conversion.go | 534 - .../pkg/apis/meta/v1/zz_generated.deepcopy.go | 1193 -- .../pkg/apis/meta/v1/zz_generated.defaults.go | 33 - .../apimachinery/pkg/conversion/converter.go | 225 - .../apimachinery/pkg/conversion/deep_equal.go | 47 - .../k8s.io/apimachinery/pkg/conversion/doc.go | 24 - .../apimachinery/pkg/conversion/helper.go | 39 - .../pkg/conversion/queryparams/convert.go | 194 - .../pkg/conversion/queryparams/doc.go | 19 - vendor/k8s.io/apimachinery/pkg/fields/doc.go | 19 - .../k8s.io/apimachinery/pkg/fields/fields.go | 62 - .../apimachinery/pkg/fields/requirements.go | 30 - .../apimachinery/pkg/fields/selector.go | 478 - vendor/k8s.io/apimachinery/pkg/labels/doc.go | 19 - .../k8s.io/apimachinery/pkg/labels/labels.go | 174 - .../apimachinery/pkg/labels/selector.go | 1036 -- .../pkg/labels/zz_generated.deepcopy.go | 43 - .../apimachinery/pkg/runtime/allocator.go | 76 - .../k8s.io/apimachinery/pkg/runtime/codec.go | 396 - .../apimachinery/pkg/runtime/codec_check.go | 56 - .../apimachinery/pkg/runtime/conversion.go | 196 - .../apimachinery/pkg/runtime/converter.go | 858 -- vendor/k8s.io/apimachinery/pkg/runtime/doc.go | 51 - .../apimachinery/pkg/runtime/embedded.go | 149 - .../k8s.io/apimachinery/pkg/runtime/error.go | 172 - .../apimachinery/pkg/runtime/extension.go | 51 - .../apimachinery/pkg/runtime/generated.pb.go | 846 -- .../apimachinery/pkg/runtime/generated.proto | 134 - .../k8s.io/apimachinery/pkg/runtime/helper.go | 282 - .../apimachinery/pkg/runtime/interfaces.go | 373 - .../k8s.io/apimachinery/pkg/runtime/mapper.go | 98 - .../apimachinery/pkg/runtime/negotiate.go | 113 - .../apimachinery/pkg/runtime/register.go | 31 - .../pkg/runtime/schema/generated.pb.go | 59 - .../pkg/runtime/schema/generated.proto | 26 - .../pkg/runtime/schema/group_version.go | 305 - .../pkg/runtime/schema/interfaces.go | 40 - .../k8s.io/apimachinery/pkg/runtime/scheme.go | 706 - .../pkg/runtime/scheme_builder.go | 48 - .../pkg/runtime/serializer/codec_factory.go | 338 - .../pkg/runtime/serializer/json/json.go | 351 - .../pkg/runtime/serializer/json/meta.go | 63 - .../runtime/serializer/negotiated_codec.go | 43 - .../pkg/runtime/serializer/protobuf/doc.go | 18 - .../runtime/serializer/protobuf/protobuf.go | 495 - .../serializer/recognizer/recognizer.go | 128 - .../runtime/serializer/streaming/streaming.go | 136 - .../serializer/versioning/versioning.go | 290 - .../k8s.io/apimachinery/pkg/runtime/splice.go | 76 - .../pkg/runtime/swagger_doc_generator.go | 262 - .../k8s.io/apimachinery/pkg/runtime/types.go | 133 - .../apimachinery/pkg/runtime/types_proto.go | 89 - .../pkg/runtime/zz_generated.deepcopy.go | 76 - .../apimachinery/pkg/selection/operator.go | 33 - vendor/k8s.io/apimachinery/pkg/types/doc.go | 18 - .../apimachinery/pkg/types/namespacedname.go | 50 - .../k8s.io/apimachinery/pkg/types/nodename.go | 43 - vendor/k8s.io/apimachinery/pkg/types/patch.go | 29 - vendor/k8s.io/apimachinery/pkg/types/uid.go | 22 - .../k8s.io/apimachinery/pkg/util/dump/dump.go | 54 - .../apimachinery/pkg/util/errors/doc.go | 18 - .../apimachinery/pkg/util/errors/errors.go | 249 - .../apimachinery/pkg/util/framer/framer.go | 170 - .../pkg/util/intstr/generated.pb.go | 369 - .../pkg/util/intstr/generated.proto | 43 - .../pkg/util/intstr/instr_fuzz.go | 43 - .../apimachinery/pkg/util/intstr/intstr.go | 232 - .../k8s.io/apimachinery/pkg/util/json/json.go | 121 - .../pkg/util/naming/from_stack.go | 93 - .../k8s.io/apimachinery/pkg/util/net/http.go | 699 - .../apimachinery/pkg/util/net/interface.go | 500 - .../apimachinery/pkg/util/net/port_range.go | 149 - .../apimachinery/pkg/util/net/port_split.go | 78 - .../k8s.io/apimachinery/pkg/util/net/util.go | 63 - .../apimachinery/pkg/util/runtime/runtime.go | 177 - .../k8s.io/apimachinery/pkg/util/sets/byte.go | 137 - .../k8s.io/apimachinery/pkg/util/sets/doc.go | 19 - .../apimachinery/pkg/util/sets/empty.go | 21 - .../k8s.io/apimachinery/pkg/util/sets/int.go | 137 - .../apimachinery/pkg/util/sets/int32.go | 137 - .../apimachinery/pkg/util/sets/int64.go | 137 - .../apimachinery/pkg/util/sets/ordered.go | 53 - .../k8s.io/apimachinery/pkg/util/sets/set.go | 241 - .../apimachinery/pkg/util/sets/string.go | 137 - .../pkg/util/validation/field/errors.go | 325 - .../pkg/util/validation/field/path.go | 117 - .../pkg/util/validation/validation.go | 510 - .../apimachinery/pkg/util/wait/backoff.go | 502 - .../apimachinery/pkg/util/wait/delay.go | 51 - .../k8s.io/apimachinery/pkg/util/wait/doc.go | 19 - .../apimachinery/pkg/util/wait/error.go | 96 - .../k8s.io/apimachinery/pkg/util/wait/loop.go | 95 - .../k8s.io/apimachinery/pkg/util/wait/poll.go | 315 - .../apimachinery/pkg/util/wait/timer.go | 121 - .../k8s.io/apimachinery/pkg/util/wait/wait.go | 223 - .../apimachinery/pkg/util/yaml/decoder.go | 397 - vendor/k8s.io/apimachinery/pkg/version/doc.go | 20 - .../apimachinery/pkg/version/helpers.go | 88 - .../k8s.io/apimachinery/pkg/version/types.go | 37 - vendor/k8s.io/apimachinery/pkg/watch/doc.go | 19 - .../k8s.io/apimachinery/pkg/watch/filter.go | 104 - vendor/k8s.io/apimachinery/pkg/watch/mux.go | 320 - .../apimachinery/pkg/watch/streamwatcher.go | 136 - vendor/k8s.io/apimachinery/pkg/watch/watch.go | 324 - .../pkg/watch/zz_generated.deepcopy.go | 41 - .../third_party/forked/golang/LICENSE | 27 - .../third_party/forked/golang/PATENTS | 22 - .../forked/golang/reflect/deep_equal.go | 434 - vendor/k8s.io/client-go/LICENSE | 202 - .../pkg/apis/clientauthentication/OWNERS | 8 - .../pkg/apis/clientauthentication/doc.go | 20 - .../clientauthentication/install/install.go | 34 - .../pkg/apis/clientauthentication/register.go | 50 - .../pkg/apis/clientauthentication/types.go | 129 - .../pkg/apis/clientauthentication/v1/doc.go | 24 - .../apis/clientauthentication/v1/register.go | 55 - .../pkg/apis/clientauthentication/v1/types.go | 127 - .../v1/zz_generated.conversion.go | 207 - .../v1/zz_generated.deepcopy.go | 120 - .../v1/zz_generated.defaults.go | 33 - .../apis/clientauthentication/v1beta1/doc.go | 24 - .../clientauthentication/v1beta1/register.go | 55 - .../clientauthentication/v1beta1/types.go | 127 - .../v1beta1/zz_generated.conversion.go | 207 - .../v1beta1/zz_generated.deepcopy.go | 120 - .../v1beta1/zz_generated.defaults.go | 33 - .../zz_generated.deepcopy.go | 122 - vendor/k8s.io/client-go/pkg/version/base.go | 64 - vendor/k8s.io/client-go/pkg/version/doc.go | 21 - .../k8s.io/client-go/pkg/version/version.go | 42 - .../pkg/client/auth/azure/azure_stub.go | 36 - .../plugin/pkg/client/auth/exec/exec.go | 547 - .../plugin/pkg/client/auth/exec/metrics.go | 111 - .../plugin/pkg/client/auth/gcp/gcp_stub.go | 36 - .../plugin/pkg/client/auth/oidc/oidc.go | 380 - vendor/k8s.io/client-go/rest/OWNERS | 14 - vendor/k8s.io/client-go/rest/client.go | 202 - vendor/k8s.io/client-go/rest/config.go | 671 - vendor/k8s.io/client-go/rest/exec.go | 86 - vendor/k8s.io/client-go/rest/plugin.go | 84 - vendor/k8s.io/client-go/rest/request.go | 1472 -- vendor/k8s.io/client-go/rest/transport.go | 155 - vendor/k8s.io/client-go/rest/url_utils.go | 97 - vendor/k8s.io/client-go/rest/urlbackoff.go | 107 - vendor/k8s.io/client-go/rest/warnings.go | 147 - vendor/k8s.io/client-go/rest/watch/decoder.go | 72 - vendor/k8s.io/client-go/rest/watch/encoder.go | 56 - vendor/k8s.io/client-go/rest/with_retry.go | 369 - .../client-go/rest/zz_generated.deepcopy.go | 58 - vendor/k8s.io/client-go/tools/auth/OWNERS | 8 - .../k8s.io/client-go/tools/auth/clientauth.go | 125 - .../client-go/tools/clientcmd/api/doc.go | 19 - .../client-go/tools/clientcmd/api/helpers.go | 266 - .../tools/clientcmd/api/latest/latest.go | 61 - .../client-go/tools/clientcmd/api/register.go | 46 - .../client-go/tools/clientcmd/api/types.go | 375 - .../tools/clientcmd/api/v1/conversion.go | 174 - .../tools/clientcmd/api/v1/defaults.go | 37 - .../client-go/tools/clientcmd/api/v1/doc.go | 21 - .../tools/clientcmd/api/v1/register.go | 56 - .../client-go/tools/clientcmd/api/v1/types.go | 271 - .../api/v1/zz_generated.conversion.go | 458 - .../clientcmd/api/v1/zz_generated.deepcopy.go | 349 - .../clientcmd/api/v1/zz_generated.defaults.go | 43 - .../clientcmd/api/zz_generated.deepcopy.go | 328 - .../client-go/tools/clientcmd/auth_loaders.go | 110 - .../tools/clientcmd/client_config.go | 638 - .../client-go/tools/clientcmd/config.go | 500 - .../k8s.io/client-go/tools/clientcmd/doc.go | 37 - .../k8s.io/client-go/tools/clientcmd/flag.go | 49 - .../client-go/tools/clientcmd/helpers.go | 50 - .../client-go/tools/clientcmd/loader.go | 669 - .../tools/clientcmd/merged_client_builder.go | 172 - .../client-go/tools/clientcmd/overrides.go | 263 - .../client-go/tools/clientcmd/validation.go | 371 - vendor/k8s.io/client-go/tools/metrics/OWNERS | 5 - .../k8s.io/client-go/tools/metrics/metrics.go | 211 - vendor/k8s.io/client-go/transport/OWNERS | 8 - vendor/k8s.io/client-go/transport/cache.go | 178 - .../k8s.io/client-go/transport/cache_go118.go | 24 - .../client-go/transport/cert_rotation.go | 176 - vendor/k8s.io/client-go/transport/config.go | 160 - .../client-go/transport/round_trippers.go | 697 - .../client-go/transport/token_source.go | 201 - .../k8s.io/client-go/transport/transport.go | 399 - vendor/k8s.io/client-go/util/cert/OWNERS | 8 - vendor/k8s.io/client-go/util/cert/cert.go | 230 - vendor/k8s.io/client-go/util/cert/csr.go | 75 - vendor/k8s.io/client-go/util/cert/io.go | 112 - vendor/k8s.io/client-go/util/cert/pem.go | 73 - .../client-go/util/cert/server_inspection.go | 102 - .../util/connrotation/connrotation.go | 133 - .../client-go/util/flowcontrol/backoff.go | 181 - .../client-go/util/flowcontrol/throttle.go | 192 - .../k8s.io/client-go/util/homedir/homedir.go | 92 - vendor/k8s.io/client-go/util/keyutil/OWNERS | 6 - vendor/k8s.io/client-go/util/keyutil/key.go | 322 - .../util/workqueue/default_rate_limiters.go | 238 - .../util/workqueue/delaying_queue.go | 325 - vendor/k8s.io/client-go/util/workqueue/doc.go | 26 - .../client-go/util/workqueue/metrics.go | 266 - .../client-go/util/workqueue/parallelizer.go | 101 - .../k8s.io/client-go/util/workqueue/queue.go | 295 - .../util/workqueue/rate_limiting_queue.go | 119 - vendor/k8s.io/klog/v2/.gitignore | 17 - vendor/k8s.io/klog/v2/.golangci.yaml | 6 - vendor/k8s.io/klog/v2/CONTRIBUTING.md | 22 - vendor/k8s.io/klog/v2/LICENSE | 191 - vendor/k8s.io/klog/v2/OWNERS | 14 - vendor/k8s.io/klog/v2/README.md | 118 - vendor/k8s.io/klog/v2/RELEASE.md | 9 - vendor/k8s.io/klog/v2/SECURITY.md | 22 - vendor/k8s.io/klog/v2/SECURITY_CONTACTS | 20 - vendor/k8s.io/klog/v2/code-of-conduct.md | 3 - vendor/k8s.io/klog/v2/contextual.go | 212 - vendor/k8s.io/klog/v2/exit.go | 69 - vendor/k8s.io/klog/v2/format.go | 65 - vendor/k8s.io/klog/v2/imports.go | 38 - .../k8s.io/klog/v2/internal/buffer/buffer.go | 184 - .../k8s.io/klog/v2/internal/clock/README.md | 7 - vendor/k8s.io/klog/v2/internal/clock/clock.go | 161 - vendor/k8s.io/klog/v2/internal/dbg/dbg.go | 42 - .../klog/v2/internal/serialize/keyvalues.go | 292 - .../internal/serialize/keyvalues_no_slog.go | 97 - .../v2/internal/serialize/keyvalues_slog.go | 155 - .../klog/v2/internal/severity/severity.go | 58 - .../internal/sloghandler/sloghandler_slog.go | 96 - vendor/k8s.io/klog/v2/k8s_references.go | 212 - vendor/k8s.io/klog/v2/k8s_references_slog.go | 39 - vendor/k8s.io/klog/v2/klog.go | 1729 --- vendor/k8s.io/klog/v2/klog_file.go | 130 - vendor/k8s.io/klog/v2/klog_file_others.go | 19 - vendor/k8s.io/klog/v2/klog_file_windows.go | 34 - vendor/k8s.io/klog/v2/klogr.go | 105 - vendor/k8s.io/klog/v2/klogr_slog.go | 96 - vendor/k8s.io/utils/LICENSE | 202 - vendor/k8s.io/utils/clock/README.md | 4 - vendor/k8s.io/utils/clock/clock.go | 178 - .../k8s.io/utils/clock/testing/fake_clock.go | 361 - .../clock/testing/simple_interval_clock.go | 44 - vendor/k8s.io/utils/integer/integer.go | 73 - .../third_party/forked/golang/LICENSE | 27 - .../third_party/forked/golang/PATENTS | 22 - .../third_party/forked/golang/net/ip.go | 236 - .../third_party/forked/golang/net/parse.go | 59 - vendor/k8s.io/utils/net/ipfamily.go | 181 - vendor/k8s.io/utils/net/ipnet.go | 221 - vendor/k8s.io/utils/net/net.go | 91 - vendor/k8s.io/utils/net/parse.go | 33 - vendor/k8s.io/utils/net/port.go | 129 - vendor/k8s.io/utils/strings/slices/slices.go | 82 - vendor/modules.txt | 329 +- vendor/sigs.k8s.io/json/CONTRIBUTING.md | 42 - vendor/sigs.k8s.io/json/LICENSE | 238 - vendor/sigs.k8s.io/json/Makefile | 35 - vendor/sigs.k8s.io/json/OWNERS | 6 - vendor/sigs.k8s.io/json/README.md | 40 - vendor/sigs.k8s.io/json/SECURITY.md | 22 - vendor/sigs.k8s.io/json/SECURITY_CONTACTS | 15 - vendor/sigs.k8s.io/json/code-of-conduct.md | 3 - vendor/sigs.k8s.io/json/doc.go | 17 - .../internal/golang/encoding/json/decode.go | 1438 -- .../internal/golang/encoding/json/encode.go | 1418 -- .../internal/golang/encoding/json/fold.go | 144 - .../internal/golang/encoding/json/fuzz.go | 42 - .../internal/golang/encoding/json/indent.go | 143 - .../golang/encoding/json/kubernetes_patch.go | 168 - .../internal/golang/encoding/json/scanner.go | 610 - .../internal/golang/encoding/json/stream.go | 518 - .../internal/golang/encoding/json/tables.go | 218 - .../internal/golang/encoding/json/tags.go | 38 - vendor/sigs.k8s.io/json/json.go | 150 - .../structured-merge-diff/v4/LICENSE | 201 - .../v4/value/allocator.go | 203 - .../structured-merge-diff/v4/value/doc.go | 21 - .../structured-merge-diff/v4/value/fields.go | 97 - .../v4/value/jsontagutil.go | 91 - .../structured-merge-diff/v4/value/list.go | 139 - .../v4/value/listreflect.go | 98 - .../v4/value/listunstructured.go | 74 - .../structured-merge-diff/v4/value/map.go | 270 - .../v4/value/mapreflect.go | 209 - .../v4/value/mapunstructured.go | 190 - .../v4/value/reflectcache.go | 469 - .../structured-merge-diff/v4/value/scalar.go | 50 - .../v4/value/structreflect.go | 208 - .../structured-merge-diff/v4/value/value.go | 347 - .../v4/value/valuereflect.go | 294 - .../v4/value/valueunstructured.go | 178 - vendor/sigs.k8s.io/yaml/.gitignore | 24 - vendor/sigs.k8s.io/yaml/.travis.yml | 12 - vendor/sigs.k8s.io/yaml/CONTRIBUTING.md | 31 - vendor/sigs.k8s.io/yaml/LICENSE | 306 - vendor/sigs.k8s.io/yaml/OWNERS | 23 - vendor/sigs.k8s.io/yaml/README.md | 123 - vendor/sigs.k8s.io/yaml/RELEASE.md | 9 - vendor/sigs.k8s.io/yaml/SECURITY_CONTACTS | 17 - vendor/sigs.k8s.io/yaml/code-of-conduct.md | 3 - vendor/sigs.k8s.io/yaml/fields.go | 501 - vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE | 201 - .../yaml/goyaml.v2/LICENSE.libyaml | 31 - vendor/sigs.k8s.io/yaml/goyaml.v2/NOTICE | 13 - vendor/sigs.k8s.io/yaml/goyaml.v2/OWNERS | 24 - vendor/sigs.k8s.io/yaml/goyaml.v2/README.md | 143 - vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go | 744 - vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go | 815 -- vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go | 1685 --- vendor/sigs.k8s.io/yaml/goyaml.v2/encode.go | 390 - vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go | 1095 -- vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go | 412 - vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go | 258 - vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go | 2711 ---- vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go | 113 - vendor/sigs.k8s.io/yaml/goyaml.v2/writerc.go | 26 - vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go | 478 - vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go | 739 - .../yaml/goyaml.v2/yamlprivateh.go | 173 - vendor/sigs.k8s.io/yaml/yaml.go | 419 - vendor/sigs.k8s.io/yaml/yaml_go110.go | 31 - 1711 files changed, 2289 insertions(+), 409043 deletions(-) create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instance_crashed_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instance_flapping_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instances_not_found_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/buildpack_invalid_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/missing_space_name_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_organization_quotas_found_for_name_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_organizations_found_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_spaces_found_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/noaa_timeout_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/organization_name_taken_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/orphaned_routes_not_found_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/port_not_provided_for_query_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/resource_already_exists_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/revision_ambiguous.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/revision_not_found.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/route_binding_not_found_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/security_group_not_bound_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/service_and_broker_combination_not_found_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/service_broker_name_required_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_already_shared_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_params_fetching_not_supported_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_type_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_update_is_noop.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/service_key_not_found_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/space_name_taken_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/actor/actionerror/tcp_lookup_without_port.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/actor.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/auth.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/check_target.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/config.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/fix_mode_unix.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/fix_mode_windows.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/help.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/is_org_targeted.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/is_space_targeted.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/log_cache_client.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/logging.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/secure_shell_client.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/sharedaction/ssh.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/actor.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/application.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/application_feature.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/application_manifest.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/application_summary.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/auth.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/build.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/buildpack.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/cloud_controller_client.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/config.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/curl.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/deployment.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/domain.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/droplet.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/environment_variable.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/event.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/feature_flag.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/fix_mode_unix.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/fix_mode_windows.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/info.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/isolation_segment.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/job.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/k8s_auth.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/label.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/logging.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/marketplace.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/organization.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/organization_quota.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/organization_summary.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/package.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/process.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/process_health_check.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/process_instance.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/process_summary.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/progress_bar.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/resource_match.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/revisions.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/role.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/route.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/route_binding.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/router_group.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/routing_client.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/security_group.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_access.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_app_binding.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_broker.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_details.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_list.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_sharing.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_key.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_offering.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/service_plan.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/shared_actor.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/space.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/space_feature.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/space_manifest.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/space_quota.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/ssh.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/ssh_actor.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/stack.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/target.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/task.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/token.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/uaa_client.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/user.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/v7action/version.go delete mode 100644 vendor/code.cloudfoundry.org/cli/actor/versioncheck/minimum_version_check.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/job_failed_no_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/resource_alredy_exists_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_not_found_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_operation_in_progress_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_parameters_fetch_not_supported_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_plan_not_found_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/application.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/application_instance.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/domain.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/event.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/feature_flag.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/filter.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/godoc.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/job.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/last_operation.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/package.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/router_group_type.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/security_group.go create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/service_instance.go rename vendor/code.cloudfoundry.org/cli/{resources/api_links_resource.go => api/cloudcontroller/ccv3/api_links.go} (58%) create mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/api_resources.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/route_binding.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_credential_binding.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccversion/maximum_version.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccversion/minimum_version.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/kubernetes_authentication.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/shared/wrap_for_cf_on_k8s.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/uaa/prompts.go delete mode 100644 vendor/code.cloudfoundry.org/cli/api/uaa/version.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor_unix.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor_win.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/access_token.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/api_config_refresher.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/config_data.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/config_repository.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/formatters/bools.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/formatters/bytes.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/formatters/memoryLimit.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/formatters/string.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/i18n/README-i18n.md delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/i18n/excluded.json delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/i18n/i18n.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/i18n/locale.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/app_event.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/app_file.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/app_instance.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/application.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/buildpack.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/docker.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/domain.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/environment.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/environment_variable.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/feature_flag.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/organization.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/plugin_repo.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/quota.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/role.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/route.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/route_summary.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/router_group.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/security_group.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/service_auth_token.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/service_binding.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/service_broker.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/service_instance.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/service_key.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/service_offering.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/service_plan.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/service_plan_visibility.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/space.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/space_quota.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/stack.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/user.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/models/user_provided_service.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/ssh/sigwinch/sigwinch.go delete mode 100644 vendor/code.cloudfoundry.org/cli/cf/ssh/sigwinch/sigwinch_win.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/api_version_warning.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/config.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/display_not_logged_in.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/experimental_warning.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/extended_commander.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/godoc.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/minimum_version_check.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/shared_actor.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/translatableerror/curl_exit_22_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/translatableerror/job_failed_no_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/translatableerror/not_supported_on_k8s_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/translatableerror/request_creation_error.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/translatableerror/revision_ambiguous.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/translatableerror/revision_not_found.go delete mode 100644 vendor/code.cloudfoundry.org/cli/command/ui.go delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/README.md delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/de-de.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/en-us.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/es-es.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/fr-fr.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/i18n_resources.go delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/it-it.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/ja-jp.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/ko-kr.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/pt-br.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/zh-hans.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/i18n/resources/zh-hant.all.json delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/build_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/buildpack_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/deployment_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/environment_variables_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/feature_flag_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/isolation_segment_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/last_operation_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/manifest_diff_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/package_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/process_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/route_binding.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/service_credential_binding_details_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/service_credential_binding_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/service_instance_usage_summary_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/shared_to_spaces_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/sidecar_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/space_feature_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/stack_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/resources/task_resource.go delete mode 100644 vendor/code.cloudfoundry.org/cli/types/json_object.go delete mode 100644 vendor/code.cloudfoundry.org/cli/types/optional_boolean.go delete mode 100644 vendor/code.cloudfoundry.org/cli/types/optional_object.go delete mode 100644 vendor/code.cloudfoundry.org/cli/types/optional_string.go delete mode 100644 vendor/code.cloudfoundry.org/cli/types/optional_string_slice.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/batcher/batcher.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/clissh/listener_factory.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/clissh/secure_client.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/clissh/secure_dialer.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/clissh/secure_session.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/clissh/ssh.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/clissh/terminal_helper.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/clissh/tty_request.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/configv3/default_user_config.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/configv3/dynamic_user_config.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/configv3/k8s.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/configv3/kubernetes_user_config.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/extract/extract.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/generic/architecture.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/generic/executable_filename_unix.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/generic/executable_filename_windows.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/generic/map.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/generic/merge_reduce.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/generic/slice.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/lookuptable/name_from_guid.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/lookuptable/resource_from_guid.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/railway/railway.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/sorting/alphabetic.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/config.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/display.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/i18n.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/log_message.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/prompt.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/redacted_value.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/request_logger_file_writer.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/request_logger_terminal_display.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/sanitize_json.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/table.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/token_regexp.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/ui.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/ui_for_app.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/ui_for_push.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/ui/ui_v7.go delete mode 100644 vendor/code.cloudfoundry.org/cli/util/unique/string_slice.go create mode 100644 vendor/code.cloudfoundry.org/cli/util/v6manifestparser/app_not_in_manifest_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/util/v6manifestparser/application.go create mode 100644 vendor/code.cloudfoundry.org/cli/util/v6manifestparser/interpolation_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/util/v6manifestparser/invalid_manifest_application_path_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/util/v6manifestparser/invalid_yaml_error.go create mode 100644 vendor/code.cloudfoundry.org/cli/util/v6manifestparser/locator.go create mode 100644 vendor/code.cloudfoundry.org/cli/util/v6manifestparser/manifest.go create mode 100644 vendor/code.cloudfoundry.org/cli/util/v6manifestparser/parser.go create mode 100644 vendor/code.cloudfoundry.org/cli/util/v6manifestparser/validation.go delete mode 100644 vendor/code.cloudfoundry.org/clock/LICENSE delete mode 100644 vendor/code.cloudfoundry.org/clock/NOTICE delete mode 100644 vendor/code.cloudfoundry.org/clock/README.md delete mode 100644 vendor/code.cloudfoundry.org/clock/clock.go delete mode 100644 vendor/code.cloudfoundry.org/clock/package.go delete mode 100644 vendor/code.cloudfoundry.org/clock/ticker.go delete mode 100644 vendor/code.cloudfoundry.org/clock/timer.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/.gitignore delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/.travis.yml delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/LICENSE delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/NOTICE delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/README.md delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/client.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/internal/marshaler.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/oauth2_http_client.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/doc.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/egress.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/egress.pb.gw.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/egress_grpc.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/generate.sh delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/ingress.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/ingress_grpc.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/orchestration.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/orchestration_grpc.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/promql.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/promql.pb.gw.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/rpc/logcache_v1/promql_grpc.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/walk.go delete mode 100644 vendor/code.cloudfoundry.org/go-log-cache/window.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/LICENSE delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/NOTICE delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rfc5424/README.md delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rfc5424/marshal.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rfc5424/message.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rfc5424/rfc5424.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rfc5424/stream.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rfc5424/unmarshal.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rpc/loggregator_v2/doc.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rpc/loggregator_v2/egress.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rpc/loggregator_v2/envelope.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rpc/loggregator_v2/generate.sh delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rpc/loggregator_v2/ingress.pb.go delete mode 100644 vendor/code.cloudfoundry.org/go-loggregator/v8/rpc/loggregator_v2/syslog.go delete mode 100644 vendor/code.cloudfoundry.org/ykk/LICENSE delete mode 100644 vendor/code.cloudfoundry.org/ykk/NOTICE delete mode 100644 vendor/code.cloudfoundry.org/ykk/README.md delete mode 100644 vendor/code.cloudfoundry.org/ykk/reader.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/LICENSE delete mode 100644 vendor/github.com/Azure/go-ansiterm/README.md delete mode 100644 vendor/github.com/Azure/go-ansiterm/SECURITY.md delete mode 100644 vendor/github.com/Azure/go-ansiterm/constants.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/context.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/csi_entry_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/csi_param_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/escape_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/event_handler.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/ground_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/osc_string_state.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/parser.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/parser_actions.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/states.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/utilities.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/ansi.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/api.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/utilities.go delete mode 100644 vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go delete mode 100644 vendor/github.com/davecgh/go-spew/LICENSE delete mode 100644 vendor/github.com/davecgh/go-spew/spew/bypass.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/bypasssafe.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/common.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/config.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/doc.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/dump.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/format.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/spew.go delete mode 100644 vendor/github.com/fatih/color/LICENSE.md delete mode 100644 vendor/github.com/fatih/color/README.md delete mode 100644 vendor/github.com/fatih/color/color.go delete mode 100644 vendor/github.com/fatih/color/color_windows.go delete mode 100644 vendor/github.com/fatih/color/doc.go delete mode 100644 vendor/github.com/go-logr/logr/.golangci.yaml delete mode 100644 vendor/github.com/go-logr/logr/CHANGELOG.md delete mode 100644 vendor/github.com/go-logr/logr/CONTRIBUTING.md delete mode 100644 vendor/github.com/go-logr/logr/LICENSE delete mode 100644 vendor/github.com/go-logr/logr/README.md delete mode 100644 vendor/github.com/go-logr/logr/SECURITY.md delete mode 100644 vendor/github.com/go-logr/logr/context.go delete mode 100644 vendor/github.com/go-logr/logr/context_noslog.go delete mode 100644 vendor/github.com/go-logr/logr/context_slog.go delete mode 100644 vendor/github.com/go-logr/logr/discard.go delete mode 100644 vendor/github.com/go-logr/logr/logr.go delete mode 100644 vendor/github.com/go-logr/logr/sloghandler.go delete mode 100644 vendor/github.com/go-logr/logr/slogr.go delete mode 100644 vendor/github.com/go-logr/logr/slogr/slogr.go delete mode 100644 vendor/github.com/go-logr/logr/slogsink.go delete mode 100644 vendor/github.com/gogo/protobuf/AUTHORS delete mode 100644 vendor/github.com/gogo/protobuf/CONTRIBUTORS delete mode 100644 vendor/github.com/gogo/protobuf/LICENSE delete mode 100644 vendor/github.com/gogo/protobuf/proto/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/proto/clone.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/custom_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/decode.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/deprecated.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/discard.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/duration.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/duration_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/encode.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/encode_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/equal.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/extensions.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/extensions_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/lib.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/lib_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/message_set.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/pointer_reflect.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/properties.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/properties_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/skip_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/table_marshal.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/table_merge.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/table_unmarshal.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/text.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/text_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/text_parser.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/timestamp.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/wrappers.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go delete mode 100644 vendor/github.com/golang/protobuf/AUTHORS delete mode 100644 vendor/github.com/golang/protobuf/CONTRIBUTORS delete mode 100644 vendor/github.com/golang/protobuf/LICENSE delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/decode.go delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/encode.go delete mode 100644 vendor/github.com/golang/protobuf/jsonpb/json.go delete mode 100644 vendor/github.com/golang/protobuf/proto/buffer.go delete mode 100644 vendor/github.com/golang/protobuf/proto/defaults.go delete mode 100644 vendor/github.com/golang/protobuf/proto/deprecated.go delete mode 100644 vendor/github.com/golang/protobuf/proto/discard.go delete mode 100644 vendor/github.com/golang/protobuf/proto/extensions.go delete mode 100644 vendor/github.com/golang/protobuf/proto/properties.go delete mode 100644 vendor/github.com/golang/protobuf/proto/proto.go delete mode 100644 vendor/github.com/golang/protobuf/proto/registry.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text_decode.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text_encode.go delete mode 100644 vendor/github.com/golang/protobuf/proto/wire.go delete mode 100644 vendor/github.com/golang/protobuf/proto/wrappers.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.pb.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/doc.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/duration.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go delete mode 100644 vendor/github.com/google/gofuzz/.travis.yml delete mode 100644 vendor/github.com/google/gofuzz/CONTRIBUTING.md delete mode 100644 vendor/github.com/google/gofuzz/LICENSE delete mode 100644 vendor/github.com/google/gofuzz/README.md delete mode 100644 vendor/github.com/google/gofuzz/bytesource/bytesource.go delete mode 100644 vendor/github.com/google/gofuzz/doc.go delete mode 100644 vendor/github.com/google/gofuzz/fuzz.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/BUILD.bazel delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/BUILD.bazel delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/query.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/BUILD.bazel delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/doc.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go delete mode 100644 vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go delete mode 100644 vendor/github.com/imdario/mergo/.deepsource.toml delete mode 100644 vendor/github.com/imdario/mergo/.gitignore delete mode 100644 vendor/github.com/imdario/mergo/.travis.yml delete mode 100644 vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/imdario/mergo/CONTRIBUTING.md delete mode 100644 vendor/github.com/imdario/mergo/LICENSE delete mode 100644 vendor/github.com/imdario/mergo/README.md delete mode 100644 vendor/github.com/imdario/mergo/SECURITY.md delete mode 100644 vendor/github.com/imdario/mergo/doc.go delete mode 100644 vendor/github.com/imdario/mergo/map.go delete mode 100644 vendor/github.com/imdario/mergo/merge.go delete mode 100644 vendor/github.com/imdario/mergo/mergo.go delete mode 100644 vendor/github.com/json-iterator/go/.codecov.yml delete mode 100644 vendor/github.com/json-iterator/go/.gitignore delete mode 100644 vendor/github.com/json-iterator/go/.travis.yml delete mode 100644 vendor/github.com/json-iterator/go/Gopkg.lock delete mode 100644 vendor/github.com/json-iterator/go/Gopkg.toml delete mode 100644 vendor/github.com/json-iterator/go/LICENSE delete mode 100644 vendor/github.com/json-iterator/go/README.md delete mode 100644 vendor/github.com/json-iterator/go/adapter.go delete mode 100644 vendor/github.com/json-iterator/go/any.go delete mode 100644 vendor/github.com/json-iterator/go/any_array.go delete mode 100644 vendor/github.com/json-iterator/go/any_bool.go delete mode 100644 vendor/github.com/json-iterator/go/any_float.go delete mode 100644 vendor/github.com/json-iterator/go/any_int32.go delete mode 100644 vendor/github.com/json-iterator/go/any_int64.go delete mode 100644 vendor/github.com/json-iterator/go/any_invalid.go delete mode 100644 vendor/github.com/json-iterator/go/any_nil.go delete mode 100644 vendor/github.com/json-iterator/go/any_number.go delete mode 100644 vendor/github.com/json-iterator/go/any_object.go delete mode 100644 vendor/github.com/json-iterator/go/any_str.go delete mode 100644 vendor/github.com/json-iterator/go/any_uint32.go delete mode 100644 vendor/github.com/json-iterator/go/any_uint64.go delete mode 100644 vendor/github.com/json-iterator/go/build.sh delete mode 100644 vendor/github.com/json-iterator/go/config.go delete mode 100644 vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md delete mode 100644 vendor/github.com/json-iterator/go/iter.go delete mode 100644 vendor/github.com/json-iterator/go/iter_array.go delete mode 100644 vendor/github.com/json-iterator/go/iter_float.go delete mode 100644 vendor/github.com/json-iterator/go/iter_int.go delete mode 100644 vendor/github.com/json-iterator/go/iter_object.go delete mode 100644 vendor/github.com/json-iterator/go/iter_skip.go delete mode 100644 vendor/github.com/json-iterator/go/iter_skip_sloppy.go delete mode 100644 vendor/github.com/json-iterator/go/iter_skip_strict.go delete mode 100644 vendor/github.com/json-iterator/go/iter_str.go delete mode 100644 vendor/github.com/json-iterator/go/jsoniter.go delete mode 100644 vendor/github.com/json-iterator/go/pool.go delete mode 100644 vendor/github.com/json-iterator/go/reflect.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_array.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_dynamic.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_extension.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_json_number.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_json_raw_message.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_map.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_marshaler.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_native.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_optional.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_slice.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_struct_decoder.go delete mode 100644 vendor/github.com/json-iterator/go/reflect_struct_encoder.go delete mode 100644 vendor/github.com/json-iterator/go/stream.go delete mode 100644 vendor/github.com/json-iterator/go/stream_float.go delete mode 100644 vendor/github.com/json-iterator/go/stream_int.go delete mode 100644 vendor/github.com/json-iterator/go/stream_str.go delete mode 100644 vendor/github.com/json-iterator/go/test.sh delete mode 100644 vendor/github.com/lunixbochs/vtclean/.travis.yml delete mode 100644 vendor/github.com/lunixbochs/vtclean/LICENSE delete mode 100644 vendor/github.com/lunixbochs/vtclean/README.md delete mode 100644 vendor/github.com/lunixbochs/vtclean/io.go delete mode 100644 vendor/github.com/lunixbochs/vtclean/line.go delete mode 100644 vendor/github.com/lunixbochs/vtclean/vtclean.go delete mode 100644 vendor/github.com/mattn/go-colorable/LICENSE delete mode 100644 vendor/github.com/mattn/go-colorable/README.md delete mode 100644 vendor/github.com/mattn/go-colorable/colorable_appengine.go delete mode 100644 vendor/github.com/mattn/go-colorable/colorable_others.go delete mode 100644 vendor/github.com/mattn/go-colorable/colorable_windows.go delete mode 100644 vendor/github.com/mattn/go-colorable/go.test.sh delete mode 100644 vendor/github.com/mattn/go-colorable/noncolorable.go delete mode 100644 vendor/github.com/mattn/go-isatty/LICENSE delete mode 100644 vendor/github.com/mattn/go-isatty/README.md delete mode 100644 vendor/github.com/mattn/go-isatty/doc.go delete mode 100644 vendor/github.com/mattn/go-isatty/go.test.sh delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_bsd.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_others.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_plan9.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_solaris.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_tcgets.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_windows.go delete mode 100644 vendor/github.com/moby/moby/AUTHORS delete mode 100644 vendor/github.com/moby/moby/LICENSE delete mode 100644 vendor/github.com/moby/moby/NOTICE delete mode 100644 vendor/github.com/moby/moby/pkg/term/deprecated.go delete mode 100644 vendor/github.com/moby/moby/pkg/term/deprecated_unix.go delete mode 100644 vendor/github.com/moby/term/.gitignore delete mode 100644 vendor/github.com/moby/term/LICENSE delete mode 100644 vendor/github.com/moby/term/README.md delete mode 100644 vendor/github.com/moby/term/ascii.go delete mode 100644 vendor/github.com/moby/term/doc.go delete mode 100644 vendor/github.com/moby/term/proxy.go delete mode 100644 vendor/github.com/moby/term/term.go delete mode 100644 vendor/github.com/moby/term/term_unix.go delete mode 100644 vendor/github.com/moby/term/term_windows.go delete mode 100644 vendor/github.com/moby/term/termios_bsd.go delete mode 100644 vendor/github.com/moby/term/termios_nonbsd.go delete mode 100644 vendor/github.com/moby/term/termios_unix.go delete mode 100644 vendor/github.com/moby/term/termios_windows.go delete mode 100644 vendor/github.com/moby/term/windows/ansi_reader.go delete mode 100644 vendor/github.com/moby/term/windows/ansi_writer.go delete mode 100644 vendor/github.com/moby/term/windows/console.go delete mode 100644 vendor/github.com/moby/term/windows/doc.go delete mode 100644 vendor/github.com/modern-go/concurrent/.gitignore delete mode 100644 vendor/github.com/modern-go/concurrent/.travis.yml delete mode 100644 vendor/github.com/modern-go/concurrent/LICENSE delete mode 100644 vendor/github.com/modern-go/concurrent/README.md delete mode 100644 vendor/github.com/modern-go/concurrent/executor.go delete mode 100644 vendor/github.com/modern-go/concurrent/go_above_19.go delete mode 100644 vendor/github.com/modern-go/concurrent/go_below_19.go delete mode 100644 vendor/github.com/modern-go/concurrent/log.go delete mode 100644 vendor/github.com/modern-go/concurrent/test.sh delete mode 100644 vendor/github.com/modern-go/concurrent/unbounded_executor.go delete mode 100644 vendor/github.com/modern-go/reflect2/.gitignore delete mode 100644 vendor/github.com/modern-go/reflect2/.travis.yml delete mode 100644 vendor/github.com/modern-go/reflect2/Gopkg.lock delete mode 100644 vendor/github.com/modern-go/reflect2/Gopkg.toml delete mode 100644 vendor/github.com/modern-go/reflect2/LICENSE delete mode 100644 vendor/github.com/modern-go/reflect2/README.md delete mode 100644 vendor/github.com/modern-go/reflect2/go_above_118.go delete mode 100644 vendor/github.com/modern-go/reflect2/go_above_19.go delete mode 100644 vendor/github.com/modern-go/reflect2/go_below_118.go delete mode 100644 vendor/github.com/modern-go/reflect2/reflect2.go delete mode 100644 vendor/github.com/modern-go/reflect2/reflect2_amd64.s delete mode 100644 vendor/github.com/modern-go/reflect2/reflect2_kind.go delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_386.s delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_arm.s delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_arm64.s delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_mips64x.s delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_mipsx.s delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_s390x.s delete mode 100644 vendor/github.com/modern-go/reflect2/safe_field.go delete mode 100644 vendor/github.com/modern-go/reflect2/safe_map.go delete mode 100644 vendor/github.com/modern-go/reflect2/safe_slice.go delete mode 100644 vendor/github.com/modern-go/reflect2/safe_struct.go delete mode 100644 vendor/github.com/modern-go/reflect2/safe_type.go delete mode 100644 vendor/github.com/modern-go/reflect2/type_map.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_array.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_eface.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_field.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_iface.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_link.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_map.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_ptr.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_slice.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_struct.go delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_type.go delete mode 100644 vendor/github.com/sabhiram/go-gitignore/.gitignore delete mode 100644 vendor/github.com/sabhiram/go-gitignore/.travis.yml delete mode 100644 vendor/github.com/sabhiram/go-gitignore/LICENSE delete mode 100644 vendor/github.com/sabhiram/go-gitignore/README.md delete mode 100644 vendor/github.com/sabhiram/go-gitignore/ignore.go delete mode 100644 vendor/github.com/sabhiram/go-gitignore/version_gen.go delete mode 100644 vendor/github.com/spf13/pflag/.gitignore delete mode 100644 vendor/github.com/spf13/pflag/.travis.yml delete mode 100644 vendor/github.com/spf13/pflag/LICENSE delete mode 100644 vendor/github.com/spf13/pflag/README.md delete mode 100644 vendor/github.com/spf13/pflag/bool.go delete mode 100644 vendor/github.com/spf13/pflag/bool_slice.go delete mode 100644 vendor/github.com/spf13/pflag/bytes.go delete mode 100644 vendor/github.com/spf13/pflag/count.go delete mode 100644 vendor/github.com/spf13/pflag/duration.go delete mode 100644 vendor/github.com/spf13/pflag/duration_slice.go delete mode 100644 vendor/github.com/spf13/pflag/flag.go delete mode 100644 vendor/github.com/spf13/pflag/float32.go delete mode 100644 vendor/github.com/spf13/pflag/float32_slice.go delete mode 100644 vendor/github.com/spf13/pflag/float64.go delete mode 100644 vendor/github.com/spf13/pflag/float64_slice.go delete mode 100644 vendor/github.com/spf13/pflag/golangflag.go delete mode 100644 vendor/github.com/spf13/pflag/int.go delete mode 100644 vendor/github.com/spf13/pflag/int16.go delete mode 100644 vendor/github.com/spf13/pflag/int32.go delete mode 100644 vendor/github.com/spf13/pflag/int32_slice.go delete mode 100644 vendor/github.com/spf13/pflag/int64.go delete mode 100644 vendor/github.com/spf13/pflag/int64_slice.go delete mode 100644 vendor/github.com/spf13/pflag/int8.go delete mode 100644 vendor/github.com/spf13/pflag/int_slice.go delete mode 100644 vendor/github.com/spf13/pflag/ip.go delete mode 100644 vendor/github.com/spf13/pflag/ip_slice.go delete mode 100644 vendor/github.com/spf13/pflag/ipmask.go delete mode 100644 vendor/github.com/spf13/pflag/ipnet.go delete mode 100644 vendor/github.com/spf13/pflag/string.go delete mode 100644 vendor/github.com/spf13/pflag/string_array.go delete mode 100644 vendor/github.com/spf13/pflag/string_slice.go delete mode 100644 vendor/github.com/spf13/pflag/string_to_int.go delete mode 100644 vendor/github.com/spf13/pflag/string_to_int64.go delete mode 100644 vendor/github.com/spf13/pflag/string_to_string.go delete mode 100644 vendor/github.com/spf13/pflag/uint.go delete mode 100644 vendor/github.com/spf13/pflag/uint16.go delete mode 100644 vendor/github.com/spf13/pflag/uint32.go delete mode 100644 vendor/github.com/spf13/pflag/uint64.go delete mode 100644 vendor/github.com/spf13/pflag/uint8.go delete mode 100644 vendor/github.com/spf13/pflag/uint_slice.go delete mode 100644 vendor/github.com/vito/go-interact/LICENSE.md delete mode 100644 vendor/github.com/vito/go-interact/interact/choice.go delete mode 100644 vendor/github.com/vito/go-interact/interact/errors.go delete mode 100644 vendor/github.com/vito/go-interact/interact/interaction.go delete mode 100644 vendor/github.com/vito/go-interact/interact/password.go delete mode 100644 vendor/github.com/vito/go-interact/interact/required.go delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/AUTHORS delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/CONTRIBUTORS delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/LICENSE delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/PATENTS delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/README delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/terminal.go delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/util.go delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/util_bsd.go delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/util_linux.go delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/util_plan9.go delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/util_solaris.go delete mode 100644 vendor/github.com/vito/go-interact/interact/terminal/util_windows.go delete mode 100644 vendor/github.com/vito/go-interact/interact/userio.go delete mode 100644 vendor/golang.org/x/crypto/blowfish/block.go delete mode 100644 vendor/golang.org/x/crypto/blowfish/cipher.go delete mode 100644 vendor/golang.org/x/crypto/blowfish/const.go delete mode 100644 vendor/golang.org/x/crypto/chacha20/chacha_arm64.go delete mode 100644 vendor/golang.org/x/crypto/chacha20/chacha_arm64.s delete mode 100644 vendor/golang.org/x/crypto/chacha20/chacha_generic.go delete mode 100644 vendor/golang.org/x/crypto/chacha20/chacha_noasm.go delete mode 100644 vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go delete mode 100644 vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s delete mode 100644 vendor/golang.org/x/crypto/chacha20/chacha_s390x.go delete mode 100644 vendor/golang.org/x/crypto/chacha20/chacha_s390x.s delete mode 100644 vendor/golang.org/x/crypto/chacha20/xor.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519_compat.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519_go120.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/README delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh delete mode 100644 vendor/golang.org/x/crypto/internal/alias/alias.go delete mode 100644 vendor/golang.org/x/crypto/internal/alias/alias_purego.go delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/poly1305.go delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go delete mode 100644 vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s delete mode 100644 vendor/golang.org/x/crypto/ssh/buffer.go delete mode 100644 vendor/golang.org/x/crypto/ssh/certs.go delete mode 100644 vendor/golang.org/x/crypto/ssh/channel.go delete mode 100644 vendor/golang.org/x/crypto/ssh/cipher.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client_auth.go delete mode 100644 vendor/golang.org/x/crypto/ssh/common.go delete mode 100644 vendor/golang.org/x/crypto/ssh/connection.go delete mode 100644 vendor/golang.org/x/crypto/ssh/doc.go delete mode 100644 vendor/golang.org/x/crypto/ssh/handshake.go delete mode 100644 vendor/golang.org/x/crypto/ssh/internal/bcrypt_pbkdf/bcrypt_pbkdf.go delete mode 100644 vendor/golang.org/x/crypto/ssh/kex.go delete mode 100644 vendor/golang.org/x/crypto/ssh/keys.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mac.go delete mode 100644 vendor/golang.org/x/crypto/ssh/messages.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mux.go delete mode 100644 vendor/golang.org/x/crypto/ssh/server.go delete mode 100644 vendor/golang.org/x/crypto/ssh/session.go delete mode 100644 vendor/golang.org/x/crypto/ssh/ssh_gss.go delete mode 100644 vendor/golang.org/x/crypto/ssh/streamlocal.go delete mode 100644 vendor/golang.org/x/crypto/ssh/tcpip.go delete mode 100644 vendor/golang.org/x/crypto/ssh/transport.go delete mode 100644 vendor/golang.org/x/net/LICENSE delete mode 100644 vendor/golang.org/x/net/PATENTS delete mode 100644 vendor/golang.org/x/net/context/context.go delete mode 100644 vendor/golang.org/x/net/context/go17.go delete mode 100644 vendor/golang.org/x/net/context/go19.go delete mode 100644 vendor/golang.org/x/net/context/pre_go17.go delete mode 100644 vendor/golang.org/x/net/context/pre_go19.go delete mode 100644 vendor/golang.org/x/net/http/httpguts/guts.go delete mode 100644 vendor/golang.org/x/net/http/httpguts/httplex.go delete mode 100644 vendor/golang.org/x/net/http2/.gitignore delete mode 100644 vendor/golang.org/x/net/http2/ascii.go delete mode 100644 vendor/golang.org/x/net/http2/ciphers.go delete mode 100644 vendor/golang.org/x/net/http2/client_conn_pool.go delete mode 100644 vendor/golang.org/x/net/http2/databuffer.go delete mode 100644 vendor/golang.org/x/net/http2/errors.go delete mode 100644 vendor/golang.org/x/net/http2/flow.go delete mode 100644 vendor/golang.org/x/net/http2/frame.go delete mode 100644 vendor/golang.org/x/net/http2/gotrack.go delete mode 100644 vendor/golang.org/x/net/http2/headermap.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/encode.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/hpack.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/huffman.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/static_table.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/tables.go delete mode 100644 vendor/golang.org/x/net/http2/http2.go delete mode 100644 vendor/golang.org/x/net/http2/pipe.go delete mode 100644 vendor/golang.org/x/net/http2/server.go delete mode 100644 vendor/golang.org/x/net/http2/transport.go delete mode 100644 vendor/golang.org/x/net/http2/write.go delete mode 100644 vendor/golang.org/x/net/http2/writesched.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_priority.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_random.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_roundrobin.go delete mode 100644 vendor/golang.org/x/net/idna/go118.go delete mode 100644 vendor/golang.org/x/net/idna/idna10.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/idna9.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/pre_go118.go delete mode 100644 vendor/golang.org/x/net/idna/punycode.go delete mode 100644 vendor/golang.org/x/net/idna/tables10.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables11.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables12.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables13.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables15.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/tables9.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/trie.go delete mode 100644 vendor/golang.org/x/net/idna/trie12.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/trie13.0.0.go delete mode 100644 vendor/golang.org/x/net/idna/trieval.go delete mode 100644 vendor/golang.org/x/net/internal/socks/client.go delete mode 100644 vendor/golang.org/x/net/internal/socks/socks.go delete mode 100644 vendor/golang.org/x/net/internal/timeseries/timeseries.go delete mode 100644 vendor/golang.org/x/net/proxy/dial.go delete mode 100644 vendor/golang.org/x/net/proxy/direct.go delete mode 100644 vendor/golang.org/x/net/proxy/per_host.go delete mode 100644 vendor/golang.org/x/net/proxy/proxy.go delete mode 100644 vendor/golang.org/x/net/proxy/socks5.go delete mode 100644 vendor/golang.org/x/net/trace/events.go delete mode 100644 vendor/golang.org/x/net/trace/histogram.go delete mode 100644 vendor/golang.org/x/net/trace/trace.go delete mode 100644 vendor/golang.org/x/oauth2/.travis.yml delete mode 100644 vendor/golang.org/x/oauth2/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/oauth2/LICENSE delete mode 100644 vendor/golang.org/x/oauth2/README.md delete mode 100644 vendor/golang.org/x/oauth2/deviceauth.go delete mode 100644 vendor/golang.org/x/oauth2/internal/client_appengine.go delete mode 100644 vendor/golang.org/x/oauth2/internal/doc.go delete mode 100644 vendor/golang.org/x/oauth2/internal/oauth2.go delete mode 100644 vendor/golang.org/x/oauth2/internal/token.go delete mode 100644 vendor/golang.org/x/oauth2/internal/transport.go delete mode 100644 vendor/golang.org/x/oauth2/oauth2.go delete mode 100644 vendor/golang.org/x/oauth2/pkce.go delete mode 100644 vendor/golang.org/x/oauth2/token.go delete mode 100644 vendor/golang.org/x/oauth2/transport.go delete mode 100644 vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s delete mode 100644 vendor/golang.org/x/sys/cpu/byteorder.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_aix.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm64.s delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_x86.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_loong64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_mips64x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_mipsx.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_arm.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_arm64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_ppc64x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_riscv64.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_s390x.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_s390x.s delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_wasm.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_x86.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_x86.s delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_zos.go delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go delete mode 100644 vendor/golang.org/x/sys/cpu/endian_big.go delete mode 100644 vendor/golang.org/x/sys/cpu/endian_little.go delete mode 100644 vendor/golang.org/x/sys/cpu/hwcap_linux.go delete mode 100644 vendor/golang.org/x/sys/cpu/parse.go delete mode 100644 vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go delete mode 100644 vendor/golang.org/x/sys/cpu/runtime_auxv.go delete mode 100644 vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go delete mode 100644 vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go delete mode 100644 vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go delete mode 100644 vendor/golang.org/x/text/LICENSE delete mode 100644 vendor/golang.org/x/text/PATENTS delete mode 100644 vendor/golang.org/x/text/internal/language/common.go delete mode 100644 vendor/golang.org/x/text/internal/language/compact.go delete mode 100644 vendor/golang.org/x/text/internal/language/compact/compact.go delete mode 100644 vendor/golang.org/x/text/internal/language/compact/language.go delete mode 100644 vendor/golang.org/x/text/internal/language/compact/parents.go delete mode 100644 vendor/golang.org/x/text/internal/language/compact/tables.go delete mode 100644 vendor/golang.org/x/text/internal/language/compact/tags.go delete mode 100644 vendor/golang.org/x/text/internal/language/compose.go delete mode 100644 vendor/golang.org/x/text/internal/language/coverage.go delete mode 100644 vendor/golang.org/x/text/internal/language/language.go delete mode 100644 vendor/golang.org/x/text/internal/language/lookup.go delete mode 100644 vendor/golang.org/x/text/internal/language/match.go delete mode 100644 vendor/golang.org/x/text/internal/language/parse.go delete mode 100644 vendor/golang.org/x/text/internal/language/tables.go delete mode 100644 vendor/golang.org/x/text/internal/language/tags.go delete mode 100644 vendor/golang.org/x/text/internal/tag/tag.go delete mode 100644 vendor/golang.org/x/text/language/coverage.go delete mode 100644 vendor/golang.org/x/text/language/doc.go delete mode 100644 vendor/golang.org/x/text/language/language.go delete mode 100644 vendor/golang.org/x/text/language/match.go delete mode 100644 vendor/golang.org/x/text/language/parse.go delete mode 100644 vendor/golang.org/x/text/language/tables.go delete mode 100644 vendor/golang.org/x/text/language/tags.go delete mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule.go delete mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go delete mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go delete mode 100644 vendor/golang.org/x/text/transform/transform.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/bidi.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/bracket.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/core.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/prop.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/trieval.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/composition.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/forminfo.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/input.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/iter.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/normalize.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/readwriter.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables10.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables11.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables12.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables13.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables15.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables9.0.0.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/transform.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/trie.go delete mode 100644 vendor/golang.org/x/time/LICENSE delete mode 100644 vendor/golang.org/x/time/PATENTS delete mode 100644 vendor/golang.org/x/time/rate/rate.go delete mode 100644 vendor/golang.org/x/time/rate/sometimes.go delete mode 100644 vendor/google.golang.org/appengine/LICENSE delete mode 100644 vendor/google.golang.org/appengine/internal/api.go delete mode 100644 vendor/google.golang.org/appengine/internal/api_classic.go delete mode 100644 vendor/google.golang.org/appengine/internal/api_common.go delete mode 100644 vendor/google.golang.org/appengine/internal/app_id.go delete mode 100644 vendor/google.golang.org/appengine/internal/base/api_base.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/base/api_base.proto delete mode 100644 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto delete mode 100644 vendor/google.golang.org/appengine/internal/identity.go delete mode 100644 vendor/google.golang.org/appengine/internal/identity_classic.go delete mode 100644 vendor/google.golang.org/appengine/internal/identity_flex.go delete mode 100644 vendor/google.golang.org/appengine/internal/identity_vm.go delete mode 100644 vendor/google.golang.org/appengine/internal/internal.go delete mode 100644 vendor/google.golang.org/appengine/internal/log/log_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/log/log_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/main.go delete mode 100644 vendor/google.golang.org/appengine/internal/main_common.go delete mode 100644 vendor/google.golang.org/appengine/internal/main_vm.go delete mode 100644 vendor/google.golang.org/appengine/internal/metadata.go delete mode 100644 vendor/google.golang.org/appengine/internal/net.go delete mode 100644 vendor/google.golang.org/appengine/internal/regen.sh delete mode 100644 vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto delete mode 100644 vendor/google.golang.org/appengine/internal/transaction.go delete mode 100644 vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto delete mode 100644 vendor/google.golang.org/appengine/urlfetch/urlfetch.go delete mode 100644 vendor/google.golang.org/genproto/LICENSE delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/LICENSE delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/tidyfix.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/rpc/LICENSE delete mode 100644 vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go delete mode 100644 vendor/google.golang.org/genproto/internal/doc.go delete mode 100644 vendor/google.golang.org/grpc/AUTHORS delete mode 100644 vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md delete mode 100644 vendor/google.golang.org/grpc/CONTRIBUTING.md delete mode 100644 vendor/google.golang.org/grpc/GOVERNANCE.md delete mode 100644 vendor/google.golang.org/grpc/LICENSE delete mode 100644 vendor/google.golang.org/grpc/MAINTAINERS.md delete mode 100644 vendor/google.golang.org/grpc/Makefile delete mode 100644 vendor/google.golang.org/grpc/NOTICE.txt delete mode 100644 vendor/google.golang.org/grpc/README.md delete mode 100644 vendor/google.golang.org/grpc/SECURITY.md delete mode 100644 vendor/google.golang.org/grpc/attributes/attributes.go delete mode 100644 vendor/google.golang.org/grpc/backoff.go delete mode 100644 vendor/google.golang.org/grpc/backoff/backoff.go delete mode 100644 vendor/google.golang.org/grpc/balancer/balancer.go delete mode 100644 vendor/google.golang.org/grpc/balancer/base/balancer.go delete mode 100644 vendor/google.golang.org/grpc/balancer/base/base.go delete mode 100644 vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go delete mode 100644 vendor/google.golang.org/grpc/balancer/grpclb/state/state.go delete mode 100644 vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go delete mode 100644 vendor/google.golang.org/grpc/balancer_wrapper.go delete mode 100644 vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go delete mode 100644 vendor/google.golang.org/grpc/call.go delete mode 100644 vendor/google.golang.org/grpc/channelz/channelz.go delete mode 100644 vendor/google.golang.org/grpc/clientconn.go delete mode 100644 vendor/google.golang.org/grpc/codec.go delete mode 100644 vendor/google.golang.org/grpc/codegen.sh delete mode 100644 vendor/google.golang.org/grpc/codes/code_string.go delete mode 100644 vendor/google.golang.org/grpc/codes/codes.go delete mode 100644 vendor/google.golang.org/grpc/connectivity/connectivity.go delete mode 100644 vendor/google.golang.org/grpc/credentials/credentials.go delete mode 100644 vendor/google.golang.org/grpc/credentials/insecure/insecure.go delete mode 100644 vendor/google.golang.org/grpc/credentials/tls.go delete mode 100644 vendor/google.golang.org/grpc/dialoptions.go delete mode 100644 vendor/google.golang.org/grpc/doc.go delete mode 100644 vendor/google.golang.org/grpc/encoding/encoding.go delete mode 100644 vendor/google.golang.org/grpc/encoding/proto/proto.go delete mode 100644 vendor/google.golang.org/grpc/grpclog/component.go delete mode 100644 vendor/google.golang.org/grpc/grpclog/grpclog.go delete mode 100644 vendor/google.golang.org/grpc/grpclog/logger.go delete mode 100644 vendor/google.golang.org/grpc/grpclog/loggerv2.go delete mode 100644 vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go delete mode 100644 vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go delete mode 100644 vendor/google.golang.org/grpc/interceptor.go delete mode 100644 vendor/google.golang.org/grpc/internal/backoff/backoff.go delete mode 100644 vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go delete mode 100644 vendor/google.golang.org/grpc/internal/balancerload/load.go delete mode 100644 vendor/google.golang.org/grpc/internal/binarylog/binarylog.go delete mode 100644 vendor/google.golang.org/grpc/internal/binarylog/binarylog_testutil.go delete mode 100644 vendor/google.golang.org/grpc/internal/binarylog/env_config.go delete mode 100644 vendor/google.golang.org/grpc/internal/binarylog/method_logger.go delete mode 100644 vendor/google.golang.org/grpc/internal/binarylog/sink.go delete mode 100644 vendor/google.golang.org/grpc/internal/buffer/unbounded.go delete mode 100644 vendor/google.golang.org/grpc/internal/channelz/funcs.go delete mode 100644 vendor/google.golang.org/grpc/internal/channelz/id.go delete mode 100644 vendor/google.golang.org/grpc/internal/channelz/logging.go delete mode 100644 vendor/google.golang.org/grpc/internal/channelz/types.go delete mode 100644 vendor/google.golang.org/grpc/internal/channelz/types_linux.go delete mode 100644 vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go delete mode 100644 vendor/google.golang.org/grpc/internal/channelz/util_linux.go delete mode 100644 vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go delete mode 100644 vendor/google.golang.org/grpc/internal/credentials/credentials.go delete mode 100644 vendor/google.golang.org/grpc/internal/credentials/spiffe.go delete mode 100644 vendor/google.golang.org/grpc/internal/credentials/syscallconn.go delete mode 100644 vendor/google.golang.org/grpc/internal/credentials/util.go delete mode 100644 vendor/google.golang.org/grpc/internal/envconfig/envconfig.go delete mode 100644 vendor/google.golang.org/grpc/internal/envconfig/observability.go delete mode 100644 vendor/google.golang.org/grpc/internal/envconfig/xds.go delete mode 100644 vendor/google.golang.org/grpc/internal/experimental.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpclog/grpclog.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcsync/event.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcsync/pubsub.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcutil/compressor.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcutil/encode_duration.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcutil/metadata.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcutil/method.go delete mode 100644 vendor/google.golang.org/grpc/internal/grpcutil/regex.go delete mode 100644 vendor/google.golang.org/grpc/internal/idle/idle.go delete mode 100644 vendor/google.golang.org/grpc/internal/internal.go delete mode 100644 vendor/google.golang.org/grpc/internal/metadata/metadata.go delete mode 100644 vendor/google.golang.org/grpc/internal/pretty/pretty.go delete mode 100644 vendor/google.golang.org/grpc/internal/resolver/config_selector.go delete mode 100644 vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go delete mode 100644 vendor/google.golang.org/grpc/internal/resolver/dns/internal/internal.go delete mode 100644 vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go delete mode 100644 vendor/google.golang.org/grpc/internal/resolver/unix/unix.go delete mode 100644 vendor/google.golang.org/grpc/internal/serviceconfig/duration.go delete mode 100644 vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go delete mode 100644 vendor/google.golang.org/grpc/internal/status/status.go delete mode 100644 vendor/google.golang.org/grpc/internal/syscall/syscall_linux.go delete mode 100644 vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go delete mode 100644 vendor/google.golang.org/grpc/internal/tcp_keepalive_nonunix.go delete mode 100644 vendor/google.golang.org/grpc/internal/tcp_keepalive_unix.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/bdp_estimator.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/controlbuf.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/defaults.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/flowcontrol.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/handler_server.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/http2_client.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/http2_server.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/http_util.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/logging.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/proxy.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/transport.go delete mode 100644 vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go delete mode 100644 vendor/google.golang.org/grpc/keepalive/keepalive.go delete mode 100644 vendor/google.golang.org/grpc/metadata/metadata.go delete mode 100644 vendor/google.golang.org/grpc/peer/peer.go delete mode 100644 vendor/google.golang.org/grpc/picker_wrapper.go delete mode 100644 vendor/google.golang.org/grpc/pickfirst.go delete mode 100644 vendor/google.golang.org/grpc/preloader.go delete mode 100644 vendor/google.golang.org/grpc/regenerate.sh delete mode 100644 vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go delete mode 100644 vendor/google.golang.org/grpc/resolver/map.go delete mode 100644 vendor/google.golang.org/grpc/resolver/resolver.go delete mode 100644 vendor/google.golang.org/grpc/resolver_wrapper.go delete mode 100644 vendor/google.golang.org/grpc/rpc_util.go delete mode 100644 vendor/google.golang.org/grpc/server.go delete mode 100644 vendor/google.golang.org/grpc/service_config.go delete mode 100644 vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go delete mode 100644 vendor/google.golang.org/grpc/shared_buffer_pool.go delete mode 100644 vendor/google.golang.org/grpc/stats/handlers.go delete mode 100644 vendor/google.golang.org/grpc/stats/stats.go delete mode 100644 vendor/google.golang.org/grpc/status/status.go delete mode 100644 vendor/google.golang.org/grpc/stream.go delete mode 100644 vendor/google.golang.org/grpc/tap/tap.go delete mode 100644 vendor/google.golang.org/grpc/trace.go delete mode 100644 vendor/google.golang.org/grpc/version.go delete mode 100644 vendor/google.golang.org/grpc/vet.sh delete mode 100644 vendor/google.golang.org/protobuf/LICENSE delete mode 100644 vendor/google.golang.org/protobuf/PATENTS delete mode 100644 vendor/google.golang.org/protobuf/encoding/protojson/decode.go delete mode 100644 vendor/google.golang.org/protobuf/encoding/protojson/doc.go delete mode 100644 vendor/google.golang.org/protobuf/encoding/protojson/encode.go delete mode 100644 vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go delete mode 100644 vendor/google.golang.org/protobuf/encoding/prototext/decode.go delete mode 100644 vendor/google.golang.org/protobuf/encoding/prototext/doc.go delete mode 100644 vendor/google.golang.org/protobuf/encoding/prototext/encode.go delete mode 100644 vendor/google.golang.org/protobuf/encoding/protowire/wire.go delete mode 100644 vendor/google.golang.org/protobuf/internal/descfmt/stringer.go delete mode 100644 vendor/google.golang.org/protobuf/internal/descopts/options.go delete mode 100644 vendor/google.golang.org/protobuf/internal/detrand/rand.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/defval/default.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/json/decode.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/json/decode_number.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/json/decode_string.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/json/decode_token.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/json/encode.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/text/decode.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/text/decode_string.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/text/decode_token.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/text/doc.go delete mode 100644 vendor/google.golang.org/protobuf/internal/encoding/text/encode.go delete mode 100644 vendor/google.golang.org/protobuf/internal/errors/errors.go delete mode 100644 vendor/google.golang.org/protobuf/internal/errors/is_go112.go delete mode 100644 vendor/google.golang.org/protobuf/internal/errors/is_go113.go delete mode 100644 vendor/google.golang.org/protobuf/internal/filedesc/build.go delete mode 100644 vendor/google.golang.org/protobuf/internal/filedesc/desc.go delete mode 100644 vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go delete mode 100644 vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go delete mode 100644 vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go delete mode 100644 vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go delete mode 100644 vendor/google.golang.org/protobuf/internal/filetype/build.go delete mode 100644 vendor/google.golang.org/protobuf/internal/flags/flags.go delete mode 100644 vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go delete mode 100644 vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/any_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/api_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/doc.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/duration_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/empty_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/goname.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/map_entry.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/struct_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/timestamp_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/type_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/wrappers.go delete mode 100644 vendor/google.golang.org/protobuf/internal/genid/wrappers_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/api_export.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/checkinit.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_extension.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_field.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_map.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_message.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_tables.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/convert.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/convert_list.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/convert_map.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/decode.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/encode.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/enum.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/extension.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/legacy_export.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/legacy_file.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/legacy_message.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/merge.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/merge_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/message.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/message_reflect.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/validate.go delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/weak.go delete mode 100644 vendor/google.golang.org/protobuf/internal/order/order.go delete mode 100644 vendor/google.golang.org/protobuf/internal/order/range.go delete mode 100644 vendor/google.golang.org/protobuf/internal/pragma/pragma.go delete mode 100644 vendor/google.golang.org/protobuf/internal/set/ints.go delete mode 100644 vendor/google.golang.org/protobuf/internal/strs/strings.go delete mode 100644 vendor/google.golang.org/protobuf/internal/strs/strings_pure.go delete mode 100644 vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go delete mode 100644 vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go delete mode 100644 vendor/google.golang.org/protobuf/internal/version/version.go delete mode 100644 vendor/google.golang.org/protobuf/proto/checkinit.go delete mode 100644 vendor/google.golang.org/protobuf/proto/decode.go delete mode 100644 vendor/google.golang.org/protobuf/proto/decode_gen.go delete mode 100644 vendor/google.golang.org/protobuf/proto/doc.go delete mode 100644 vendor/google.golang.org/protobuf/proto/encode.go delete mode 100644 vendor/google.golang.org/protobuf/proto/encode_gen.go delete mode 100644 vendor/google.golang.org/protobuf/proto/equal.go delete mode 100644 vendor/google.golang.org/protobuf/proto/extension.go delete mode 100644 vendor/google.golang.org/protobuf/proto/merge.go delete mode 100644 vendor/google.golang.org/protobuf/proto/messageset.go delete mode 100644 vendor/google.golang.org/protobuf/proto/proto.go delete mode 100644 vendor/google.golang.org/protobuf/proto/proto_methods.go delete mode 100644 vendor/google.golang.org/protobuf/proto/proto_reflect.go delete mode 100644 vendor/google.golang.org/protobuf/proto/reset.go delete mode 100644 vendor/google.golang.org/protobuf/proto/size.go delete mode 100644 vendor/google.golang.org/protobuf/proto/size_gen.go delete mode 100644 vendor/google.golang.org/protobuf/proto/wrappers.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/desc.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/editions.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb delete mode 100644 vendor/google.golang.org/protobuf/reflect/protodesc/proto.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/source.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/type.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go delete mode 100644 vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go delete mode 100644 vendor/google.golang.org/protobuf/runtime/protoiface/methods.go delete mode 100644 vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go delete mode 100644 vendor/google.golang.org/protobuf/runtime/protoimpl/version.go delete mode 100644 vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go delete mode 100644 vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go delete mode 100644 vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go delete mode 100644 vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go delete mode 100644 vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go delete mode 100644 vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go delete mode 100644 vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go delete mode 100644 vendor/gopkg.in/inf.v0/LICENSE delete mode 100644 vendor/gopkg.in/inf.v0/dec.go delete mode 100644 vendor/gopkg.in/inf.v0/rounder.go delete mode 100644 vendor/k8s.io/apimachinery/LICENSE delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/errors/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/errors/errors.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/amount.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/math.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_fuzz.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_fuzz.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/converter.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/helper.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/fields.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/requirements.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/selector.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/labels.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/selector.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/allocator.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/codec.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/conversion.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/converter.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/embedded.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/error.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/extension.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/helper.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/mapper.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/negotiate.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/register.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/scheme.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/negotiated_codec.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/recognizer.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/splice.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/types.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/selection/operator.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/namespacedname.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/nodename.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/patch.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/types/uid.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/dump/dump.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/errors/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/errors/errors.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/framer/framer.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/instr_fuzz.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/json/json.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/naming/from_stack.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/http.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/interface.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/port_range.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/port_split.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/util.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/byte.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/empty.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/int.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/int32.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/int64.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/set.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/string.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/validation.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/delay.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/error.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/loop.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/poll.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/timer.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/wait.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/version/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/version/helpers.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/version/types.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/doc.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/filter.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/mux.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/watch.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/LICENSE delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/PATENTS delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go delete mode 100644 vendor/k8s.io/client-go/LICENSE delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/doc.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/install/install.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/register.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/doc.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/register.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/types.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/zz_generated.conversion.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/zz_generated.defaults.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/doc.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/register.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/types.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.defaults.go delete mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/client-go/pkg/version/base.go delete mode 100644 vendor/k8s.io/client-go/pkg/version/doc.go delete mode 100644 vendor/k8s.io/client-go/pkg/version/version.go delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/azure/azure_stub.go delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/metrics.go delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp_stub.go delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go delete mode 100644 vendor/k8s.io/client-go/rest/OWNERS delete mode 100644 vendor/k8s.io/client-go/rest/client.go delete mode 100644 vendor/k8s.io/client-go/rest/config.go delete mode 100644 vendor/k8s.io/client-go/rest/exec.go delete mode 100644 vendor/k8s.io/client-go/rest/plugin.go delete mode 100644 vendor/k8s.io/client-go/rest/request.go delete mode 100644 vendor/k8s.io/client-go/rest/transport.go delete mode 100644 vendor/k8s.io/client-go/rest/url_utils.go delete mode 100644 vendor/k8s.io/client-go/rest/urlbackoff.go delete mode 100644 vendor/k8s.io/client-go/rest/warnings.go delete mode 100644 vendor/k8s.io/client-go/rest/watch/decoder.go delete mode 100644 vendor/k8s.io/client-go/rest/watch/encoder.go delete mode 100644 vendor/k8s.io/client-go/rest/with_retry.go delete mode 100644 vendor/k8s.io/client-go/rest/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/client-go/tools/auth/OWNERS delete mode 100644 vendor/k8s.io/client-go/tools/auth/clientauth.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/doc.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/latest/latest.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/register.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/types.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/v1/conversion.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/v1/defaults.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/v1/doc.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/v1/register.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.defaults.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/client_config.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/config.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/doc.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/flag.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/helpers.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/loader.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/overrides.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/validation.go delete mode 100644 vendor/k8s.io/client-go/tools/metrics/OWNERS delete mode 100644 vendor/k8s.io/client-go/tools/metrics/metrics.go delete mode 100644 vendor/k8s.io/client-go/transport/OWNERS delete mode 100644 vendor/k8s.io/client-go/transport/cache.go delete mode 100644 vendor/k8s.io/client-go/transport/cache_go118.go delete mode 100644 vendor/k8s.io/client-go/transport/cert_rotation.go delete mode 100644 vendor/k8s.io/client-go/transport/config.go delete mode 100644 vendor/k8s.io/client-go/transport/round_trippers.go delete mode 100644 vendor/k8s.io/client-go/transport/token_source.go delete mode 100644 vendor/k8s.io/client-go/transport/transport.go delete mode 100644 vendor/k8s.io/client-go/util/cert/OWNERS delete mode 100644 vendor/k8s.io/client-go/util/cert/cert.go delete mode 100644 vendor/k8s.io/client-go/util/cert/csr.go delete mode 100644 vendor/k8s.io/client-go/util/cert/io.go delete mode 100644 vendor/k8s.io/client-go/util/cert/pem.go delete mode 100644 vendor/k8s.io/client-go/util/cert/server_inspection.go delete mode 100644 vendor/k8s.io/client-go/util/connrotation/connrotation.go delete mode 100644 vendor/k8s.io/client-go/util/flowcontrol/backoff.go delete mode 100644 vendor/k8s.io/client-go/util/flowcontrol/throttle.go delete mode 100644 vendor/k8s.io/client-go/util/homedir/homedir.go delete mode 100644 vendor/k8s.io/client-go/util/keyutil/OWNERS delete mode 100644 vendor/k8s.io/client-go/util/keyutil/key.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/delaying_queue.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/doc.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/metrics.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/parallelizer.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/queue.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/rate_limiting_queue.go delete mode 100644 vendor/k8s.io/klog/v2/.gitignore delete mode 100644 vendor/k8s.io/klog/v2/.golangci.yaml delete mode 100644 vendor/k8s.io/klog/v2/CONTRIBUTING.md delete mode 100644 vendor/k8s.io/klog/v2/LICENSE delete mode 100644 vendor/k8s.io/klog/v2/OWNERS delete mode 100644 vendor/k8s.io/klog/v2/README.md delete mode 100644 vendor/k8s.io/klog/v2/RELEASE.md delete mode 100644 vendor/k8s.io/klog/v2/SECURITY.md delete mode 100644 vendor/k8s.io/klog/v2/SECURITY_CONTACTS delete mode 100644 vendor/k8s.io/klog/v2/code-of-conduct.md delete mode 100644 vendor/k8s.io/klog/v2/contextual.go delete mode 100644 vendor/k8s.io/klog/v2/exit.go delete mode 100644 vendor/k8s.io/klog/v2/format.go delete mode 100644 vendor/k8s.io/klog/v2/imports.go delete mode 100644 vendor/k8s.io/klog/v2/internal/buffer/buffer.go delete mode 100644 vendor/k8s.io/klog/v2/internal/clock/README.md delete mode 100644 vendor/k8s.io/klog/v2/internal/clock/clock.go delete mode 100644 vendor/k8s.io/klog/v2/internal/dbg/dbg.go delete mode 100644 vendor/k8s.io/klog/v2/internal/serialize/keyvalues.go delete mode 100644 vendor/k8s.io/klog/v2/internal/serialize/keyvalues_no_slog.go delete mode 100644 vendor/k8s.io/klog/v2/internal/serialize/keyvalues_slog.go delete mode 100644 vendor/k8s.io/klog/v2/internal/severity/severity.go delete mode 100644 vendor/k8s.io/klog/v2/internal/sloghandler/sloghandler_slog.go delete mode 100644 vendor/k8s.io/klog/v2/k8s_references.go delete mode 100644 vendor/k8s.io/klog/v2/k8s_references_slog.go delete mode 100644 vendor/k8s.io/klog/v2/klog.go delete mode 100644 vendor/k8s.io/klog/v2/klog_file.go delete mode 100644 vendor/k8s.io/klog/v2/klog_file_others.go delete mode 100644 vendor/k8s.io/klog/v2/klog_file_windows.go delete mode 100644 vendor/k8s.io/klog/v2/klogr.go delete mode 100644 vendor/k8s.io/klog/v2/klogr_slog.go delete mode 100644 vendor/k8s.io/utils/LICENSE delete mode 100644 vendor/k8s.io/utils/clock/README.md delete mode 100644 vendor/k8s.io/utils/clock/clock.go delete mode 100644 vendor/k8s.io/utils/clock/testing/fake_clock.go delete mode 100644 vendor/k8s.io/utils/clock/testing/simple_interval_clock.go delete mode 100644 vendor/k8s.io/utils/integer/integer.go delete mode 100644 vendor/k8s.io/utils/internal/third_party/forked/golang/LICENSE delete mode 100644 vendor/k8s.io/utils/internal/third_party/forked/golang/PATENTS delete mode 100644 vendor/k8s.io/utils/internal/third_party/forked/golang/net/ip.go delete mode 100644 vendor/k8s.io/utils/internal/third_party/forked/golang/net/parse.go delete mode 100644 vendor/k8s.io/utils/net/ipfamily.go delete mode 100644 vendor/k8s.io/utils/net/ipnet.go delete mode 100644 vendor/k8s.io/utils/net/net.go delete mode 100644 vendor/k8s.io/utils/net/parse.go delete mode 100644 vendor/k8s.io/utils/net/port.go delete mode 100644 vendor/k8s.io/utils/strings/slices/slices.go delete mode 100644 vendor/sigs.k8s.io/json/CONTRIBUTING.md delete mode 100644 vendor/sigs.k8s.io/json/LICENSE delete mode 100644 vendor/sigs.k8s.io/json/Makefile delete mode 100644 vendor/sigs.k8s.io/json/OWNERS delete mode 100644 vendor/sigs.k8s.io/json/README.md delete mode 100644 vendor/sigs.k8s.io/json/SECURITY.md delete mode 100644 vendor/sigs.k8s.io/json/SECURITY_CONTACTS delete mode 100644 vendor/sigs.k8s.io/json/code-of-conduct.md delete mode 100644 vendor/sigs.k8s.io/json/doc.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/encode.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/fold.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/fuzz.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/indent.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/kubernetes_patch.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/scanner.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/stream.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/tables.go delete mode 100644 vendor/sigs.k8s.io/json/internal/golang/encoding/json/tags.go delete mode 100644 vendor/sigs.k8s.io/json/json.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/LICENSE delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/allocator.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/doc.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/fields.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/jsontagutil.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/list.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/listreflect.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/listunstructured.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/map.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/mapreflect.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/mapunstructured.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/reflectcache.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/scalar.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/structreflect.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/value.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/valuereflect.go delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/value/valueunstructured.go delete mode 100644 vendor/sigs.k8s.io/yaml/.gitignore delete mode 100644 vendor/sigs.k8s.io/yaml/.travis.yml delete mode 100644 vendor/sigs.k8s.io/yaml/CONTRIBUTING.md delete mode 100644 vendor/sigs.k8s.io/yaml/LICENSE delete mode 100644 vendor/sigs.k8s.io/yaml/OWNERS delete mode 100644 vendor/sigs.k8s.io/yaml/README.md delete mode 100644 vendor/sigs.k8s.io/yaml/RELEASE.md delete mode 100644 vendor/sigs.k8s.io/yaml/SECURITY_CONTACTS delete mode 100644 vendor/sigs.k8s.io/yaml/code-of-conduct.md delete mode 100644 vendor/sigs.k8s.io/yaml/fields.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE.libyaml delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/NOTICE delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/OWNERS delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/README.md delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/encode.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/writerc.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go delete mode 100644 vendor/sigs.k8s.io/yaml/goyaml.v2/yamlprivateh.go delete mode 100644 vendor/sigs.k8s.io/yaml/yaml.go delete mode 100644 vendor/sigs.k8s.io/yaml/yaml_go110.go diff --git a/go.mod b/go.mod index 3fadc68..3747a6f 100644 --- a/go.mod +++ b/go.mod @@ -11,15 +11,16 @@ exclude ( require ( code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6 - code.cloudfoundry.org/cli v0.0.0-20220602204915-eda2b7b2321c + code.cloudfoundry.org/cli v7.1.0+incompatible ) require ( code.cloudfoundry.org/bytefmt v0.0.0-20231017140541-3b893ed0421b // indirect code.cloudfoundry.org/cli-plugin-repo v0.0.0-20230525012251-b9c89116786e // indirect - code.cloudfoundry.org/clock v1.1.0 // indirect code.cloudfoundry.org/go-log-cache v1.0.1-0.20211011162012-ede82a99d3cc // indirect + code.cloudfoundry.org/go-loggregator v7.4.0+incompatible // indirect code.cloudfoundry.org/go-loggregator/v8 v8.0.5 // indirect + code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f // indirect code.cloudfoundry.org/jsonry v1.1.4 // indirect code.cloudfoundry.org/tlsconfig v0.0.0-20231017135636-f0e44068c22f // indirect code.cloudfoundry.org/ykk v0.0.0-20170424192843-e4df4ce2fd4d // indirect @@ -33,52 +34,34 @@ require ( github.com/cloudfoundry/bosh-utils v0.0.423 // indirect github.com/cppforlife/go-patch v0.2.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.16.0 // indirect github.com/go-logr/logr v1.4.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect - github.com/imdario/mergo v0.3.15 // indirect github.com/jessevdk/go-flags v1.5.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/lunixbochs/vtclean v1.0.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/moby/moby v20.10.22+incompatible // indirect github.com/moby/term v0.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/onsi/ginkgo v1.16.5 // indirect github.com/rivo/uniseg v0.4.4 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/spf13/pflag v1.0.5 // indirect github.com/tedsuo/rata v1.0.1-0.20170830210128-07d200713958 // indirect github.com/vito/go-interact v1.0.0 // indirect golang.org/x/crypto v0.18.0 // indirect golang.org/x/net v0.20.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/term v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.5.0 // indirect - google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240108191215-35c7eff3a6b1 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect google.golang.org/grpc v1.60.1 // indirect google.golang.org/protobuf v1.32.0 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/apimachinery v0.29.0 // indirect - k8s.io/client-go v0.29.0 // indirect - k8s.io/klog/v2 v2.110.1 // indirect - k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 6d856a9..1560f11 100644 --- a/go.sum +++ b/go.sum @@ -34,18 +34,16 @@ code.cloudfoundry.org/bytefmt v0.0.0-20231017140541-3b893ed0421b h1:/2OEIBwZAaJ8 code.cloudfoundry.org/bytefmt v0.0.0-20231017140541-3b893ed0421b/go.mod h1:CKNYSQxmKcMCNIKoRG5rRR4AIgJMIoK65ya+Z5xHnk4= code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6 h1:Yc9r1p21kEpni9WlG4mwOZw87TB2QlyS9sAEebZ3+ak= code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6/go.mod h1:u5FovqC5GGAEbFPz+IdjycDA+gIjhUwqxnu0vbHwVeM= -code.cloudfoundry.org/cli v0.0.0-20220602204915-eda2b7b2321c h1:EaIB5O4kD7qFRuueRxotGws5ZizriECglGyveM1ZDKM= -code.cloudfoundry.org/cli v0.0.0-20220602204915-eda2b7b2321c/go.mod h1:vS0rCfoWEgSCHPhwfJ3C//uVe3GDrfLrY4wEBGUqh4o= +code.cloudfoundry.org/cli v7.1.0+incompatible h1:1Zn3I+epQBaBvnZAaTudCQQ0WdqcWtjtjEV9MBZP08Y= +code.cloudfoundry.org/cli v7.1.0+incompatible/go.mod h1:e4d+EpbwevNhyTZKybrLlyTvpH+W22vMsmdmcTxs/Fo= code.cloudfoundry.org/cli-plugin-repo v0.0.0-20230525012251-b9c89116786e h1:S3mdVd/uTwYYtrf5j9feucRuTqb05SsO5D1H2Mj09ao= code.cloudfoundry.org/cli-plugin-repo v0.0.0-20230525012251-b9c89116786e/go.mod h1:R1EiyOAr7lW0l/YkZNqItUNZ01Q/dYUfbTn4X4Z+82M= -code.cloudfoundry.org/clock v1.1.0 h1:XLzC6W3Ah/Y7ht1rmZ6+QfPdt1iGWEAAtIZXgiaj57c= -code.cloudfoundry.org/clock v1.1.0/go.mod h1:yA3fxddT9RINQL2XHS7PS+OXxKCGhfrZmlNUCIM6AKo= -code.cloudfoundry.org/diego-ssh v0.0.0-20170109142818-18cdb3586e7f h1:xDSTgaS6b/AkaBqvyEYfu6i1Z+y8JSCHAd/e1HGqyF4= -code.cloudfoundry.org/diego-ssh v0.0.0-20170109142818-18cdb3586e7f/go.mod h1:L2/glHnSK+wKnsG8oZZqdV2sgYY9NDo/I1aDJGhcWaM= code.cloudfoundry.org/go-diodes v0.0.0-20180905200951-72629b5276e3/go.mod h1:Jzi+ccHgo/V/PLQUaQ6hnZcC1c4BS790gx21LRRui4g= code.cloudfoundry.org/go-envstruct v1.5.0/go.mod h1:E2S/gzRZpZ51PZnIv7Bo7QvcgH18yio19upkrRk0xLU= code.cloudfoundry.org/go-log-cache v1.0.1-0.20211011162012-ede82a99d3cc h1:8gj5Z08i9ZvoIGi1A/E2CEQTbvJjogYQgBQUI2/DyNE= code.cloudfoundry.org/go-log-cache v1.0.1-0.20211011162012-ede82a99d3cc/go.mod h1:8thG6lrstlbeI44hc7QgSnX8eau68+mNt9Pp33/TEcg= +code.cloudfoundry.org/go-loggregator v7.4.0+incompatible h1:KqZYloMQWM5Zg/BQKunOIA4OODh7djZbk48qqbowNFI= +code.cloudfoundry.org/go-loggregator v7.4.0+incompatible/go.mod h1:KPBTRqj+y738Nhf1+g4JHFaBU8j7dedirR5ETNHvMXU= code.cloudfoundry.org/go-loggregator/v8 v8.0.2-0.20200722201844-b5130958b65d/go.mod h1:Or3cWTXwK6d3caPRBTUJv/suT+47jOltB7hYC/3ECCo= code.cloudfoundry.org/go-loggregator/v8 v8.0.5 h1:p1rrGxTwUqLjlUVtbjTAvKOSGNmPuBja8LeQOQgRrBc= code.cloudfoundry.org/go-loggregator/v8 v8.0.5/go.mod h1:mLlJ1ZyG6gVvBEtYypvbztRvFeCtBsTxE9tt+85tS6Y= @@ -53,8 +51,7 @@ code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTg code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= code.cloudfoundry.org/jsonry v1.1.4 h1:P9N7IlH1/4aRCLcXLgLFj1hkcBmV7muijJzY+K6U4hE= code.cloudfoundry.org/jsonry v1.1.4/go.mod h1:6aKilShQP7w/Ez76h1El2/n9y2OkHuU56nKSBB9Gp0A= -code.cloudfoundry.org/lager v1.1.1-0.20191008172124-a9afc05ee5be h1:rnGRgbKlOPKbI9N/PscJ78Ug5Iw+o1kE7aDW01V+0FM= -code.cloudfoundry.org/lager v1.1.1-0.20191008172124-a9afc05ee5be/go.mod h1:O2sS7gKP3HM2iemG+EnwvyNQK7pTSC6Foi4QiMp9sSk= +code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a h1:8rqv2w8xEceNwckcF5ONeRt0qBHlh5bnNfFnYTrZbxs= code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= code.cloudfoundry.org/tlsconfig v0.0.0-20200131000646-bbe0f8da39b3/go.mod h1:eTbFJpyXRGuFVyg5+oaj9B2eIbIc+0/kZjH8ftbtdew= code.cloudfoundry.org/tlsconfig v0.0.0-20231017135636-f0e44068c22f h1:5OUq3fp3kg9ztdzVX7V7SvSZ06rKWhG3CybVmXsj8O8= @@ -102,15 +99,12 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= github.com/cppforlife/go-patch v0.2.0 h1:Y14MnCQjDlbw7WXT4k+u6DPAA9XnygN4BfrSpI/19RU= github.com/cppforlife/go-patch v0.2.0/go.mod h1:67a7aIi94FHDZdoeGSJRRFDp66l9MhaAG1yGxpUoFD8= -github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -120,28 +114,18 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -174,8 +158,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -187,14 +169,10 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -209,8 +187,6 @@ github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 h1:dHLYa5D8/Ta0aLR2Xc github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -223,33 +199,25 @@ github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jessevdk/go-flags v0.0.0-20170926144705-f88afde2fa19/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/loggregator/go-bindata v0.0.0-20190422223605-5f11cfb2d7d9/go.mod h1:PvsJfK9t/8OdGvSanpYlwJ1EPoJ/hwT3c52txAzqooY= github.com/lunixbochs/vtclean v1.0.0 h1:xu2sLAri4lGiovBDQKxl5mrXyESr3gUr5m5SM5+LVb8= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -261,13 +229,6 @@ github.com/moby/moby v20.10.22+incompatible h1:KHnFMlxjgGizH7+3fQj8+PjmrwEnilKga github.com/moby/moby v20.10.22+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -295,6 +256,7 @@ github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9 github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -306,6 +268,7 @@ github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 h1:G04eS0JkAIVZfaJLjla9dNxkJCPiKIGZlw9AfOhzOD0= @@ -313,13 +276,10 @@ github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94/go.mod h1:b1 github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/square/certstrap v1.2.0/go.mod h1:CUHqV+fxJW0Y5UQFnnbYwQ7bpKXO1AKbic9g73799yw= github.com/square/certstrap v1.3.0 h1:N9P0ZRA+DjT8pq5fGDj0z3FjafRKnBDypP0QHpMlaAk= github.com/square/certstrap v1.3.0/go.mod h1:wGZo9eE1B7WX2GKBn0htJ+B3OuRl2UsdCFySNooy9hU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -337,7 +297,6 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -390,7 +349,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180418062111-d41e8174641f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -428,7 +386,6 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -437,8 +394,6 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -449,7 +404,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180419222023-a2a45943ae67/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -495,11 +449,8 @@ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -514,14 +465,11 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -560,16 +508,13 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -598,8 +543,6 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -678,8 +621,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20171116090243-287cf08546ab/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -687,7 +628,6 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -702,25 +642,7 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.4.0-0.dev/go.mod h1:vlRD9XErLMGT+mDuofSr0mMMquscM/1nQqtRSsh6m70= -k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= -k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= -k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= -k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= -k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= -k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instance_crashed_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instance_crashed_error.go new file mode 100644 index 0000000..d49ddd4 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instance_crashed_error.go @@ -0,0 +1,12 @@ +package actionerror + +import "fmt" + +// ApplicationInstanceCrashedError is returned when an instance crashes. +type ApplicationInstanceCrashedError struct { + Name string +} + +func (e ApplicationInstanceCrashedError) Error() string { + return fmt.Sprintf("Application '%s' crashed", e.Name) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instance_flapping_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instance_flapping_error.go new file mode 100644 index 0000000..516a09a --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instance_flapping_error.go @@ -0,0 +1,12 @@ +package actionerror + +import "fmt" + +// ApplicationInstanceFlappingError is returned when an instance crashes. +type ApplicationInstanceFlappingError struct { + Name string +} + +func (e ApplicationInstanceFlappingError) Error() string { + return fmt.Sprintf("Application '%s' crashed", e.Name) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instances_not_found_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instances_not_found_error.go new file mode 100644 index 0000000..a78d9af --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/application_instances_not_found_error.go @@ -0,0 +1,13 @@ +package actionerror + +import "fmt" + +// ApplicationInstancesNotFoundError is returned when the application does not +// have running instances. +type ApplicationInstancesNotFoundError struct { + ApplicationGUID string +} + +func (e ApplicationInstancesNotFoundError) Error() string { + return fmt.Sprintf("Application instances '%s' not found.", e.ApplicationGUID) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/buildpack_invalid_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/buildpack_invalid_error.go new file mode 100644 index 0000000..42782e4 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/buildpack_invalid_error.go @@ -0,0 +1,9 @@ +package actionerror + +type BuildpackInvalidError struct { + Message string +} + +func (e BuildpackInvalidError) Error() string { + return e.Message +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/missing_space_name_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/missing_space_name_error.go new file mode 100644 index 0000000..f52dc8c --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/missing_space_name_error.go @@ -0,0 +1,7 @@ +package actionerror + +type MissingSecurityGroupArgsError struct{} + +func (MissingSecurityGroupArgsError) Error() string { + return "Incorrect Usage: the required arguments `SECURITY_GROUP`, `ORG`, and `SPACE` were not provided" +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_organization_quotas_found_for_name_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_organization_quotas_found_for_name_error.go new file mode 100644 index 0000000..22ee333 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_organization_quotas_found_for_name_error.go @@ -0,0 +1,15 @@ +package actionerror + +import ( + "fmt" + "strings" +) + +type MultipleOrganizationQuotasFoundForNameError struct { + Name string + GUIDs []string +} + +func (e MultipleOrganizationQuotasFoundForNameError) Error() string { + return fmt.Sprintf("Organization quota name '%s' references multiple quotas. GUIDs: '%s'", e.Name, strings.Join(e.GUIDs, ", ")) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_organizations_found_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_organizations_found_error.go new file mode 100644 index 0000000..dc6a6d9 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_organizations_found_error.go @@ -0,0 +1,19 @@ +package actionerror + +import ( + "fmt" + "strings" +) + +// MultipleOrganizationsFoundError represents the scenario when the cloud +// controller returns multiple organizations when filtering by name. This is a +// far out edge case and should not happen. +type MultipleOrganizationsFoundError struct { + Name string + GUIDs []string +} + +func (e MultipleOrganizationsFoundError) Error() string { + guids := strings.Join(e.GUIDs, ", ") + return fmt.Sprintf("Organization name '%s' matches multiple GUIDs: %s", e.Name, guids) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_spaces_found_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_spaces_found_error.go new file mode 100644 index 0000000..d32bac8 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/multiple_spaces_found_error.go @@ -0,0 +1,15 @@ +package actionerror + +import "fmt" + +// MultipleSpacesFoundError represents the scenario when the cloud +// controller returns multiple spaces when filtering by name. This is a +// far out edge case and should not happen. +type MultipleSpacesFoundError struct { + Name string + OrgGUID string +} + +func (e MultipleSpacesFoundError) Error() string { + return fmt.Sprintf("Multiple spaces found matching organization GUID '%s' and name '%s'", e.OrgGUID, e.Name) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/noaa_timeout_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/noaa_timeout_error.go new file mode 100644 index 0000000..f5dff40 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/noaa_timeout_error.go @@ -0,0 +1,7 @@ +package actionerror + +type NOAATimeoutError struct{} + +func (NOAATimeoutError) Error() string { + return "Timeout trying to connect to NOAA" +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/organization_name_taken_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/organization_name_taken_error.go new file mode 100644 index 0000000..35f7fd6 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/organization_name_taken_error.go @@ -0,0 +1,13 @@ +package actionerror + +import "fmt" + +// OrganizationNameTakenError represents the error that occurs when creating +// an organization fails because an organization with that name already exists +type OrganizationNameTakenError struct { + Name string +} + +func (e OrganizationNameTakenError) Error() string { + return fmt.Sprintf("Organization '%s' already exists.", e.Name) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/orphaned_routes_not_found_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/orphaned_routes_not_found_error.go new file mode 100644 index 0000000..2066718 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/orphaned_routes_not_found_error.go @@ -0,0 +1,10 @@ +package actionerror + +// OrphanedRoutesNotFoundError is an error wrapper that represents the case +// when no orphaned routes are found. +type OrphanedRoutesNotFoundError struct{} + +// Error method to display the error message. +func (OrphanedRoutesNotFoundError) Error() string { + return "No orphaned routes were found." +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/port_not_provided_for_query_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/port_not_provided_for_query_error.go new file mode 100644 index 0000000..24e9b0c --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/port_not_provided_for_query_error.go @@ -0,0 +1,9 @@ +package actionerror + +type PortNotProvidedForQueryError struct { +} + +// PortNotProvidedForQueryError is returned when trying to GetRouteByComponents, querying by a tcp domain, but omitting a port +func (PortNotProvidedForQueryError) Error() string { + return "Ambiguous TCP Route lookup. Port must be set with TCP domains." +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/resource_already_exists_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/resource_already_exists_error.go deleted file mode 100644 index beaf695..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/resource_already_exists_error.go +++ /dev/null @@ -1,10 +0,0 @@ -package actionerror - -// ResourceAlreadyExistsError is returned when an identical resource already exists -type ResourceAlreadyExistsError struct { - Message string -} - -func (e ResourceAlreadyExistsError) Error() string { - return e.Message -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/revision_ambiguous.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/revision_ambiguous.go deleted file mode 100644 index 6e9c3ad..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/revision_ambiguous.go +++ /dev/null @@ -1,13 +0,0 @@ -package actionerror - -import "fmt" - -// RevisionAmbiguousError is returned when multiple revisions with the same -// version are returned -type RevisionAmbiguousError struct { - Version int -} - -func (e RevisionAmbiguousError) Error() string { - return fmt.Sprintf("More than one revision '%d' found", e.Version) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/revision_not_found.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/revision_not_found.go deleted file mode 100644 index c1a8a0d..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/revision_not_found.go +++ /dev/null @@ -1,13 +0,0 @@ -package actionerror - -import "fmt" - -// RevisionNotFoundError is returned when a requested revision is not -// found. -type RevisionNotFoundError struct { - Version int -} - -func (e RevisionNotFoundError) Error() string { - return fmt.Sprintf("Revision '%d' not found", e.Version) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_binding_not_found_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_binding_not_found_error.go deleted file mode 100644 index 92203f0..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_binding_not_found_error.go +++ /dev/null @@ -1,7 +0,0 @@ -package actionerror - -type RouteBindingNotFoundError struct{} - -func (e RouteBindingNotFoundError) Error() string { - return "Route binding not found." -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_bound_to_multiple_apps_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_bound_to_multiple_apps_error.go index d3f0689..318351f 100644 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_bound_to_multiple_apps_error.go +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_bound_to_multiple_apps_error.go @@ -2,7 +2,7 @@ package actionerror import "fmt" -// RouteBoundToMultipleAppsError is returned when a route is mapped to more than one app +// RouteNotFoundError is returned when a route cannot be found type RouteBoundToMultipleAppsError struct { AppName string RouteURL string diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_not_found_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_not_found_error.go index 94f40a0..48dd1dc 100644 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_not_found_error.go +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/route_not_found_error.go @@ -5,23 +5,29 @@ import "fmt" // RouteNotFoundError is returned when a route cannot be found type RouteNotFoundError struct { Host string + DomainGUID string DomainName string Path string Port int } func (e RouteNotFoundError) Error() string { - switch e.Port { - case 0: - return fmt.Sprintf("Route with host '%s', domain '%s', and path '%s' not found.", e.Host, e.DomainName, e.path()) - default: - return fmt.Sprintf("Route with domain '%s' and port %d not found.", e.DomainName, e.Port) + if e.DomainName != "" { + switch { + case e.Host != "" && e.Path != "": + return fmt.Sprintf("Route with host '%s', domain '%s', and path '%s' not found.", e.Host, e.DomainName, e.Path) + case e.Host != "": + return fmt.Sprintf("Route with host '%s' and domain '%s' not found.", e.Host, e.DomainName) + case e.Path != "": + return fmt.Sprintf("Route with domain '%s' and path '%s' not found.", e.DomainName, e.Path) + case e.Port != 0: + return fmt.Sprintf("Route with domain '%s' and port %d not found.", e.DomainName, e.Port) + default: + return fmt.Sprintf("Route with domain '%s' not found.", e.DomainName) + } } -} - -func (e RouteNotFoundError) path() string { - if e.Path == "" { - return "/" + if e.Path != "" { + return fmt.Sprintf("Route with host '%s', domain guid '%s', and path '%s' not found.", e.Host, e.DomainGUID, e.Path) } - return e.Path + return fmt.Sprintf("Route with host '%s' and domain guid '%s' not found.", e.Host, e.DomainGUID) } diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/security_group_not_bound_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/security_group_not_bound_error.go new file mode 100644 index 0000000..3be7b2c --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/security_group_not_bound_error.go @@ -0,0 +1,18 @@ +package actionerror + +import ( + "fmt" + + "code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant" +) + +// SecurityGroupNotBoundError is returned when a requested security group is +// not bound in the requested lifecycle phase to the requested space. +type SecurityGroupNotBoundError struct { + Lifecycle constant.SecurityGroupLifecycle + Name string +} + +func (e SecurityGroupNotBoundError) Error() string { + return fmt.Sprintf("Security group %s not bound to this space for lifecycle phase %s.", e.Name, e.Lifecycle) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_and_broker_combination_not_found_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_and_broker_combination_not_found_error.go new file mode 100644 index 0000000..156223c --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_and_broker_combination_not_found_error.go @@ -0,0 +1,12 @@ +package actionerror + +import "fmt" + +type ServiceAndBrokerCombinationNotFoundError struct { + BrokerName string + ServiceName string +} + +func (e ServiceAndBrokerCombinationNotFoundError) Error() string { + return fmt.Sprintf("Service '%s' provided by service broker '%s' not found.\n", e.ServiceName, e.BrokerName) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_broker_name_required_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_broker_name_required_error.go deleted file mode 100644 index 07ff885..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_broker_name_required_error.go +++ /dev/null @@ -1,16 +0,0 @@ -package actionerror - -import ( - "fmt" -) - -type ServiceBrokerNameRequiredError struct { - ServiceOfferingName string -} - -func (e ServiceBrokerNameRequiredError) Error() string { - return fmt.Sprintf( - "Service offering '%s' is provided by multiple service brokers. Specify a broker name by using the '-b' flag.", - e.ServiceOfferingName, - ) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_already_shared_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_already_shared_error.go new file mode 100644 index 0000000..da275ec --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_already_shared_error.go @@ -0,0 +1,10 @@ +package actionerror + +// ServiceInstanceAlreadySharedError is returned when attempting to shared a +// service instance to a space in which the service instance has already been +// shared with. +type ServiceInstanceAlreadySharedError struct{} + +func (e ServiceInstanceAlreadySharedError) Error() string { + return "The service instance has already been shared with this space" +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_params_fetching_not_supported_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_params_fetching_not_supported_error.go deleted file mode 100644 index bf15682..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_params_fetching_not_supported_error.go +++ /dev/null @@ -1,11 +0,0 @@ -package actionerror - -// ServiceInstanceParamsFetchingNotSupportedError is returned when -// service instance is user provided or -// service instance retrievable is false for a managed service instance -type ServiceInstanceParamsFetchingNotSupportedError struct { -} - -func (e ServiceInstanceParamsFetchingNotSupportedError) Error() string { - return "This service does not support fetching service instance parameters." -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_type_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_type_error.go deleted file mode 100644 index 9021fcd..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_type_error.go +++ /dev/null @@ -1,16 +0,0 @@ -package actionerror - -import ( - "fmt" - - "code.cloudfoundry.org/cli/resources" -) - -type ServiceInstanceTypeError struct { - Name string - RequiredType resources.ServiceInstanceType -} - -func (e ServiceInstanceTypeError) Error() string { - return fmt.Sprintf("The service instance '%s' is not %s", e.Name, e.RequiredType) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_update_is_noop.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_update_is_noop.go deleted file mode 100644 index 2191aac..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_instance_update_is_noop.go +++ /dev/null @@ -1,7 +0,0 @@ -package actionerror - -type ServiceInstanceUpdateIsNoop struct{} - -func (ServiceInstanceUpdateIsNoop) Error() string { - return "ServiceInstanceUpdateIsNoop" -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_key_not_found_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_key_not_found_error.go deleted file mode 100644 index 870ea65..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_key_not_found_error.go +++ /dev/null @@ -1,19 +0,0 @@ -package actionerror - -import "fmt" - -type ServiceKeyNotFoundError struct { - KeyName string - ServiceInstanceName string -} - -func NewServiceKeyNotFoundError(keyName, serviceInstanceName string) error { - return ServiceKeyNotFoundError{ - KeyName: keyName, - ServiceInstanceName: serviceInstanceName, - } -} - -func (e ServiceKeyNotFoundError) Error() string { - return fmt.Sprintf("No service key %s found for service instance %s", e.KeyName, e.ServiceInstanceName) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_plan_not_found_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_plan_not_found_error.go index 34d38d0..ca7197f 100644 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_plan_not_found_error.go +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_plan_not_found_error.go @@ -3,17 +3,13 @@ package actionerror import "fmt" type ServicePlanNotFoundError struct { - PlanName string - OfferingName string - ServiceBrokerName string + PlanName string + OfferingName string } func (e ServicePlanNotFoundError) Error() string { if e.OfferingName != "" && e.PlanName != "" { - if e.ServiceBrokerName != "" { - return fmt.Sprintf("The plan %s could not be found for service offering %s and broker %s.", e.PlanName, e.OfferingName, e.ServiceBrokerName) - } - return fmt.Sprintf("The plan %s could not be found for service offering %s.", e.PlanName, e.OfferingName) + return fmt.Sprintf("The plan %s could not be found for service %s.", e.PlanName, e.OfferingName) } if e.PlanName != "" { diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_upgrade_not_available_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_upgrade_not_available_error.go index 2fa641a..1382102 100644 --- a/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_upgrade_not_available_error.go +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/service_upgrade_not_available_error.go @@ -1,10 +1,10 @@ package actionerror -// ServiceInstanceUpgradeNotAvailableError is returned when attempting to upgrade a single service instance, +// ServiceUpgradeNotAvailableError is returned when attempting to upgrade a single service instance, // but there is no upgrade available on the current service plan, i.e., service instance is already // up-to-date. -type ServiceInstanceUpgradeNotAvailableError struct{} +type ServiceUpgradeNotAvailableError struct{} -func (e ServiceInstanceUpgradeNotAvailableError) Error() string { +func (e ServiceUpgradeNotAvailableError) Error() string { return "No upgrade is available." } diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/space_name_taken_error.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/space_name_taken_error.go new file mode 100644 index 0000000..44fb22a --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/space_name_taken_error.go @@ -0,0 +1,11 @@ +package actionerror + +import "fmt" + +type SpaceNameTakenError struct { + Name string +} + +func (err SpaceNameTakenError) Error() string { + return fmt.Sprintf("A space with the name '%s' already exists", err.Name) +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/actionerror/tcp_lookup_without_port.go b/vendor/code.cloudfoundry.org/cli/actor/actionerror/tcp_lookup_without_port.go new file mode 100644 index 0000000..0575f4f --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/actor/actionerror/tcp_lookup_without_port.go @@ -0,0 +1,8 @@ +package actionerror + +type TCPLookupWithoutPort struct { +} + +func (TCPLookupWithoutPort) Error() string { + return "TCP route lookup must include a port" +} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/actor.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/actor.go deleted file mode 100644 index 11f7c31..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/actor.go +++ /dev/null @@ -1,26 +0,0 @@ -// Package sharedaction handles all operations that do not require a cloud -// controller -package sharedaction - -type AuthActor interface { - IsLoggedIn() bool -} - -// Actor handles all shared actions -type Actor struct { - Config Config - AuthActor -} - -// NewActor returns an Actor with default settings -func NewActor(config Config) *Actor { - var authActor AuthActor = NewDefaultAuthActor(config) - if config.IsCFOnK8s() { - authActor = NewK8sAuthActor(config) - } - - return &Actor{ - AuthActor: authActor, - Config: config, - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/auth.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/auth.go deleted file mode 100644 index f7f5910..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/auth.go +++ /dev/null @@ -1,31 +0,0 @@ -package sharedaction - -type DefaultAuthActor struct { - config Config -} - -func NewDefaultAuthActor(config Config) DefaultAuthActor { - return DefaultAuthActor{ - config: config, - } -} - -func (a DefaultAuthActor) IsLoggedIn() bool { - return a.config.AccessToken() != "" || a.config.RefreshToken() != "" -} - -type K8sAuthActor struct { - config Config -} - -func NewK8sAuthActor(config Config) K8sAuthActor { - return K8sAuthActor{ - config: config, - } -} - -func (a K8sAuthActor) IsLoggedIn() bool { - name, err := a.config.CurrentUserName() - - return err == nil && name != "" -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/check_target.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/check_target.go deleted file mode 100644 index 5621e84..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/check_target.go +++ /dev/null @@ -1,51 +0,0 @@ -package sharedaction - -import "code.cloudfoundry.org/cli/actor/actionerror" - -// CheckTarget confirms that the user is logged in. Optionally it will also -// check if an organization and space are targeted. -func (actor Actor) CheckTarget(targetedOrganizationRequired bool, targetedSpaceRequired bool) error { - if !actor.IsLoggedIn() { - return actionerror.NotLoggedInError{ - BinaryName: actor.Config.BinaryName(), - } - } - - if targetedOrganizationRequired { - if !actor.IsOrgTargeted() { - return actionerror.NoOrganizationTargetedError{ - BinaryName: actor.Config.BinaryName(), - } - } - - if targetedSpaceRequired { - if !actor.IsSpaceTargeted() { - return actionerror.NoSpaceTargetedError{ - BinaryName: actor.Config.BinaryName(), - } - } - } - } - - return nil -} - -func (actor Actor) RequireCurrentUser() (string, error) { - if !actor.IsLoggedIn() { - return "", actionerror.NotLoggedInError{ - BinaryName: actor.Config.BinaryName(), - } - } - - return actor.Config.CurrentUserName() -} - -func (actor Actor) RequireTargetedOrg() (string, error) { - if !actor.IsOrgTargeted() { - return "", actionerror.NoOrganizationTargetedError{ - BinaryName: actor.Config.BinaryName(), - } - } - - return actor.Config.TargetedOrganizationName(), nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/config.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/config.go deleted file mode 100644 index 32be6d2..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/config.go +++ /dev/null @@ -1,16 +0,0 @@ -package sharedaction - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Config - -// Config a way of getting basic CF configuration -type Config interface { - AccessToken() string - BinaryName() string - CurrentUserName() (string, error) - HasTargetedOrganization() bool - HasTargetedSpace() bool - IsCFOnK8s() bool - RefreshToken() string - TargetedOrganizationName() string - Verbose() (bool, []string) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/fix_mode_unix.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/fix_mode_unix.go deleted file mode 100644 index 680fe4c..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/fix_mode_unix.go +++ /dev/null @@ -1,12 +0,0 @@ -//go:build !windows -// +build !windows - -package sharedaction - -import "os" - -// fixMode is unnecessary on UNIX systems, see windows version for more -// details. -func fixMode(mode os.FileMode) os.FileMode { - return mode -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/fix_mode_windows.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/fix_mode_windows.go deleted file mode 100644 index 2e726c7..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/fix_mode_windows.go +++ /dev/null @@ -1,12 +0,0 @@ -//go:build windows -// +build windows - -package sharedaction - -import "os" - -// fixMode forces all files on windows to be executable because by default -// everything on windows is read/write only. Even executable files. -func fixMode(mode os.FileMode) os.FileMode { - return mode | 0700 -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/help.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/help.go deleted file mode 100644 index a1120cd..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/help.go +++ /dev/null @@ -1,200 +0,0 @@ -package sharedaction - -import ( - "reflect" - "sort" - "strings" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/util/sorting" -) - -const ( - CommonCommandsIndent string = " " - AllCommandsIndent string = " " - CommandIndent string = " " -) - -// CommandInfo contains the help details of a command -type CommandInfo struct { - // Name is the command name - Name string - - // Description is the command description - Description string - - // Alias is the command alias - Alias string - - // Usage is the command usage string - Usage string - - // Examples is the command examples string - Examples string - - // Resources is the types of object that the command applies to - Resources string - - // RelatedCommands is a list of commands related to the command - RelatedCommands []string - - // Flags contains the list of flags for this command - Flags []CommandFlag - - // Environment is a list of environment variables specific for this command - Environment []EnvironmentVariable -} - -// CommandFlag contains the help details of a command's flag -type CommandFlag struct { - // Short is the short form of the flag - Short string - - // Long is the long form of the flag - Long string - - // Description is the description of the flag - Description string - - // Default is the flag's default value - Default string -} - -// EnvironmentVariable contains env vars specific for this command -type EnvironmentVariable struct { - Name string - Description string - DefaultValue string -} - -// HasUsage is an interface that commands may implement if they want to define their usage -// text in a Usage() method, which gives them more flexibility than a struct tag. -type HasUsage interface { - Usage() string -} - -// HasExamples is an interface that commands may implement if they want to define their examples -// text in a Examples() method, which gives them more flexibility than a struct tag. -type HasExamples interface { - Examples() string -} - -// HasResources is an interface that commands may implement if they want to define their resources -// text in a Resources() method, which gives them more flexibility than a struct tag. -type HasResources interface { - Resources() string -} - -// CommandInfoByName returns the help information for a particular commandName in -// the commandList. -func (Actor) CommandInfoByName(commandList interface{}, commandName string) (CommandInfo, error) { - field, found := reflect.TypeOf(commandList).FieldByNameFunc( - func(fieldName string) bool { - field, _ := reflect.TypeOf(commandList).FieldByName(fieldName) - return field.Tag.Get("command") == commandName || field.Tag.Get("alias") == commandName - }, - ) - - if !found { - return CommandInfo{}, actionerror.InvalidCommandError{CommandName: commandName} - } - - tag := field.Tag - cmd := CommandInfo{ - Name: tag.Get("command"), - Description: tag.Get("description"), - Alias: tag.Get("alias"), - Flags: []CommandFlag{}, - Environment: []EnvironmentVariable{}, - } - - fieldValue := reflect.ValueOf(commandList).FieldByIndex(field.Index) - - if commandWithUsage, hasUsage := fieldValue.Interface().(HasUsage); hasUsage { - cmd.Usage = strings.ReplaceAll( - strings.TrimSpace(commandWithUsage.Usage()), - "\n", - "\n"+CommandIndent, - ) - } - - if commandWithExamples, hasExamples := fieldValue.Interface().(HasExamples); hasExamples { - cmd.Examples = strings.ReplaceAll( - strings.TrimSpace(commandWithExamples.Examples()), - "\n", - "\n"+CommandIndent, - ) - } - - if commandWithResources, hasResources := fieldValue.Interface().(HasResources); hasResources { - cmd.Resources = strings.ReplaceAll( - strings.TrimSpace(commandWithResources.Resources()), - "\n", - "\n"+CommandIndent, - ) - } - - command := field.Type - for i := 0; i < command.NumField(); i++ { - fieldTag := command.Field(i).Tag - - if fieldTag.Get("hidden") != "" { - continue - } - - if cmd.Usage == "" && fieldTag.Get("usage") != "" { - cmd.Usage = fieldTag.Get("usage") - continue - } - - if cmd.Examples == "" && fieldTag.Get("examples") != "" { - cmd.Examples = fieldTag.Get("examples") - continue - } - - if fieldTag.Get("related_commands") != "" { - relatedCommands := strings.Split(fieldTag.Get("related_commands"), ", ") - sort.Slice(relatedCommands, sorting.SortAlphabeticFunc(relatedCommands)) - cmd.RelatedCommands = relatedCommands - continue - } - - if fieldTag.Get("description") != "" { - cmd.Flags = append(cmd.Flags, CommandFlag{ - Short: fieldTag.Get("short"), - Long: fieldTag.Get("long"), - Description: fieldTag.Get("description"), - Default: fieldTag.Get("default"), - }) - } - - if fieldTag.Get("environmentName") != "" { - cmd.Environment = append(cmd.Environment, EnvironmentVariable{ - Name: fieldTag.Get("environmentName"), - DefaultValue: fieldTag.Get("environmentDefault"), - Description: fieldTag.Get("environmentDescription"), - }) - } - } - - return cmd, nil -} - -// CommandInfos returns a slice of CommandInfo that only fills in -// the Name and Description for all the commands in commandList -func (Actor) CommandInfos(commandList interface{}) map[string]CommandInfo { - handler := reflect.TypeOf(commandList) - - infos := make(map[string]CommandInfo, handler.NumField()) - for i := 0; i < handler.NumField(); i++ { - fieldTag := handler.Field(i).Tag - commandName := fieldTag.Get("command") - infos[commandName] = CommandInfo{ - Name: commandName, - Description: fieldTag.Get("description"), - Alias: fieldTag.Get("alias"), - } - } - - return infos -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/is_org_targeted.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/is_org_targeted.go deleted file mode 100644 index b9a317b..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/is_org_targeted.go +++ /dev/null @@ -1,6 +0,0 @@ -package sharedaction - -// IsOrgTargeted determines whether an org is being targeted by the CLI -func (actor Actor) IsOrgTargeted() bool { - return actor.Config.HasTargetedOrganization() -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/is_space_targeted.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/is_space_targeted.go deleted file mode 100644 index 80a45ba..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/is_space_targeted.go +++ /dev/null @@ -1,6 +0,0 @@ -package sharedaction - -// IsSpaceTargeted determines whether a space is being targeted by the CLI -func (actor Actor) IsSpaceTargeted() bool { - return actor.Config.HasTargetedSpace() -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/log_cache_client.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/log_cache_client.go deleted file mode 100644 index ed3403a..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/log_cache_client.go +++ /dev/null @@ -1,21 +0,0 @@ -package sharedaction - -import ( - "context" - "time" - - logcache "code.cloudfoundry.org/go-log-cache" - "code.cloudfoundry.org/go-loggregator/v8/rpc/loggregator_v2" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . LogCacheClient - -// LogCacheClient is a client for getting logs. -type LogCacheClient interface { - Read( - ctx context.Context, - sourceID string, - start time.Time, - opts ...logcache.ReadOption, - ) ([]*loggregator_v2.Envelope, error) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/logging.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/logging.go deleted file mode 100644 index 8207676..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/logging.go +++ /dev/null @@ -1,261 +0,0 @@ -package sharedaction - -import ( - "context" - "errors" - "fmt" - "log" - "strings" - "time" - - logcache "code.cloudfoundry.org/go-log-cache" - "code.cloudfoundry.org/go-log-cache/rpc/logcache_v1" - "code.cloudfoundry.org/go-loggregator/v8/rpc/loggregator_v2" - "github.com/sirupsen/logrus" -) - -const ( - StagingLog = "STG" - RecentLogsLines = 1000 - - retryCount = 5 - retryInterval = time.Millisecond * 250 -) - -type LogMessage struct { - message string - messageType string - timestamp time.Time - sourceType string - sourceInstance string -} - -func (log LogMessage) Message() string { - return log.message -} - -func (log LogMessage) Type() string { - return log.messageType -} - -func (log LogMessage) Staging() bool { - return log.sourceType == StagingLog -} - -func (log LogMessage) Timestamp() time.Time { - return log.timestamp -} - -func (log LogMessage) SourceType() string { - return log.sourceType -} - -func (log LogMessage) SourceInstance() string { - return log.sourceInstance -} - -func NewLogMessage(message string, messageType string, timestamp time.Time, sourceType string, sourceInstance string) *LogMessage { - return &LogMessage{ - message: message, - messageType: messageType, - timestamp: timestamp, - sourceType: sourceType, - sourceInstance: sourceInstance, - } -} - -type LogMessages []*LogMessage - -func (lm LogMessages) Len() int { return len(lm) } - -func (lm LogMessages) Less(i, j int) bool { - return lm[i].timestamp.Before(lm[j].timestamp) -} - -func (lm LogMessages) Swap(i, j int) { - lm[i], lm[j] = lm[j], lm[i] -} - -type channelWriter struct { - errChannel chan error -} - -func (c channelWriter) Write(bytes []byte) (n int, err error) { - c.errChannel <- errors.New(strings.Trim(string(bytes), "\n")) - - return len(bytes), nil -} - -// cliRetryBackoff returns true for OnErr after sleeping the given interval for a limited number of times, -// and returns true for OnEmpty always. -// Basically: retry x times on connection failures, and wait forever for logs to show up. -type cliRetryBackoff struct { - interval time.Duration - maxCount int - count int -} - -func newCliRetryBackoff(interval time.Duration, maxCount int) *cliRetryBackoff { - return &cliRetryBackoff{ - interval: interval, - maxCount: maxCount, - } -} - -func (b *cliRetryBackoff) OnErr(error) bool { - b.count++ - if b.count >= b.maxCount { - return false - } - - time.Sleep(b.interval) - return true -} - -func (b *cliRetryBackoff) OnEmpty() bool { - time.Sleep(b.interval) - return true -} - -func (b *cliRetryBackoff) Reset() { - b.count = 0 -} - -func GetStreamingLogs(appGUID string, client LogCacheClient) (<-chan LogMessage, <-chan error, context.CancelFunc) { - - logrus.Info("Start Tailing Logs") - - outgoingLogStream := make(chan LogMessage, 1000) - outgoingErrStream := make(chan error, 1000) - ctx, cancelFunc := context.WithCancel(context.Background()) - go func() { - defer close(outgoingLogStream) - defer close(outgoingErrStream) - - ts := latestEnvelopeTimestamp(client, outgoingErrStream, ctx, appGUID) - - // if the context was cancelled we may not have seen an envelope - if ts.IsZero() { - return - } - - const offset = 1 * time.Second - walkStartTime := ts.Add(-offset) - - logcache.Walk( - ctx, - appGUID, - logcache.Visitor(func(envelopes []*loggregator_v2.Envelope) bool { - logMessages := convertEnvelopesToLogMessages(envelopes) - for _, logMessage := range logMessages { - select { - case <-ctx.Done(): - return false - default: - outgoingLogStream <- *logMessage - } - } - return true - }), - client.Read, - logcache.WithWalkDelay(2*time.Second), - logcache.WithWalkStartTime(walkStartTime), - logcache.WithWalkEnvelopeTypes(logcache_v1.EnvelopeType_LOG), - logcache.WithWalkBackoff(newCliRetryBackoff(retryInterval, retryCount)), - logcache.WithWalkLogger(log.New(channelWriter{ - errChannel: outgoingErrStream, - }, "", 0)), - ) - }() - - return outgoingLogStream, outgoingErrStream, cancelFunc -} - -func latestEnvelopeTimestamp(client LogCacheClient, errs chan error, ctx context.Context, sourceID string) time.Time { - - // Fetching the most recent timestamp could be implemented with client.Read directly rather than using logcache.Walk - // We use Walk because we want the extra retry behavior provided through Walk - - // Wrap client.Read in our own function to allow us to specify our own read options - // https://github.com/cloudfoundry/go-log-cache/issues/27 - r := func(ctx context.Context, sourceID string, _ time.Time, opts ...logcache.ReadOption) ([]*loggregator_v2.Envelope, error) { - os := []logcache.ReadOption{ - logcache.WithLimit(1), - logcache.WithDescending(), - } - for _, o := range opts { - os = append(os, o) - } - return client.Read(ctx, sourceID, time.Time{}, os...) - } - - var timestamp time.Time - - logcache.Walk( - ctx, - sourceID, - logcache.Visitor(func(envelopes []*loggregator_v2.Envelope) bool { - timestamp = time.Unix(0, envelopes[0].Timestamp) - return false - }), - r, - logcache.WithWalkBackoff(newCliRetryBackoff(retryInterval, retryCount)), - logcache.WithWalkLogger(log.New(channelWriter{ - errChannel: errs, - }, "", 0)), - ) - - return timestamp -} - -func GetRecentLogs(appGUID string, client LogCacheClient) ([]LogMessage, error) { - logLineRequestCount := RecentLogsLines - var envelopes []*loggregator_v2.Envelope - var err error - - for logLineRequestCount >= 1 { - envelopes, err = client.Read( - context.Background(), - appGUID, - time.Time{}, - logcache.WithEnvelopeTypes(logcache_v1.EnvelopeType_LOG), - logcache.WithLimit(logLineRequestCount), - logcache.WithDescending(), - ) - if err == nil || err.Error() != "unexpected status code 429" { - break - } - logLineRequestCount /= 2 - } - if err != nil { - return nil, fmt.Errorf("Failed to retrieve logs from Log Cache: %s", err) - } - - logMessages := convertEnvelopesToLogMessages(envelopes) - var reorderedLogMessages []LogMessage - for i := len(logMessages) - 1; i >= 0; i-- { - reorderedLogMessages = append(reorderedLogMessages, *logMessages[i]) - } - - return reorderedLogMessages, nil -} - -func convertEnvelopesToLogMessages(envelopes []*loggregator_v2.Envelope) []*LogMessage { - var logMessages []*LogMessage - for _, envelope := range envelopes { - logEnvelope, ok := envelope.GetMessage().(*loggregator_v2.Envelope_Log) - if !ok { - continue - } - log := logEnvelope.Log - - logMessages = append(logMessages, NewLogMessage( - string(log.Payload), - loggregator_v2.Log_Type_name[int32(log.Type)], - time.Unix(0, envelope.GetTimestamp()), - envelope.GetTags()["source_type"], - envelope.GetInstanceId(), - )) - } - return logMessages -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/resource.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/resource.go deleted file mode 100644 index 944883b..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/resource.go +++ /dev/null @@ -1,516 +0,0 @@ -package sharedaction - -import ( - "archive/zip" - "crypto/sha1" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "strings" - - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/ykk" - ignore "github.com/sabhiram/go-gitignore" - log "github.com/sirupsen/logrus" -) - -const ( - DefaultFolderPermissions = 0755 - DefaultArchiveFilePermissions = 0744 - MaxResourceMatchChunkSize = 1000 -) - -var DefaultIgnoreLines = []string{ - ".cfignore", - ".DS_Store", - ".git", - ".gitignore", - ".hg", - ".svn", - "_darcs", - "manifest.yaml", - "manifest.yml", -} - -type Resource struct { - Filename string `json:"fn"` - Mode os.FileMode `json:"mode"` - SHA1 string `json:"sha1"` - Size int64 `json:"size"` -} - -type V3Resource ccv3.Resource - -// ToV3Resource converts a sharedaction Resource to V3 Resource format -func (r Resource) ToV3Resource() V3Resource { - return V3Resource{ - FilePath: r.Filename, - Mode: r.Mode, - Checksum: ccv3.Checksum{Value: r.SHA1}, - SizeInBytes: r.Size, - } -} - -// ToV2Resource converts a V3 Resource to V2 Resource format -func (r V3Resource) ToV2Resource() Resource { - return Resource{ - Filename: r.FilePath, - Mode: r.Mode, - SHA1: r.Checksum.Value, - Size: r.SizeInBytes, - } -} - -// GatherArchiveResources returns a list of resources for an archive. -func (actor Actor) GatherArchiveResources(archivePath string) ([]Resource, error) { - var resources []Resource - - archive, err := os.Open(archivePath) - if err != nil { - return nil, err - } - defer archive.Close() - - reader, err := actor.newArchiveReader(archive) - if err != nil { - return nil, err - } - - gitIgnore, err := actor.generateArchiveCFIgnoreMatcher(reader.File) - if err != nil { - log.Errorln("reading .cfignore file:", err) - return nil, err - } - - for _, archivedFile := range reader.File { - filename := filepath.ToSlash(archivedFile.Name) - if gitIgnore.MatchesPath(filename) { - continue - } - - resource := Resource{Filename: filename} - info := archivedFile.FileInfo() - - switch { - case info.IsDir(): - resource.Mode = DefaultFolderPermissions - case info.Mode()&os.ModeSymlink == os.ModeSymlink: - resource.Mode = info.Mode() - default: - fileReader, err := archivedFile.Open() - if err != nil { - return nil, err - } - defer fileReader.Close() - - hash := sha1.New() - - _, err = io.Copy(hash, fileReader) - if err != nil { - return nil, err - } - - resource.Mode = DefaultArchiveFilePermissions - resource.SHA1 = fmt.Sprintf("%x", hash.Sum(nil)) - resource.Size = archivedFile.FileInfo().Size() - } - - resources = append(resources, resource) - } - if len(resources) <= 1 { - return nil, actionerror.EmptyArchiveError{Path: archivePath} - } - return resources, nil -} - -// GatherDirectoryResources returns a list of resources for a directory. -func (actor Actor) GatherDirectoryResources(sourceDir string) ([]Resource, error) { - var ( - resources []Resource - gitIgnore *ignore.GitIgnore - ) - - gitIgnore, err := actor.generateDirectoryCFIgnoreMatcher(sourceDir) - if err != nil { - log.Errorln("reading .cfignore file:", err) - return nil, err - } - - evalDir, err := filepath.EvalSymlinks(sourceDir) - if err != nil { - log.Errorln("evaluating symlink:", err) - return nil, err - } - - walkErr := filepath.Walk(evalDir, func(fullPath string, info os.FileInfo, err error) error { - if err != nil { - return err - } - - relPath, err := filepath.Rel(evalDir, fullPath) - if err != nil { - return err - } - - // if file ignored continue to the next file - if gitIgnore.MatchesPath(relPath) { - return nil - } - - if relPath == "." { - return nil - } - - resource := Resource{ - Filename: filepath.ToSlash(relPath), - } - - switch { - case info.IsDir(): - // If the file is a directory - resource.Mode = DefaultFolderPermissions - case info.Mode()&os.ModeSymlink == os.ModeSymlink: - // If the file is a Symlink we just set the mode of the file - // We won't be using any sha information since we don't do - // any resource matching on symlinks. - resource.Mode = fixMode(info.Mode()) - default: - // If the file is regular we want to open - // and calculate the sha of the file - file, err := os.Open(fullPath) - if err != nil { - return err - } - defer file.Close() - - sum := sha1.New() - _, err = io.Copy(sum, file) - if err != nil { - return err - } - - resource.Mode = fixMode(info.Mode()) - resource.SHA1 = fmt.Sprintf("%x", sum.Sum(nil)) - resource.Size = info.Size() - } - - resources = append(resources, resource) - return nil - }) - - if len(resources) == 0 { - return nil, actionerror.EmptyDirectoryError{Path: sourceDir} - } - - return resources, walkErr -} - -// ZipArchiveResources zips an archive and a sorted (based on full -// path/filename) list of resources and returns the location. On Windows, the -// filemode for user is forced to be readable and executable. -func (actor Actor) ZipArchiveResources(sourceArchivePath string, filesToInclude []Resource) (string, error) { - log.WithField("sourceArchive", sourceArchivePath).Info("zipping source files from archive") - zipFile, err := ioutil.TempFile("", "cf-cli-") - if err != nil { - return "", err - } - defer zipFile.Close() - zipPath := zipFile.Name() - - writer := zip.NewWriter(zipFile) - defer writer.Close() - - source, err := os.Open(sourceArchivePath) - if err != nil { - return zipPath, err - } - defer source.Close() - - reader, err := actor.newArchiveReader(source) - if err != nil { - return zipPath, err - } - - for _, archiveFile := range reader.File { - resource, ok := actor.findInResources(archiveFile.Name, filesToInclude) - if !ok { - log.WithField("archiveFileName", archiveFile.Name).Debug("skipping file") - continue - } - - log.WithField("archiveFileName", archiveFile.Name).Debug("zipping file") - // archiveFile.Open opens the symlink file, not the file it points too - reader, openErr := archiveFile.Open() - if openErr != nil { - log.WithField("archiveFile", archiveFile.Name).Errorln("opening path in dir:", openErr) - return zipPath, openErr - } - defer reader.Close() - - err = actor.addFileToZipFromFileSystem( - resource.Filename, reader, archiveFile.FileInfo(), - resource, writer, - ) - if err != nil { - log.WithField("archiveFileName", archiveFile.Name).Errorln("zipping file:", err) - return zipPath, err - } - reader.Close() - } - - log.WithFields(log.Fields{ - "zip_file_location": zipFile.Name(), - "zipped_file_count": len(filesToInclude), - }).Info("zip file created") - return zipPath, nil -} - -// ZipDirectoryResources zips a directory and a sorted (based on full -// path/filename) list of resources and returns the location. On Windows, the -// filemode for user is forced to be readable and executable. -func (actor Actor) ZipDirectoryResources(sourceDir string, filesToInclude []Resource) (string, error) { - log.WithField("sourceDir", sourceDir).Info("zipping source files from directory") - zipFile, err := ioutil.TempFile("", "cf-cli-") - if err != nil { - return "", err - } - defer zipFile.Close() - zipPath := zipFile.Name() - - writer := zip.NewWriter(zipFile) - defer writer.Close() - - for _, resource := range filesToInclude { - fullPath := filepath.Join(sourceDir, resource.Filename) - log.WithField("fullPath", fullPath).Debug("zipping file") - - fileInfo, err := os.Lstat(fullPath) - if err != nil { - log.WithField("fullPath", fullPath).Errorln("stat error in dir:", err) - return zipPath, err - } - - log.WithField("file-mode", fileInfo.Mode().String()).Debug("resource file info") - if fileInfo.Mode()&os.ModeSymlink == os.ModeSymlink { - // we need to user os.Readlink to read a symlink file from a directory - err = actor.addLinkToZipFromFileSystem(fullPath, fileInfo, resource, writer) - if err != nil { - log.WithField("fullPath", fullPath).Errorln("zipping file:", err) - return zipPath, err - } - } else { - srcFile, err := os.Open(fullPath) - if err != nil { - log.WithField("fullPath", fullPath).Errorln("opening path in dir:", err) - return zipPath, err - } - defer srcFile.Close() - - err = actor.addFileToZipFromFileSystem( - fullPath, srcFile, fileInfo, - resource, writer, - ) - srcFile.Close() - if err != nil { - log.WithField("fullPath", fullPath).Errorln("zipping file:", err) - return zipPath, err - } - } - } - - log.WithFields(log.Fields{ - "zip_file_location": zipFile.Name(), - "zipped_file_count": len(filesToInclude), - }).Info("zip file created") - return zipPath, nil -} - -func (Actor) addLinkToZipFromFileSystem(srcPath string, - fileInfo os.FileInfo, resource Resource, - zipFile *zip.Writer, -) error { - header, err := zip.FileInfoHeader(fileInfo) - if err != nil { - log.WithField("srcPath", srcPath).Errorln("getting file info in dir:", err) - return err - } - - header.Name = resource.Filename - header.Method = zip.Deflate - - log.WithFields(log.Fields{ - "srcPath": srcPath, - "destPath": header.Name, - "mode": header.Mode().String(), - }).Debug("setting mode for file") - - destFileWriter, err := zipFile.CreateHeader(header) - if err != nil { - log.Errorln("creating header:", err) - return err - } - - pathInSymlink, err := os.Readlink(srcPath) - if err != nil { - return err - } - log.WithField("path", pathInSymlink).Debug("resolving symlink") - symLinkContents := strings.NewReader(pathInSymlink) - if _, err := io.Copy(destFileWriter, symLinkContents); err != nil { - log.WithField("srcPath", srcPath).Errorln("copying data in dir:", err) - return err - } - - return nil -} - -func (Actor) addFileToZipFromFileSystem(srcPath string, - srcFile io.Reader, fileInfo os.FileInfo, resource Resource, - zipFile *zip.Writer, -) error { - header, err := zip.FileInfoHeader(fileInfo) - if err != nil { - log.WithField("srcPath", srcPath).Errorln("getting file info in dir:", err) - return err - } - - header.Name = resource.Filename - - // An extra '/' indicates that this file is a directory - if fileInfo.IsDir() && !strings.HasSuffix(resource.Filename, "/") { - header.Name += "/" - } - header.Method = zip.Deflate - header.SetMode(resource.Mode) - - log.WithFields(log.Fields{ - "srcPath": srcPath, - "destPath": header.Name, - "mode": header.Mode().String(), - }).Debug("setting mode for file") - - destFileWriter, err := zipFile.CreateHeader(header) - if err != nil { - log.Errorln("creating header:", err) - return err - } - - if fileInfo.Mode().IsRegular() { - sum := sha1.New() - multi := io.MultiWriter(sum, destFileWriter) - - if _, err := io.Copy(multi, srcFile); err != nil { - log.WithField("srcPath", srcPath).Errorln("copying data in dir:", err) - return err - } - - if currentSum := fmt.Sprintf("%x", sum.Sum(nil)); resource.SHA1 != currentSum { - log.WithFields(log.Fields{ - "expected": resource.SHA1, - "currentSum": currentSum, - }).Error("setting mode for file") - return actionerror.FileChangedError{Filename: srcPath} - } - } else if fileInfo.Mode()&os.ModeSymlink == os.ModeSymlink { - _, err = io.Copy(destFileWriter, srcFile) - if err != nil { - return err - } - } - - return nil -} - -func (Actor) generateArchiveCFIgnoreMatcher(files []*zip.File) (*ignore.GitIgnore, error) { - for _, item := range files { - if strings.HasSuffix(item.Name, ".cfignore") { - fileReader, err := item.Open() - if err != nil { - return nil, err - } - defer fileReader.Close() - - raw, err := ioutil.ReadAll(fileReader) - if err != nil { - return nil, err - } - s := append(DefaultIgnoreLines, strings.Split(string(raw), "\n")...) - return ignore.CompileIgnoreLines(s...) - } - } - return ignore.CompileIgnoreLines(DefaultIgnoreLines...) -} - -func (actor Actor) generateDirectoryCFIgnoreMatcher(sourceDir string) (*ignore.GitIgnore, error) { - pathToCFIgnore := filepath.Join(sourceDir, ".cfignore") - log.WithFields(log.Fields{ - "pathToCFIgnore": pathToCFIgnore, - "sourceDir": sourceDir, - }).Debug("using ignore file") - - additionalIgnoreLines := DefaultIgnoreLines - - // If verbose logging has files in the current dir, ignore them - _, traceFiles := actor.Config.Verbose() - for _, traceFilePath := range traceFiles { - if relPath, err := filepath.Rel(sourceDir, traceFilePath); err == nil { - additionalIgnoreLines = append(additionalIgnoreLines, relPath) - } - } - - log.Debugf("ignore rules: %v", additionalIgnoreLines) - - if _, err := os.Stat(pathToCFIgnore); !os.IsNotExist(err) { - return ignore.CompileIgnoreFileAndLines(pathToCFIgnore, additionalIgnoreLines...) - } - return ignore.CompileIgnoreLines(additionalIgnoreLines...) -} - -func (Actor) findInResources(path string, filesToInclude []Resource) (Resource, bool) { - for _, resource := range filesToInclude { - if resource.Filename == filepath.ToSlash(path) { - log.WithField("resource", resource.Filename).Debug("found resource in files to include") - return resource, true - } - } - - log.WithField("path", path).Debug("did not find resource in files to include") - return Resource{}, false -} - -func (Actor) newArchiveReader(archive *os.File) (*zip.Reader, error) { - info, err := archive.Stat() - if err != nil { - return nil, err - } - - return ykk.NewReader(archive, info.Size()) -} - -func (actor Actor) CreateArchive(bitsPath string, resources []Resource) (io.ReadCloser, int64, error) { - archivePath, err := actor.ZipDirectoryResources(bitsPath, resources) - _ = err - - return actor.ReadArchive(archivePath) -} - -func (Actor) ReadArchive(archivePath string) (io.ReadCloser, int64, error) { - archive, err := os.Open(archivePath) - if err != nil { - log.WithField("archivePath", archivePath).Errorln("opening temp archive:", err) - return nil, -1, err - } - - archiveInfo, err := archive.Stat() - if err != nil { - archive.Close() - log.WithField("archivePath", archivePath).Errorln("stat temp archive:", err) - return nil, -1, err - } - - return archive, archiveInfo.Size(), nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/secure_shell_client.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/secure_shell_client.go deleted file mode 100644 index af27600..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/secure_shell_client.go +++ /dev/null @@ -1,13 +0,0 @@ -package sharedaction - -import "code.cloudfoundry.org/cli/util/clissh" - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . SecureShellClient - -type SecureShellClient interface { - Connect(username string, passcode string, sshEndpoint string, sshHostKeyFingerprint string, skipHostValidation bool) error - Close() error - InteractiveSession(commands []string, terminalRequest clissh.TTYRequest) error - LocalPortForward(localPortForwardSpecs []clissh.LocalPortForward) error - Wait() error -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/ssh.go b/vendor/code.cloudfoundry.org/cli/actor/sharedaction/ssh.go deleted file mode 100644 index 600d4cc..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/sharedaction/ssh.go +++ /dev/null @@ -1,56 +0,0 @@ -package sharedaction - -import "code.cloudfoundry.org/cli/util/clissh" - -type TTYOption clissh.TTYRequest - -const ( - RequestTTYAuto TTYOption = iota - RequestTTYNo - RequestTTYYes - RequestTTYForce -) - -type LocalPortForward clissh.LocalPortForward - -type SSHOptions struct { - Commands []string - Username string - Passcode string - Endpoint string - HostKeyFingerprint string - SkipHostValidation bool - SkipRemoteExecution bool - TTYOption TTYOption - LocalPortForwardSpecs []LocalPortForward -} - -func (actor Actor) ExecuteSecureShell(sshClient SecureShellClient, sshOptions SSHOptions) error { - err := sshClient.Connect(sshOptions.Username, sshOptions.Passcode, sshOptions.Endpoint, sshOptions.HostKeyFingerprint, sshOptions.SkipHostValidation) - if err != nil { - return err - } - defer sshClient.Close() - - err = sshClient.LocalPortForward(convertActorToSSHPackageForwardingSpecs(sshOptions.LocalPortForwardSpecs)) - if err != nil { - return err - } - - if sshOptions.SkipRemoteExecution { - err = sshClient.Wait() - } else { - err = sshClient.InteractiveSession(sshOptions.Commands, clissh.TTYRequest(sshOptions.TTYOption)) - } - return err -} - -func convertActorToSSHPackageForwardingSpecs(actorSpecs []LocalPortForward) []clissh.LocalPortForward { - sshPackageSpecs := []clissh.LocalPortForward{} - - for _, spec := range actorSpecs { - sshPackageSpecs = append(sshPackageSpecs, clissh.LocalPortForward(spec)) - } - - return sshPackageSpecs -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/actor.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/actor.go deleted file mode 100644 index 6fb6cbe..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/actor.go +++ /dev/null @@ -1,63 +0,0 @@ -// Package v7action contains the business logic for the commands/v7 package -package v7action - -import ( - "code.cloudfoundry.org/cli/api/uaa/constant" - "code.cloudfoundry.org/cli/cf/configuration/coreconfig" - "code.cloudfoundry.org/cli/util/configv3" - "code.cloudfoundry.org/clock" -) - -// SortOrder is used for sorting. -type SortOrder string - -const ( - Ascending SortOrder = "Ascending" - Descending SortOrder = "Descending" -) - -// Warnings is a list of warnings returned back from the cloud controller -type Warnings []string - -type AuthActor interface { - Authenticate(credentials map[string]string, origin string, grantType constant.GrantType) error - GetLoginPrompts() (map[string]coreconfig.AuthPrompt, error) - GetCurrentUser() (configv3.User, error) -} - -// Actor represents a V7 actor. -type Actor struct { - CloudControllerClient CloudControllerClient - Config Config - SharedActor SharedActor - UAAClient UAAClient - RoutingClient RoutingClient - Clock clock.Clock - - AuthActor -} - -// NewActor returns a new V7 actor. -func NewActor( - client CloudControllerClient, - config Config, - sharedActor SharedActor, - uaaClient UAAClient, - routingClient RoutingClient, - clk clock.Clock, -) *Actor { - authActor := NewDefaultAuthActor(config, uaaClient) - if config != nil && config.IsCFOnK8s() { - authActor = NewKubernetesAuthActor(config, NewDefaultKubernetesConfigGetter(), client) - } - - return &Actor{ - CloudControllerClient: client, - Config: config, - SharedActor: sharedActor, - UAAClient: uaaClient, - RoutingClient: routingClient, - Clock: clk, - AuthActor: authActor, - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/application.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/application.go deleted file mode 100644 index 95f1abb..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/application.go +++ /dev/null @@ -1,464 +0,0 @@ -package v7action - -import ( - "errors" - "fmt" - "time" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/batcher" - "code.cloudfoundry.org/cli/util/unique" -) - -func (actor Actor) DeleteApplicationByNameAndSpace(name, spaceGUID string, deleteRoutes bool) (Warnings, error) { - var allWarnings Warnings - var jobQueue []ccv3.JobURL - - app, getAppWarnings, err := actor.GetApplicationByNameAndSpace(name, spaceGUID) - allWarnings = append(allWarnings, getAppWarnings...) - if err != nil { - return allWarnings, err - } - - var routes []resources.Route - if deleteRoutes { - var getRoutesWarnings Warnings - routes, getRoutesWarnings, err = actor.GetApplicationRoutes(app.GUID) - allWarnings = append(allWarnings, getRoutesWarnings...) - if err != nil { - return allWarnings, err - } - - for _, route := range routes { - if len(route.Destinations) > 1 { - for _, destination := range route.Destinations { - guid := destination.App.GUID - if guid != app.GUID { - return allWarnings, actionerror.RouteBoundToMultipleAppsError{AppName: app.Name, RouteURL: route.URL} - } - } - } - } - } - - appDeleteJobURL, deleteAppWarnings, err := actor.CloudControllerClient.DeleteApplication(app.GUID) - allWarnings = append(allWarnings, deleteAppWarnings...) - if err != nil { - return allWarnings, err - } - - pollWarnings, err := actor.CloudControllerClient.PollJob(appDeleteJobURL) - allWarnings = append(allWarnings, pollWarnings...) - if err != nil { - return allWarnings, err - } - - if deleteRoutes { - for _, route := range routes { - jobURL, deleteRouteWarnings, err := actor.CloudControllerClient.DeleteRoute(route.GUID) - allWarnings = append(allWarnings, deleteRouteWarnings...) - if err != nil { - if _, ok := err.(ccerror.ResourceNotFoundError); ok { - continue - } - return allWarnings, err - } - - jobQueue = append(jobQueue, jobURL) - } - } - - for _, job := range jobQueue { - pollWarnings, err := actor.CloudControllerClient.PollJob(job) - allWarnings = append(allWarnings, pollWarnings...) - if err != nil { - return allWarnings, err - } - } - - return allWarnings, err -} - -func (actor Actor) GetApplicationsByGUIDs(appGUIDs []string) ([]resources.Application, Warnings, error) { - uniqueAppGUIDs := unique.StringSlice(appGUIDs) - - var apps []resources.Application - warnings, err := batcher.RequestByGUID(appGUIDs, func(guids []string) (ccv3.Warnings, error) { - batch, warnings, err := actor.CloudControllerClient.GetApplications( - ccv3.Query{Key: ccv3.GUIDFilter, Values: guids}, - ) - apps = append(apps, batch...) - return warnings, err - }) - - if err != nil { - return nil, Warnings(warnings), err - } - - if len(apps) < len(uniqueAppGUIDs) { - return nil, Warnings(warnings), actionerror.ApplicationsNotFoundError{} - } - - return apps, Warnings(warnings), nil -} - -func (actor Actor) GetApplicationsByNamesAndSpace(appNames []string, spaceGUID string) ([]resources.Application, Warnings, error) { - uniqueAppNames := unique.StringSlice(appNames) - - apps, warnings, err := actor.CloudControllerClient.GetApplications( - ccv3.Query{Key: ccv3.NameFilter, Values: appNames}, - ccv3.Query{Key: ccv3.SpaceGUIDFilter, Values: []string{spaceGUID}}, - ) - - if err != nil { - return nil, Warnings(warnings), err - } - - if len(apps) < len(uniqueAppNames) { - return nil, Warnings(warnings), actionerror.ApplicationsNotFoundError{} - } - - return apps, Warnings(warnings), nil -} - -// GetApplicationByNameAndSpace returns the application with the given -// name in the given space. -func (actor Actor) GetApplicationByNameAndSpace(appName string, spaceGUID string) (resources.Application, Warnings, error) { - apps, warnings, err := actor.GetApplicationsByNamesAndSpace([]string{appName}, spaceGUID) - - if err != nil { - if _, ok := err.(actionerror.ApplicationsNotFoundError); ok { - return resources.Application{}, warnings, actionerror.ApplicationNotFoundError{Name: appName} - } - return resources.Application{}, warnings, err - } - - return apps[0], warnings, nil -} - -// GetApplicationsBySpace returns all applications in a space. -func (actor Actor) GetApplicationsBySpace(spaceGUID string) ([]resources.Application, Warnings, error) { - apps, warnings, err := actor.CloudControllerClient.GetApplications( - ccv3.Query{Key: ccv3.SpaceGUIDFilter, Values: []string{spaceGUID}}, - ) - - if err != nil { - return []resources.Application{}, Warnings(warnings), err - } - - return apps, Warnings(warnings), nil -} - -// CreateApplicationInSpace creates and returns the application with the given -// name in the given space. -func (actor Actor) CreateApplicationInSpace(app resources.Application, spaceGUID string) (resources.Application, Warnings, error) { - createdApp, warnings, err := actor.CloudControllerClient.CreateApplication( - resources.Application{ - LifecycleType: app.LifecycleType, - LifecycleBuildpacks: app.LifecycleBuildpacks, - StackName: app.StackName, - Name: app.Name, - SpaceGUID: spaceGUID, - }) - - if err != nil { - return resources.Application{}, Warnings(warnings), err - } - - return createdApp, Warnings(warnings), nil -} - -// SetApplicationProcessHealthCheckTypeByNameAndSpace sets the health check -// information of the provided processType for an application with the given -// name and space GUID. -func (actor Actor) SetApplicationProcessHealthCheckTypeByNameAndSpace( - appName string, - spaceGUID string, - healthCheckType constant.HealthCheckType, - httpEndpoint string, - processType string, - invocationTimeout int64, -) (resources.Application, Warnings, error) { - - app, getWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return resources.Application{}, getWarnings, err - } - - setWarnings, err := actor.UpdateProcessByTypeAndApplication( - processType, - app.GUID, - resources.Process{ - HealthCheckType: healthCheckType, - HealthCheckEndpoint: httpEndpoint, - HealthCheckInvocationTimeout: invocationTimeout, - }) - return app, append(getWarnings, setWarnings...), err -} - -// StopApplication stops an application. -func (actor Actor) StopApplication(appGUID string) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.UpdateApplicationStop(appGUID) - - return Warnings(warnings), err -} - -// StartApplication starts an application. -func (actor Actor) StartApplication(appGUID string) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.UpdateApplicationStart(appGUID) - return Warnings(warnings), err -} - -// RestartApplication restarts an application and waits for it to start. -func (actor Actor) RestartApplication(appGUID string, noWait bool) (Warnings, error) { - // var allWarnings Warnings - _, warnings, err := actor.CloudControllerClient.UpdateApplicationRestart(appGUID) - return Warnings(warnings), err -} - -func (actor Actor) GetUnstagedNewestPackageGUID(appGUID string) (string, Warnings, error) { - var err error - var allWarnings Warnings - packages, warnings, err := actor.CloudControllerClient.GetPackages( - ccv3.Query{Key: ccv3.AppGUIDFilter, Values: []string{appGUID}}, - ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.CreatedAtDescendingOrder}}, - ccv3.Query{Key: ccv3.PerPage, Values: []string{"1"}}) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return "", allWarnings, err - } - if len(packages) == 0 { - return "", allWarnings, nil - } - - newestPackage := packages[0] - - droplets, warnings, err := actor.CloudControllerClient.GetPackageDroplets( - newestPackage.GUID, - ccv3.Query{Key: ccv3.StatesFilter, Values: []string{"STAGED"}}, - ccv3.Query{Key: ccv3.PerPage, Values: []string{"1"}}, - ) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return "", allWarnings, err - } - - if len(droplets) == 0 { - return newestPackage.GUID, allWarnings, nil - } - - return "", allWarnings, nil -} - -// PollStart polls an application's processes until some are started. If noWait is false, -// it waits for at least one instance of all processes to be running. If noWait is true, -// it only waits for an instance of the web process to be running. -func (actor Actor) PollStart(app resources.Application, noWait bool, handleInstanceDetails func(string)) (Warnings, error) { - var allWarnings Warnings - processes, warnings, err := actor.CloudControllerClient.GetApplicationProcesses(app.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - var filteredProcesses []resources.Process - if noWait { - for _, process := range processes { - if process.Type == constant.ProcessTypeWeb { - filteredProcesses = append(filteredProcesses, process) - } - } - } else { - filteredProcesses = processes - } - - timer := actor.Clock.NewTimer(time.Millisecond) - defer timer.Stop() - timeout := actor.Clock.After(actor.Config.StartupTimeout()) - - for { - select { - case <-timeout: - return allWarnings, actionerror.StartupTimeoutError{Name: app.Name} - case <-timer.C(): - stopPolling, warnings, err := actor.PollProcesses(filteredProcesses, handleInstanceDetails) - allWarnings = append(allWarnings, warnings...) - if stopPolling || err != nil { - return allWarnings, err - } - - timer.Reset(actor.Config.PollingInterval()) - } - } -} - -// PollStartForRolling polls a deploying application's processes until some are started. It does the same thing as PollStart, except it accounts for rolling deployments and whether -// they have failed or been canceled during polling. -func (actor Actor) PollStartForRolling(app resources.Application, deploymentGUID string, noWait bool, handleInstanceDetails func(string)) (Warnings, error) { - var ( - deployment resources.Deployment - processes []resources.Process - allWarnings Warnings - ) - - timer := actor.Clock.NewTimer(time.Millisecond) - defer timer.Stop() - timeout := actor.Clock.After(actor.Config.StartupTimeout()) - - for { - select { - case <-timeout: - warnings, err := actor.CancelDeployment(deploymentGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - return allWarnings, actionerror.StartupTimeoutError{Name: app.Name} - case <-timer.C(): - if !isDeployed(deployment) { - ccDeployment, warnings, err := actor.getDeployment(deploymentGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - deployment = ccDeployment - processes, warnings, err = actor.getProcesses(deployment, app.GUID, noWait) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - } - - if noWait || isDeployed(deployment) { - stopPolling, warnings, err := actor.PollProcesses(processes, handleInstanceDetails) - allWarnings = append(allWarnings, warnings...) - if stopPolling || err != nil { - return allWarnings, err - } - } - - timer.Reset(actor.Config.PollingInterval()) - } - } -} - -func isDeployed(d resources.Deployment) bool { - return d.StatusValue == constant.DeploymentStatusValueFinalized && d.StatusReason == constant.DeploymentStatusReasonDeployed -} - -// PollProcesses - return true if there's no need to keep polling -func (actor Actor) PollProcesses(processes []resources.Process, handleInstanceDetails func(string)) (bool, Warnings, error) { - numProcesses := len(processes) - numStableProcesses := 0 - var allWarnings Warnings - for _, process := range processes { - ccInstances, ccWarnings, err := actor.CloudControllerClient.GetProcessInstances(process.GUID) - instances := ProcessInstances(ccInstances) - allWarnings = append(allWarnings, ccWarnings...) - if err != nil { - return true, allWarnings, err - } - - handleInstanceDetails(formatInstanceDetails(instances)) - - if instances.Empty() || instances.AnyRunning() { - numStableProcesses += 1 - continue - } - - if instances.AllCrashed() { - return true, allWarnings, actionerror.AllInstancesCrashedError{} - } - - //precondition: !instances.Empty() && no instances are running - // do not increment numStableProcesses - return false, allWarnings, nil - } - return numStableProcesses == numProcesses, allWarnings, nil -} - -// UpdateApplication updates the buildpacks on an application -func (actor Actor) UpdateApplication(app resources.Application) (resources.Application, Warnings, error) { - ccApp := resources.Application{ - GUID: app.GUID, - StackName: app.StackName, - LifecycleType: app.LifecycleType, - LifecycleBuildpacks: app.LifecycleBuildpacks, - Metadata: app.Metadata, - Name: app.Name, - } - - updatedApp, warnings, err := actor.CloudControllerClient.UpdateApplication(ccApp) - if err != nil { - return resources.Application{}, Warnings(warnings), err - } - - return updatedApp, Warnings(warnings), nil -} - -func (actor Actor) getDeployment(deploymentGUID string) (resources.Deployment, Warnings, error) { - deployment, warnings, err := actor.CloudControllerClient.GetDeployment(deploymentGUID) - if err != nil { - return deployment, Warnings(warnings), err - } - - if deployment.StatusValue == constant.DeploymentStatusValueFinalized { - switch deployment.StatusReason { - case constant.DeploymentStatusReasonCanceled: - return deployment, Warnings(warnings), errors.New("Deployment has been canceled") - case constant.DeploymentStatusReasonSuperseded: - return deployment, Warnings(warnings), errors.New("Deployment has been superseded") - } - } - - return deployment, Warnings(warnings), err -} - -func (actor Actor) getProcesses(deployment resources.Deployment, appGUID string, noWait bool) ([]resources.Process, Warnings, error) { - if noWait { - // these are only web processes for now so we can just use these - return deployment.NewProcesses, nil, nil - } - - // if the deployment is deployed we know web are all running and PollProcesses will see those as stable - // so just getting all processes is equivalent to just getting non-web ones and polling those - if isDeployed(deployment) { - processes, warnings, err := actor.CloudControllerClient.GetApplicationProcesses(appGUID) - if err != nil { - return processes, Warnings(warnings), err - } - return processes, Warnings(warnings), nil - } - - return nil, nil, nil -} - -func (actor Actor) RenameApplicationByNameAndSpaceGUID(appName, newAppName, spaceGUID string) (resources.Application, Warnings, error) { - allWarnings := Warnings{} - application, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Application{}, allWarnings, err - } - application.Name = newAppName - application, warnings, err = actor.UpdateApplication(application) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Application{}, allWarnings, err - } - - return application, allWarnings, nil -} - -func formatInstanceDetails(instances ProcessInstances) string { - for _, instance := range instances { - if instance.Details != "" { - return fmt.Sprintf("Error starting instances: '%s'", instance.Details) - } - } - return "Instances starting..." -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/application_feature.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/application_feature.go deleted file mode 100644 index 24c00e7..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/application_feature.go +++ /dev/null @@ -1,40 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" -) - -func (actor Actor) GetAppFeature(appGUID string, featureName string) (resources.ApplicationFeature, Warnings, error) { - appFeature, warnings, err := actor.CloudControllerClient.GetAppFeature(appGUID, featureName) - - return appFeature, Warnings(warnings), err -} - -func (actor Actor) GetSSHEnabled(appGUID string) (ccv3.SSHEnabled, Warnings, error) { - sshEnabled, warnings, err := actor.CloudControllerClient.GetSSHEnabled(appGUID) - return sshEnabled, Warnings(warnings), err -} - -func (actor Actor) GetSSHEnabledByAppName(appName string, spaceGUID string) (ccv3.SSHEnabled, Warnings, error) { - var allWarnings Warnings - - app, warnings, err := actor.CloudControllerClient.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return ccv3.SSHEnabled{}, allWarnings, err - } - - sshEnabled, warnings, err := actor.CloudControllerClient.GetSSHEnabled(app.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return ccv3.SSHEnabled{}, allWarnings, err - } - - return sshEnabled, allWarnings, nil -} - -func (actor Actor) UpdateAppFeature(app resources.Application, enabled bool, featureName string) (Warnings, error) { - warnings, err := actor.CloudControllerClient.UpdateAppFeature(app.GUID, enabled, featureName) - return Warnings(warnings), err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/application_manifest.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/application_manifest.go deleted file mode 100644 index 9e23a1e..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/application_manifest.go +++ /dev/null @@ -1,70 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . ManifestParser - -type ManifestParser interface { - AppNames() []string - RawAppManifest(name string) ([]byte, error) -} - -// ApplyApplicationManifest reads in the manifest from the path and provides it -// to the cloud controller. -func (actor Actor) ApplyApplicationManifest(parser ManifestParser, spaceGUID string) (Warnings, error) { - var allWarnings Warnings - - for _, appName := range parser.AppNames() { - rawManifest, err := parser.RawAppManifest(appName) - if err != nil { - return allWarnings, err - } - - app, getAppWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - - allWarnings = append(allWarnings, getAppWarnings...) - if err != nil { - return allWarnings, err - } - - applyManifestWarnings, err := actor.SetApplicationManifest(app.GUID, rawManifest) - allWarnings = append(allWarnings, applyManifestWarnings...) - if err != nil { - return allWarnings, err - } - } - - return allWarnings, nil -} - -func (actor Actor) SetApplicationManifest(appGUID string, rawManifest []byte) (Warnings, error) { - var allWarnings Warnings - jobURL, applyManifestWarnings, err := actor.CloudControllerClient.UpdateApplicationApplyManifest(appGUID, rawManifest) - allWarnings = append(allWarnings, applyManifestWarnings...) - if err != nil { - return allWarnings, err - } - - pollWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, pollWarnings...) - if err != nil { - if newErr, ok := err.(ccerror.V3JobFailedError); ok { - return allWarnings, actionerror.ApplicationManifestError{Message: newErr.Detail} - } - return allWarnings, err - } - return allWarnings, nil -} - -func (actor Actor) GetRawApplicationManifestByNameAndSpace(appName string, spaceGUID string) ([]byte, Warnings, error) { - app, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return nil, warnings, err - } - - rawManifest, manifestWarnings, err := actor.CloudControllerClient.GetApplicationManifest(app.GUID) - return rawManifest, append(warnings, manifestWarnings...), err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/application_summary.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/application_summary.go deleted file mode 100644 index 42776cf..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/application_summary.go +++ /dev/null @@ -1,193 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/batcher" -) - -type ApplicationSummary struct { - resources.Application - ProcessSummaries ProcessSummaries - Routes []resources.Route -} - -// v7action.DetailedApplicationSummary represents an application with its processes and droplet. -type DetailedApplicationSummary struct { - ApplicationSummary - CurrentDroplet resources.Droplet -} - -func (a ApplicationSummary) GetIsolationSegmentName() (string, bool) { - if a.hasIsolationSegment() { - return a.ProcessSummaries[0].InstanceDetails[0].IsolationSegment, true - } - return "", false -} - -func (a ApplicationSummary) hasIsolationSegment() bool { - return len(a.ProcessSummaries) > 0 && - len(a.ProcessSummaries[0].InstanceDetails) > 0 && - len(a.ProcessSummaries[0].InstanceDetails[0].IsolationSegment) > 0 -} - -func (actor Actor) GetAppSummariesForSpace(spaceGUID string, labelSelector string) ([]ApplicationSummary, Warnings, error) { - var allWarnings Warnings - var allSummaries []ApplicationSummary - - keys := []ccv3.Query{ - {Key: ccv3.SpaceGUIDFilter, Values: []string{spaceGUID}}, - {Key: ccv3.OrderBy, Values: []string{ccv3.NameOrder}}, - } - if len(labelSelector) > 0 { - keys = append(keys, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}}) - } - apps, warnings, err := actor.CloudControllerClient.GetApplications(keys...) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - var processes []resources.Process - - warnings, err = batcher.RequestByGUID(toAppGUIDs(apps), func(guids []string) (ccv3.Warnings, error) { - batch, warnings, err := actor.CloudControllerClient.GetProcesses(ccv3.Query{ - Key: ccv3.AppGUIDFilter, Values: guids, - }) - processes = append(processes, batch...) - return warnings, err - }) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - processSummariesByAppGUID := make(map[string]ProcessSummaries, len(apps)) - for _, process := range processes { - instances, warnings, err := actor.CloudControllerClient.GetProcessInstances(process.GUID) - allWarnings = append(allWarnings, Warnings(warnings)...) - if err != nil { - return nil, allWarnings, err - } - - var instanceDetails []ProcessInstance - for _, instance := range instances { - instanceDetails = append(instanceDetails, ProcessInstance(instance)) - } - - processSummary := ProcessSummary{ - Process: resources.Process(process), - InstanceDetails: instanceDetails, - } - - processSummariesByAppGUID[process.AppGUID] = append(processSummariesByAppGUID[process.AppGUID], processSummary) - } - - var routes []resources.Route - - warnings, err = batcher.RequestByGUID(toAppGUIDs(apps), func(guids []string) (ccv3.Warnings, error) { - batch, warnings, err := actor.CloudControllerClient.GetRoutes(ccv3.Query{ - Key: ccv3.AppGUIDFilter, Values: guids, - }) - routes = append(routes, batch...) - return warnings, err - }) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - routesByAppGUID := make(map[string][]resources.Route) - - for _, route := range routes { - for _, dest := range route.Destinations { - routesByAppGUID[dest.App.GUID] = append(routesByAppGUID[dest.App.GUID], route) - } - } - - for _, app := range apps { - processSummariesByAppGUID[app.GUID].Sort() - - summary := ApplicationSummary{ - Application: app, - ProcessSummaries: processSummariesByAppGUID[app.GUID], - Routes: routesByAppGUID[app.GUID], - } - - allSummaries = append(allSummaries, summary) - } - - return allSummaries, allWarnings, nil -} - -func (actor Actor) GetDetailedAppSummary(appName, spaceGUID string, withObfuscatedValues bool) (DetailedApplicationSummary, Warnings, error) { - var allWarnings Warnings - - app, actorWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, actorWarnings...) - if err != nil { - return DetailedApplicationSummary{}, actorWarnings, err - } - - summary, warnings, err := actor.createSummary(app, withObfuscatedValues) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return DetailedApplicationSummary{}, allWarnings, err - } - - detailedSummary, warnings, err := actor.addDroplet(summary) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return DetailedApplicationSummary{}, allWarnings, err - } - - return detailedSummary, allWarnings, err -} - -func (actor Actor) createSummary(app resources.Application, withObfuscatedValues bool) (ApplicationSummary, Warnings, error) { - var allWarnings Warnings - - processSummaries, processWarnings, err := actor.getProcessSummariesForApp(app.GUID, withObfuscatedValues) - allWarnings = append(allWarnings, processWarnings...) - if err != nil { - return ApplicationSummary{}, allWarnings, err - } - - routes, warnings, err := actor.GetApplicationRoutes(app.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return ApplicationSummary{}, allWarnings, err - } - - return ApplicationSummary{ - Application: app, - ProcessSummaries: processSummaries, - Routes: routes, - }, allWarnings, nil -} - -func (actor Actor) addDroplet(summary ApplicationSummary) (DetailedApplicationSummary, Warnings, error) { - var allWarnings Warnings - - droplet, warnings, err := actor.GetCurrentDropletByApplication(summary.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - if _, ok := err.(actionerror.DropletNotFoundError); !ok { - return DetailedApplicationSummary{}, allWarnings, err - } - } - return DetailedApplicationSummary{ - ApplicationSummary: summary, - CurrentDroplet: droplet, - }, allWarnings, nil -} - -func toAppGUIDs(apps []resources.Application) []string { - guids := make([]string, len(apps)) - - for i, app := range apps { - guids[i] = app.GUID - } - - return guids -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/auth.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/auth.go deleted file mode 100644 index c69d483..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/auth.go +++ /dev/null @@ -1,113 +0,0 @@ -package v7action - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "strings" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/uaa/constant" - "code.cloudfoundry.org/cli/cf/configuration/coreconfig" - "code.cloudfoundry.org/cli/util/configv3" -) - -type defaultAuthActor struct { - config Config - uaaClient UAAClient -} - -func NewDefaultAuthActor(config Config, uaaClient UAAClient) AuthActor { - return &defaultAuthActor{ - config: config, - uaaClient: uaaClient, - } -} - -func (actor defaultAuthActor) Authenticate(credentials map[string]string, origin string, grantType constant.GrantType) error { - if grantType == constant.GrantTypePassword && actor.config.UAAGrantType() == string(constant.GrantTypeClientCredentials) { - return actionerror.PasswordGrantTypeLogoutRequiredError{} - } - - actor.config.UnsetOrganizationAndSpaceInformation() - accessToken, refreshToken, err := actor.uaaClient.Authenticate(credentials, origin, grantType) - if err != nil { - actor.config.SetTokenInformation("", "", "") - return err - } - - accessToken = fmt.Sprintf("bearer %s", accessToken) - actor.config.SetTokenInformation(accessToken, refreshToken, "") - - if grantType == constant.GrantTypePassword { - actor.config.SetUAAGrantType("") - } else { - actor.config.SetUAAGrantType(string(grantType)) - } - - if grantType == constant.GrantTypeClientCredentials { - actor.config.SetUAAClientCredentials(credentials["client_id"], "") - } - - return nil -} - -func (actor defaultAuthActor) GetLoginPrompts() (map[string]coreconfig.AuthPrompt, error) { - rawPrompts, err := actor.uaaClient.GetLoginPrompts() - if err != nil { - return nil, err - } - - prompts := make(map[string]coreconfig.AuthPrompt) - for key, val := range rawPrompts { - prompts[key] = coreconfig.AuthPrompt{ - Type: knownAuthPromptTypes[val[0]], - DisplayName: val[1], - } - } - - return prompts, nil -} - -func (actor defaultAuthActor) GetCurrentUser() (configv3.User, error) { - return actor.config.CurrentUser() -} - -// TODO: error check this in future stories -func (actor Actor) RevokeAccessAndRefreshTokens() error { - accessToken := actor.Config.AccessToken() - if actor.isTokenRevocable(accessToken) { - refreshToken := actor.Config.RefreshToken() - _ = actor.UAAClient.Revoke(refreshToken) - _ = actor.UAAClient.Revoke(accessToken) - } - return nil -} - -func (actor Actor) isTokenRevocable(token string) bool { - segments := strings.Split(token, ".") - - if len(segments) < 2 { - return false - } - - jsonPayload, err := base64.RawURLEncoding.DecodeString(segments[1]) - if err != nil { - return false - } - - payload := make(map[string]interface{}) - json.Unmarshal(jsonPayload, &payload) - revocable, ok := payload["revocable"].(bool) - - if !ok { - return false - } - - return revocable -} - -var knownAuthPromptTypes = map[string]coreconfig.AuthPromptType{ - "text": coreconfig.AuthPromptTypeText, - "password": coreconfig.AuthPromptTypePassword, -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/build.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/build.go deleted file mode 100644 index a6aeda4..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/build.go +++ /dev/null @@ -1,177 +0,0 @@ -package v7action - -import ( - "errors" - "strings" - "time" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" - - log "github.com/sirupsen/logrus" -) - -func (actor Actor) StagePackage(packageGUID, appName, spaceGUID string) (<-chan resources.Droplet, <-chan Warnings, <-chan error) { - dropletStream := make(chan resources.Droplet) - warningsStream := make(chan Warnings) - errorStream := make(chan error) - go func() { - defer close(dropletStream) - defer close(warningsStream) - defer close(errorStream) - - apps, warnings, err := actor.GetApplicationsByNamesAndSpace([]string{appName}, spaceGUID) - warningsStream <- warnings - if err != nil { - if _, ok := err.(actionerror.ApplicationsNotFoundError); ok { - err = actionerror.ApplicationNotFoundError{Name: appName} - } - errorStream <- err - return - } - app := apps[0] - - pkgs, allWarnings, err := actor.CloudControllerClient.GetPackages(ccv3.Query{ - Key: ccv3.AppGUIDFilter, Values: []string{app.GUID}, - }) - warningsStream <- Warnings(allWarnings) - if err != nil { - errorStream <- err - return - } - - if !packageInPackages(packageGUID, pkgs) { - err = actionerror.PackageNotFoundInAppError{GUID: packageGUID, AppName: appName} - errorStream <- err - return - } - - build := resources.Build{PackageGUID: packageGUID} - build, allWarnings, err = actor.CloudControllerClient.CreateBuild(build) - warningsStream <- Warnings(allWarnings) - - if err != nil { - errorStream <- err - return - } - - timer := actor.Clock.NewTimer(time.Millisecond) - defer timer.Stop() - timeout := actor.Clock.After(actor.Config.StagingTimeout()) - - for { - select { - case <-timeout: - errorStream <- actionerror.StagingTimeoutError{AppName: appName, Timeout: actor.Config.StagingTimeout()} - return - case <-timer.C(): - var warnings ccv3.Warnings - build, warnings, err = actor.CloudControllerClient.GetBuild(build.GUID) - warningsStream <- Warnings(warnings) - if err != nil { - errorStream <- err - return - } - - switch build.State { - case constant.BuildFailed: - if strings.Contains(build.Error, "NoAppDetectedError") { - errorStream <- actionerror.StagingFailedNoAppDetectedError{Reason: build.Error} - } else { - errorStream <- actionerror.StagingFailedError{Reason: build.Error} - } - return - case constant.BuildStaging: - timer.Reset(actor.Config.PollingInterval()) - default: - - //TODO: uncomment after #150569020 - // droplet, warnings, err := actor.CloudControllerClient.GetDroplet(build.DropletGUID) - // warningsStream <- Warnings(warnings) - // if err != nil { - // errorStream <- err - // return - // } - - droplet := resources.Droplet{ - GUID: build.DropletGUID, - State: constant.DropletState(build.State), - CreatedAt: build.CreatedAt, - } - - dropletStream <- droplet - return - } - } - } - }() - - return dropletStream, warningsStream, errorStream -} - -func (actor Actor) StageApplicationPackage(packageGUID string) (resources.Build, Warnings, error) { - var allWarnings Warnings - - build := resources.Build{PackageGUID: packageGUID} - build, warnings, err := actor.CloudControllerClient.CreateBuild(build) - log.Debug("created build") - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Build{}, allWarnings, err - } - - log.Debug("no errors creating build") - return resources.Build{GUID: build.GUID}, allWarnings, nil -} - -func (actor Actor) PollBuild(buildGUID string, appName string) (resources.Droplet, Warnings, error) { - var allWarnings Warnings - - timeout := actor.Clock.After(actor.Config.StagingTimeout()) - interval := actor.Clock.NewTimer(time.Millisecond) - - for { - select { - case <-interval.C(): - build, warnings, err := actor.CloudControllerClient.GetBuild(buildGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Droplet{}, allWarnings, err - } - - switch build.State { - case constant.BuildFailed: - return resources.Droplet{}, allWarnings, errors.New(build.Error) - - case constant.BuildStaged: - droplet, warnings, err := actor.CloudControllerClient.GetDroplet(build.DropletGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Droplet{}, allWarnings, err - } - - return resources.Droplet{ - GUID: droplet.GUID, - State: droplet.State, - CreatedAt: droplet.CreatedAt, - }, allWarnings, nil - } - - interval.Reset(actor.Config.PollingInterval()) - - case <-timeout: - return resources.Droplet{}, allWarnings, actionerror.StagingTimeoutError{AppName: appName, Timeout: actor.Config.StagingTimeout()} - } - } -} - -func packageInPackages(targetPkgGUID string, pkgs []resources.Package) bool { - for i := range pkgs { - if pkgs[i].GUID == targetPkgGUID { - return true - } - } - return false -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/buildpack.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/buildpack.go deleted file mode 100644 index 0fc3eab..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/buildpack.go +++ /dev/null @@ -1,271 +0,0 @@ -package v7action - -import ( - "archive/zip" - "io" - "os" - "path/filepath" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util" -) - -type JobURL ccv3.JobURL - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Downloader - -type Downloader interface { - Download(url string, tmpDirPath string) (string, error) -} - -func (actor Actor) GetBuildpacks(labelSelector string) ([]resources.Buildpack, Warnings, error) { - queries := []ccv3.Query{ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.PositionOrder}}} - if labelSelector != "" { - queries = append(queries, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}}) - } - - buildpacks, warnings, err := actor.CloudControllerClient.GetBuildpacks(queries...) - - return buildpacks, Warnings(warnings), err -} - -// GetBuildpackByNameAndStack returns a buildpack with the provided name and -// stack. If `buildpackStack` is not specified, and there are multiple -// buildpacks with the same name, it will return the one with no stack, if -// present. -func (actor Actor) GetBuildpackByNameAndStack(buildpackName string, buildpackStack string) (resources.Buildpack, Warnings, error) { - var ( - buildpacks []resources.Buildpack - warnings ccv3.Warnings - err error - ) - - if buildpackStack == "" { - buildpacks, warnings, err = actor.CloudControllerClient.GetBuildpacks(ccv3.Query{ - Key: ccv3.NameFilter, - Values: []string{buildpackName}, - }) - } else { - buildpacks, warnings, err = actor.CloudControllerClient.GetBuildpacks( - ccv3.Query{ - Key: ccv3.NameFilter, - Values: []string{buildpackName}, - }, - ccv3.Query{ - Key: ccv3.StackFilter, - Values: []string{buildpackStack}, - }, - ) - } - - if err != nil { - return resources.Buildpack{}, Warnings(warnings), err - } - - if len(buildpacks) == 0 { - return resources.Buildpack{}, Warnings(warnings), actionerror.BuildpackNotFoundError{BuildpackName: buildpackName, StackName: buildpackStack} - } - - if len(buildpacks) > 1 { - for _, buildpack := range buildpacks { - if buildpack.Stack == "" { - return buildpack, Warnings(warnings), nil - } - } - return resources.Buildpack{}, Warnings(warnings), actionerror.MultipleBuildpacksFoundError{BuildpackName: buildpackName} - } - - return buildpacks[0], Warnings(warnings), err -} - -func (actor Actor) CreateBuildpack(buildpack resources.Buildpack) (resources.Buildpack, Warnings, error) { - buildpack, warnings, err := actor.CloudControllerClient.CreateBuildpack(buildpack) - - return buildpack, Warnings(warnings), err -} - -func (actor Actor) UpdateBuildpackByNameAndStack(buildpackName string, buildpackStack string, buildpack resources.Buildpack) (resources.Buildpack, Warnings, error) { - var warnings Warnings - foundBuildpack, getWarnings, err := actor.GetBuildpackByNameAndStack(buildpackName, buildpackStack) - warnings = append(warnings, getWarnings...) - - if err != nil { - return resources.Buildpack{}, warnings, err - } - - buildpack.GUID = foundBuildpack.GUID - - updatedBuildpack, updateWarnings, err := actor.CloudControllerClient.UpdateBuildpack(resources.Buildpack(buildpack)) - warnings = append(warnings, updateWarnings...) - if err != nil { - return resources.Buildpack{}, warnings, err - } - - return updatedBuildpack, warnings, nil -} - -func (actor Actor) UploadBuildpack(guid string, pathToBuildpackBits string, progressBar SimpleProgressBar) (ccv3.JobURL, Warnings, error) { - wrappedReader, size, err := progressBar.Initialize(pathToBuildpackBits) - if err != nil { - return "", Warnings{}, err - } - - defer progressBar.Terminate() - - jobURL, warnings, err := actor.CloudControllerClient.UploadBuildpack(guid, pathToBuildpackBits, wrappedReader, size) - if err != nil { - // TODO: Do we actually want to convert this error? Is this the right place? - if e, ok := err.(ccerror.BuildpackAlreadyExistsForStackError); ok { - return "", Warnings(warnings), actionerror.BuildpackAlreadyExistsForStackError{Message: e.Message} - } - return "", Warnings(warnings), err - } - - return jobURL, Warnings(warnings), nil -} - -func (actor *Actor) PrepareBuildpackBits(inputPath string, tmpDirPath string, downloader Downloader) (string, error) { - if util.IsHTTPScheme(inputPath) { - pathToDownloadedBits, err := downloader.Download(inputPath, tmpDirPath) - if err != nil { - return "", err - } - return pathToDownloadedBits, nil - } - - if filepath.Ext(inputPath) == ".zip" { - return inputPath, nil - } - - info, err := os.Stat(inputPath) - if err != nil { - return "", err - } - - if info.IsDir() { - var empty bool - empty, err = isEmptyDirectory(inputPath) - if err != nil { - return "", err - } - if empty { - return "", actionerror.EmptyBuildpackDirectoryError{Path: inputPath} - } - archive := filepath.Join(tmpDirPath, filepath.Base(inputPath)) + ".zip" - - err = Zipit(inputPath, archive, "") - if err != nil { - return "", err - } - return archive, nil - } - - return inputPath, nil -} - -func isEmptyDirectory(name string) (bool, error) { - f, err := os.Open(name) - if err != nil { - return false, err - } - defer f.Close() - - _, err = f.Readdirnames(1) - if err == io.EOF { - return true, nil - } - return false, err -} - -// Zipit zips the source into a .zip file in the target dir -func Zipit(source, target, prefix string) error { - // Thanks to Svett Ralchev - // http://blog.ralch.com/tutorial/golang-working-with-zip/ - - zipfile, err := os.Create(target) - if err != nil { - return err - } - defer zipfile.Close() - - if prefix != "" { - _, err = io.WriteString(zipfile, prefix) - if err != nil { - return err - } - } - - archive := zip.NewWriter(zipfile) - defer archive.Close() - - err = filepath.Walk(source, func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - - if path == source { - return nil - } - - header, err := zip.FileInfoHeader(info) - if err != nil { - return err - } - header.Name, err = filepath.Rel(source, path) - if err != nil { - return err - } - - header.Name = filepath.ToSlash(header.Name) - if info.IsDir() { - header.Name += "/" - header.SetMode(info.Mode()) - } else { - header.Method = zip.Deflate - header.SetMode(fixMode(info.Mode())) - } - - writer, err := archive.CreateHeader(header) - if err != nil { - return err - } - - if info.IsDir() { - return nil - } - - file, err := os.Open(path) - if err != nil { - return err - } - defer file.Close() - - _, err = io.Copy(writer, file) - return err - }) - - return err -} - -func (actor Actor) DeleteBuildpackByNameAndStack(buildpackName string, buildpackStack string) (Warnings, error) { - var allWarnings Warnings - buildpack, getBuildpackWarnings, err := actor.GetBuildpackByNameAndStack(buildpackName, buildpackStack) - allWarnings = append(allWarnings, getBuildpackWarnings...) - if err != nil { - return allWarnings, err - } - - jobURL, deleteBuildpackWarnings, err := actor.CloudControllerClient.DeleteBuildpack(buildpack.GUID) - allWarnings = append(allWarnings, deleteBuildpackWarnings...) - if err != nil { - return allWarnings, err - } - - pollWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, pollWarnings...) - - return allWarnings, err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/cloud_controller_client.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/cloud_controller_client.go deleted file mode 100644 index 5bca12c..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/cloud_controller_client.go +++ /dev/null @@ -1,201 +0,0 @@ -package v7action - -import ( - "io" - "net/http" - - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . CloudControllerClient - -// CloudControllerClient is the interface to the cloud controller V3 API. -type CloudControllerClient interface { - ApplyOrganizationQuota(quotaGUID string, orgGUID string) (resources.RelationshipList, ccv3.Warnings, error) - ApplySpaceQuota(quotaGUID string, spaceGUID string) (resources.RelationshipList, ccv3.Warnings, error) - CheckRoute(domainGUID string, hostname string, path string, port int) (bool, ccv3.Warnings, error) - CancelDeployment(deploymentGUID string) (ccv3.Warnings, error) - CopyPackage(sourcePackageGUID string, targetAppGUID string) (resources.Package, ccv3.Warnings, error) - CreateApplication(app resources.Application) (resources.Application, ccv3.Warnings, error) - CreateApplicationDeployment(appGUID string, dropletGUID string) (string, ccv3.Warnings, error) - CreateApplicationDeploymentByRevision(appGUID string, revisionGUID string) (string, ccv3.Warnings, error) - CreateApplicationProcessScale(appGUID string, process resources.Process) (resources.Process, ccv3.Warnings, error) - CreateApplicationTask(appGUID string, task resources.Task) (resources.Task, ccv3.Warnings, error) - CreateBuild(build resources.Build) (resources.Build, ccv3.Warnings, error) - CreateBuildpack(bp resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error) - CreateDomain(domain resources.Domain) (resources.Domain, ccv3.Warnings, error) - CreateDroplet(appGUID string) (resources.Droplet, ccv3.Warnings, error) - CreateIsolationSegment(isolationSegment resources.IsolationSegment) (resources.IsolationSegment, ccv3.Warnings, error) - CreateOrganization(orgName string) (resources.Organization, ccv3.Warnings, error) - CreateOrganizationQuota(orgQuota resources.OrganizationQuota) (resources.OrganizationQuota, ccv3.Warnings, error) - CreatePackage(pkg resources.Package) (resources.Package, ccv3.Warnings, error) - CreateRole(role resources.Role) (resources.Role, ccv3.Warnings, error) - CreateRoute(route resources.Route) (resources.Route, ccv3.Warnings, error) - CreateRouteBinding(binding resources.RouteBinding) (ccv3.JobURL, ccv3.Warnings, error) - CreateServiceBroker(serviceBroker resources.ServiceBroker) (ccv3.JobURL, ccv3.Warnings, error) - CreateServiceCredentialBinding(binding resources.ServiceCredentialBinding) (ccv3.JobURL, ccv3.Warnings, error) - CreateServiceInstance(serviceInstance resources.ServiceInstance) (ccv3.JobURL, ccv3.Warnings, error) - CreateSecurityGroup(securityGroup resources.SecurityGroup) (resources.SecurityGroup, ccv3.Warnings, error) - CreateSpace(space resources.Space) (resources.Space, ccv3.Warnings, error) - CreateSpaceQuota(spaceQuota resources.SpaceQuota) (resources.SpaceQuota, ccv3.Warnings, error) - CreateUser(userGUID string) (resources.User, ccv3.Warnings, error) - DeleteApplication(guid string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteApplicationProcessInstance(appGUID string, processType string, instanceIndex int) (ccv3.Warnings, error) - DeleteBuildpack(buildpackGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteDomain(domainGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteIsolationSegment(guid string) (ccv3.Warnings, error) - DeleteIsolationSegmentOrganization(isolationSegmentGUID string, organizationGUID string) (ccv3.Warnings, error) - DeleteOrganization(orgGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteOrganizationQuota(quotaGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteOrphanedRoutes(spaceGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteRole(roleGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteRoute(routeGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteRouteBinding(guid string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteSecurityGroup(securityGroupGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteServiceCredentialBinding(guid string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteServiceBroker(serviceBrokerGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteServiceInstance(serviceInstanceGUID string, query ...ccv3.Query) (ccv3.JobURL, ccv3.Warnings, error) - DeleteSpaceQuota(spaceQuotaGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteSpace(guid string) (ccv3.JobURL, ccv3.Warnings, error) - DeleteUser(userGUID string) (ccv3.JobURL, ccv3.Warnings, error) - DownloadDroplet(dropletGUID string) ([]byte, ccv3.Warnings, error) - EntitleIsolationSegmentToOrganizations(isoGUID string, orgGUIDs []string) (resources.RelationshipList, ccv3.Warnings, error) - GetApplicationByNameAndSpace(appName string, spaceGUID string) (resources.Application, ccv3.Warnings, error) - GetApplicationDropletCurrent(appGUID string) (resources.Droplet, ccv3.Warnings, error) - GetApplicationEnvironment(appGUID string) (ccv3.Environment, ccv3.Warnings, error) - GetApplicationManifest(appGUID string) ([]byte, ccv3.Warnings, error) - GetApplicationProcessByType(appGUID string, processType string) (resources.Process, ccv3.Warnings, error) - GetApplicationProcesses(appGUID string) ([]resources.Process, ccv3.Warnings, error) - GetApplicationRevisions(appGUID string, query ...ccv3.Query) ([]resources.Revision, ccv3.Warnings, error) - GetApplicationRevisionsDeployed(appGUID string) ([]resources.Revision, ccv3.Warnings, error) - GetApplicationRoutes(appGUID string) ([]resources.Route, ccv3.Warnings, error) - GetApplicationTasks(appGUID string, query ...ccv3.Query) ([]resources.Task, ccv3.Warnings, error) - GetApplications(query ...ccv3.Query) ([]resources.Application, ccv3.Warnings, error) - GetBuild(guid string) (resources.Build, ccv3.Warnings, error) - GetBuildpacks(query ...ccv3.Query) ([]resources.Buildpack, ccv3.Warnings, error) - GetDefaultDomain(orgGuid string) (resources.Domain, ccv3.Warnings, error) - GetDeployment(guid string) (resources.Deployment, ccv3.Warnings, error) - GetDeployments(query ...ccv3.Query) ([]resources.Deployment, ccv3.Warnings, error) - GetDomain(GUID string) (resources.Domain, ccv3.Warnings, error) - GetDomains(query ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error) - GetDroplet(guid string) (resources.Droplet, ccv3.Warnings, error) - GetDroplets(query ...ccv3.Query) ([]resources.Droplet, ccv3.Warnings, error) - GetEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName) (resources.EnvironmentVariables, ccv3.Warnings, error) - GetEvents(query ...ccv3.Query) ([]ccv3.Event, ccv3.Warnings, error) - GetFeatureFlag(featureFlagName string) (resources.FeatureFlag, ccv3.Warnings, error) - GetFeatureFlags() ([]resources.FeatureFlag, ccv3.Warnings, error) - GetInfo() (ccv3.Info, ccv3.Warnings, error) - GetIsolationSegment(guid string) (resources.IsolationSegment, ccv3.Warnings, error) - GetIsolationSegmentOrganizations(isolationSegmentGUID string) ([]resources.Organization, ccv3.Warnings, error) - GetIsolationSegments(query ...ccv3.Query) ([]resources.IsolationSegment, ccv3.Warnings, error) - GetNewApplicationProcesses(appGUID string, deploymentGUID string) ([]resources.Process, ccv3.Warnings, error) - GetOrganization(orgGUID string) (resources.Organization, ccv3.Warnings, error) - GetOrganizationDefaultIsolationSegment(orgGUID string) (resources.Relationship, ccv3.Warnings, error) - GetOrganizationDomains(orgGUID string, query ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error) - GetOrganizationQuota(quotaGUID string) (resources.OrganizationQuota, ccv3.Warnings, error) - GetOrganizationQuotas(query ...ccv3.Query) ([]resources.OrganizationQuota, ccv3.Warnings, error) - GetOrganizations(query ...ccv3.Query) ([]resources.Organization, ccv3.Warnings, error) - GetPackage(guid string) (resources.Package, ccv3.Warnings, error) - GetPackages(query ...ccv3.Query) ([]resources.Package, ccv3.Warnings, error) - GetPackageDroplets(packageGUID string, query ...ccv3.Query) ([]resources.Droplet, ccv3.Warnings, error) - GetProcess(processGUID string) (resources.Process, ccv3.Warnings, error) - GetProcesses(query ...ccv3.Query) ([]resources.Process, ccv3.Warnings, error) - GetProcessInstances(processGUID string) ([]ccv3.ProcessInstance, ccv3.Warnings, error) - GetProcessSidecars(processGUID string) ([]resources.Sidecar, ccv3.Warnings, error) - GetRoles(query ...ccv3.Query) ([]resources.Role, ccv3.IncludedResources, ccv3.Warnings, error) - GetRouteBindings(query ...ccv3.Query) ([]resources.RouteBinding, ccv3.IncludedResources, ccv3.Warnings, error) - GetRouteDestinations(routeGUID string) ([]resources.RouteDestination, ccv3.Warnings, error) - GetRoutes(query ...ccv3.Query) ([]resources.Route, ccv3.Warnings, error) - GetRunningSecurityGroups(spaceGUID string, queries ...ccv3.Query) ([]resources.SecurityGroup, ccv3.Warnings, error) - GetSecurityGroups(query ...ccv3.Query) ([]resources.SecurityGroup, ccv3.Warnings, error) - GetServiceBrokers(query ...ccv3.Query) ([]resources.ServiceBroker, ccv3.Warnings, error) - GetServiceCredentialBindings(query ...ccv3.Query) ([]resources.ServiceCredentialBinding, ccv3.Warnings, error) - GetServiceCredentialBindingDetails(guid string) (resources.ServiceCredentialBindingDetails, ccv3.Warnings, error) - GetServiceInstanceByNameAndSpace(name, spaceGUID string, query ...ccv3.Query) (resources.ServiceInstance, ccv3.IncludedResources, ccv3.Warnings, error) - GetServiceInstanceParameters(serviceInstanceGUID string) (types.JSONObject, ccv3.Warnings, error) - GetServiceInstanceSharedSpaces(serviceInstanceGUID string) ([]ccv3.SpaceWithOrganization, ccv3.Warnings, error) - GetServiceInstanceUsageSummary(serviceInstanceGUID string) ([]resources.ServiceInstanceUsageSummary, ccv3.Warnings, error) - GetServiceInstances(query ...ccv3.Query) ([]resources.ServiceInstance, ccv3.IncludedResources, ccv3.Warnings, error) - GetServiceOfferingByGUID(guid string) (resources.ServiceOffering, ccv3.Warnings, error) - GetServiceOfferings(query ...ccv3.Query) ([]resources.ServiceOffering, ccv3.Warnings, error) - GetServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName string) (resources.ServiceOffering, ccv3.Warnings, error) - GetServicePlanByGUID(guid string) (resources.ServicePlan, ccv3.Warnings, error) - GetServicePlans(query ...ccv3.Query) ([]resources.ServicePlan, ccv3.Warnings, error) - GetServicePlansWithOfferings(query ...ccv3.Query) ([]ccv3.ServiceOfferingWithPlans, ccv3.Warnings, error) - GetServicePlansWithSpaceAndOrganization(query ...ccv3.Query) ([]ccv3.ServicePlanWithSpaceAndOrganization, ccv3.Warnings, error) - GetSpaceFeature(spaceGUID string, featureName string) (bool, ccv3.Warnings, error) - GetSpaceIsolationSegment(spaceGUID string) (resources.Relationship, ccv3.Warnings, error) - GetSpaceManifestDiff(spaceGUID string, rawManifest []byte) (resources.ManifestDiff, ccv3.Warnings, error) - GetSpaceQuota(spaceQuotaGUID string) (resources.SpaceQuota, ccv3.Warnings, error) - GetSpaces(query ...ccv3.Query) ([]resources.Space, ccv3.IncludedResources, ccv3.Warnings, error) - GetSpaceQuotas(query ...ccv3.Query) ([]resources.SpaceQuota, ccv3.Warnings, error) - GetSSHEnabled(appGUID string) (ccv3.SSHEnabled, ccv3.Warnings, error) - GetAppFeature(appGUID string, featureName string) (resources.ApplicationFeature, ccv3.Warnings, error) - GetStacks(query ...ccv3.Query) ([]resources.Stack, ccv3.Warnings, error) - GetStagingSecurityGroups(spaceGUID string, queries ...ccv3.Query) ([]resources.SecurityGroup, ccv3.Warnings, error) - GetUser(userGUID string) (resources.User, ccv3.Warnings, error) - GetUsers(query ...ccv3.Query) ([]resources.User, ccv3.Warnings, error) - MakeRequestSendReceiveRaw(Method string, URL string, headers http.Header, requestBody []byte) ([]byte, *http.Response, error) - MapRoute(routeGUID string, appGUID string, destinationProtocol string) (ccv3.Warnings, error) - PollJob(jobURL ccv3.JobURL) (ccv3.Warnings, error) - PollJobForState(jobURL ccv3.JobURL, state constant.JobState) (ccv3.Warnings, error) - PollJobToEventStream(jobURL ccv3.JobURL) chan ccv3.PollJobEvent - PurgeServiceOffering(serviceOfferingGUID string) (ccv3.Warnings, error) - ResourceMatch(resources []ccv3.Resource) ([]ccv3.Resource, ccv3.Warnings, error) - RootResponse() (ccv3.Info, ccv3.Warnings, error) - SetApplicationDroplet(appGUID string, dropletGUID string) (resources.Relationship, ccv3.Warnings, error) - SharePrivateDomainToOrgs(domainGuid string, sharedOrgs ccv3.SharedOrgs) (ccv3.Warnings, error) - ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (resources.RelationshipList, ccv3.Warnings, error) - TargetCF(settings ccv3.TargetSettings) - UnbindSecurityGroupRunningSpace(securityGroupGUID string, spaceGUID string) (ccv3.Warnings, error) - UnbindSecurityGroupStagingSpace(securityGroupGUID string, spaceGUID string) (ccv3.Warnings, error) - UnmapRoute(routeGUID string, destinationGUID string) (ccv3.Warnings, error) - UnsharePrivateDomainFromOrg(domainGUID string, sharedOrgGUID string) (ccv3.Warnings, error) - UnshareServiceInstanceFromSpace(serviceInstanceGUID string, sharedToSpaceGUID string) (ccv3.Warnings, error) - UpdateAppFeature(appGUID string, enabled bool, featureName string) (ccv3.Warnings, error) - UpdateApplication(app resources.Application) (resources.Application, ccv3.Warnings, error) - UpdateApplicationApplyManifest(appGUID string, rawManifest []byte) (ccv3.JobURL, ccv3.Warnings, error) - UpdateApplicationEnvironmentVariables(appGUID string, envVars resources.EnvironmentVariables) (resources.EnvironmentVariables, ccv3.Warnings, error) - UpdateApplicationRestart(appGUID string) (resources.Application, ccv3.Warnings, error) - UpdateApplicationStart(appGUID string) (resources.Application, ccv3.Warnings, error) - UpdateApplicationStop(appGUID string) (resources.Application, ccv3.Warnings, error) - UpdateDestination(routeGUID string, destinationGUID string, protocol string) (ccv3.Warnings, error) - UpdateBuildpack(buildpack resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error) - UpdateEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName, envVars resources.EnvironmentVariables) (resources.EnvironmentVariables, ccv3.Warnings, error) - UpdateFeatureFlag(flag resources.FeatureFlag) (resources.FeatureFlag, ccv3.Warnings, error) - UpdateOrganization(org resources.Organization) (resources.Organization, ccv3.Warnings, error) - UpdateOrganizationDefaultIsolationSegmentRelationship(orgGUID string, isolationSegmentGUID string) (resources.Relationship, ccv3.Warnings, error) - UpdateOrganizationQuota(orgQuota resources.OrganizationQuota) (resources.OrganizationQuota, ccv3.Warnings, error) - UpdateProcess(process resources.Process) (resources.Process, ccv3.Warnings, error) - UpdateResourceMetadata(resource string, resourceGUID string, metadata resources.Metadata) (ccv3.JobURL, ccv3.Warnings, error) - UpdateSecurityGroupRunningSpace(securityGroupGUID string, spaceGUIDs []string) (ccv3.Warnings, error) - UpdateSecurityGroupStagingSpace(securityGroupGUID string, spaceGUIDs []string) (ccv3.Warnings, error) - UpdateSecurityGroup(securityGroup resources.SecurityGroup) (resources.SecurityGroup, ccv3.Warnings, error) - UpdateServiceInstance(serviceInstanceGUID string, serviceInstanceUpdates resources.ServiceInstance) (ccv3.JobURL, ccv3.Warnings, error) - UpdateSpace(space resources.Space) (resources.Space, ccv3.Warnings, error) - UpdateSpaceApplyManifest(spaceGUID string, rawManifest []byte) (ccv3.JobURL, ccv3.Warnings, error) - UpdateSpaceFeature(spaceGUID string, enabled bool, featureName string) (ccv3.Warnings, error) - UpdateSpaceIsolationSegmentRelationship(spaceGUID string, isolationSegmentGUID string) (resources.Relationship, ccv3.Warnings, error) - UpdateSpaceQuota(spaceQuota resources.SpaceQuota) (resources.SpaceQuota, ccv3.Warnings, error) - UnsetSpaceQuota(spaceQuotaGUID, spaceGUID string) (ccv3.Warnings, error) - UpdateServiceBroker(serviceBrokerGUID string, serviceBroker resources.ServiceBroker) (ccv3.JobURL, ccv3.Warnings, error) - UpdateTaskCancel(taskGUID string) (resources.Task, ccv3.Warnings, error) - UploadBitsPackage(pkg resources.Package, matchedResources []ccv3.Resource, newResources io.Reader, newResourcesLength int64) (resources.Package, ccv3.Warnings, error) - UploadBuildpack(buildpackGUID string, buildpackPath string, buildpack io.Reader, buildpackLength int64) (ccv3.JobURL, ccv3.Warnings, error) - UploadDropletBits(dropletGUID string, dropletPath string, droplet io.Reader, dropletLength int64) (ccv3.JobURL, ccv3.Warnings, error) - UploadPackage(pkg resources.Package, zipFilepath string) (resources.Package, ccv3.Warnings, error) - WhoAmI() (resources.K8sUser, ccv3.Warnings, error) - - servicePlanVisibilityClient -} - -type servicePlanVisibilityClient interface { - GetServicePlanVisibility(servicePlanGUID string) (resources.ServicePlanVisibility, ccv3.Warnings, error) - UpdateServicePlanVisibility(servicePlanGUID string, visibility resources.ServicePlanVisibility) (resources.ServicePlanVisibility, ccv3.Warnings, error) - DeleteServicePlanVisibility(servicePlanGUID, organizationGUID string) (ccv3.Warnings, error) -} - -// TODO: Split this enormous interface diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/config.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/config.go deleted file mode 100644 index 8c4eb01..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/config.go +++ /dev/null @@ -1,33 +0,0 @@ -package v7action - -import ( - "time" - - "code.cloudfoundry.org/cli/util/configv3" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Config - -type Config interface { - AccessToken() string - APIVersion() string - CurrentUser() (configv3.User, error) - DialTimeout() time.Duration - PollingInterval() time.Duration - RefreshToken() string - SSHOAuthClient() string - SetAccessToken(token string) - SetRefreshToken(token string) - SetTargetInformation(args configv3.TargetInformationArgs) - SetTokenInformation(accessToken string, refreshToken string, token string) - SetUAAClientCredentials(client string, clientSecret string) - SetUAAGrantType(grantType string) - SkipSSLValidation() bool - StagingTimeout() time.Duration - StartupTimeout() time.Duration - Target() string - UAAGrantType() string - UnsetOrganizationAndSpaceInformation() - SetKubernetesAuthInfo(authInfo string) - IsCFOnK8s() bool -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/curl.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/curl.go deleted file mode 100644 index 7e82c96..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/curl.go +++ /dev/null @@ -1,69 +0,0 @@ -package v7action - -import ( - "bufio" - "fmt" - "io/ioutil" - "net/http" - "net/textproto" - "strings" - - "code.cloudfoundry.org/cli/command/translatableerror" -) - -func (actor Actor) MakeCurlRequest( - method string, - path string, - customHeaders []string, - data string, - failOnHTTPError bool, -) ([]byte, *http.Response, error) { - url := fmt.Sprintf("%s/%s", actor.Config.Target(), strings.TrimLeft(path, "/")) - - requestHeaders, err := buildRequestHeaders(customHeaders) - if err != nil { - return nil, nil, translatableerror.RequestCreationError{Err: err} - } - - if method == "" && data != "" { - method = "POST" - } - - requestBodyBytes := []byte(data) - - trimmedData := strings.Trim(string(data), `"'`) - if strings.HasPrefix(trimmedData, "@") { - trimmedData = strings.Trim(trimmedData[1:], `"'`) - requestBodyBytes, err = ioutil.ReadFile(trimmedData) - if err != nil { - return nil, nil, translatableerror.RequestCreationError{Err: err} - } - } - - responseBody, httpResponse, err := actor.CloudControllerClient.MakeRequestSendReceiveRaw( - method, - url, - requestHeaders, - requestBodyBytes, - ) - - if err != nil && failOnHTTPError { - return nil, nil, translatableerror.CurlExit22Error{StatusCode: httpResponse.StatusCode} - } - - return responseBody, httpResponse, nil -} - -func buildRequestHeaders(customHeaders []string) (http.Header, error) { - headerString := strings.Join(customHeaders, "\n") - headerString = strings.TrimSpace(headerString) - headerString += "\n\n" - - headerReader := bufio.NewReader(strings.NewReader(headerString)) - parsedCustomHeaders, err := textproto.NewReader(headerReader).ReadMIMEHeader() - if err != nil { - return nil, err - } - - return http.Header(parsedCustomHeaders), nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/deployment.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/deployment.go deleted file mode 100644 index c532df8..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/deployment.go +++ /dev/null @@ -1,44 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" -) - -func (actor Actor) CreateDeploymentByApplicationAndDroplet(appGUID string, dropletGUID string) (string, Warnings, error) { - deploymentGUID, warnings, err := actor.CloudControllerClient.CreateApplicationDeployment(appGUID, dropletGUID) - - return deploymentGUID, Warnings(warnings), err -} - -func (actor Actor) CreateDeploymentByApplicationAndRevision(appGUID string, revisionGUID string) (string, Warnings, error) { - deploymentGUID, warnings, err := actor.CloudControllerClient.CreateApplicationDeploymentByRevision(appGUID, revisionGUID) - - return deploymentGUID, Warnings(warnings), err -} - -func (actor Actor) GetLatestActiveDeploymentForApp(appGUID string) (resources.Deployment, Warnings, error) { - ccDeployments, warnings, err := actor.CloudControllerClient.GetDeployments( - ccv3.Query{Key: ccv3.AppGUIDFilter, Values: []string{appGUID}}, - ccv3.Query{Key: ccv3.StatusValueFilter, Values: []string{string(constant.DeploymentStatusValueActive)}}, - ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.CreatedAtDescendingOrder}}, - ccv3.Query{Key: ccv3.PerPage, Values: []string{"1"}}, - ) - - if err != nil { - return resources.Deployment{}, Warnings(warnings), err - } - - if len(ccDeployments) == 0 { - return resources.Deployment{}, Warnings(warnings), actionerror.ActiveDeploymentNotFoundError{} - } - - return resources.Deployment(ccDeployments[0]), Warnings(warnings), nil -} - -func (actor Actor) CancelDeployment(deploymentGUID string) (Warnings, error) { - warnings, err := actor.CloudControllerClient.CancelDeployment(deploymentGUID) - return Warnings(warnings), err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/domain.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/domain.go deleted file mode 100644 index d9ed8c9..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/domain.go +++ /dev/null @@ -1,184 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" -) - -type SharedOrgs ccv3.SharedOrgs - -func (actor Actor) CheckRoute(domainName string, hostname string, path string, port int) (bool, Warnings, error) { - var allWarnings Warnings - - domain, warnings, err := actor.GetDomainByName(domainName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return false, allWarnings, err - } - - matches, checkRouteWarnings, err := actor.CloudControllerClient.CheckRoute(domain.GUID, hostname, path, port) - allWarnings = append(allWarnings, checkRouteWarnings...) - - return matches, allWarnings, err -} - -func (actor Actor) CreateSharedDomain(domainName string, internal bool, routerGroupName string) (Warnings, error) { - allWarnings := Warnings{} - routerGroupGUID := "" - - if routerGroupName != "" { - routerGroup, err := actor.GetRouterGroupByName(routerGroupName) - if err != nil { - return allWarnings, err - } - - routerGroupGUID = routerGroup.GUID - } - - _, warnings, err := actor.CloudControllerClient.CreateDomain(resources.Domain{ - Name: domainName, - Internal: types.NullBool{IsSet: true, Value: internal}, - RouterGroup: routerGroupGUID, - }) - allWarnings = append(allWarnings, Warnings(warnings)...) - - return allWarnings, err -} - -func (actor Actor) CreatePrivateDomain(domainName string, orgName string) (Warnings, error) { - allWarnings := Warnings{} - organization, warnings, err := actor.GetOrganizationByName(orgName) - allWarnings = append(allWarnings, warnings...) - - if err != nil { - return allWarnings, err - } - _, apiWarnings, err := actor.CloudControllerClient.CreateDomain(resources.Domain{ - Name: domainName, - OrganizationGUID: organization.GUID, - }) - - actorWarnings := Warnings(apiWarnings) - allWarnings = append(allWarnings, actorWarnings...) - - return allWarnings, err -} - -func (actor Actor) DeleteDomain(domain resources.Domain) (Warnings, error) { - allWarnings := Warnings{} - - jobURL, apiWarnings, err := actor.CloudControllerClient.DeleteDomain(domain.GUID) - - actorWarnings := Warnings(apiWarnings) - allWarnings = append(allWarnings, actorWarnings...) - - if err != nil { - return allWarnings, err - } - - pollJobWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, Warnings(pollJobWarnings)...) - - return allWarnings, err -} - -func (actor Actor) GetOrganizationDomains(orgGuid string, labelSelector string) ([]resources.Domain, Warnings, error) { - keys := []ccv3.Query{} - if labelSelector != "" { - keys = append(keys, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}}) - } - ccv3Domains, warnings, err := actor.CloudControllerClient.GetOrganizationDomains(orgGuid, keys...) - - if err != nil { - return nil, Warnings(warnings), err - } - - var domains []resources.Domain - for _, domain := range ccv3Domains { - domains = append(domains, resources.Domain(domain)) - } - - return domains, Warnings(warnings), nil -} - -func (actor Actor) GetDomain(domainGUID string) (resources.Domain, Warnings, error) { - domain, warnings, err := actor.CloudControllerClient.GetDomain(domainGUID) - - if err != nil { - return resources.Domain{}, Warnings(warnings), err - } - - return resources.Domain(domain), Warnings(warnings), nil -} - -func (actor Actor) GetDomainByName(domainName string) (resources.Domain, Warnings, error) { - domain, warnings, err := actor.getDomainByName(domainName) - return domain, Warnings(warnings), err -} - -func (actor Actor) SharePrivateDomain(domainName string, orgName string) (Warnings, error) { - orgGUID, domainGUID, warnings, err := actor.GetDomainAndOrgGUIDsByName(domainName, orgName) - - if err != nil { - return warnings, err - } - - apiWarnings, err := actor.CloudControllerClient.SharePrivateDomainToOrgs( - domainGUID, - ccv3.SharedOrgs{GUIDs: []string{orgGUID}}, - ) - - allWarnings := append(warnings, Warnings(apiWarnings)...) - - return allWarnings, err -} - -func (actor Actor) UnsharePrivateDomain(domainName string, orgName string) (Warnings, error) { - orgGUID, domainGUID, warnings, err := actor.GetDomainAndOrgGUIDsByName(domainName, orgName) - - if err != nil { - return warnings, err - } - - apiWarnings, err := actor.CloudControllerClient.UnsharePrivateDomainFromOrg( - domainGUID, - orgGUID, - ) - - allWarnings := append(warnings, Warnings(apiWarnings)...) - - return allWarnings, err -} - -func (actor Actor) GetDomainAndOrgGUIDsByName(domainName string, orgName string) (string, string, Warnings, error) { - org, getOrgWarnings, err := actor.GetOrganizationByName(orgName) - - if err != nil { - return "", "", getOrgWarnings, err - } - - domain, getDomainWarnings, err := actor.GetDomainByName(domainName) - allWarnings := append(getOrgWarnings, getDomainWarnings...) - - if err != nil { - return "", "", allWarnings, err - } - - return org.GUID, domain.GUID, allWarnings, nil -} - -func (actor Actor) getDomainByName(domainName string) (resources.Domain, ccv3.Warnings, error) { - domains, warnings, err := actor.CloudControllerClient.GetDomains( - ccv3.Query{Key: ccv3.NameFilter, Values: []string{domainName}}, - ) - switch { - case err != nil: - return resources.Domain{}, warnings, err - case len(domains) == 0: - return resources.Domain{}, warnings, actionerror.DomainNotFoundError{Name: domainName} - default: - return domains[0], warnings, nil - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/droplet.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/droplet.go deleted file mode 100644 index e9ec793..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/droplet.go +++ /dev/null @@ -1,176 +0,0 @@ -package v7action - -import ( - "io" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" -) - -// CreateApplicationDroplet creates a new droplet without a package for the app with -// guid appGUID. -func (actor Actor) CreateApplicationDroplet(appGUID string) (resources.Droplet, Warnings, error) { - ccDroplet, warnings, err := actor.CloudControllerClient.CreateDroplet(appGUID) - - return ccDroplet, Warnings(warnings), err -} - -// SetApplicationDropletByApplicationNameAndSpace sets the droplet for an application. -func (actor Actor) SetApplicationDropletByApplicationNameAndSpace(appName string, spaceGUID string, dropletGUID string) (Warnings, error) { - allWarnings := Warnings{} - application, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - _, apiWarnings, err := actor.CloudControllerClient.SetApplicationDroplet(application.GUID, dropletGUID) - actorWarnings := Warnings(apiWarnings) - allWarnings = append(allWarnings, actorWarnings...) - - if newErr, ok := err.(ccerror.UnprocessableEntityError); ok { - return allWarnings, actionerror.AssignDropletError{Message: newErr.Message} - } - - return allWarnings, err -} - -func (actor Actor) SetApplicationDroplet(appGUID string, dropletGUID string) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.SetApplicationDroplet(appGUID, dropletGUID) - - if newErr, ok := err.(ccerror.UnprocessableEntityError); ok { - return Warnings(warnings), actionerror.AssignDropletError{Message: newErr.Message} - } - - return Warnings(warnings), err -} - -// GetApplicationDroplets returns the list of droplets that belong to application. -func (actor Actor) GetApplicationDroplets(appName string, spaceGUID string) ([]resources.Droplet, Warnings, error) { - allWarnings := Warnings{} - application, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - droplets, apiWarnings, err := actor.CloudControllerClient.GetDroplets( - ccv3.Query{Key: ccv3.AppGUIDFilter, Values: []string{application.GUID}}, - ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.CreatedAtDescendingOrder}}, - ) - actorWarnings := Warnings(apiWarnings) - allWarnings = append(allWarnings, actorWarnings...) - if err != nil { - return nil, allWarnings, err - } - - if len(droplets) == 0 { - return []resources.Droplet{}, allWarnings, nil - } - - currentDroplet, apiWarnings, err := actor.CloudControllerClient.GetApplicationDropletCurrent(application.GUID) - allWarnings = append(allWarnings, apiWarnings...) - if err != nil { - if _, ok := err.(ccerror.DropletNotFoundError); ok { - return droplets, allWarnings, nil - } - return []resources.Droplet{}, allWarnings, err - } - - for i, droplet := range droplets { - if droplet.GUID == currentDroplet.GUID { - droplets[i].IsCurrent = true - } - } - - return droplets, allWarnings, err -} - -func (actor Actor) GetCurrentDropletByApplication(appGUID string) (resources.Droplet, Warnings, error) { - droplet, warnings, err := actor.CloudControllerClient.GetApplicationDropletCurrent(appGUID) - switch err.(type) { - case ccerror.ApplicationNotFoundError: - return resources.Droplet{}, Warnings(warnings), actionerror.ApplicationNotFoundError{GUID: appGUID} - case ccerror.DropletNotFoundError: - return resources.Droplet{}, Warnings(warnings), actionerror.DropletNotFoundError{AppGUID: appGUID} - } - return droplet, Warnings(warnings), err -} - -func (actor Actor) UploadDroplet(dropletGUID string, dropletPath string, progressReader io.Reader, size int64) (Warnings, error) { - var allWarnings Warnings - - jobURL, uploadWarnings, err := actor.CloudControllerClient.UploadDropletBits(dropletGUID, dropletPath, progressReader, size) - allWarnings = append(allWarnings, uploadWarnings...) - if err != nil { - return allWarnings, err - } - - jobWarnings, jobErr := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, jobWarnings...) - if jobErr != nil { - return allWarnings, jobErr - } - - return allWarnings, nil -} - -func (actor Actor) DownloadCurrentDropletByAppName(appName string, spaceGUID string) ([]byte, string, Warnings, error) { - var allWarnings Warnings - - app, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return []byte{}, "", allWarnings, err - } - - droplet, ccWarnings, err := actor.CloudControllerClient.GetApplicationDropletCurrent(app.GUID) - allWarnings = append(allWarnings, ccWarnings...) - - if err != nil { - if _, ok := err.(ccerror.DropletNotFoundError); ok { - return []byte{}, "", allWarnings, actionerror.DropletNotFoundError{} - } - return []byte{}, "", allWarnings, err - } - - rawDropletBytes, ccWarnings, err := actor.CloudControllerClient.DownloadDroplet(droplet.GUID) - allWarnings = append(allWarnings, ccWarnings...) - if err != nil { - return []byte{}, "", allWarnings, err - } - - return rawDropletBytes, droplet.GUID, allWarnings, nil -} - -func (actor Actor) DownloadDropletByGUIDAndAppName(dropletGUID string, appName string, spaceGUID string) ([]byte, Warnings, error) { - var allWarnings Warnings - - app, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return []byte{}, allWarnings, err - } - - droplets, getDropletWarnings, err := actor.CloudControllerClient.GetDroplets( - ccv3.Query{Key: ccv3.GUIDFilter, Values: []string{dropletGUID}}, - ccv3.Query{Key: ccv3.AppGUIDFilter, Values: []string{app.GUID}}, - ) - allWarnings = append(allWarnings, getDropletWarnings...) - if err != nil { - return []byte{}, allWarnings, err - } - - if len(droplets) == 0 { - return []byte{}, allWarnings, actionerror.DropletNotFoundError{} - } - - rawDropletBytes, ccWarnings, err := actor.CloudControllerClient.DownloadDroplet(dropletGUID) - allWarnings = append(allWarnings, ccWarnings...) - if err != nil { - return []byte{}, allWarnings, err - } - - return rawDropletBytes, allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/environment_variable.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/environment_variable.go deleted file mode 100644 index a5588b5..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/environment_variable.go +++ /dev/null @@ -1,110 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" -) - -// EnvironmentVariableGroups represents all environment variables for application -type EnvironmentVariableGroups ccv3.Environment - -// EnvironmentVariableGroup represents a CC environment variable group (e.g. staging or running) -type EnvironmentVariableGroup resources.EnvironmentVariables - -// EnvironmentVariablePair represents an environment variable and its value -// on an application -type EnvironmentVariablePair struct { - Key string - Value string -} - -// GetEnvironmentVariableGroup returns the values of an environment variable group. -func (actor *Actor) GetEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName) (EnvironmentVariableGroup, Warnings, error) { - ccEnvGroup, warnings, err := actor.CloudControllerClient.GetEnvironmentVariableGroup(group) - return EnvironmentVariableGroup(ccEnvGroup), Warnings(warnings), err -} - -// GetEnvironmentVariablesByApplicationNameAndSpace returns the environment -// variables for an application. -func (actor *Actor) GetEnvironmentVariablesByApplicationNameAndSpace(appName string, spaceGUID string) (EnvironmentVariableGroups, Warnings, error) { - app, warnings, appErr := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if appErr != nil { - return EnvironmentVariableGroups{}, warnings, appErr - } - - ccEnvGroups, v3Warnings, apiErr := actor.CloudControllerClient.GetApplicationEnvironment(app.GUID) - warnings = append(warnings, v3Warnings...) - return EnvironmentVariableGroups(ccEnvGroups), warnings, apiErr -} - -// SetEnvironmentVariableByApplicationNameAndSpace adds an -// EnvironmentVariablePair to an application. It must be restarted for changes -// to take effect. -func (actor *Actor) SetEnvironmentVariableByApplicationNameAndSpace(appName string, spaceGUID string, envPair EnvironmentVariablePair) (Warnings, error) { - app, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return warnings, err - } - - _, v3Warnings, apiErr := actor.CloudControllerClient.UpdateApplicationEnvironmentVariables( - app.GUID, - resources.EnvironmentVariables{ - envPair.Key: {Value: envPair.Value, IsSet: true}, - }) - warnings = append(warnings, v3Warnings...) - return warnings, apiErr -} - -// SetEnvironmentVariableGroup sets a given environment variable group according to the given -// keys and values. Any existing variables that are not present in the given set of variables -// will be unset. -func (actor *Actor) SetEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName, newEnvVars resources.EnvironmentVariables) (Warnings, error) { - var allWarnings Warnings - - existingEnvVars, warnings, err := actor.CloudControllerClient.GetEnvironmentVariableGroup(group) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - for k := range existingEnvVars { - if _, ok := newEnvVars[k]; !ok { - newEnvVars[k] = types.FilteredString{IsSet: false} - } - } - - _, warnings, err = actor.CloudControllerClient.UpdateEnvironmentVariableGroup(group, newEnvVars) - allWarnings = append(allWarnings, warnings...) - - return allWarnings, err -} - -// UnsetEnvironmentVariableByApplicationNameAndSpace removes an environment -// variable from an application. It must be restarted for changes to take -// effect. -func (actor *Actor) UnsetEnvironmentVariableByApplicationNameAndSpace(appName string, spaceGUID string, environmentVariableName string) (Warnings, error) { - app, warnings, appErr := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if appErr != nil { - return warnings, appErr - } - envGroups, getWarnings, getErr := actor.CloudControllerClient.GetApplicationEnvironment(app.GUID) - warnings = append(warnings, getWarnings...) - if getErr != nil { - return warnings, getErr - } - - if _, ok := envGroups.EnvironmentVariables[environmentVariableName]; !ok { - return warnings, actionerror.EnvironmentVariableNotSetError{EnvironmentVariableName: environmentVariableName} - } - - _, patchWarnings, patchErr := actor.CloudControllerClient.UpdateApplicationEnvironmentVariables( - app.GUID, - resources.EnvironmentVariables{ - environmentVariableName: {Value: "", IsSet: false}, - }) - warnings = append(warnings, patchWarnings...) - return warnings, patchErr -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/event.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/event.go deleted file mode 100644 index 36b1726..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/event.go +++ /dev/null @@ -1,104 +0,0 @@ -package v7action - -import ( - "fmt" - "strconv" - "strings" - "time" - - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/util/generic" -) - -type Event struct { - GUID string - Time time.Time - Type string - ActorName string - Description string -} - -func (actor Actor) GetRecentEventsByApplicationNameAndSpace(appName string, spaceGUID string) ([]Event, Warnings, error) { - var allWarnings Warnings - - app, appWarnings, appErr := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, appWarnings...) - if appErr != nil { - return nil, allWarnings, appErr - } - - ccEvents, warnings, err := actor.CloudControllerClient.GetEvents( - ccv3.Query{Key: ccv3.TargetGUIDFilter, Values: []string{app.GUID}}, - ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.CreatedAtDescendingOrder}}, - ) - allWarnings = append(allWarnings, warnings...) - - if err != nil { - return nil, allWarnings, err - } - - var events []Event - for _, ccEvent := range ccEvents { - events = append(events, Event{ - GUID: ccEvent.GUID, - Time: ccEvent.CreatedAt, - Type: ccEvent.Type, - ActorName: ccEvent.ActorName, - Description: generateDescription(ccEvent.Data), - }) - - } - - return events, allWarnings, nil -} - -var knownMetadataKeys = []string{ - "index", - "reason", - "cell_id", - "instance", - "exit_description", - "exit_status", - "recursive", - "disk_quota", - "instances", - "memory", - "state", - "command", - "environment_json", -} - -func generateDescription(data map[string]interface{}) string { - mappedData := generic.NewMap(data) - if mappedData.Has("request") { - mappedData = generic.NewMap(mappedData.Get("request")) - } - return formatDescription(mappedData, knownMetadataKeys) -} - -func formatDescription(metadata generic.Map, keys []string) string { - parts := []string{} - for _, key := range keys { - value := metadata.Get(key) - if value != nil { - parts = append(parts, fmt.Sprintf("%s: %s", key, formatDescriptionPart(value))) - } - } - return strings.Join(parts, ", ") -} - -func formatDescriptionPart(val interface{}) string { - switch val := val.(type) { - case string: - return val - case float64: - return strconv.FormatFloat(val, byte('f'), -1, 64) - case bool: - if val { - return "true" - } - return "false" - default: - return fmt.Sprintf("%s", val) - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/feature_flag.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/feature_flag.go deleted file mode 100644 index 00b9740..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/feature_flag.go +++ /dev/null @@ -1,48 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/resources" -) - -// GetFeatureFlagByName returns a featureFlag with the provided name. -func (actor Actor) GetFeatureFlagByName(featureFlagName string) (resources.FeatureFlag, Warnings, error) { - featureFlag, warnings, err := actor.CloudControllerClient.GetFeatureFlag(featureFlagName) - - if err != nil { - if _, ok := err.(ccerror.FeatureFlagNotFoundError); ok { - return resources.FeatureFlag{}, Warnings(warnings), actionerror.FeatureFlagNotFoundError{FeatureFlagName: featureFlagName} - } - return resources.FeatureFlag{}, Warnings(warnings), err - } - - return featureFlag, Warnings(warnings), err -} - -func (actor Actor) GetFeatureFlags() ([]resources.FeatureFlag, Warnings, error) { - featureFlags, warnings, err := actor.CloudControllerClient.GetFeatureFlags() - - if err != nil { - return nil, Warnings(warnings), err - } - - return featureFlags, Warnings(warnings), nil -} - -func (actor Actor) EnableFeatureFlag(flagName string) (Warnings, error) { - return actor.updateFeatureFlag(resources.FeatureFlag{Name: flagName, Enabled: true}) -} - -func (actor Actor) DisableFeatureFlag(flagName string) (Warnings, error) { - return actor.updateFeatureFlag(resources.FeatureFlag{Name: flagName, Enabled: false}) -} - -func (actor Actor) updateFeatureFlag(flag resources.FeatureFlag) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.UpdateFeatureFlag(flag) - - if _, ok := err.(ccerror.FeatureFlagNotFoundError); ok { - err = actionerror.FeatureFlagNotFoundError{FeatureFlagName: flag.Name} - } - return Warnings(warnings), err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/fix_mode_unix.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/fix_mode_unix.go deleted file mode 100644 index 5a3e9de..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/fix_mode_unix.go +++ /dev/null @@ -1,12 +0,0 @@ -//go:build !windows -// +build !windows - -package v7action - -import "os" - -// fixMode is unnecessary on UNIX systems, see windows version for more -// details. -func fixMode(mode os.FileMode) os.FileMode { - return mode -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/fix_mode_windows.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/fix_mode_windows.go deleted file mode 100644 index 2ad56de..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/fix_mode_windows.go +++ /dev/null @@ -1,12 +0,0 @@ -//go:build windows -// +build windows - -package v7action - -import "os" - -// fixMode forces all files on windows to be executable because by default -// everything on windows is read/write only. Even executable files. -func fixMode(mode os.FileMode) os.FileMode { - return mode | 0700 -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/info.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/info.go deleted file mode 100644 index 723c1b5..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/info.go +++ /dev/null @@ -1,13 +0,0 @@ -package v7action - -import "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - -type Info ccv3.Info - -func (actor Actor) GetRootResponse() (Info, Warnings, error) { - info, warnings, err := actor.CloudControllerClient.GetInfo() - if err != nil { - return Info{}, Warnings(warnings), err - } - return Info(info), Warnings(warnings), nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/isolation_segment.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/isolation_segment.go deleted file mode 100644 index 1ca9e76..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/isolation_segment.go +++ /dev/null @@ -1,197 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" -) - -type IsolationSegmentSummary struct { - Name string - EntitledOrgs []string -} - -// GetEffectiveIsolationSegmentBySpace returns the space's effective isolation -// segment. -// -// If the space has its own isolation segment, that will be returned. -// -// If the space does not have one, the organization's default isolation segment -// (GUID passed in) will be returned. -// -// If the space does not have one and the passed in organization default -// isolation segment GUID is empty, a NoRelationshipError will be returned. -func (actor Actor) GetEffectiveIsolationSegmentBySpace(spaceGUID string, orgDefaultIsolationSegmentGUID string) (resources.IsolationSegment, Warnings, error) { - relationship, warnings, err := actor.CloudControllerClient.GetSpaceIsolationSegment(spaceGUID) - allWarnings := append(Warnings{}, warnings...) - if err != nil { - return resources.IsolationSegment{}, allWarnings, err - } - - effectiveGUID := relationship.GUID - if effectiveGUID == "" { - if orgDefaultIsolationSegmentGUID != "" { - effectiveGUID = orgDefaultIsolationSegmentGUID - } else { - return resources.IsolationSegment{}, allWarnings, actionerror.NoRelationshipError{} - } - } - - isolationSegment, warnings, err := actor.CloudControllerClient.GetIsolationSegment(effectiveGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.IsolationSegment{}, allWarnings, err - } - - return resources.IsolationSegment(isolationSegment), allWarnings, err -} - -// CreateIsolationSegmentByName creates a given isolation segment. -func (actor Actor) CreateIsolationSegmentByName(isolationSegment resources.IsolationSegment) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.CreateIsolationSegment(resources.IsolationSegment(isolationSegment)) - if _, ok := err.(ccerror.UnprocessableEntityError); ok { - return Warnings(warnings), actionerror.IsolationSegmentAlreadyExistsError{Name: isolationSegment.Name} - } - return Warnings(warnings), err -} - -// DeleteIsolationSegmentByName deletes the given isolation segment. -func (actor Actor) DeleteIsolationSegmentByName(name string) (Warnings, error) { - isolationSegment, warnings, err := actor.GetIsolationSegmentByName(name) - allWarnings := append(Warnings{}, warnings...) - if err != nil { - return allWarnings, err - } - - apiWarnings, err := actor.CloudControllerClient.DeleteIsolationSegment(isolationSegment.GUID) - return append(allWarnings, apiWarnings...), err -} - -// EntitleIsolationSegmentToOrganizationByName entitles the given organization -// to use the specified isolation segment -func (actor Actor) EntitleIsolationSegmentToOrganizationByName(isolationSegmentName string, orgName string) (Warnings, error) { - isolationSegment, warnings, err := actor.GetIsolationSegmentByName(isolationSegmentName) - allWarnings := append(Warnings{}, warnings...) - if err != nil { - return allWarnings, err - } - - organization, warnings, err := actor.GetOrganizationByName(orgName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - _, apiWarnings, err := actor.CloudControllerClient.EntitleIsolationSegmentToOrganizations(isolationSegment.GUID, []string{organization.GUID}) - return append(allWarnings, apiWarnings...), err -} - -func (actor Actor) AssignIsolationSegmentToSpaceByNameAndSpace(isolationSegmentName string, spaceGUID string) (Warnings, error) { - seg, warnings, err := actor.GetIsolationSegmentByName(isolationSegmentName) - if err != nil { - return warnings, err - } - - _, apiWarnings, err := actor.CloudControllerClient.UpdateSpaceIsolationSegmentRelationship(spaceGUID, seg.GUID) - return append(warnings, apiWarnings...), err -} - -// GetIsolationSegmentByName returns the requested isolation segment. -func (actor Actor) GetIsolationSegmentByName(name string) (resources.IsolationSegment, Warnings, error) { - isolationSegments, warnings, err := actor.CloudControllerClient.GetIsolationSegments( - ccv3.Query{Key: ccv3.NameFilter, Values: []string{name}}, - ) - if err != nil { - return resources.IsolationSegment{}, Warnings(warnings), err - } - - if len(isolationSegments) == 0 { - return resources.IsolationSegment{}, Warnings(warnings), actionerror.IsolationSegmentNotFoundError{Name: name} - } - - return resources.IsolationSegment(isolationSegments[0]), Warnings(warnings), nil -} - -// GetIsolationSegmentSummaries returns all isolation segments and their entitled orgs -func (actor Actor) GetIsolationSegmentSummaries() ([]IsolationSegmentSummary, Warnings, error) { - isolationSegments, warnings, err := actor.CloudControllerClient.GetIsolationSegments() - allWarnings := append(Warnings{}, warnings...) - if err != nil { - return nil, allWarnings, err - } - - var isolationSegmentSummaries []IsolationSegmentSummary - - for _, isolationSegment := range isolationSegments { - isolationSegmentSummary := IsolationSegmentSummary{ - Name: isolationSegment.Name, - EntitledOrgs: []string{}, - } - - orgs, warnings, err := actor.CloudControllerClient.GetIsolationSegmentOrganizations(isolationSegment.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - for _, org := range orgs { - isolationSegmentSummary.EntitledOrgs = append(isolationSegmentSummary.EntitledOrgs, org.Name) - } - - isolationSegmentSummaries = append(isolationSegmentSummaries, isolationSegmentSummary) - } - return isolationSegmentSummaries, allWarnings, nil -} - -func (actor Actor) GetIsolationSegmentsByOrganization(orgGUID string) ([]resources.IsolationSegment, Warnings, error) { - isolationSegments, warnings, err := actor.CloudControllerClient.GetIsolationSegments( - ccv3.Query{Key: ccv3.OrganizationGUIDFilter, Values: []string{orgGUID}}, - ) - if err != nil { - return []resources.IsolationSegment{}, Warnings(warnings), err - } - - return isolationSegments, Warnings(warnings), nil -} - -func (actor Actor) DeleteIsolationSegmentOrganizationByName(isolationSegmentName string, orgName string) (Warnings, error) { - segment, warnings, err := actor.GetIsolationSegmentByName(isolationSegmentName) - allWarnings := append(Warnings{}, warnings...) - if err != nil { - return allWarnings, err - } - - org, warnings, err := actor.GetOrganizationByName(orgName) - allWarnings = append(allWarnings, warnings...) - - if err != nil { - return allWarnings, err - } - - apiWarnings, err := actor.CloudControllerClient.DeleteIsolationSegmentOrganization(segment.GUID, org.GUID) - - allWarnings = append(allWarnings, apiWarnings...) - return allWarnings, err -} - -// GetOrganizationDefaultIsolationSegment gets a default isolation segment on -// an organization. -func (actor Actor) GetOrganizationDefaultIsolationSegment(orgGUID string) (string, Warnings, error) { - defaultIsoSegRelationship, apiWarnings, err := actor.CloudControllerClient.GetOrganizationDefaultIsolationSegment(orgGUID) - return defaultIsoSegRelationship.GUID, Warnings(apiWarnings), err -} - -// SetOrganizationDefaultIsolationSegment sets a default isolation segment on -// an organization. -func (actor Actor) SetOrganizationDefaultIsolationSegment(orgGUID string, isoSegGUID string) (Warnings, error) { - _, apiWarnings, err := actor.CloudControllerClient.UpdateOrganizationDefaultIsolationSegmentRelationship(orgGUID, isoSegGUID) - return Warnings(apiWarnings), err -} - -// ResetOrganizationDefaultIsolationSegment resets the default isolation segment fon -// an organization. -func (actor Actor) ResetOrganizationDefaultIsolationSegment(orgGUID string) (Warnings, error) { - _, apiWarnings, err := actor.CloudControllerClient.UpdateOrganizationDefaultIsolationSegmentRelationship(orgGUID, "") - return Warnings(apiWarnings), err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/job.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/job.go deleted file mode 100644 index 0324477..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/job.go +++ /dev/null @@ -1,48 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" -) - -type JobState constant.JobState - -const ( - JobPolling = JobState(constant.JobPolling) - JobComplete = JobState(constant.JobComplete) - JobFailed = JobState(constant.JobFailed) - JobProcessing = JobState(constant.JobProcessing) -) - -type PollJobEvent struct { - State JobState - Err error - Warnings Warnings -} - -func (actor Actor) PollUploadBuildpackJob(jobURL ccv3.JobURL) (Warnings, error) { - warnings, err := actor.CloudControllerClient.PollJob(jobURL) - return Warnings(warnings), err -} - -func (actor Actor) PollJobToEventStream(jobURL ccv3.JobURL) chan PollJobEvent { - input := actor.CloudControllerClient.PollJobToEventStream(jobURL) - if input == nil { - return nil - } - - output := make(chan PollJobEvent) - - go func() { - for event := range input { - output <- PollJobEvent{ - State: JobState(event.State), - Err: event.Err, - Warnings: Warnings(event.Warnings), - } - } - close(output) - }() - - return output -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/k8s_auth.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/k8s_auth.go deleted file mode 100644 index bbbfadb..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/k8s_auth.go +++ /dev/null @@ -1,89 +0,0 @@ -package v7action - -import ( - "errors" - "fmt" - "sort" - - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/uaa/constant" - "code.cloudfoundry.org/cli/cf/configuration/coreconfig" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/configv3" - "k8s.io/client-go/tools/clientcmd" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . KubernetesConfigGetter - -type KubernetesConfigGetter interface { - Get() (*clientcmdapi.Config, error) -} - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . WhoAmIer - -type WhoAmIer interface { - WhoAmI() (resources.K8sUser, ccv3.Warnings, error) -} - -type DefaultKubernetesConfigGetter struct{} - -func NewDefaultKubernetesConfigGetter() DefaultKubernetesConfigGetter { - return DefaultKubernetesConfigGetter{} -} - -func (c DefaultKubernetesConfigGetter) Get() (*clientcmdapi.Config, error) { - pathOpts := clientcmd.NewDefaultPathOptions() - return pathOpts.GetStartingConfig() -} - -type kubernetesAuthActor struct { - config Config - k8sConfigGetter KubernetesConfigGetter - whoAmIer WhoAmIer -} - -func NewKubernetesAuthActor(config Config, k8sConfigGetter KubernetesConfigGetter, whoAmIer WhoAmIer) AuthActor { - return &kubernetesAuthActor{ - config: config, - k8sConfigGetter: k8sConfigGetter, - whoAmIer: whoAmIer, - } -} - -func (actor kubernetesAuthActor) Authenticate(credentials map[string]string, origin string, grantType constant.GrantType) error { - actor.config.SetKubernetesAuthInfo(credentials["k8s-auth-info"]) - return nil -} - -func (actor kubernetesAuthActor) GetLoginPrompts() (map[string]coreconfig.AuthPrompt, error) { - conf, err := actor.k8sConfigGetter.Get() - if err != nil { - return nil, err - } - - if len(conf.AuthInfos) == 0 { - return nil, errors.New("no kubernetes authentication infos configured") - } - - var prompts []string - for authInfo := range conf.AuthInfos { - prompts = append(prompts, authInfo) - } - sort.Strings(prompts) - - return map[string]coreconfig.AuthPrompt{"k8s-auth-info": { - Type: coreconfig.AuthPromptTypeMenu, - Entries: prompts, - DisplayName: "Choose your Kubernetes authentication info", - }}, nil -} - -func (actor kubernetesAuthActor) GetCurrentUser() (configv3.User, error) { - user, _, err := actor.whoAmIer.WhoAmI() - if err != nil { - return configv3.User{}, fmt.Errorf("calling /whoami endpoint failed: %w", err) - } - - return configv3.User{Name: user.Name}, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/label.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/label.go deleted file mode 100644 index 5ed9845..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/label.go +++ /dev/null @@ -1,180 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" -) - -func (actor *Actor) GetApplicationLabels(appName string, spaceGUID string) (map[string]types.NullString, Warnings, error) { - resource, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - return actor.extractLabels((*resources.Metadata)(resource.Metadata), warnings, err) -} - -func (actor *Actor) GetDomainLabels(domainName string) (map[string]types.NullString, Warnings, error) { - resource, warnings, err := actor.GetDomainByName(domainName) - return actor.extractLabels(resource.Metadata, warnings, err) -} - -func (actor *Actor) GetOrganizationLabels(orgName string) (map[string]types.NullString, Warnings, error) { - resource, warnings, err := actor.GetOrganizationByName(orgName) - return actor.extractLabels(resource.Metadata, warnings, err) -} - -func (actor *Actor) GetRouteLabels(routeName string, spaceGUID string) (map[string]types.NullString, Warnings, error) { - resource, warnings, err := actor.GetRoute(routeName, spaceGUID) - return actor.extractLabels((*resources.Metadata)(resource.Metadata), warnings, err) -} - -func (actor *Actor) GetServiceBrokerLabels(serviceBrokerName string) (map[string]types.NullString, Warnings, error) { - serviceBroker, warnings, err := actor.GetServiceBrokerByName(serviceBrokerName) - return actor.extractLabels(serviceBroker.Metadata, warnings, err) -} - -func (actor *Actor) GetServiceInstanceLabels(serviceInstanceName, spaceGUID string) (map[string]types.NullString, Warnings, error) { - serviceInstance, warnings, err := actor.GetServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - return actor.extractLabels(serviceInstance.Metadata, warnings, err) -} - -func (actor *Actor) GetServiceOfferingLabels(serviceOfferingName, serviceBrokerName string) (map[string]types.NullString, Warnings, error) { - serviceOffering, warnings, err := actor.CloudControllerClient.GetServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName) - return actor.extractLabels(serviceOffering.Metadata, Warnings(warnings), actionerror.EnrichAPIErrors(err)) -} - -func (actor *Actor) GetServicePlanLabels(servicePlanName, serviceOfferingName, serviceBrokerName string) (map[string]types.NullString, Warnings, error) { - servicePlan, warnings, err := actor.GetServicePlanByNameOfferingAndBroker(servicePlanName, serviceOfferingName, serviceBrokerName) - return actor.extractLabels(servicePlan.Metadata, warnings, err) -} - -func (actor *Actor) GetSpaceLabels(spaceName string, orgGUID string) (map[string]types.NullString, Warnings, error) { - resource, warnings, err := actor.GetSpaceByNameAndOrganization(spaceName, orgGUID) - return actor.extractLabels(resource.Metadata, warnings, err) -} - -func (actor *Actor) GetStackLabels(stackName string) (map[string]types.NullString, Warnings, error) { - resource, warnings, err := actor.GetStackByName(stackName) - return actor.extractLabels(resource.Metadata, warnings, err) -} - -func (actor *Actor) GetBuildpackLabels(buildpackName string, buildpackStack string) (map[string]types.NullString, Warnings, error) { - resource, warnings, err := actor.GetBuildpackByNameAndStack(buildpackName, buildpackStack) - return actor.extractLabels(resource.Metadata, warnings, err) -} - -func (actor *Actor) extractLabels(metadata *resources.Metadata, warnings Warnings, err error) (map[string]types.NullString, Warnings, error) { - var labels map[string]types.NullString - - if err != nil { - return labels, warnings, err - } - if metadata != nil { - labels = metadata.Labels - } - return labels, warnings, nil -} - -func (actor *Actor) UpdateApplicationLabelsByApplicationName(appName string, spaceGUID string, labels map[string]types.NullString) (Warnings, error) { - app, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("app", app.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) UpdateBuildpackLabelsByBuildpackNameAndStack(buildpackName string, stack string, labels map[string]types.NullString) (Warnings, error) { - buildpack, warnings, err := actor.GetBuildpackByNameAndStack(buildpackName, stack) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("buildpack", buildpack.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) UpdateDomainLabelsByDomainName(domainName string, labels map[string]types.NullString) (Warnings, error) { - domain, warnings, err := actor.GetDomainByName(domainName) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("domain", domain.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) UpdateOrganizationLabelsByOrganizationName(orgName string, labels map[string]types.NullString) (Warnings, error) { - org, warnings, err := actor.GetOrganizationByName(orgName) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("org", org.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) UpdateRouteLabels(routeName string, spaceGUID string, labels map[string]types.NullString) (Warnings, error) { - route, warnings, err := actor.GetRoute(routeName, spaceGUID) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("route", route.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) UpdateSpaceLabelsBySpaceName(spaceName string, orgGUID string, labels map[string]types.NullString) (Warnings, error) { - space, warnings, err := actor.GetSpaceByNameAndOrganization(spaceName, orgGUID) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("space", space.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) UpdateStackLabelsByStackName(stackName string, labels map[string]types.NullString) (Warnings, error) { - stack, warnings, err := actor.GetStackByName(stackName) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("stack", stack.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) UpdateServiceBrokerLabelsByServiceBrokerName(serviceBrokerName string, labels map[string]types.NullString) (Warnings, error) { - serviceBroker, warnings, err := actor.GetServiceBrokerByName(serviceBrokerName) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("service-broker", serviceBroker.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) UpdateServiceInstanceLabels(serviceInstanceName, spaceGUID string, labels map[string]types.NullString) (Warnings, error) { - serviceInstance, warnings, err := actor.GetServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("service-instance", serviceInstance.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) UpdateServiceOfferingLabels(serviceOfferingName string, serviceBrokerName string, labels map[string]types.NullString) (Warnings, error) { - serviceOffering, warnings, err := actor.CloudControllerClient.GetServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName) - if err != nil { - return Warnings(warnings), actionerror.EnrichAPIErrors(err) - } - return actor.updateResourceMetadata("service-offering", serviceOffering.GUID, resources.Metadata{Labels: labels}, Warnings(warnings)) -} - -func (actor *Actor) UpdateServicePlanLabels(servicePlanName string, serviceOfferingName string, serviceBrokerName string, labels map[string]types.NullString) (Warnings, error) { - servicePlan, warnings, err := actor.GetServicePlanByNameOfferingAndBroker(servicePlanName, serviceOfferingName, serviceBrokerName) - if err != nil { - return warnings, err - } - return actor.updateResourceMetadata("service-plan", servicePlan.GUID, resources.Metadata{Labels: labels}, warnings) -} - -func (actor *Actor) updateResourceMetadata(resourceType string, resourceGUID string, payload resources.Metadata, warnings Warnings) (Warnings, error) { - jobURL, updateWarnings, err := actor.CloudControllerClient.UpdateResourceMetadata(resourceType, resourceGUID, payload) - warnings = append(warnings, updateWarnings...) - if err != nil { - return warnings, err - } - - if jobURL != "" { - pollWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - warnings = append(warnings, pollWarnings...) - if err != nil { - return warnings, err - } - } - - return warnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/logging.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/logging.go deleted file mode 100644 index 5c77b2d..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/logging.go +++ /dev/null @@ -1,128 +0,0 @@ -package v7action - -import ( - "context" - "errors" - "strings" - "time" - - "code.cloudfoundry.org/cli/actor/sharedaction" - "github.com/SermoDigital/jose/jws" -) - -func (actor Actor) GetStreamingLogsForApplicationByNameAndSpace(appName string, spaceGUID string, client sharedaction.LogCacheClient) (<-chan sharedaction.LogMessage, <-chan error, context.CancelFunc, Warnings, error) { - app, allWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return nil, nil, nil, allWarnings, err - } - - messages, logErrs, cancelFunc := sharedaction.GetStreamingLogs(app.GUID, client) - - return messages, logErrs, cancelFunc, allWarnings, err -} - -func (actor Actor) GetRecentLogsForApplicationByNameAndSpace(appName string, spaceGUID string, client sharedaction.LogCacheClient) ([]sharedaction.LogMessage, Warnings, error) { - app, allWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return nil, allWarnings, err - } - - logCacheMessages, err := sharedaction.GetRecentLogs(app.GUID, client) - if err != nil { - return nil, allWarnings, err - } - - var logMessages []sharedaction.LogMessage - - for _, message := range logCacheMessages { - logMessages = append(logMessages, *sharedaction.NewLogMessage( - message.Message(), - message.Type(), - message.Timestamp(), - message.SourceType(), - message.SourceInstance(), - )) - } - - return logMessages, allWarnings, nil -} - -func (actor Actor) ScheduleTokenRefresh( - after func(time.Duration) <-chan time.Time, - stop chan struct{}, - stoppedRefreshingToken chan struct{}) (<-chan error, error) { - - timeToRefresh, err := actor.refreshAccessTokenIfNecessary() - if err != nil { - close(stoppedRefreshingToken) - return nil, err - } - - refreshErrs := make(chan error) - - go func() { - defer close(stoppedRefreshingToken) - for { - select { - case <-after(*timeToRefresh): - d, err := actor.refreshAccessTokenIfNecessary() - if err == nil { - timeToRefresh = d - } else { - refreshErrs <- err - } - case <-stop: - return - } - } - }() - - return refreshErrs, nil -} - -func (actor Actor) refreshAccessTokenIfNecessary() (*time.Duration, error) { - accessToken := actor.Config.AccessToken() - - duration, err := actor.tokenExpiryTime(accessToken) - if err != nil || *duration < time.Minute { - accessToken, err = actor.RefreshAccessToken() - if err != nil { - return nil, err - } - } - - accessToken = strings.TrimPrefix(accessToken, "bearer ") - token, err := jws.ParseJWT([]byte(accessToken)) - if err != nil { - return nil, err - } - - var timeToRefresh time.Duration - expiration, ok := token.Claims().Expiration() - if !ok { - return nil, errors.New("Failed to get an expiry time from the current access token") - } - expiresIn := time.Until(expiration) - if expiresIn >= 2*time.Minute { - timeToRefresh = expiresIn - time.Minute - } else { - timeToRefresh = expiresIn * 9 / 10 - } - return &timeToRefresh, nil -} - -func (actor Actor) tokenExpiryTime(accessToken string) (*time.Duration, error) { - var expiresIn time.Duration - - accessTokenString := strings.TrimPrefix(accessToken, "bearer ") - token, err := jws.ParseJWT([]byte(accessTokenString)) - if err != nil { - return nil, err - } - - expiration, ok := token.Claims().Expiration() - if ok { - expiresIn = time.Until(expiration) - } - return &expiresIn, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/marketplace.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/marketplace.go deleted file mode 100644 index cc6f3a3..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/marketplace.go +++ /dev/null @@ -1,56 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" -) - -type ServiceOfferingWithPlans ccv3.ServiceOfferingWithPlans - -type MarketplaceFilter struct { - SpaceGUID, ServiceOfferingName, ServiceBrokerName string - ShowUnavailable bool -} - -func (actor Actor) Marketplace(filter MarketplaceFilter) ([]ServiceOfferingWithPlans, Warnings, error) { - query := []ccv3.Query{{Key: ccv3.PerPage, Values: []string{ccv3.MaxPerPage}}} - - if filter.SpaceGUID != "" { - query = append(query, ccv3.Query{ - Key: ccv3.SpaceGUIDFilter, - Values: []string{filter.SpaceGUID}, - }) - } - - if filter.ServiceOfferingName != "" { - query = append(query, ccv3.Query{ - Key: ccv3.ServiceOfferingNamesFilter, - Values: []string{filter.ServiceOfferingName}, - }) - } - - if filter.ServiceBrokerName != "" { - query = append(query, ccv3.Query{ - Key: ccv3.ServiceBrokerNamesFilter, - Values: []string{filter.ServiceBrokerName}, - }) - } - - if !filter.ShowUnavailable { - query = append(query, ccv3.Query{ - Key: ccv3.AvailableFilter, - Values: []string{"true"}, - }) - } - - serviceOffering, warnings, err := actor.CloudControllerClient.GetServicePlansWithOfferings(query...) - if err != nil { - return nil, Warnings(warnings), err - } - - result := make([]ServiceOfferingWithPlans, len(serviceOffering)) - for i := range serviceOffering { - result[i] = ServiceOfferingWithPlans(serviceOffering[i]) - } - - return result, Warnings(warnings), nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/organization.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/organization.go deleted file mode 100644 index dbe432e..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/organization.go +++ /dev/null @@ -1,113 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" -) - -func (actor Actor) GetOrganizations(labelSelector string) ([]resources.Organization, Warnings, error) { - queries := []ccv3.Query{ - ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.NameOrder}}, - } - if len(labelSelector) > 0 { - queries = append(queries, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}}) - } - orgs, warnings, err := actor.CloudControllerClient.GetOrganizations(queries...) - if err != nil { - return []resources.Organization{}, Warnings(warnings), err - } - - return orgs, Warnings(warnings), nil -} - -// GetOrganizationByGUID returns the organization with the given guid. -func (actor Actor) GetOrganizationByGUID(orgGUID string) (resources.Organization, Warnings, error) { - ccOrg, warnings, err := actor.CloudControllerClient.GetOrganization(orgGUID) - if err != nil { - return resources.Organization{}, Warnings(warnings), err - } - - return resources.Organization(ccOrg), Warnings(warnings), err -} - -// GetOrganizationByName returns the organization with the given name. -func (actor Actor) GetOrganizationByName(name string) (resources.Organization, Warnings, error) { - orgs, warnings, err := actor.CloudControllerClient.GetOrganizations( - ccv3.Query{Key: ccv3.NameFilter, Values: []string{name}}, - ) - if err != nil { - return resources.Organization{}, Warnings(warnings), err - } - - if len(orgs) == 0 { - return resources.Organization{}, Warnings(warnings), actionerror.OrganizationNotFoundError{Name: name} - } - - return resources.Organization(orgs[0]), Warnings(warnings), nil -} - -// CreateOrganization creates a new organization with the given name -func (actor Actor) CreateOrganization(orgName string) (resources.Organization, Warnings, error) { - allWarnings := Warnings{} - - organization, apiWarnings, err := actor.CloudControllerClient.CreateOrganization(orgName) - allWarnings = append(allWarnings, apiWarnings...) - - return organization, allWarnings, err -} - -// updateOrganization updates the name and/or labels of an organization -func (actor Actor) updateOrganization(org resources.Organization) (resources.Organization, Warnings, error) { - updatedOrg, warnings, err := actor.CloudControllerClient.UpdateOrganization(org) - if err != nil { - return resources.Organization{}, Warnings(warnings), err - } - - return updatedOrg, Warnings(warnings), nil -} - -func (actor Actor) RenameOrganization(oldOrgName, newOrgName string) (resources.Organization, Warnings, error) { - var allWarnings Warnings - - org, warnings, err := actor.GetOrganizationByName(oldOrgName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Organization{}, allWarnings, err - } - - org.Name = newOrgName - org, warnings, err = actor.updateOrganization(org) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Organization{}, allWarnings, err - } - return org, allWarnings, nil -} - -func (actor Actor) DeleteOrganization(name string) (Warnings, error) { - var allWarnings Warnings - - org, warnings, err := actor.GetOrganizationByName(name) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - jobURL, deleteWarnings, err := actor.CloudControllerClient.DeleteOrganization(org.GUID) - allWarnings = append(allWarnings, Warnings(deleteWarnings)...) - if err != nil { - return allWarnings, err - } - - ccWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, Warnings(ccWarnings)...) - - return allWarnings, err -} - -func (actor Actor) GetDefaultDomain(orgGUID string) (resources.Domain, Warnings, error) { - domain, warnings, err := actor.CloudControllerClient.GetDefaultDomain(orgGUID) - - return resources.Domain(domain), Warnings(warnings), err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/organization_quota.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/organization_quota.go deleted file mode 100644 index 1352d43..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/organization_quota.go +++ /dev/null @@ -1,180 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" -) - -type QuotaLimits struct { - TotalMemoryInMB *types.NullInt - PerProcessMemoryInMB *types.NullInt - TotalInstances *types.NullInt - PaidServicesAllowed *bool - TotalServiceInstances *types.NullInt - TotalRoutes *types.NullInt - TotalReservedPorts *types.NullInt -} - -func (actor Actor) ApplyOrganizationQuotaByName(quotaName string, orgGUID string) (Warnings, error) { - var allWarnings Warnings - - quota, warnings, err := actor.GetOrganizationQuotaByName(quotaName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - _, ccWarnings, err := actor.CloudControllerClient.ApplyOrganizationQuota(quota.GUID, orgGUID) - allWarnings = append(allWarnings, ccWarnings...) - - return allWarnings, err -} - -// CreateOrganization creates a new organization with the given name -func (actor Actor) CreateOrganizationQuota(name string, limits QuotaLimits) (Warnings, error) { - orgQuota := createQuotaStruct(name, limits) - setZeroDefaultsForQuotaCreation(&orgQuota.Apps, &orgQuota.Routes, &orgQuota.Services) - convertUnlimitedToNil(&orgQuota.Apps, &orgQuota.Routes, &orgQuota.Services) - - _, apiWarnings, err := actor.CloudControllerClient.CreateOrganizationQuota(orgQuota) - - return Warnings(apiWarnings), err -} - -func (actor Actor) DeleteOrganizationQuota(quotaName string) (Warnings, error) { - var allWarnings Warnings - - quota, warnings, err := actor.GetOrganizationQuotaByName(quotaName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - jobURL, ccWarnings, err := actor.CloudControllerClient.DeleteOrganizationQuota(quota.GUID) - allWarnings = append(allWarnings, ccWarnings...) - if err != nil { - return allWarnings, err - } - - ccWarnings, err = actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, ccWarnings...) - - return allWarnings, err -} - -func (actor Actor) GetOrganizationQuotas() ([]resources.OrganizationQuota, Warnings, error) { - orgQuotas, warnings, err := actor.CloudControllerClient.GetOrganizationQuotas() - if err != nil { - return []resources.OrganizationQuota{}, Warnings(warnings), err - } - - return orgQuotas, Warnings(warnings), nil -} - -func (actor Actor) GetOrganizationQuotaByName(orgQuotaName string) (resources.OrganizationQuota, Warnings, error) { - ccv3OrgQuotas, warnings, err := actor.CloudControllerClient.GetOrganizationQuotas( - ccv3.Query{ - Key: ccv3.NameFilter, - Values: []string{orgQuotaName}, - }, - ) - if err != nil { - return resources.OrganizationQuota{}, Warnings(warnings), err - - } - - if len(ccv3OrgQuotas) == 0 { - return resources.OrganizationQuota{}, Warnings(warnings), actionerror.OrganizationQuotaNotFoundForNameError{Name: orgQuotaName} - } - - return ccv3OrgQuotas[0], Warnings(warnings), nil -} - -func (actor Actor) UpdateOrganizationQuota(quotaName string, newName string, limits QuotaLimits) (Warnings, error) { - var allWarnings Warnings - - quota, warnings, err := actor.GetOrganizationQuotaByName(quotaName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - if newName == "" { - newName = quotaName - } - newQuota := createQuotaStruct(newName, limits) - newQuota.GUID = quota.GUID - convertUnlimitedToNil(&newQuota.Apps, &newQuota.Routes, &newQuota.Services) - - _, ccWarnings, err := actor.CloudControllerClient.UpdateOrganizationQuota(newQuota) - allWarnings = append(allWarnings, ccWarnings...) - - return allWarnings, err -} - -func createQuotaStruct(name string, limits QuotaLimits) resources.OrganizationQuota { - AppLimit := resources.AppLimit{ - TotalMemory: limits.TotalMemoryInMB, - InstanceMemory: limits.PerProcessMemoryInMB, - TotalAppInstances: limits.TotalInstances, - } - ServiceLimit := resources.ServiceLimit{ - TotalServiceInstances: limits.TotalServiceInstances, - PaidServicePlans: limits.PaidServicesAllowed, - } - RouteLimit := resources.RouteLimit{ - TotalRoutes: limits.TotalRoutes, - TotalReservedPorts: limits.TotalReservedPorts, - } - - quota := resources.OrganizationQuota{ - Quota: resources.Quota{ - Name: name, - Apps: AppLimit, - Services: ServiceLimit, - Routes: RouteLimit, - }, - } - - return quota -} - -func setZeroDefaultsForQuotaCreation(apps *resources.AppLimit, routes *resources.RouteLimit, services *resources.ServiceLimit) { - if apps.TotalMemory == nil { - apps.TotalMemory = &types.NullInt{IsSet: true, Value: 0} - } - - if routes.TotalRoutes == nil { - routes.TotalRoutes = &types.NullInt{IsSet: true, Value: 0} - } - - if routes.TotalReservedPorts == nil { - routes.TotalReservedPorts = &types.NullInt{IsSet: true, Value: 0} - } - - if services.TotalServiceInstances == nil { - services.TotalServiceInstances = &types.NullInt{IsSet: true, Value: 0} - } -} - -func convertUnlimitedToNil(apps *resources.AppLimit, routes *resources.RouteLimit, services *resources.ServiceLimit) { - flags := []*types.NullInt{ - apps.TotalMemory, - apps.InstanceMemory, - apps.TotalAppInstances, - services.TotalServiceInstances, - routes.TotalRoutes, - routes.TotalReservedPorts, - } - - for i := 0; i < len(flags); i++ { - if flags[i] != nil { - if flags[i].Value == -1 { - flags[i].IsSet = false - flags[i].Value = 0 - } - } - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/organization_summary.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/organization_summary.go deleted file mode 100644 index 2fdc28c..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/organization_summary.go +++ /dev/null @@ -1,75 +0,0 @@ -package v7action - -import ( - "sort" - - "code.cloudfoundry.org/cli/resources" -) - -type OrganizationSummary struct { - resources.Organization - DomainNames []string - QuotaName string - SpaceNames []string - - // DefaultIsolationSegmentGUID is the unique identifier of the isolation - // segment this organization is tagged with. - DefaultIsolationSegmentGUID string -} - -func (actor Actor) GetOrganizationSummaryByName(orgName string) (OrganizationSummary, Warnings, error) { - var allWarnings Warnings - - org, warnings, err := actor.GetOrganizationByName(orgName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return OrganizationSummary{}, allWarnings, err - } - - domains, warnings, err := actor.GetOrganizationDomains(org.GUID, "") - allWarnings = append(allWarnings, warnings...) - if err != nil { - return OrganizationSummary{}, allWarnings, err - } - - quota, ccv3Warnings, err := actor.CloudControllerClient.GetOrganizationQuota(org.QuotaGUID) - allWarnings = append(allWarnings, ccv3Warnings...) - if err != nil { - return OrganizationSummary{}, allWarnings, err - } - - spaces, warnings, err := actor.GetOrganizationSpaces(org.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return OrganizationSummary{}, allWarnings, err - } - - isoSegGUID, warnings, err := actor.GetOrganizationDefaultIsolationSegment(org.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return OrganizationSummary{}, allWarnings, err - } - - domainNames := []string{} - for _, domain := range domains { - domainNames = append(domainNames, domain.Name) - } - - spaceNames := []string{} - for _, space := range spaces { - spaceNames = append(spaceNames, space.Name) - } - - sort.Strings(domainNames) - sort.Strings(spaceNames) - - organizationSummary := OrganizationSummary{ - Organization: org, - DomainNames: domainNames, - QuotaName: quota.Name, - SpaceNames: spaceNames, - DefaultIsolationSegmentGUID: isoSegGUID, - } - - return organizationSummary, allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/package.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/package.go deleted file mode 100644 index 38f080d..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/package.go +++ /dev/null @@ -1,259 +0,0 @@ -package v7action - -import ( - "io" - "os" - "time" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/actor/sharedaction" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" - log "github.com/sirupsen/logrus" -) - -const ( - DefaultFolderPermissions = 0755 - DefaultArchiveFilePermissions = 0744 -) - -type DockerImageCredentials struct { - Path string - Username string - Password string -} - -func (actor Actor) CreateDockerPackageByApplication(appGUID string, dockerImageCredentials DockerImageCredentials) (resources.Package, Warnings, error) { - inputPackage := resources.Package{ - Type: constant.PackageTypeDocker, - Relationships: resources.Relationships{ - constant.RelationshipTypeApplication: resources.Relationship{GUID: appGUID}, - }, - DockerImage: dockerImageCredentials.Path, - DockerUsername: dockerImageCredentials.Username, - DockerPassword: dockerImageCredentials.Password, - } - pkg, warnings, err := actor.CloudControllerClient.CreatePackage(inputPackage) - return resources.Package(pkg), Warnings(warnings), err -} - -func (actor Actor) CreateDockerPackageByApplicationNameAndSpace(appName string, spaceGUID string, dockerImageCredentials DockerImageCredentials) (resources.Package, Warnings, error) { - app, getWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return resources.Package{}, getWarnings, err - } - pkg, warnings, err := actor.CreateDockerPackageByApplication(app.GUID, dockerImageCredentials) - return pkg, append(getWarnings, warnings...), err -} - -func (actor Actor) CreateAndUploadBitsPackageByApplicationNameAndSpace(appName string, spaceGUID string, bitsPath string) (resources.Package, Warnings, error) { - app, allWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return resources.Package{}, allWarnings, err - } - - if bitsPath == "" { - bitsPath, err = os.Getwd() - if err != nil { - return resources.Package{}, allWarnings, err - } - } - - info, err := os.Stat(bitsPath) - if err != nil { - return resources.Package{}, allWarnings, err - } - - var fileResources []sharedaction.Resource - if info.IsDir() { - fileResources, err = actor.SharedActor.GatherDirectoryResources(bitsPath) - } else { - fileResources, err = actor.SharedActor.GatherArchiveResources(bitsPath) - } - if err != nil { - return resources.Package{}, allWarnings, err - } - - // potentially match resources here in the future - - var archivePath string - if info.IsDir() { - archivePath, err = actor.SharedActor.ZipDirectoryResources(bitsPath, fileResources) - } else { - archivePath, err = actor.SharedActor.ZipArchiveResources(bitsPath, fileResources) - } - if err != nil { - os.RemoveAll(archivePath) - return resources.Package{}, allWarnings, err - } - defer os.RemoveAll(archivePath) - - inputPackage := resources.Package{ - Type: constant.PackageTypeBits, - Relationships: resources.Relationships{ - constant.RelationshipTypeApplication: resources.Relationship{GUID: app.GUID}, - }, - } - - pkg, warnings, err := actor.CloudControllerClient.CreatePackage(inputPackage) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Package{}, allWarnings, err - } - - _, warnings, err = actor.CloudControllerClient.UploadPackage(pkg, archivePath) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Package{}, allWarnings, err - } - - for pkg.State != constant.PackageReady && - pkg.State != constant.PackageFailed && - pkg.State != constant.PackageExpired { - time.Sleep(actor.Config.PollingInterval()) - pkg, warnings, err = actor.CloudControllerClient.GetPackage(pkg.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Package{}, allWarnings, err - } - } - - if pkg.State == constant.PackageFailed { - return resources.Package{}, allWarnings, actionerror.PackageProcessingFailedError{} - } else if pkg.State == constant.PackageExpired { - return resources.Package{}, allWarnings, actionerror.PackageProcessingExpiredError{} - } - - updatedPackage, updatedWarnings, err := actor.PollPackage(resources.Package(pkg)) - return updatedPackage, append(allWarnings, updatedWarnings...), err -} - -func (actor Actor) GetNewestReadyPackageForApplication(app resources.Application) (resources.Package, Warnings, error) { - ccv3Packages, warnings, err := actor.CloudControllerClient.GetPackages( - ccv3.Query{ - Key: ccv3.AppGUIDFilter, - Values: []string{app.GUID}, - }, - ccv3.Query{ - Key: ccv3.StatesFilter, - Values: []string{string(constant.PackageReady)}, - }, - ccv3.Query{ - Key: ccv3.OrderBy, - Values: []string{ccv3.CreatedAtDescendingOrder}, - }, - ) - - if err != nil { - return resources.Package{}, Warnings(warnings), err - } - - if len(ccv3Packages) == 0 { - return resources.Package{}, Warnings(warnings), actionerror.NoEligiblePackagesError{AppName: app.Name} - } - - return resources.Package(ccv3Packages[0]), Warnings(warnings), nil -} - -// GetApplicationPackages returns a list of package of an app. -func (actor *Actor) GetApplicationPackages(appName string, spaceGUID string) ([]resources.Package, Warnings, error) { - app, allWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return nil, allWarnings, err - } - - ccv3Packages, warnings, err := actor.CloudControllerClient.GetPackages( - ccv3.Query{Key: ccv3.AppGUIDFilter, Values: []string{app.GUID}}, - ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.CreatedAtDescendingOrder}}, - ) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - var packages []resources.Package - for _, ccv3Package := range ccv3Packages { - packages = append(packages, resources.Package(ccv3Package)) - } - - return packages, allWarnings, nil -} - -func (actor Actor) CreateBitsPackageByApplication(appGUID string) (resources.Package, Warnings, error) { - inputPackage := resources.Package{ - Type: constant.PackageTypeBits, - Relationships: resources.Relationships{ - constant.RelationshipTypeApplication: resources.Relationship{GUID: appGUID}, - }, - } - - pkg, warnings, err := actor.CloudControllerClient.CreatePackage(inputPackage) - if err != nil { - return resources.Package{}, Warnings(warnings), err - } - - return resources.Package(pkg), Warnings(warnings), err -} - -func (actor Actor) UploadBitsPackage(pkg resources.Package, matchedResources []sharedaction.V3Resource, newResources io.Reader, newResourcesLength int64) (resources.Package, Warnings, error) { - apiResources := make([]ccv3.Resource, 0, len(matchedResources)) // Explicitly done to prevent nils - - for _, resource := range matchedResources { - apiResources = append(apiResources, ccv3.Resource(resource)) - } - - appPkg, warnings, err := actor.CloudControllerClient.UploadBitsPackage(resources.Package(pkg), apiResources, newResources, newResourcesLength) - return resources.Package(appPkg), Warnings(warnings), err -} - -// PollPackage returns a package of an app. -func (actor Actor) PollPackage(pkg resources.Package) (resources.Package, Warnings, error) { - var allWarnings Warnings - - for pkg.State != constant.PackageReady && pkg.State != constant.PackageFailed && pkg.State != constant.PackageExpired { - time.Sleep(actor.Config.PollingInterval()) - ccPkg, warnings, err := actor.CloudControllerClient.GetPackage(pkg.GUID) - log.WithFields(log.Fields{ - "package_guid": pkg.GUID, - "state": pkg.State, - }).Debug("polling package state") - - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Package{}, allWarnings, err - } - - pkg = resources.Package(ccPkg) - } - - if pkg.State == constant.PackageFailed { - return resources.Package{}, allWarnings, actionerror.PackageProcessingFailedError{} - } else if pkg.State == constant.PackageExpired { - return resources.Package{}, allWarnings, actionerror.PackageProcessingExpiredError{} - } - - return pkg, allWarnings, nil -} - -func (actor Actor) CopyPackage(sourceApp resources.Application, targetApp resources.Application) (resources.Package, Warnings, error) { - var allWarnings Warnings - sourcePkg, warnings, err := actor.GetNewestReadyPackageForApplication(sourceApp) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Package{}, allWarnings, err - } - targetPkg, ccv3Warnings, err := actor.CloudControllerClient.CopyPackage(sourcePkg.GUID, targetApp.GUID) - allWarnings = append(allWarnings, ccv3Warnings...) - if err != nil { - return resources.Package{}, allWarnings, err - } - - readyPackage, warnings, err := actor.PollPackage(resources.Package(targetPkg)) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Package{}, allWarnings, err - } - - return readyPackage, allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/process.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/process.go deleted file mode 100644 index c25884e..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/process.go +++ /dev/null @@ -1,62 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" -) - -func (actor Actor) GetProcess(processGUID string) (resources.Process, Warnings, error) { - process, warnings, err := actor.CloudControllerClient.GetProcess(processGUID) - - return resources.Process(process), Warnings(warnings), err -} - -// GetProcessByTypeAndApplication returns a process for the given application -// and type. -func (actor Actor) GetProcessByTypeAndApplication(processType string, appGUID string) (resources.Process, Warnings, error) { - process, warnings, err := actor.CloudControllerClient.GetApplicationProcessByType(appGUID, processType) - if _, ok := err.(ccerror.ProcessNotFoundError); ok { - return resources.Process{}, Warnings(warnings), actionerror.ProcessNotFoundError{ProcessType: processType} - } - return resources.Process(process), Warnings(warnings), err -} - -func (actor Actor) ScaleProcessByApplication(appGUID string, process resources.Process) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.CreateApplicationProcessScale(appGUID, resources.Process(process)) - allWarnings := Warnings(warnings) - if err != nil { - if _, ok := err.(ccerror.ProcessNotFoundError); ok { - return allWarnings, actionerror.ProcessNotFoundError{ProcessType: process.Type} - } - return allWarnings, err - } - - return allWarnings, nil -} - -func (actor Actor) UpdateProcessByTypeAndApplication(processType string, appGUID string, updatedProcess resources.Process) (Warnings, error) { - if updatedProcess.HealthCheckType != constant.HTTP { - if updatedProcess.HealthCheckEndpoint != constant.ProcessHealthCheckEndpointDefault && updatedProcess.HealthCheckEndpoint != "" { - return nil, actionerror.HTTPHealthCheckInvalidError{} - } - - updatedProcess.HealthCheckEndpoint = "" - } - - process, warnings, err := actor.GetProcessByTypeAndApplication(processType, appGUID) - allWarnings := warnings - if err != nil { - return allWarnings, err - } - - updatedProcess.GUID = process.GUID - _, updateWarnings, err := actor.CloudControllerClient.UpdateProcess(resources.Process(updatedProcess)) - allWarnings = append(allWarnings, Warnings(updateWarnings)...) - if err != nil { - return allWarnings, err - } - - return allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/process_health_check.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/process_health_check.go deleted file mode 100644 index 51f2edb..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/process_health_check.go +++ /dev/null @@ -1,70 +0,0 @@ -package v7action - -import ( - "sort" - - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" -) - -type ProcessHealthCheck struct { - ProcessType string - HealthCheckType constant.HealthCheckType - Endpoint string - InvocationTimeout int64 -} - -type ProcessHealthChecks []ProcessHealthCheck - -func (phs ProcessHealthChecks) Sort() { - sort.Slice(phs, func(i int, j int) bool { - var iScore int - var jScore int - - switch phs[i].ProcessType { - case constant.ProcessTypeWeb: - iScore = 0 - default: - iScore = 1 - } - - switch phs[j].ProcessType { - case constant.ProcessTypeWeb: - jScore = 0 - default: - jScore = 1 - } - - if iScore == 1 && jScore == 1 { - return phs[i].ProcessType < phs[j].ProcessType - } - return iScore < jScore - }) -} - -func (actor Actor) GetApplicationProcessHealthChecksByNameAndSpace(appName string, spaceGUID string) ([]ProcessHealthCheck, Warnings, error) { - app, allWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - if err != nil { - return nil, allWarnings, err - } - - ccv3Processes, warnings, err := actor.CloudControllerClient.GetApplicationProcesses(app.GUID) - allWarnings = append(allWarnings, Warnings(warnings)...) - if err != nil { - return nil, allWarnings, err - } - - var processHealthChecks ProcessHealthChecks - for _, ccv3Process := range ccv3Processes { - processHealthCheck := ProcessHealthCheck{ - ProcessType: ccv3Process.Type, - HealthCheckType: ccv3Process.HealthCheckType, - Endpoint: ccv3Process.HealthCheckEndpoint, - InvocationTimeout: ccv3Process.HealthCheckInvocationTimeout, - } - processHealthChecks = append(processHealthChecks, processHealthCheck) - } - - processHealthChecks.Sort() - - return processHealthChecks, allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/process_instance.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/process_instance.go deleted file mode 100644 index 5393899..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/process_instance.go +++ /dev/null @@ -1,77 +0,0 @@ -package v7action - -import ( - "time" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" -) - -type ProcessInstance ccv3.ProcessInstance - -// Running will return true if the instance is running. -func (instance ProcessInstance) Running() bool { - return instance.State == constant.ProcessInstanceRunning -} - -// StartTime returns the time that the instance started. -func (instance *ProcessInstance) StartTime() time.Time { - return time.Now().Add(-instance.Uptime) -} - -type ProcessInstances []ccv3.ProcessInstance - -func (pi ProcessInstances) AllCrashed() bool { - for _, instance := range pi { - if instance.State != constant.ProcessInstanceCrashed { - return false - } - } - return true -} - -func (pi ProcessInstances) AnyRunning() bool { - for _, instance := range pi { - if instance.State == constant.ProcessInstanceRunning { - return true - } - } - return false -} - -func (pi ProcessInstances) Empty() bool { - return len(pi) == 0 -} - -func (actor Actor) DeleteInstanceByApplicationNameSpaceProcessTypeAndIndex(appName string, spaceGUID string, processType string, instanceIndex int) (Warnings, error) { - var allWarnings Warnings - app, appWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, appWarnings...) - if err != nil { - return allWarnings, err - } - - deleteWarnings, err := actor.CloudControllerClient.DeleteApplicationProcessInstance(app.GUID, processType, instanceIndex) - allWarnings = append(allWarnings, deleteWarnings...) - - if err != nil { - switch err.(type) { - case ccerror.ProcessNotFoundError: - return allWarnings, actionerror.ProcessNotFoundError{ - ProcessType: processType, - } - case ccerror.InstanceNotFoundError: - return allWarnings, actionerror.ProcessInstanceNotFoundError{ - ProcessType: processType, - InstanceIndex: uint(instanceIndex), - } - default: - return allWarnings, err - } - } - - return allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/process_summary.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/process_summary.go deleted file mode 100644 index 72f1e9a..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/process_summary.go +++ /dev/null @@ -1,136 +0,0 @@ -package v7action - -import ( - "fmt" - "sort" - "strings" - - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" - log "github.com/sirupsen/logrus" -) - -// ProcessSummary represents a process with instance details. -type ProcessSummary struct { - resources.Process - - Sidecars []resources.Sidecar - - InstanceDetails []ProcessInstance -} - -type ProcessSummaries []ProcessSummary - -func (p ProcessSummary) TotalInstanceCount() int { - return len(p.InstanceDetails) -} - -func (p ProcessSummary) HealthyInstanceCount() int { - count := 0 - for _, instance := range p.InstanceDetails { - if instance.State == constant.ProcessInstanceRunning { - count++ - } - } - return count -} - -func (ps ProcessSummaries) Sort() { - sort.Slice(ps, func(i int, j int) bool { - var iScore int - var jScore int - - switch ps[i].Type { - case constant.ProcessTypeWeb: - iScore = 0 - default: - iScore = 1 - } - - switch ps[j].Type { - case constant.ProcessTypeWeb: - jScore = 0 - default: - jScore = 1 - } - - if iScore == 1 && jScore == 1 { - return ps[i].Type < ps[j].Type - } - return iScore < jScore - }) -} - -func (ps ProcessSummaries) String() string { - ps.Sort() - - var summaries []string - for _, p := range ps { - summaries = append(summaries, fmt.Sprintf("%s:%d/%d", p.Type, p.HealthyInstanceCount(), p.TotalInstanceCount())) - } - - return strings.Join(summaries, ", ") -} - -func (actor Actor) getProcessSummariesForApp(appGUID string, withObfuscatedValues bool) (ProcessSummaries, Warnings, error) { - log.WithFields(log.Fields{ - "appGUID": appGUID, - "withObfuscatedValues": withObfuscatedValues, - }).Info("retrieving process information") - - ccv3Processes, warnings, err := actor.CloudControllerClient.GetApplicationProcesses(appGUID) - allWarnings := Warnings(warnings) - if err != nil { - return nil, allWarnings, err - } - - var processSummaries ProcessSummaries - for _, ccv3Process := range ccv3Processes { - process := resources.Process(ccv3Process) - if withObfuscatedValues { - fullProcess, warnings, err := actor.GetProcess(ccv3Process.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - process = fullProcess - } - - processSummary, warnings, err := actor.getProcessSummary(process) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - processSummaries = append(processSummaries, processSummary) - } - processSummaries.Sort() - - return processSummaries, allWarnings, nil -} - -func (actor Actor) getProcessSummary(process resources.Process) (ProcessSummary, Warnings, error) { - sidecars, warnings, err := actor.CloudControllerClient.GetProcessSidecars(process.GUID) - allWarnings := Warnings(warnings) - if err != nil { - return ProcessSummary{}, allWarnings, err - } - - instances, warnings, err := actor.CloudControllerClient.GetProcessInstances(process.GUID) - allWarnings = append(allWarnings, Warnings(warnings)...) - if err != nil { - return ProcessSummary{}, allWarnings, err - } - - processSummary := ProcessSummary{ - Process: process, - } - for _, sidecar := range sidecars { - processSummary.Sidecars = append(processSummary.Sidecars, resources.Sidecar(sidecar)) - } - for _, instance := range instances { - processSummary.InstanceDetails = append(processSummary.InstanceDetails, ProcessInstance(instance)) - } - - return processSummary, allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/progress_bar.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/progress_bar.go deleted file mode 100644 index 3b1951c..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/progress_bar.go +++ /dev/null @@ -1,48 +0,0 @@ -package v7action - -import ( - "io" - "os" - "time" - - "gopkg.in/cheggaaa/pb.v1" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . SimpleProgressBar - -type SimpleProgressBar interface { - Initialize(path string) (io.Reader, int64, error) - Terminate() -} - -type ProgressBar struct { - bar *pb.ProgressBar -} - -func NewProgressBar() *ProgressBar { - return &ProgressBar{} -} - -func (p *ProgressBar) Initialize(path string) (io.Reader, int64, error) { - file, err := os.Open(path) - if err != nil { - return nil, 0, err - } - - fileInfo, err := file.Stat() - if err != nil { - return nil, 0, err - } - - p.bar = pb.New(int(fileInfo.Size())).SetUnits(pb.U_BYTES) - p.bar.ShowTimeLeft = false - p.bar.Start() - return p.bar.NewProxyReader(file), fileInfo.Size(), nil - -} - -func (p *ProgressBar) Terminate() { - // Adding sleep to ensure UI has finished drawing - time.Sleep(time.Second) - p.bar.Finish() -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/resource_match.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/resource_match.go deleted file mode 100644 index dc5db1c..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/resource_match.go +++ /dev/null @@ -1,59 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/sharedaction" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - log "github.com/sirupsen/logrus" -) - -func (actor Actor) ResourceMatch(resources []sharedaction.V3Resource) ([]sharedaction.V3Resource, Warnings, error) { - resourceChunks := actor.chunkResources(resources) - - log.WithFields(log.Fields{ - "total_resources": len(resources), - "chunks": len(resourceChunks), - }).Debug("sending resource match stats") - - var ( - allWarnings Warnings - matchedAPIResources []ccv3.Resource - ) - - for _, chunk := range resourceChunks { - newMatchedAPIResources, warnings, err := actor.CloudControllerClient.ResourceMatch(chunk) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - matchedAPIResources = append(matchedAPIResources, newMatchedAPIResources...) - } - - var matchedResources []sharedaction.V3Resource - for _, resource := range matchedAPIResources { - matchedResources = append(matchedResources, sharedaction.V3Resource(resource)) - } - - log.WithFields(log.Fields{ - "matchedResources": len(matchedResources), - }).Debug("number of resources matched by CC") - - return matchedResources, allWarnings, nil -} - -func (Actor) chunkResources(resources []sharedaction.V3Resource) [][]ccv3.Resource { - var chunkedResources [][]ccv3.Resource - var currentSet []ccv3.Resource - - for index, resource := range resources { - if resource.SizeInBytes != 0 { - currentSet = append(currentSet, ccv3.Resource(resource)) - } - - if len(currentSet) == constant.MaxNumberOfResourcesForMatching || index+1 == len(resources) { - chunkedResources = append(chunkedResources, currentSet) - currentSet = []ccv3.Resource{} - } - } - return chunkedResources -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/revisions.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/revisions.go deleted file mode 100644 index 47b7920..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/revisions.go +++ /dev/null @@ -1,104 +0,0 @@ -package v7action - -import ( - "strconv" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/actor/versioncheck" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" -) - -const MinimumCCAPIVersionForDeployable = "3.86.0" - -// GetRevisionsByApplicationNameAndSpace returns revisions for application. -func (actor *Actor) GetRevisionsByApplicationNameAndSpace(appName string, spaceGUID string) ([]resources.Revision, Warnings, error) { - var warnings Warnings - app, appWarnings, appErr := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - warnings = append(warnings, appWarnings...) - if appErr != nil { - return []resources.Revision{}, warnings, appErr - } - revisions, apiWarnings, apiErr := actor.CloudControllerClient.GetApplicationRevisions( - app.GUID, - ccv3.Query{Key: ccv3.OrderBy, Values: []string{"-created_at"}}, - ) - warnings = append(warnings, apiWarnings...) - if apiErr != nil { - return []resources.Revision{}, warnings, apiErr - } - versionRequirementMet, versionErr := versioncheck.IsMinimumAPIVersionMet(actor.Config.APIVersion(), MinimumCCAPIVersionForDeployable) - if versionErr != nil { - return []resources.Revision{}, warnings, versionErr - } - if versionRequirementMet == false { - _, deployableWarnings, deployableErr := actor.setRevisionsDeployableByDropletStateForApp(app.GUID, revisions) - warnings = append(warnings, deployableWarnings...) - if deployableErr != nil { - return []resources.Revision{}, warnings, deployableErr - } - } - return revisions, warnings, nil -} - -func (actor Actor) GetRevisionByApplicationAndVersion(appGUID string, revisionVersion int) (resources.Revision, Warnings, error) { - query := ccv3.Query{ - Key: ccv3.VersionsFilter, - Values: []string{strconv.Itoa(revisionVersion)}, - } - revisions, warnings, apiErr := actor.CloudControllerClient.GetApplicationRevisions(appGUID, query) - if apiErr != nil { - return resources.Revision{}, Warnings(warnings), apiErr - } - - if len(revisions) > 1 { - return resources.Revision{}, Warnings(warnings), actionerror.RevisionAmbiguousError{Version: revisionVersion} - } - - if len(revisions) == 0 { - return resources.Revision{}, Warnings(warnings), actionerror.RevisionNotFoundError{Version: revisionVersion} - } - - versionRequirementMet, versionErr := versioncheck.IsMinimumAPIVersionMet(actor.Config.APIVersion(), MinimumCCAPIVersionForDeployable) - if versionErr != nil { - return resources.Revision{}, Warnings(warnings), versionErr - } - if versionRequirementMet == false { - _, deployableWarnings, deployableErr := actor.setRevisionsDeployableByDropletStateForApp(appGUID, revisions) - warnings = append(warnings, deployableWarnings...) - if deployableErr != nil { - return resources.Revision{}, Warnings(warnings), deployableErr - } - } - - return revisions[0], Warnings(warnings), nil -} - -func (actor Actor) setRevisionsDeployableByDropletStateForApp(appGUID string, revisions []resources.Revision) ([]resources.Revision, Warnings, error) { - droplets, warnings, err := actor.CloudControllerClient.GetDroplets( - ccv3.Query{Key: ccv3.AppGUIDFilter, Values: []string{appGUID}}, - ) - if err != nil { - return []resources.Revision{}, Warnings(warnings), err - } - for i := range revisions { - for _, droplet := range droplets { - if revisions[i].Droplet.GUID == droplet.GUID { - revisions[i].Deployable = (droplet.State == constant.DropletStaged) - } - } - } - return revisions, Warnings(warnings), nil -} - -func (actor Actor) GetApplicationRevisionsDeployed(appGUID string) ([]resources.Revision, Warnings, error) { - - revisions, warnings, apiErr := actor.CloudControllerClient.GetApplicationRevisionsDeployed(appGUID) - - if apiErr != nil { - return []resources.Revision{}, Warnings(warnings), apiErr - } - - return revisions, Warnings(warnings), nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/role.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/role.go deleted file mode 100644 index 437d324..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/role.go +++ /dev/null @@ -1,227 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" -) - -func (actor Actor) CreateOrgRole(roleType constant.RoleType, orgGUID string, userNameOrGUID string, userOrigin string, isClient bool) (Warnings, error) { - roleToCreate := resources.Role{ - Type: roleType, - OrgGUID: orgGUID, - } - - if isClient { - err := actor.UAAClient.ValidateClientUser(userNameOrGUID) - if err != nil { - return Warnings{}, err - } - - roleToCreate.UserGUID = userNameOrGUID - } else { - roleToCreate.Username = userNameOrGUID - roleToCreate.Origin = userOrigin - } - - _, warnings, err := actor.CloudControllerClient.CreateRole(roleToCreate) - - return Warnings(warnings), err -} - -func (actor Actor) CreateSpaceRole(roleType constant.RoleType, orgGUID string, spaceGUID string, userNameOrGUID string, userOrigin string, isClient bool) (Warnings, error) { - roleToCreate := resources.Role{ - Type: roleType, - SpaceGUID: spaceGUID, - } - - if isClient { - roleToCreate.UserGUID = userNameOrGUID - } else { - roleToCreate.Username = userNameOrGUID - roleToCreate.Origin = userOrigin - } - - warnings, err := actor.CreateOrgRole(constant.OrgUserRole, orgGUID, userNameOrGUID, userOrigin, isClient) - if err != nil { - _, isIdempotentError := err.(ccerror.RoleAlreadyExistsError) - _, isForbiddenError := err.(ccerror.ForbiddenError) - _, isUserNotFoundError := err.(actionerror.UserNotFoundError) - - if !isIdempotentError && !isForbiddenError && !isUserNotFoundError { - return warnings, err - } - } - - _, ccv3Warnings, err := actor.CloudControllerClient.CreateRole(roleToCreate) - warnings = append(warnings, ccv3Warnings...) - - return warnings, err -} - -func (actor Actor) DeleteOrgRole(roleType constant.RoleType, orgGUID string, userNameOrGUID string, userOrigin string, isClient bool) (Warnings, error) { - var userGUID string - var allWarnings Warnings - userGUID, warnings, err := actor.getUserGuidForDeleteRole(isClient, userNameOrGUID, userOrigin, allWarnings) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - roleGUID, warnings, err := actor.GetRoleGUID(ccv3.OrganizationGUIDFilter, orgGUID, userGUID, roleType) - allWarnings = append(allWarnings, warnings...) - if err != nil || roleGUID == "" { - return allWarnings, err - } - - jobURL, deleteRoleWarnings, err := actor.CloudControllerClient.DeleteRole(roleGUID) - allWarnings = append(allWarnings, deleteRoleWarnings...) - if err != nil { - return allWarnings, err - } - - pollJobWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, pollJobWarnings...) - if err != nil { - return allWarnings, err - } - - return allWarnings, nil -} - -func (actor Actor) DeleteSpaceRole(roleType constant.RoleType, spaceGUID string, userNameOrGUID string, userOrigin string, isClient bool) (Warnings, error) { - var userGUID string - var allWarnings Warnings - userGUID, userWarnings, err := actor.getUserGuidForDeleteRole(isClient, userNameOrGUID, userOrigin, allWarnings) - allWarnings = append(allWarnings, userWarnings...) - if err != nil { - return allWarnings, err - } - - roleGUID, roleWarnings, err := actor.GetRoleGUID(ccv3.SpaceGUIDFilter, spaceGUID, userGUID, roleType) - allWarnings = append(allWarnings, roleWarnings...) - if err != nil || roleGUID == "" { - return allWarnings, err - } - - jobURL, deleteRoleWarnings, err := actor.CloudControllerClient.DeleteRole(roleGUID) - allWarnings = append(allWarnings, deleteRoleWarnings...) - if err != nil { - return allWarnings, err - } - - pollJobWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, pollJobWarnings...) - if err != nil { - return allWarnings, err - } - - return allWarnings, nil -} - -func (actor Actor) getUserGuidForDeleteRole(isClient bool, userNameOrGUID string, userOrigin string, allWarnings Warnings) (string, Warnings, error) { - var userGUID string - if isClient { - user, warnings, err := actor.CloudControllerClient.GetUser(userNameOrGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - if _, ok := err.(ccerror.UserNotFoundError); ok { - err = actionerror.UserNotFoundError{Username: userNameOrGUID} - } - return "", allWarnings, err - } - userGUID = user.GUID - } else { - queries := []ccv3.Query{{ - Key: ccv3.UsernamesFilter, - Values: []string{userNameOrGUID}, - }} - if userOrigin != "" { - queries = append(queries, ccv3.Query{ - Key: ccv3.OriginsFilter, - Values: []string{userOrigin}, - }) - } - - ccv3Users, warnings, err := actor.CloudControllerClient.GetUsers(queries...) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return "", allWarnings, err - } - if len(ccv3Users) == 0 { - return "", allWarnings, actionerror.UserNotFoundError{Username: userNameOrGUID, Origin: userOrigin} - } - if len(ccv3Users) > 1 { - origins := []string{} - for _, user := range ccv3Users { - origins = append(origins, user.Origin) - } - return "", allWarnings, actionerror.AmbiguousUserError{Username: userNameOrGUID, Origins: origins} - } - userGUID = ccv3Users[0].GUID - } - return userGUID, allWarnings, nil -} - -func (actor Actor) GetRoleGUID(queryKey ccv3.QueryKey, orgOrSpaceGUID string, userGUID string, roleType constant.RoleType) (string, Warnings, error) { - ccv3Roles, _, warnings, err := actor.CloudControllerClient.GetRoles( - ccv3.Query{ - Key: ccv3.UserGUIDFilter, - Values: []string{userGUID}, - }, - ccv3.Query{ - Key: ccv3.RoleTypesFilter, - Values: []string{string(roleType)}, - }, - ccv3.Query{ - Key: queryKey, - Values: []string{orgOrSpaceGUID}, - }, - ) - - if err != nil { - return "", Warnings(warnings), err - } - - if len(ccv3Roles) == 0 { - return "", Warnings(warnings), nil - } - - return ccv3Roles[0].GUID, Warnings(warnings), nil -} - -func (actor Actor) GetOrgUsersByRoleType(orgGuid string) (map[constant.RoleType][]resources.User, Warnings, error) { - return actor.getUsersByRoleType(orgGuid, ccv3.OrganizationGUIDFilter) -} - -func (actor Actor) GetSpaceUsersByRoleType(spaceGuid string) (map[constant.RoleType][]resources.User, Warnings, error) { - return actor.getUsersByRoleType(spaceGuid, ccv3.SpaceGUIDFilter) -} - -func (actor Actor) getUsersByRoleType(guid string, filterKey ccv3.QueryKey) (map[constant.RoleType][]resources.User, Warnings, error) { - ccv3Roles, includes, ccWarnings, err := actor.CloudControllerClient.GetRoles( - ccv3.Query{ - Key: filterKey, - Values: []string{guid}, - }, - ccv3.Query{ - Key: ccv3.Include, - Values: []string{"user"}, - }, - ) - if err != nil { - return nil, Warnings(ccWarnings), err - } - usersByGuids := make(map[string]resources.User) - for _, user := range includes.Users { - usersByGuids[user.GUID] = user - } - usersByRoleType := make(map[constant.RoleType][]resources.User) - for _, role := range ccv3Roles { - user := resources.User(usersByGuids[role.UserGUID]) - usersByRoleType[role.Type] = append(usersByRoleType[role.Type], user) - } - return usersByRoleType, Warnings(ccWarnings), nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/route.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/route.go deleted file mode 100644 index e91d543..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/route.go +++ /dev/null @@ -1,437 +0,0 @@ -package v7action - -import ( - "sort" - "strconv" - "strings" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/batcher" - "code.cloudfoundry.org/cli/util/extract" - "code.cloudfoundry.org/cli/util/lookuptable" - "code.cloudfoundry.org/cli/util/railway" - "code.cloudfoundry.org/cli/util/sorting" -) - -type RouteSummary struct { - resources.Route - AppNames []string - AppProtocols []string - DomainName string - SpaceName string - ServiceInstanceName string -} - -func (actor Actor) CreateRoute(spaceGUID, domainName, hostname, path string, port int) (resources.Route, Warnings, error) { - allWarnings := Warnings{} - domain, warnings, err := actor.GetDomainByName(domainName) - allWarnings = append(allWarnings, warnings...) - - if err != nil { - return resources.Route{}, allWarnings, err - } - - route, apiWarnings, err := actor.CloudControllerClient.CreateRoute(resources.Route{ - SpaceGUID: spaceGUID, - DomainGUID: domain.GUID, - Host: hostname, - Path: path, - Port: port, - }) - - actorWarnings := Warnings(apiWarnings) - allWarnings = append(allWarnings, actorWarnings...) - - if _, ok := err.(ccerror.RouteNotUniqueError); ok { - return resources.Route{}, allWarnings, actionerror.RouteAlreadyExistsError{Err: err} - } - - return route, allWarnings, err -} - -func (actor Actor) GetRouteDestinations(routeGUID string) ([]resources.RouteDestination, Warnings, error) { - destinations, warnings, err := actor.CloudControllerClient.GetRouteDestinations(routeGUID) - - var actorDestinations []resources.RouteDestination - for _, dst := range destinations { - actorDestinations = append(actorDestinations, resources.RouteDestination{ - GUID: dst.GUID, - App: resources.RouteDestinationApp(dst.App), - }) - } - - return actorDestinations, Warnings(warnings), err -} - -func (actor Actor) GetRouteDestinationByAppGUID(route resources.Route, appGUID string) (resources.RouteDestination, error) { - for _, destination := range route.Destinations { - if destination.App.GUID == appGUID && destination.App.Process.Type == constant.ProcessTypeWeb { - return destination, nil - } - } - - return resources.RouteDestination{}, actionerror.RouteDestinationNotFoundError{ - AppGUID: appGUID, - ProcessType: constant.ProcessTypeWeb, - RouteGUID: route.GUID, - } -} - -func (actor Actor) GetRoutesBySpace(spaceGUID string, labelSelector string) ([]resources.Route, Warnings, error) { - allWarnings := Warnings{} - queries := []ccv3.Query{ - ccv3.Query{Key: ccv3.SpaceGUIDFilter, Values: []string{spaceGUID}}, - } - if len(labelSelector) > 0 { - queries = append(queries, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}}) - } - - routes, warnings, err := actor.CloudControllerClient.GetRoutes(queries...) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - return routes, allWarnings, nil -} - -func (actor Actor) parseRoutePath(routePath string) (string, string, string, resources.Domain, Warnings, error) { - var ( - warnings Warnings - host string - path string - port string - ) - - routeParts := strings.SplitN(routePath, "/", 2) - domainAndPort := routeParts[0] - if len(routeParts) > 1 { - path = "/" + routeParts[1] - } - - domainAndPortParts := strings.SplitN(domainAndPort, ":", 2) - domainName := domainAndPortParts[0] - if len(domainAndPortParts) > 1 { - port = domainAndPortParts[1] - } - - domain, allWarnings, err := actor.GetDomainByName(domainName) - - if err != nil { - _, domainNotFound := err.(actionerror.DomainNotFoundError) - domainParts := strings.SplitN(domainName, ".", 2) - needToCheckForHost := domainNotFound && len(domainParts) > 1 - - if !needToCheckForHost { - return "", "", "", resources.Domain{}, allWarnings, err - } - - host = domainParts[0] - domainName = domainParts[1] - domain, warnings, err = actor.GetDomainByName(domainName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return "", "", "", resources.Domain{}, allWarnings, err - } - } - - return host, path, port, domain, allWarnings, err -} - -func (actor Actor) GetRoute(routePath string, spaceGUID string) (resources.Route, Warnings, error) { - filters := []ccv3.Query{ - { - Key: ccv3.SpaceGUIDFilter, - Values: []string{spaceGUID}, - }, - } - - host, path, port, domain, allWarnings, err := actor.parseRoutePath(routePath) - if err != nil { - return resources.Route{}, allWarnings, err - } - - filters = append(filters, ccv3.Query{Key: ccv3.DomainGUIDFilter, - Values: []string{domain.GUID}, - }) - filters = append(filters, ccv3.Query{Key: ccv3.HostsFilter, - Values: []string{host}, - }) - filters = append(filters, ccv3.Query{Key: ccv3.PathsFilter, - Values: []string{path}, - }) - - if domain.IsTCP() { - filters = append(filters, ccv3.Query{Key: ccv3.PortsFilter, - Values: []string{port}, - }) - } - - routes, warnings, err := actor.CloudControllerClient.GetRoutes(filters...) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return resources.Route{}, allWarnings, err - } - if len(routes) == 0 { - return resources.Route{}, allWarnings, actionerror.RouteNotFoundError{ - Host: host, - DomainName: domain.Name, - Path: path, - } - } - - return routes[0], allWarnings, nil -} - -func (actor Actor) GetRoutesByOrg(orgGUID string, labelSelector string) ([]resources.Route, Warnings, error) { - allWarnings := Warnings{} - queries := []ccv3.Query{ - ccv3.Query{Key: ccv3.OrganizationGUIDFilter, Values: []string{orgGUID}}, - } - if len(labelSelector) > 0 { - queries = append(queries, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}}) - } - - routes, warnings, err := actor.CloudControllerClient.GetRoutes(queries...) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - return routes, allWarnings, nil -} - -func (actor Actor) GetApplicationMapForRoute(route resources.Route) (map[string]resources.Application, Warnings, error) { - var v7Warning Warnings - apps, v7Warning, err := actor.GetApplicationsByGUIDs(extract.UniqueList("Destinations.App.GUID", route)) - - appMap := make(map[string]resources.Application) - for _, a := range apps { - appMap[a.GUID] = a - } - return appMap, v7Warning, err -} - -func (actor Actor) GetRouteSummaries(routes []resources.Route) ([]RouteSummary, Warnings, error) { - var ( - spaces []resources.Space - apps []resources.Application - routeBindings []resources.RouteBinding - serviceInstances []resources.ServiceInstance - ) - - warnings, err := railway.Sequentially( - func() (ccv3.Warnings, error) { - return batcher.RequestByGUID( - extract.UniqueList("SpaceGUID", routes), - func(guids []string) (ccv3.Warnings, error) { - batch, _, warnings, err := actor.CloudControllerClient.GetSpaces(ccv3.Query{ - Key: ccv3.GUIDFilter, - Values: guids, - }) - spaces = append(spaces, batch...) - return warnings, err - }, - ) - }, - func() (warnings ccv3.Warnings, err error) { - var v7Warning Warnings - apps, v7Warning, err = actor.GetApplicationsByGUIDs(extract.UniqueList("Destinations.App.GUID", routes)) - return ccv3.Warnings(v7Warning), err - }, - func() (warnings ccv3.Warnings, err error) { - return batcher.RequestByGUID( - extract.UniqueList("GUID", routes), - func(guids []string) (ccv3.Warnings, error) { - batch, included, warnings, err := actor.CloudControllerClient.GetRouteBindings( - ccv3.Query{Key: ccv3.Include, Values: []string{"service_instance"}}, - ccv3.Query{Key: ccv3.RouteGUIDFilter, Values: guids}, - ) - routeBindings = append(routeBindings, batch...) - serviceInstances = append(serviceInstances, included.ServiceInstances...) - return warnings, err - }, - ) - }, - ) - - if err != nil { - return nil, Warnings(warnings), err - } - - spaceNamesByGUID := lookuptable.NameFromGUID(spaces) - appNamesByGUID := lookuptable.NameFromGUID(apps) - serviceInstanceNameByGUID := lookuptable.NameFromGUID(serviceInstances) - - serviceInstanceNameByRouteGUID := make(map[string]string) - for _, routeBinding := range routeBindings { - serviceInstanceNameByRouteGUID[routeBinding.RouteGUID] = serviceInstanceNameByGUID[routeBinding.ServiceInstanceGUID] - } - - var routeSummaries []RouteSummary - for _, route := range routes { - var appNames []string - - protocolSet := map[string]bool{} - for _, destination := range route.Destinations { - appNames = append(appNames, appNamesByGUID[destination.App.GUID]) - protocolSet[destination.Protocol] = true - } - - var appProtocols []string - if len(protocolSet) > 0 { - appProtocols = make([]string, 0, len(protocolSet)) - for key := range protocolSet { - appProtocols = append(appProtocols, key) - } - sort.Strings(appProtocols) - } - - routeSummaries = append(routeSummaries, RouteSummary{ - Route: route, - AppNames: appNames, - AppProtocols: appProtocols, - SpaceName: spaceNamesByGUID[route.SpaceGUID], - DomainName: getDomainName(route.URL, route.Host, route.Path, route.Port), - ServiceInstanceName: serviceInstanceNameByRouteGUID[route.GUID], - }) - } - - sort.Slice(routeSummaries, func(i, j int) bool { - return sorting.LessIgnoreCase(routeSummaries[i].SpaceName, routeSummaries[j].SpaceName) - }) - - return routeSummaries, Warnings(warnings), nil -} - -func (actor Actor) DeleteOrphanedRoutes(spaceGUID string) (Warnings, error) { - var allWarnings Warnings - - jobURL, warnings, err := actor.CloudControllerClient.DeleteOrphanedRoutes(spaceGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - warnings, err = actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, warnings...) - - return allWarnings, err -} - -func (actor Actor) DeleteRoute(domainName, hostname, path string, port int) (Warnings, error) { - allWarnings := Warnings{} - domain, warnings, err := actor.GetDomainByName(domainName) - allWarnings = append(allWarnings, warnings...) - - if _, ok := err.(actionerror.DomainNotFoundError); ok { - allWarnings = append(allWarnings, err.Error()) - return allWarnings, nil - } - - if err != nil { - return allWarnings, err - } - - route, actorWarnings, err := actor.GetRouteByAttributes(domain, hostname, path, port) - - allWarnings = append(allWarnings, actorWarnings...) - - if err != nil { - return allWarnings, err - } - - jobURL, apiWarnings, err := actor.CloudControllerClient.DeleteRoute(route.GUID) - actorWarnings = Warnings(apiWarnings) - allWarnings = append(allWarnings, actorWarnings...) - - if err != nil { - return allWarnings, err - } - - pollJobWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, Warnings(pollJobWarnings)...) - - return allWarnings, err -} - -func (actor Actor) GetRouteByAttributes(domain resources.Domain, hostname string, path string, port int) (resources.Route, Warnings, error) { - var ( - routes []resources.Route - ccWarnings ccv3.Warnings - err error - ) - - queries := []ccv3.Query{ - {Key: ccv3.DomainGUIDFilter, Values: []string{domain.GUID}}, - {Key: ccv3.HostsFilter, Values: []string{hostname}}, - {Key: ccv3.PathsFilter, Values: []string{path}}, - } - - if domain.IsTCP() { - queries = append(queries, ccv3.Query{Key: ccv3.PortsFilter, Values: []string{strconv.Itoa(port)}}) - } - - routes, ccWarnings, err = actor.CloudControllerClient.GetRoutes(queries...) - if err != nil { - return resources.Route{}, Warnings(ccWarnings), err - } - - if len(routes) < 1 { - return resources.Route{}, Warnings(ccWarnings), actionerror.RouteNotFoundError{ - DomainName: domain.Name, - Host: hostname, - Path: path, - Port: port, - } - } - - return routes[0], Warnings(ccWarnings), nil -} - -func (actor Actor) MapRoute(routeGUID string, appGUID string, destinationProtocol string) (Warnings, error) { - warnings, err := actor.CloudControllerClient.MapRoute(routeGUID, appGUID, destinationProtocol) - return Warnings(warnings), err -} - -func (actor Actor) UpdateDestination(routeGUID string, destinationGUID string, protocol string) (Warnings, error) { - warnings, err := actor.CloudControllerClient.UpdateDestination(routeGUID, destinationGUID, protocol) - return Warnings(warnings), err -} -func (actor Actor) UnmapRoute(routeGUID string, destinationGUID string) (Warnings, error) { - warnings, err := actor.CloudControllerClient.UnmapRoute(routeGUID, destinationGUID) - return Warnings(warnings), err -} - -func (actor Actor) GetApplicationRoutes(appGUID string) ([]resources.Route, Warnings, error) { - allWarnings := Warnings{} - - routes, warnings, err := actor.CloudControllerClient.GetApplicationRoutes(appGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - if len(routes) == 0 { - return nil, allWarnings, err - } - - return routes, allWarnings, nil -} - -func getDomainName(fullURL, host, path string, port int) string { - domainWithoutHost := strings.TrimPrefix(fullURL, host+".") - domainWithoutPath := strings.TrimSuffix(domainWithoutHost, path) - - if port > 0 { - portString := strconv.Itoa(port) - domainWithoutPort := strings.TrimSuffix(domainWithoutPath, ":"+portString) - return domainWithoutPort - } - - return domainWithoutPath -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/route_binding.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/route_binding.go deleted file mode 100644 index 6d2d278..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/route_binding.go +++ /dev/null @@ -1,176 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" - "code.cloudfoundry.org/cli/util/railway" -) - -type CreateRouteBindingParams struct { - SpaceGUID string - ServiceInstanceName string - DomainName string - Hostname string - Path string - Parameters types.OptionalObject -} - -type DeleteRouteBindingParams struct { - SpaceGUID string - ServiceInstanceName string - DomainName string - Hostname string - Path string -} - -type getRouteForBindingParams struct { - SpaceGUID string - DomainName string - Hostname string - Path string -} - -func (actor Actor) CreateRouteBinding(params CreateRouteBindingParams) (chan PollJobEvent, Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - route resources.Route - jobURL ccv3.JobURL - stream chan PollJobEvent - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(params.ServiceInstanceName, params.SpaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - route, warnings, err = actor.getRouteForBinding(getRouteForBindingParams{ - SpaceGUID: params.SpaceGUID, - DomainName: params.DomainName, - Hostname: params.Hostname, - Path: params.Path, - }) - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.createRouteBinding(serviceInstance.GUID, route.GUID, params.Parameters) - return - }, - func() (warnings ccv3.Warnings, err error) { - stream = actor.PollJobToEventStream(jobURL) - return - }, - ) - - return stream, Warnings(warnings), err -} - -func (actor Actor) DeleteRouteBinding(params DeleteRouteBindingParams) (chan PollJobEvent, Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - route resources.Route - binding resources.RouteBinding - jobURL ccv3.JobURL - stream chan PollJobEvent - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(params.ServiceInstanceName, params.SpaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - route, warnings, err = actor.getRouteForBinding(getRouteForBindingParams{ - SpaceGUID: params.SpaceGUID, - DomainName: params.DomainName, - Hostname: params.Hostname, - Path: params.Path, - }) - return - }, - func() (warnings ccv3.Warnings, err error) { - binding, warnings, err = actor.getRouteBinding(serviceInstance.GUID, route.GUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.CloudControllerClient.DeleteRouteBinding(binding.GUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - stream = actor.PollJobToEventStream(jobURL) - return - }, - ) - - return stream, Warnings(warnings), err -} - -func (actor Actor) createRouteBinding(serviceInstanceGUID, routeGUID string, parameters types.OptionalObject) (ccv3.JobURL, ccv3.Warnings, error) { - jobURL, warnings, err := actor.CloudControllerClient.CreateRouteBinding(resources.RouteBinding{ - ServiceInstanceGUID: serviceInstanceGUID, - RouteGUID: routeGUID, - Parameters: parameters, - }) - switch err.(type) { - case nil: - return jobURL, warnings, nil - case ccerror.ResourceAlreadyExistsError: - return "", warnings, actionerror.ResourceAlreadyExistsError{Message: err.Error()} - default: - return "", warnings, err - } -} - -func (actor Actor) getRouteBinding(serviceInstanceGUID, routeGUID string) (resources.RouteBinding, ccv3.Warnings, error) { - bindings, _, warnings, err := actor.CloudControllerClient.GetRouteBindings( - ccv3.Query{Key: ccv3.RouteGUIDFilter, Values: []string{routeGUID}}, - ccv3.Query{Key: ccv3.ServiceInstanceGUIDFilter, Values: []string{serviceInstanceGUID}}, - ) - - switch { - case err != nil: - return resources.RouteBinding{}, warnings, err - case len(bindings) == 0: - return resources.RouteBinding{}, warnings, actionerror.RouteBindingNotFoundError{} - default: - return bindings[0], warnings, nil - } -} - -func (actor Actor) getRouteForBinding(params getRouteForBindingParams) (resources.Route, ccv3.Warnings, error) { - var ( - domain resources.Domain - routes []resources.Route - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - domain, warnings, err = actor.getDomainByName(params.DomainName) - return - }, - func() (warnings ccv3.Warnings, err error) { - routes, warnings, err = actor.CloudControllerClient.GetRoutes( - ccv3.Query{Key: ccv3.DomainGUIDFilter, Values: []string{domain.GUID}}, - ccv3.Query{Key: ccv3.HostsFilter, Values: []string{params.Hostname}}, - ccv3.Query{Key: ccv3.PathsFilter, Values: []string{params.Path}}, - ) - return - }, - ) - - switch { - case err != nil: - return resources.Route{}, warnings, err - case len(routes) == 0: - return resources.Route{}, warnings, actionerror.RouteNotFoundError{ - Host: params.Hostname, - DomainName: domain.Name, - Path: params.Path, - } - default: - return routes[0], warnings, nil - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/router_group.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/router_group.go deleted file mode 100644 index 2be81f3..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/router_group.go +++ /dev/null @@ -1,37 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/router" - "code.cloudfoundry.org/cli/api/router/routererror" -) - -type RouterGroup router.RouterGroup - -func (actor Actor) GetRouterGroups() ([]RouterGroup, error) { - var routerGroups []RouterGroup - - apiRouterGroups, err := actor.RoutingClient.GetRouterGroups() - if err != nil { - return nil, err - } - - for _, group := range apiRouterGroups { - routerGroups = append(routerGroups, RouterGroup(group)) - } - - return routerGroups, err -} - -func (actor Actor) GetRouterGroupByName(name string) (RouterGroup, error) { - apiRouterGroup, err := actor.RoutingClient.GetRouterGroupByName(name) - if err != nil { - if _, ok := err.(routererror.ResourceNotFoundError); ok { - return RouterGroup{}, actionerror.RouterGroupNotFoundError{Name: name} - } - - return RouterGroup{}, err - } - - return RouterGroup(apiRouterGroup), nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/routing_client.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/routing_client.go deleted file mode 100644 index 2922959..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/routing_client.go +++ /dev/null @@ -1,10 +0,0 @@ -package v7action - -import "code.cloudfoundry.org/cli/api/router" - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . RoutingClient - -type RoutingClient interface { - GetRouterGroups() ([]router.RouterGroup, error) - GetRouterGroupByName(name string) (router.RouterGroup, error) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/security_group.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/security_group.go deleted file mode 100644 index 73099a3..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/security_group.go +++ /dev/null @@ -1,386 +0,0 @@ -package v7action - -import ( - "encoding/json" - "io/ioutil" - "os" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/batcher" - "code.cloudfoundry.org/cli/util/lookuptable" -) - -type SecurityGroupSummary struct { - Name string - Rules []resources.Rule - SecurityGroupSpaces []SecurityGroupSpace -} - -type SecurityGroupSpace struct { - SpaceName string - OrgName string - Lifecycle string -} - -func (actor Actor) BindSecurityGroupToSpaces(securityGroupGUID string, spaces []resources.Space, lifecycle constant.SecurityGroupLifecycle) (Warnings, error) { - var ( - warnings ccv3.Warnings - err error - spaceGUIDs []string - ) - - for _, space := range spaces { - spaceGUIDs = append(spaceGUIDs, space.GUID) - } - - switch lifecycle { - case constant.SecurityGroupLifecycleRunning: - warnings, err = actor.CloudControllerClient.UpdateSecurityGroupRunningSpace(securityGroupGUID, spaceGUIDs) - case constant.SecurityGroupLifecycleStaging: - warnings, err = actor.CloudControllerClient.UpdateSecurityGroupStagingSpace(securityGroupGUID, spaceGUIDs) - default: - err = actionerror.InvalidLifecycleError{Lifecycle: string(lifecycle)} - } - - return Warnings(warnings), err -} - -func (actor Actor) CreateSecurityGroup(name, filePath string) (Warnings, error) { - allWarnings := Warnings{} - bytes, err := parsePath(filePath) - if err != nil { - return allWarnings, err - } - - var rules []resources.Rule - err = json.Unmarshal(bytes, &rules) - if err != nil { - return allWarnings, err - } - - securityGroup := resources.SecurityGroup{Name: name, Rules: rules} - - _, warnings, err := actor.CloudControllerClient.CreateSecurityGroup(securityGroup) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - return allWarnings, nil -} - -func (actor Actor) GetSecurityGroup(securityGroupName string) (resources.SecurityGroup, Warnings, error) { - allWarnings := Warnings{} - - securityGroups, warnings, err := actor.CloudControllerClient.GetSecurityGroups(ccv3.Query{Key: ccv3.NameFilter, Values: []string{securityGroupName}}) - allWarnings = append(allWarnings, warnings...) - - if err != nil { - return resources.SecurityGroup{}, allWarnings, err - } - - if len(securityGroups) == 0 { - return resources.SecurityGroup{}, allWarnings, actionerror.SecurityGroupNotFoundError{Name: securityGroupName} - } - - return securityGroups[0], allWarnings, err -} - -func (actor Actor) GetSecurityGroupSummary(securityGroupName string) (SecurityGroupSummary, Warnings, error) { - allWarnings := Warnings{} - securityGroupSummary := SecurityGroupSummary{} - securityGroups, warnings, err := actor.CloudControllerClient.GetSecurityGroups(ccv3.Query{Key: ccv3.NameFilter, Values: []string{securityGroupName}}) - - allWarnings = append(allWarnings, warnings...) - - if err != nil { - return securityGroupSummary, allWarnings, err - } - if len(securityGroups) == 0 { - return securityGroupSummary, allWarnings, actionerror.SecurityGroupNotFoundError{Name: securityGroupName} - } - - securityGroupSummary.Name = securityGroupName - securityGroupSummary.Rules = securityGroups[0].Rules - - var noSecurityGroupSpaces = len(securityGroups[0].StagingSpaceGUIDs) == 0 && len(securityGroups[0].RunningSpaceGUIDs) == 0 - if noSecurityGroupSpaces { - securityGroupSummary.SecurityGroupSpaces = []SecurityGroupSpace{} - } else { - secGroupSpaces, warnings, err := getSecurityGroupSpaces(actor, securityGroups[0].StagingSpaceGUIDs, securityGroups[0].RunningSpaceGUIDs) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return securityGroupSummary, allWarnings, err - } - securityGroupSummary.SecurityGroupSpaces = secGroupSpaces - } - - return securityGroupSummary, allWarnings, nil -} - -func (actor Actor) GetSecurityGroups() ([]SecurityGroupSummary, Warnings, error) { - allWarnings := Warnings{} - securityGroupSummaries := []SecurityGroupSummary{} - securityGroups, warnings, err := actor.CloudControllerClient.GetSecurityGroups() - - allWarnings = append(allWarnings, warnings...) - - if err != nil { - return securityGroupSummaries, allWarnings, err - } - - for _, securityGroup := range securityGroups { - var securityGroupSummary SecurityGroupSummary - securityGroupSummary.Name = securityGroup.Name - securityGroupSummary.Rules = securityGroup.Rules - - var securityGroupSpaces []SecurityGroupSpace - var noSecurityGroupSpaces = !*securityGroup.StagingGloballyEnabled && !*securityGroup.RunningGloballyEnabled && len(securityGroup.StagingSpaceGUIDs) == 0 && len(securityGroup.RunningSpaceGUIDs) == 0 - if noSecurityGroupSpaces { - securityGroupSpaces = []SecurityGroupSpace{} - } - - if *securityGroup.StagingGloballyEnabled { - securityGroupSpaces = append(securityGroupSpaces, SecurityGroupSpace{ - SpaceName: "", - OrgName: "", - Lifecycle: "staging", - }) - } - - if *securityGroup.RunningGloballyEnabled { - securityGroupSpaces = append(securityGroupSpaces, SecurityGroupSpace{ - SpaceName: "", - OrgName: "", - Lifecycle: "running", - }) - } - - secGroupSpaces, warnings, err := getSecurityGroupSpaces(actor, securityGroup.StagingSpaceGUIDs, securityGroup.RunningSpaceGUIDs) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return securityGroupSummaries, allWarnings, err - } - securityGroupSpaces = append(securityGroupSpaces, secGroupSpaces...) - securityGroupSummary.SecurityGroupSpaces = securityGroupSpaces - - securityGroupSummaries = append(securityGroupSummaries, securityGroupSummary) - } - - return securityGroupSummaries, allWarnings, nil -} - -func (actor Actor) UnbindSecurityGroup(securityGroupName string, orgName string, spaceName string, lifecycle constant.SecurityGroupLifecycle) (Warnings, error) { - var allWarnings Warnings - - org, warnings, err := actor.GetOrganizationByName(orgName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - space, warnings, err := actor.GetSpaceByNameAndOrganization(spaceName, org.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - securityGroup, warnings, err := actor.GetSecurityGroup(securityGroupName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - var ccv3Warnings ccv3.Warnings - switch lifecycle { - case constant.SecurityGroupLifecycleRunning: - ccv3Warnings, err = actor.CloudControllerClient.UnbindSecurityGroupRunningSpace(securityGroup.GUID, space.GUID) - case constant.SecurityGroupLifecycleStaging: - ccv3Warnings, err = actor.CloudControllerClient.UnbindSecurityGroupStagingSpace(securityGroup.GUID, space.GUID) - default: - return allWarnings, actionerror.InvalidLifecycleError{Lifecycle: string(lifecycle)} - } - - allWarnings = append(allWarnings, ccv3Warnings...) - - if err != nil { - if _, isNotBoundError := err.(ccerror.SecurityGroupNotBound); isNotBoundError { - return allWarnings, actionerror.SecurityGroupNotBoundToSpaceError{ - Name: securityGroupName, - Space: spaceName, - Lifecycle: lifecycle, - } - } - } - - return allWarnings, err -} - -func (actor Actor) GetGlobalStagingSecurityGroups() ([]resources.SecurityGroup, Warnings, error) { - stagingSecurityGroups, warnings, err := actor.CloudControllerClient.GetSecurityGroups(ccv3.Query{Key: ccv3.GloballyEnabledStaging, Values: []string{"true"}}) - - return stagingSecurityGroups, Warnings(warnings), err -} - -func (actor Actor) GetGlobalRunningSecurityGroups() ([]resources.SecurityGroup, Warnings, error) { - runningSecurityGroups, warnings, err := actor.CloudControllerClient.GetSecurityGroups(ccv3.Query{Key: ccv3.GloballyEnabledRunning, Values: []string{"true"}}) - - return runningSecurityGroups, Warnings(warnings), err -} - -func (actor Actor) UpdateSecurityGroup(name, filePath string) (Warnings, error) { - allWarnings := Warnings{} - - // parse input file - bytes, err := parsePath(filePath) - if err != nil { - return allWarnings, err - } - - var rules []resources.Rule - err = json.Unmarshal(bytes, &rules) - if err != nil { - return allWarnings, err - } - - // fetch security group from API - securityGroups, warnings, err := actor.CloudControllerClient.GetSecurityGroups(ccv3.Query{Key: ccv3.NameFilter, Values: []string{name}}) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - if len(securityGroups) == 0 { - return allWarnings, actionerror.SecurityGroupNotFoundError{Name: name} - } - - securityGroup := resources.SecurityGroup{ - Name: name, - GUID: securityGroups[0].GUID, - Rules: rules, - } - - // update security group - _, warnings, err = actor.CloudControllerClient.UpdateSecurityGroup(securityGroup) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - return allWarnings, nil -} - -func (actor Actor) UpdateSecurityGroupGloballyEnabled(securityGroupName string, lifecycle constant.SecurityGroupLifecycle, enabled bool) (Warnings, error) { - var allWarnings Warnings - - securityGroup, warnings, err := actor.GetSecurityGroup(securityGroupName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - requestBody := resources.SecurityGroup{GUID: securityGroup.GUID} - switch lifecycle { - case constant.SecurityGroupLifecycleRunning: - requestBody.RunningGloballyEnabled = &enabled - case constant.SecurityGroupLifecycleStaging: - requestBody.StagingGloballyEnabled = &enabled - default: - return allWarnings, actionerror.InvalidLifecycleError{Lifecycle: string(lifecycle)} - } - - _, ccv3Warnings, err := actor.CloudControllerClient.UpdateSecurityGroup(requestBody) - allWarnings = append(allWarnings, ccv3Warnings...) - - return allWarnings, err -} - -func (actor Actor) DeleteSecurityGroup(securityGroupName string) (Warnings, error) { - var allWarnings Warnings - - securityGroup, warnings, err := actor.GetSecurityGroup(securityGroupName) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - jobURL, ccv3Warnings, err := actor.CloudControllerClient.DeleteSecurityGroup(securityGroup.GUID) - allWarnings = append(allWarnings, ccv3Warnings...) - if err != nil { - return allWarnings, err - } - - pollingWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, pollingWarnings...) - return allWarnings, err -} - -func getSecurityGroupSpaces(actor Actor, stagingSpaceGUIDs []string, runningSpaceGUIDs []string) ([]SecurityGroupSpace, ccv3.Warnings, error) { - var warnings ccv3.Warnings - associatedSpaceGuids := runningSpaceGUIDs - associatedSpaceGuids = append(associatedSpaceGuids, stagingSpaceGUIDs...) - - var securityGroupSpaces []SecurityGroupSpace - var spaces []resources.Space - var includes ccv3.IncludedResources - - if len(associatedSpaceGuids) > 0 { - ccv3Warnings, err := batcher.RequestByGUID(associatedSpaceGuids, func(guids []string) (ccv3.Warnings, error) { - batchSpaces, batchIncludes, newWarnings, err := actor.CloudControllerClient.GetSpaces(ccv3.Query{ - Key: ccv3.GUIDFilter, - Values: guids, - }, ccv3.Query{ - Key: ccv3.Include, - Values: []string{"organization"}, - }) - spaces = append(spaces, batchSpaces...) - includes.Organizations = append(includes.Organizations, batchIncludes.Organizations...) - return newWarnings, err - }) - warnings = ccv3Warnings - if err != nil { - return securityGroupSpaces, warnings, err - } - - orgsByGuid := lookuptable.OrgFromGUID(includes.Organizations) - spacesByGuid := lookuptable.SpaceFromGUID(spaces) - - for _, runningSpaceGUID := range runningSpaceGUIDs { - space := spacesByGuid[runningSpaceGUID] - orgGuid := space.Relationships[constant.RelationshipTypeOrganization].GUID - securityGroupSpaces = append(securityGroupSpaces, SecurityGroupSpace{ - SpaceName: space.Name, - OrgName: orgsByGuid[orgGuid].Name, - Lifecycle: "running", - }) - } - - for _, stagingSpaceGUID := range stagingSpaceGUIDs { - space := spacesByGuid[stagingSpaceGUID] - orgGuid := space.Relationships[constant.RelationshipTypeOrganization].GUID - securityGroupSpaces = append(securityGroupSpaces, SecurityGroupSpace{ - SpaceName: space.Name, - OrgName: orgsByGuid[orgGuid].Name, - Lifecycle: "staging", - }) - } - } - return securityGroupSpaces, warnings, nil -} - -func parsePath(path string) ([]byte, error) { - file, err := os.Open(path) - if err != nil { - return nil, err - } - - bytes, err := ioutil.ReadAll(file) - if err != nil { - return nil, err - } - - return bytes, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_access.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_access.go deleted file mode 100644 index 7f32b77..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_access.go +++ /dev/null @@ -1,343 +0,0 @@ -package v7action - -import ( - "errors" - "fmt" - "sort" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" -) - -type ServicePlanWithSpaceAndOrganization ccv3.ServicePlanWithSpaceAndOrganization - -type ServicePlanAccess struct { - BrokerName string - ServiceOfferingName string - ServicePlanName string - VisibilityType resources.ServicePlanVisibilityType - VisibilityDetails []string -} - -type SkippedPlans []string - -type offeringDetails struct{ offeringName, brokerName string } - -func (actor *Actor) GetServiceAccess(offeringName, brokerName, orgName string) ([]ServicePlanAccess, Warnings, error) { - var orgGUID string - var allWarnings Warnings - if orgName != "" { - org, orgWarnings, err := actor.GetOrganizationByName(orgName) - if err != nil { - return nil, orgWarnings, err - } - allWarnings = append(allWarnings, orgWarnings...) - - orgGUID = org.GUID - } - - plansQuery := buildPlansFilterForGet(offeringName, brokerName, orgGUID) - - offerings, offeringsWarnings, err := actor.getServiceOfferings(offeringName, brokerName) - allWarnings = append(allWarnings, offeringsWarnings...) - if err != nil { - return nil, allWarnings, err - } - - plans, plansWarnings, err := actor.CloudControllerClient.GetServicePlansWithSpaceAndOrganization(plansQuery...) - allWarnings = append(allWarnings, plansWarnings...) - if err != nil { - return nil, allWarnings, err - } - - var result []ServicePlanAccess - for _, plan := range plans { - if offering, ok := offerings[plan.ServiceOfferingGUID]; ok { - visibilityDetails, warnings, err := actor.getServicePlanVisibilityDetails(ServicePlanWithSpaceAndOrganization(plan)) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return nil, allWarnings, err - } - - result = append(result, ServicePlanAccess{ - ServicePlanName: plan.Name, - VisibilityType: plan.VisibilityType, - VisibilityDetails: visibilityDetails, - ServiceOfferingName: offering.offeringName, - BrokerName: offering.brokerName, - }) - } - } - - sort.Slice(result, func(i, j int) bool { - if result[i].BrokerName != result[j].BrokerName { - return result[i].BrokerName < result[j].BrokerName - } - if result[i].ServiceOfferingName != result[j].ServiceOfferingName { - return result[i].ServiceOfferingName < result[j].ServiceOfferingName - } - return result[i].ServicePlanName < result[j].ServicePlanName - }) - - return result, allWarnings, err -} - -func (actor *Actor) EnableServiceAccess(offeringName, brokerName, orgName, planName string) (SkippedPlans, Warnings, error) { - var allWarnings Warnings - - offering, offeringWarnings, err := actor.CloudControllerClient.GetServiceOfferingByNameAndBroker(offeringName, brokerName) - allWarnings = append(allWarnings, offeringWarnings...) - if err != nil { - return nil, allWarnings, actionerror.EnrichAPIErrors(err) - } - - plansQuery := buildPlansFilterForUpdate(offering.GUID, planName) - plans, planWarnings, err := actor.CloudControllerClient.GetServicePlans(plansQuery...) - allWarnings = append(allWarnings, planWarnings...) - if err != nil { - return nil, allWarnings, err - } - - if len(plans) == 0 { - return nil, allWarnings, actionerror.ServicePlanNotFoundError{ - PlanName: planName, - OfferingName: offeringName, - } - } - - if offeringIsSpaceScoped(plans) { - return nil, allWarnings, actionerror.ServicePlanVisibilityTypeError{} - } - - visibility := resources.ServicePlanVisibility{Type: resources.ServicePlanVisibilityPublic} - if orgName != "" { - org, orgWarnings, err := actor.GetOrganizationByName(orgName) - allWarnings = append(allWarnings, orgWarnings...) - if err != nil { - return nil, allWarnings, err - } - - visibility.Type = resources.ServicePlanVisibilityOrganization - visibility.Organizations = []resources.ServicePlanVisibilityDetail{{GUID: org.GUID}} - } - - var skipped SkippedPlans - for _, plan := range plans { - if plan.VisibilityType == resources.ServicePlanVisibilityPublic && visibility.Type == resources.ServicePlanVisibilityOrganization { - skipped = append(skipped, plan.Name) - continue - } - - _, visibilityWarnings, err := actor.CloudControllerClient.UpdateServicePlanVisibility( - plan.GUID, - visibility, - ) - allWarnings = append(allWarnings, visibilityWarnings...) - if err != nil { - return nil, allWarnings, err - } - } - - return skipped, allWarnings, nil -} - -func (actor *Actor) DisableServiceAccess(offeringName, brokerName, orgName, planName string) (SkippedPlans, Warnings, error) { - var allWarnings Warnings - - offering, offeringWarnings, err := actor.CloudControllerClient.GetServiceOfferingByNameAndBroker(offeringName, brokerName) - allWarnings = append(allWarnings, offeringWarnings...) - if err != nil { - return SkippedPlans{}, allWarnings, actionerror.EnrichAPIErrors(err) - } - - plansQuery := buildPlansFilterForUpdate(offering.GUID, planName) - plans, planWarnings, err := actor.CloudControllerClient.GetServicePlans(plansQuery...) - allWarnings = append(allWarnings, planWarnings...) - if err != nil { - return SkippedPlans{}, allWarnings, err - } - - if len(plans) == 0 { - return SkippedPlans{}, allWarnings, actionerror.ServicePlanNotFoundError{ - PlanName: planName, - OfferingName: offeringName, - } - } - - if offeringIsSpaceScoped(plans) { - return SkippedPlans{}, allWarnings, actionerror.ServicePlanVisibilityTypeError{} - } - - var ( - disableWarnings Warnings - skipped SkippedPlans - ) - - if orgName != "" { - skipped, disableWarnings, err = actor.disableOrganizationServiceAccess(plans, orgName) - } else { - skipped, disableWarnings, err = actor.disableAllServiceAccess(plans) - } - - allWarnings = append(allWarnings, disableWarnings...) - return skipped, allWarnings, err -} - -func (actor *Actor) disableAllServiceAccess(plans []resources.ServicePlan) (SkippedPlans, Warnings, error) { - var ( - allWarnings Warnings - skipped SkippedPlans - ) - - visibility := resources.ServicePlanVisibility{Type: resources.ServicePlanVisibilityAdmin} - for _, plan := range plans { - if plan.VisibilityType == resources.ServicePlanVisibilityAdmin { - skipped = append(skipped, plan.Name) - continue - } - - _, visibilityWarnings, err := actor.CloudControllerClient.UpdateServicePlanVisibility( - plan.GUID, - visibility, - ) - allWarnings = append(allWarnings, visibilityWarnings...) - if err != nil { - return skipped, allWarnings, err - } - } - return skipped, allWarnings, nil -} - -func (actor *Actor) disableOrganizationServiceAccess(plans []resources.ServicePlan, orgName string) (SkippedPlans, Warnings, error) { - var allWarnings Warnings - - org, orgWarnings, err := actor.GetOrganizationByName(orgName) - allWarnings = append(allWarnings, orgWarnings...) - if err != nil { - return nil, allWarnings, err - } - - for _, plan := range plans { - if plan.VisibilityType == resources.ServicePlanVisibilityPublic { - return nil, allWarnings, errors.New("Cannot remove organization level access for public plans.") - } - } - - var skipped SkippedPlans - for _, plan := range plans { - if plan.VisibilityType == resources.ServicePlanVisibilityAdmin { - skipped = append(skipped, plan.Name) - continue - } - - deleteWarnings, err := actor.CloudControllerClient.DeleteServicePlanVisibility(plan.GUID, org.GUID) - allWarnings = append(allWarnings, deleteWarnings...) - if err != nil { - return skipped, allWarnings, err - } - } - - return skipped, allWarnings, nil -} - -func (actor *Actor) getServiceOfferings(service, broker string) (map[string]offeringDetails, Warnings, error) { - var offeringsQuery []ccv3.Query - - if broker != "" { - offeringsQuery = append(offeringsQuery, ccv3.Query{ - Key: ccv3.ServiceBrokerNamesFilter, - Values: []string{broker}, - }) - } - - if service != "" { - offeringsQuery = append(offeringsQuery, ccv3.Query{ - Key: ccv3.NameFilter, - Values: []string{service}, - }) - } - - serviceOfferings, warnings, err := actor.CloudControllerClient.GetServiceOfferings(offeringsQuery...) - if err != nil { - return nil, Warnings(warnings), err - } - if len(serviceOfferings) == 0 && len(offeringsQuery) > 0 { - return nil, Warnings(warnings), actionerror.ServiceNotFoundError{Name: service, Broker: broker} - } - - offerings := make(map[string]offeringDetails) - for _, o := range serviceOfferings { - offerings[o.GUID] = offeringDetails{ - offeringName: o.Name, - brokerName: o.ServiceBrokerName, - } - } - return offerings, Warnings(warnings), err -} - -func (actor *Actor) getServicePlanVisibilityDetails(plan ServicePlanWithSpaceAndOrganization) (names []string, warnings Warnings, err error) { - if plan.VisibilityType == resources.ServicePlanVisibilityOrganization { - result, vwarn, err := actor.CloudControllerClient.GetServicePlanVisibility(plan.GUID) - warnings = Warnings(vwarn) - if err != nil { - return nil, warnings, err - } - - for _, organization := range result.Organizations { - names = append(names, organization.Name) - } - } - - if plan.VisibilityType == resources.ServicePlanVisibilitySpace { - names = []string{fmt.Sprintf("%s (org: %s)", plan.SpaceName, plan.OrganizationName)} - } - - return names, warnings, nil -} - -func buildPlansFilterForGet(offeringName, brokerName, orgGUID string) (query []ccv3.Query) { - if offeringName != "" { - query = append(query, ccv3.Query{ - Key: ccv3.ServiceOfferingNamesFilter, - Values: []string{offeringName}, - }) - } - - if brokerName != "" { - query = append(query, ccv3.Query{ - Key: ccv3.ServiceBrokerNamesFilter, - Values: []string{brokerName}, - }) - } - - if orgGUID != "" { - query = append(query, ccv3.Query{ - Key: ccv3.OrganizationGUIDFilter, - Values: []string{orgGUID}, - }) - } - - return query -} - -func buildPlansFilterForUpdate(offeringGUID, planName string) []ccv3.Query { - plansQuery := []ccv3.Query{{ - Key: ccv3.ServiceOfferingGUIDsFilter, - Values: []string{offeringGUID}, - }} - - if planName != "" { - plansQuery = append(plansQuery, ccv3.Query{ - Key: ccv3.NameFilter, - Values: []string{planName}, - }) - } - - return plansQuery -} - -func offeringIsSpaceScoped(plans []resources.ServicePlan) bool { - // All plans from a space scoped offering will have the same visibility type - return plans[0].VisibilityType == resources.ServicePlanVisibilitySpace -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_app_binding.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_app_binding.go deleted file mode 100644 index 0ff5779..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_app_binding.go +++ /dev/null @@ -1,141 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" - "code.cloudfoundry.org/cli/util/railway" -) - -type CreateServiceAppBindingParams struct { - SpaceGUID string - ServiceInstanceName string - AppName string - BindingName string - Parameters types.OptionalObject -} - -type DeleteServiceAppBindingParams struct { - SpaceGUID string - ServiceInstanceName string - AppName string -} - -func (actor Actor) CreateServiceAppBinding(params CreateServiceAppBindingParams) (chan PollJobEvent, Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - app resources.Application - jobURL ccv3.JobURL - stream chan PollJobEvent - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(params.ServiceInstanceName, params.SpaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - app, warnings, err = actor.CloudControllerClient.GetApplicationByNameAndSpace(params.AppName, params.SpaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.createServiceAppBinding(serviceInstance.GUID, app.GUID, params.BindingName, params.Parameters) - return - }, - func() (warnings ccv3.Warnings, err error) { - stream = actor.PollJobToEventStream(jobURL) - return - }, - ) - - switch err.(type) { - case nil: - return stream, Warnings(warnings), nil - case ccerror.ApplicationNotFoundError: - return nil, Warnings(warnings), actionerror.ApplicationNotFoundError{Name: params.AppName} - default: - return nil, Warnings(warnings), err - } -} - -func (actor Actor) DeleteServiceAppBinding(params DeleteServiceAppBindingParams) (chan PollJobEvent, Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - app resources.Application - binding resources.ServiceCredentialBinding - jobURL ccv3.JobURL - stream chan PollJobEvent - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(params.ServiceInstanceName, params.SpaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - app, warnings, err = actor.CloudControllerClient.GetApplicationByNameAndSpace(params.AppName, params.SpaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - binding, warnings, err = actor.getServiceAppBinding(serviceInstance.GUID, app.GUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.CloudControllerClient.DeleteServiceCredentialBinding(binding.GUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - stream = actor.PollJobToEventStream(jobURL) - return - }, - ) - - switch err.(type) { - case nil: - return stream, Warnings(warnings), nil - case ccerror.ApplicationNotFoundError: - return nil, Warnings(warnings), actionerror.ApplicationNotFoundError{Name: params.AppName} - default: - return nil, Warnings(warnings), err - } -} - -func (actor Actor) createServiceAppBinding(serviceInstanceGUID, appGUID, bindingName string, parameters types.OptionalObject) (ccv3.JobURL, ccv3.Warnings, error) { - jobURL, warnings, err := actor.CloudControllerClient.CreateServiceCredentialBinding(resources.ServiceCredentialBinding{ - Type: resources.AppBinding, - Name: bindingName, - ServiceInstanceGUID: serviceInstanceGUID, - AppGUID: appGUID, - Parameters: parameters, - }) - switch err.(type) { - case nil: - return jobURL, warnings, nil - case ccerror.ResourceAlreadyExistsError: - return "", warnings, actionerror.ResourceAlreadyExistsError{Message: err.Error()} - default: - return "", warnings, err - } -} - -func (actor Actor) getServiceAppBinding(serviceInstanceGUID, appGUID string) (resources.ServiceCredentialBinding, ccv3.Warnings, error) { - bindings, warnings, err := actor.CloudControllerClient.GetServiceCredentialBindings( - ccv3.Query{Key: ccv3.TypeFilter, Values: []string{"app"}}, - ccv3.Query{Key: ccv3.ServiceInstanceGUIDFilter, Values: []string{serviceInstanceGUID}}, - ccv3.Query{Key: ccv3.AppGUIDFilter, Values: []string{appGUID}}, - ) - - switch { - case err != nil: - return resources.ServiceCredentialBinding{}, warnings, err - case len(bindings) == 0: - return resources.ServiceCredentialBinding{}, warnings, actionerror.ServiceBindingNotFoundError{ - AppGUID: appGUID, - ServiceInstanceGUID: serviceInstanceGUID, - } - default: - return bindings[0], warnings, nil - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_broker.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_broker.go deleted file mode 100644 index 620ddce..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_broker.go +++ /dev/null @@ -1,69 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/railway" -) - -func (actor Actor) GetServiceBrokers() ([]resources.ServiceBroker, Warnings, error) { - serviceBrokers, warnings, err := actor.CloudControllerClient.GetServiceBrokers() - if err != nil { - return nil, Warnings(warnings), err - } - - return serviceBrokers, Warnings(warnings), nil -} - -func (actor Actor) GetServiceBrokerByName(serviceBrokerName string) (resources.ServiceBroker, Warnings, error) { - query := []ccv3.Query{ - { - Key: ccv3.NameFilter, - Values: []string{serviceBrokerName}, - }, - } - serviceBrokers, warnings, err := actor.CloudControllerClient.GetServiceBrokers(query...) - if err != nil { - return resources.ServiceBroker{}, Warnings(warnings), err - } - - if len(serviceBrokers) == 0 { - return resources.ServiceBroker{}, Warnings(warnings), actionerror.ServiceBrokerNotFoundError{Name: serviceBrokerName} - } - - return serviceBrokers[0], Warnings(warnings), nil -} - -func (actor Actor) CreateServiceBroker(model resources.ServiceBroker) (Warnings, error) { - return actor.performAndPoll(func() (ccv3.JobURL, ccv3.Warnings, error) { - return actor.CloudControllerClient.CreateServiceBroker(model) - }) -} - -func (actor Actor) UpdateServiceBroker(serviceBrokerGUID string, model resources.ServiceBroker) (Warnings, error) { - return actor.performAndPoll(func() (ccv3.JobURL, ccv3.Warnings, error) { - return actor.CloudControllerClient.UpdateServiceBroker(serviceBrokerGUID, model) - }) -} - -func (actor Actor) DeleteServiceBroker(serviceBrokerGUID string) (Warnings, error) { - return actor.performAndPoll(func() (ccv3.JobURL, ccv3.Warnings, error) { - return actor.CloudControllerClient.DeleteServiceBroker(serviceBrokerGUID) - }) -} - -func (actor Actor) performAndPoll(callback func() (ccv3.JobURL, ccv3.Warnings, error)) (Warnings, error) { - var jobURL ccv3.JobURL - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = callback() - return - }, - func() (ccv3.Warnings, error) { - return actor.CloudControllerClient.PollJob(jobURL) - }, - ) - return Warnings(warnings), err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance.go deleted file mode 100644 index 7ac5c7b..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance.go +++ /dev/null @@ -1,374 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" - "code.cloudfoundry.org/cli/util/railway" -) - -type UpdateManagedServiceInstanceParams struct { - ServiceInstanceName string - ServicePlanName string - SpaceGUID string - Tags types.OptionalStringSlice - Parameters types.OptionalObject -} - -type CreateManagedServiceInstanceParams struct { - ServiceOfferingName string - ServicePlanName string - ServiceInstanceName string - ServiceBrokerName string - SpaceGUID string - Tags types.OptionalStringSlice - Parameters types.OptionalObject -} - -func (actor Actor) GetServiceInstanceByNameAndSpace(serviceInstanceName string, spaceGUID string) (resources.ServiceInstance, Warnings, error) { - serviceInstance, _, warnings, err := actor.getServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - return serviceInstance, Warnings(warnings), err -} - -func (actor Actor) CreateUserProvidedServiceInstance(serviceInstance resources.ServiceInstance) (Warnings, error) { - serviceInstance.Type = resources.UserProvidedServiceInstance - _, warnings, err := actor.CloudControllerClient.CreateServiceInstance(serviceInstance) - return Warnings(warnings), err -} - -func (actor Actor) UpdateUserProvidedServiceInstance(serviceInstanceName, spaceGUID string, serviceInstanceUpdates resources.ServiceInstance) (Warnings, error) { - var original resources.ServiceInstance - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - original, _, warnings, err = actor.CloudControllerClient.GetServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - err = assertServiceInstanceType(resources.UserProvidedServiceInstance, original) - return - }, - func() (warnings ccv3.Warnings, err error) { - _, warnings, err = actor.CloudControllerClient.UpdateServiceInstance(original.GUID, serviceInstanceUpdates) - return - }, - ) - - return Warnings(warnings), err -} - -func (actor Actor) CreateManagedServiceInstance(params CreateManagedServiceInstanceParams) (chan PollJobEvent, Warnings, error) { - var ( - servicePlan resources.ServicePlan - jobURL ccv3.JobURL - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - var v7Warnings Warnings - servicePlan, v7Warnings, err = actor.GetServicePlanByNameOfferingAndBroker( - params.ServicePlanName, - params.ServiceOfferingName, - params.ServiceBrokerName, - ) - return ccv3.Warnings(v7Warnings), err - }, - func() (warnings ccv3.Warnings, err error) { - serviceInstance := resources.ServiceInstance{ - Type: resources.ManagedServiceInstance, - Name: params.ServiceInstanceName, - ServicePlanGUID: servicePlan.GUID, - SpaceGUID: params.SpaceGUID, - Tags: params.Tags, - Parameters: params.Parameters, - } - - jobURL, warnings, err = actor.CloudControllerClient.CreateServiceInstance(serviceInstance) - return - }, - ) - switch e := err.(type) { - case nil: - return actor.PollJobToEventStream(jobURL), Warnings(warnings), nil - case actionerror.DuplicateServicePlanError: - return nil, Warnings(warnings), actionerror.ServiceBrokerNameRequiredError{ - ServiceOfferingName: e.ServiceOfferingName, - } - default: - return nil, Warnings(warnings), err - } -} - -func (actor Actor) UpdateManagedServiceInstance(params UpdateManagedServiceInstanceParams) (chan PollJobEvent, Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - serviceOffering resources.ServiceOffering - serviceBroker resources.ServiceBroker - newPlanGUID string - jobURL ccv3.JobURL - stream chan PollJobEvent - ) - - planChangeRequested := params.ServicePlanName != "" - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, serviceOffering, serviceBroker, warnings, err = actor.getServiceInstanceForUpdate( - params.ServiceInstanceName, - params.SpaceGUID, - planChangeRequested, - ) - return - }, - func() (warnings ccv3.Warnings, err error) { - err = assertServiceInstanceType(resources.ManagedServiceInstance, serviceInstance) - return - }, - func() (warnings ccv3.Warnings, err error) { - if planChangeRequested { - newPlanGUID, warnings, err = actor.getPlanForInstanceUpdate(params.ServicePlanName, serviceOffering, serviceBroker) - } - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.updateManagedServiceInstance(serviceInstance, newPlanGUID, params) - return - }, - func() (warnings ccv3.Warnings, err error) { - stream = actor.PollJobToEventStream(jobURL) - return - }, - ) - - return stream, Warnings(warnings), err -} - -func (actor Actor) UpgradeManagedServiceInstance(serviceInstanceName string, spaceGUID string) (Warnings, error) { - var serviceInstance resources.ServiceInstance - var servicePlan resources.ServicePlan - var jobURL ccv3.JobURL - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - if serviceInstance.UpgradeAvailable.Value != true { - err = actionerror.ServiceInstanceUpgradeNotAvailableError{} - } - return - }, - func() (warnings ccv3.Warnings, err error) { - servicePlan, warnings, err = actor.CloudControllerClient.GetServicePlanByGUID(serviceInstance.ServicePlanGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.CloudControllerClient.UpdateServiceInstance(serviceInstance.GUID, resources.ServiceInstance{ - MaintenanceInfoVersion: servicePlan.MaintenanceInfoVersion, - }) - return - }, - func() (warnings ccv3.Warnings, err error) { - return actor.CloudControllerClient.PollJobForState(jobURL, constant.JobPolling) - }, - ) - - return Warnings(warnings), err -} - -func (actor Actor) RenameServiceInstance(currentServiceInstanceName, spaceGUID, newServiceInstanceName string) (Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - jobURL ccv3.JobURL - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(currentServiceInstanceName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.CloudControllerClient.UpdateServiceInstance( - serviceInstance.GUID, - resources.ServiceInstance{Name: newServiceInstanceName}, - ) - return - }, - func() (warnings ccv3.Warnings, err error) { - return actor.CloudControllerClient.PollJobForState(jobURL, constant.JobPolling) - }, - ) - - return Warnings(warnings), err -} - -func (actor Actor) DeleteServiceInstance(serviceInstanceName, spaceGUID string) (chan PollJobEvent, Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - jobURL ccv3.JobURL - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.CloudControllerClient.GetServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.CloudControllerClient.DeleteServiceInstance(serviceInstance.GUID) - return - }, - ) - - switch err.(type) { - case nil: - case ccerror.ServiceInstanceNotFoundError: - return nil, Warnings(warnings), actionerror.ServiceInstanceNotFoundError{Name: serviceInstanceName} - default: - return nil, Warnings(warnings), err - } - - switch jobURL { - case "": - return nil, Warnings(warnings), nil - default: - return actor.PollJobToEventStream(jobURL), Warnings(warnings), nil - } -} - -func (actor Actor) PurgeServiceInstance(serviceInstanceName, spaceGUID string) (Warnings, error) { - var serviceInstance resources.ServiceInstance - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.CloudControllerClient.GetServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - _, warnings, err = actor.CloudControllerClient.DeleteServiceInstance( - serviceInstance.GUID, - ccv3.Query{Key: ccv3.Purge, Values: []string{"true"}}, - ) - return - }, - ) - - switch err.(type) { - case nil: - return Warnings(warnings), nil - case ccerror.ServiceInstanceNotFoundError: - return Warnings(warnings), actionerror.ServiceInstanceNotFoundError{Name: serviceInstanceName} - default: - return Warnings(warnings), err - } -} - -func (actor Actor) pollJob(jobURL ccv3.JobURL, wait bool) (ccv3.Warnings, error) { - switch { - case jobURL == "": - return ccv3.Warnings{}, nil - case wait: - return actor.CloudControllerClient.PollJob(jobURL) - default: - return actor.CloudControllerClient.PollJobForState(jobURL, constant.JobPolling) - } -} - -func (actor Actor) getServiceInstanceByNameAndSpace(serviceInstanceName string, spaceGUID string, query ...ccv3.Query) (resources.ServiceInstance, ccv3.IncludedResources, ccv3.Warnings, error) { - serviceInstance, includedResources, warnings, err := actor.CloudControllerClient.GetServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID, query...) - switch e := err.(type) { - case ccerror.ServiceInstanceNotFoundError: - return serviceInstance, ccv3.IncludedResources{}, warnings, actionerror.ServiceInstanceNotFoundError{Name: e.Name} - default: - return serviceInstance, includedResources, warnings, err - } -} - -func (actor Actor) getServiceInstanceForUpdate(serviceInstanceName string, spaceGUID string, includePlan bool) (resources.ServiceInstance, resources.ServiceOffering, resources.ServiceBroker, ccv3.Warnings, error) { - var query []ccv3.Query - if includePlan { - query = append( - query, - ccv3.Query{Key: ccv3.FieldsServicePlanServiceOffering, Values: []string{"name", "guid"}}, - ccv3.Query{Key: ccv3.FieldsServicePlanServiceOfferingServiceBroker, Values: []string{"name"}}, - ) - } - - serviceInstance, includedResources, warnings, err := actor.getServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID, query...) - - var ( - serviceOffering resources.ServiceOffering - serviceBroker resources.ServiceBroker - ) - if len(includedResources.ServiceOfferings) != 0 { - serviceOffering = includedResources.ServiceOfferings[0] - } - if len(includedResources.ServiceBrokers) != 0 { - serviceBroker = includedResources.ServiceBrokers[0] - } - - return serviceInstance, serviceOffering, serviceBroker, warnings, err -} - -func (actor Actor) getPlanForInstanceUpdate(planName string, serviceOffering resources.ServiceOffering, serviceBroker resources.ServiceBroker) (string, ccv3.Warnings, error) { - plans, warnings, err := actor.CloudControllerClient.GetServicePlans([]ccv3.Query{ - {Key: ccv3.ServiceOfferingGUIDsFilter, Values: []string{serviceOffering.GUID}}, - {Key: ccv3.NameFilter, Values: []string{planName}}, - }...) - - switch { - case err != nil: - return "", warnings, err - case len(plans) == 0: - return "", warnings, actionerror.ServicePlanNotFoundError{ - PlanName: planName, - OfferingName: serviceOffering.Name, - ServiceBrokerName: serviceBroker.Name, - } - default: - return plans[0].GUID, warnings, nil - } -} - -func (actor Actor) updateManagedServiceInstance(serviceInstance resources.ServiceInstance, newServicePlanGUID string, params UpdateManagedServiceInstanceParams) (ccv3.JobURL, ccv3.Warnings, error) { - if newServicePlanGUID == serviceInstance.ServicePlanGUID { - newServicePlanGUID = "" - } - - update := resources.ServiceInstance{ - ServicePlanGUID: newServicePlanGUID, - Tags: params.Tags, - Parameters: params.Parameters, - } - - if update.ServicePlanGUID == "" && !update.Tags.IsSet && !update.Parameters.IsSet { - return "", nil, actionerror.ServiceInstanceUpdateIsNoop{} - } - - return actor.CloudControllerClient.UpdateServiceInstance(serviceInstance.GUID, update) -} - -func assertServiceInstanceType(requiredType resources.ServiceInstanceType, instance resources.ServiceInstance) error { - if instance.Type != requiredType { - return actionerror.ServiceInstanceTypeError{ - Name: instance.Name, - RequiredType: requiredType, - } - } - - return nil -} - -func handleServiceInstanceErrors(warnings ccv3.Warnings, err error) (Warnings, error) { - switch e := err.(type) { - case nil: - return Warnings(warnings), nil - case ccerror.ServiceInstanceNotFoundError: - return Warnings(warnings), actionerror.ServiceInstanceNotFoundError{Name: e.Name} - default: - return Warnings(warnings), err - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_details.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_details.go deleted file mode 100644 index 80597c0..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_details.go +++ /dev/null @@ -1,300 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/extract" - "code.cloudfoundry.org/cli/util/railway" -) - -const featureFlagServiceInstanceSharing string = "service_instance_sharing" - -type ServiceInstanceBoundAppCount struct { - OrgName string - SpaceName string - BoundAppCount int -} - -type UsageSummaryWithSpaceAndOrg struct { - SpaceName string - OrganizationName string - BoundAppCount int -} - -type SharedStatus struct { - FeatureFlagIsDisabled bool - OfferingDisablesSharing bool - IsSharedToOtherSpaces bool - IsSharedFromOriginalSpace bool - UsageSummary []UsageSummaryWithSpaceAndOrg -} - -type ServiceInstanceParameters map[string]interface{} - -type ServiceInstanceUpgradeState int - -type ServiceInstanceUpgradeStatus struct { - State ServiceInstanceUpgradeState - Description string -} - -const ( - ServiceInstanceUpgradeNotSupported ServiceInstanceUpgradeState = iota - ServiceInstanceUpgradeAvailable - ServiceInstanceUpgradeNotAvailable -) - -type ServiceInstanceDetails struct { - resources.ServiceInstance - SpaceName string - OrganizationName string - ServiceOffering resources.ServiceOffering - ServicePlan resources.ServicePlan - ServiceBrokerName string - SharedStatus SharedStatus - UpgradeStatus ServiceInstanceUpgradeStatus - BoundApps []resources.ServiceCredentialBinding -} - -func (actor Actor) GetServiceInstanceDetails(serviceInstanceName string, spaceGUID string, omitApps bool) (ServiceInstanceDetails, Warnings, error) { - var serviceInstanceDetails ServiceInstanceDetails - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstanceDetails, warnings, err = actor.getServiceInstanceDetails(serviceInstanceName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - serviceInstanceDetails.SharedStatus, warnings, err = actor.getServiceInstanceSharedStatus(serviceInstanceDetails, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - serviceInstanceDetails.UpgradeStatus, warnings, err = actor.getServiceInstanceUpgradeStatus(serviceInstanceDetails) - return - }, - func() (warnings ccv3.Warnings, err error) { - if !omitApps { - serviceInstanceDetails.BoundApps, warnings, err = actor.getServiceInstanceBoundApps(serviceInstanceDetails.GUID) - } - return - }, - ) - if err != nil { - return ServiceInstanceDetails{}, Warnings(warnings), err - } - - return serviceInstanceDetails, Warnings(warnings), nil -} - -func (actor Actor) GetServiceInstanceParameters(serviceInstanceName string, spaceGUID string) (ServiceInstanceParameters, Warnings, error) { - var serviceInstance resources.ServiceInstance - var parameters ServiceInstanceParameters - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - parameters, warnings, err = actor.getServiceInstanceParameters(serviceInstance.GUID) - return - }, - ) - if err != nil { - return ServiceInstanceParameters{}, Warnings(warnings), err - } - - return parameters, Warnings(warnings), nil -} - -func (actor Actor) getServiceInstanceDetails(serviceInstanceName string, spaceGUID string) (ServiceInstanceDetails, ccv3.Warnings, error) { - query := []ccv3.Query{ - { - Key: ccv3.FieldsServicePlan, - Values: []string{"name", "guid"}, - }, - { - Key: ccv3.FieldsServicePlanServiceOffering, - Values: []string{"name", "guid", "description", "tags", "documentation_url"}, - }, - { - Key: ccv3.FieldsServicePlanServiceOfferingServiceBroker, - Values: []string{"name", "guid"}, - }, - { - Key: ccv3.FieldsSpace, - Values: []string{"name", "guid"}, - }, - { - Key: ccv3.FieldsSpaceOrganization, - Values: []string{"name", "guid"}, - }, - } - - serviceInstance, included, warnings, err := actor.CloudControllerClient.GetServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID, query...) - switch err.(type) { - case nil: - case ccerror.ServiceInstanceNotFoundError: - return ServiceInstanceDetails{}, warnings, actionerror.ServiceInstanceNotFoundError{Name: serviceInstanceName} - default: - return ServiceInstanceDetails{}, warnings, err - } - - result := ServiceInstanceDetails{ - ServiceInstance: serviceInstance, - ServicePlan: extractServicePlan(included), - ServiceOffering: extractServiceOffering(included), - ServiceBrokerName: extract.First("Name", included.ServiceBrokers), - SpaceName: extract.First("Name", included.Spaces), - OrganizationName: extract.First("Name", included.Organizations), - } - - return result, warnings, nil -} - -func (actor Actor) getServiceInstanceParameters(serviceInstanceGUID string) (ServiceInstanceParameters, ccv3.Warnings, error) { - params, warnings, err := actor.CloudControllerClient.GetServiceInstanceParameters(serviceInstanceGUID) - - switch err := err.(type) { - case nil: - return ServiceInstanceParameters(params), warnings, nil - case ccerror.ResourceNotFoundError, - ccerror.ServiceInstanceParametersFetchNotSupportedError: - return ServiceInstanceParameters{}, warnings, actionerror.ServiceInstanceParamsFetchingNotSupportedError{} - default: - return ServiceInstanceParameters{}, warnings, err - } -} - -func (actor Actor) getServiceInstanceSharedStatus(serviceInstanceDetails ServiceInstanceDetails, targetedSpace string) (SharedStatus, ccv3.Warnings, error) { - if serviceInstanceDetails.Type != resources.ManagedServiceInstance { - return SharedStatus{}, nil, nil - } - - if targetedSpace != serviceInstanceDetails.SpaceGUID { - return SharedStatus{IsSharedFromOriginalSpace: true}, nil, nil - } - - var ( - featureFlag resources.FeatureFlag - offeringDisablesSharing bool - sharedSpaces []ccv3.SpaceWithOrganization - usageSummaries []resources.ServiceInstanceUsageSummary - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - featureFlag, warnings, err = actor.CloudControllerClient.GetFeatureFlag(featureFlagServiceInstanceSharing) - return - }, - func() (warnings ccv3.Warnings, err error) { - offeringDisablesSharing, warnings, err = actor.getOfferingSharingDetails(serviceInstanceDetails.ServiceOffering.GUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - sharedSpaces, warnings, err = actor.CloudControllerClient.GetServiceInstanceSharedSpaces(serviceInstanceDetails.GUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - if len(sharedSpaces) > 0 { - usageSummaries, warnings, err = actor.CloudControllerClient.GetServiceInstanceUsageSummary(serviceInstanceDetails.GUID) - } - return - }, - ) - if err != nil { - return SharedStatus{}, warnings, err - } - - sharedStatus := SharedStatus{ - IsSharedToOtherSpaces: len(sharedSpaces) > 0, - OfferingDisablesSharing: offeringDisablesSharing, - FeatureFlagIsDisabled: !featureFlag.Enabled, - UsageSummary: buildUsageSummary(sharedSpaces, usageSummaries), - } - - return sharedStatus, warnings, nil -} - -func (actor Actor) getOfferingSharingDetails(serviceOfferingGUID string) (bool, ccv3.Warnings, error) { - serviceOffering, serviceOfferingWarning, err := - actor.CloudControllerClient.GetServiceOfferingByGUID(serviceOfferingGUID) - - switch err := err.(type) { - case nil: - return !serviceOffering.AllowsInstanceSharing, serviceOfferingWarning, nil - case ccerror.ServiceOfferingNotFoundError: - return false, serviceOfferingWarning, nil - default: - return false, serviceOfferingWarning, err - } -} - -func (actor Actor) getServiceInstanceUpgradeStatus(serviceInstanceDetails ServiceInstanceDetails) (ServiceInstanceUpgradeStatus, ccv3.Warnings, error) { - if !serviceInstanceDetails.UpgradeAvailable.Value { - if serviceInstanceDetails.MaintenanceInfoVersion == "" { - return ServiceInstanceUpgradeStatus{State: ServiceInstanceUpgradeNotSupported}, nil, nil - } - return ServiceInstanceUpgradeStatus{State: ServiceInstanceUpgradeNotAvailable}, nil, nil - } - - servicePlan, warnings, err := actor.CloudControllerClient.GetServicePlanByGUID(serviceInstanceDetails.ServicePlanGUID) - switch err.(type) { - case nil: - return ServiceInstanceUpgradeStatus{ - State: ServiceInstanceUpgradeAvailable, - Description: servicePlan.MaintenanceInfoDescription, - }, warnings, nil - case ccerror.ServicePlanNotFound: - return ServiceInstanceUpgradeStatus{ - State: ServiceInstanceUpgradeAvailable, - Description: "No upgrade details where found", - }, warnings, nil - default: - return ServiceInstanceUpgradeStatus{}, warnings, err - } -} - -func (actor Actor) getServiceInstanceBoundApps(serviceInstanceGUID string) ([]resources.ServiceCredentialBinding, ccv3.Warnings, error) { - return actor.CloudControllerClient.GetServiceCredentialBindings( - ccv3.Query{Key: ccv3.Include, Values: []string{"app"}}, - ccv3.Query{Key: ccv3.ServiceInstanceGUIDFilter, Values: []string{serviceInstanceGUID}}, - ccv3.Query{Key: ccv3.TypeFilter, Values: []string{"app"}}, - ) -} - -func extractServicePlan(included ccv3.IncludedResources) resources.ServicePlan { - if len(included.ServicePlans) == 1 { - return included.ServicePlans[0] - } - - return resources.ServicePlan{} -} - -func extractServiceOffering(included ccv3.IncludedResources) resources.ServiceOffering { - if len(included.ServiceOfferings) == 1 { - return included.ServiceOfferings[0] - } - - return resources.ServiceOffering{} -} - -func buildUsageSummary(sharedSpaces []ccv3.SpaceWithOrganization, usageSummaries []resources.ServiceInstanceUsageSummary) []UsageSummaryWithSpaceAndOrg { - var spaceGUIDToNames = make(map[string]ccv3.SpaceWithOrganization) - var sharedSpacesUsage []UsageSummaryWithSpaceAndOrg - - for _, sharedSpace := range sharedSpaces { - spaceGUIDToNames[sharedSpace.SpaceGUID] = sharedSpace - } - for _, usageSummary := range usageSummaries { - summary := UsageSummaryWithSpaceAndOrg{ - SpaceName: spaceGUIDToNames[usageSummary.SpaceGUID].SpaceName, - OrganizationName: spaceGUIDToNames[usageSummary.SpaceGUID].OrganizationName, - BoundAppCount: usageSummary.BoundAppCount, - } - sharedSpacesUsage = append(sharedSpacesUsage, summary) - } - return sharedSpacesUsage -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_list.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_list.go deleted file mode 100644 index d090b6b..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_list.go +++ /dev/null @@ -1,131 +0,0 @@ -package v7action - -import ( - "fmt" - - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" - "code.cloudfoundry.org/cli/util/batcher" - "code.cloudfoundry.org/cli/util/extract" - "code.cloudfoundry.org/cli/util/lookuptable" - "code.cloudfoundry.org/cli/util/railway" -) - -type ServiceInstance struct { - Type resources.ServiceInstanceType - Name string - ServicePlanName string - ServiceOfferingName string - ServiceBrokerName string - BoundApps []string - LastOperation string - UpgradeAvailable types.OptionalBoolean -} - -type planDetails struct { - plan, offering, broker string -} - -func (actor Actor) GetServiceInstancesForSpace(spaceGUID string, omitApps bool) ([]ServiceInstance, Warnings, error) { - var ( - instances []resources.ServiceInstance - bindings []resources.ServiceCredentialBinding - included ccv3.IncludedResources - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - instances, included, warnings, err = actor.CloudControllerClient.GetServiceInstances( - ccv3.Query{Key: ccv3.SpaceGUIDFilter, Values: []string{spaceGUID}}, - ccv3.Query{Key: ccv3.FieldsServicePlan, Values: []string{"guid", "name", "relationships.service_offering"}}, - ccv3.Query{Key: ccv3.FieldsServicePlanServiceOffering, Values: []string{"guid", "name", "relationships.service_broker"}}, - ccv3.Query{Key: ccv3.FieldsServicePlanServiceOfferingServiceBroker, Values: []string{"guid", "name"}}, - ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.NameOrder}}, - ccv3.Query{Key: ccv3.PerPage, Values: []string{ccv3.MaxPerPage}}, - ) - return - }, - func() (warnings ccv3.Warnings, err error) { - if !omitApps { - return batcher.RequestByGUID( - extract.UniqueList("GUID", instances), - func(guids []string) (ccv3.Warnings, error) { - batch, warnings, err := actor.CloudControllerClient.GetServiceCredentialBindings( - ccv3.Query{Key: ccv3.ServiceInstanceGUIDFilter, Values: guids}, - ccv3.Query{Key: ccv3.Include, Values: []string{"app"}}, - ) - bindings = append(bindings, batch...) - return warnings, err - }, - ) - } - return - }, - ) - if err != nil { - return nil, Warnings(warnings), err - } - - planDetailsFromPlanGUIDLookup := buildPlanDetailsLookup(included) - boundAppsNamesFromInstanceGUIDLookup := buildBoundAppsLookup(bindings, spaceGUID) - - result := make([]ServiceInstance, len(instances)) - for i, instance := range instances { - names := planDetailsFromPlanGUIDLookup[instance.ServicePlanGUID] - result[i] = ServiceInstance{ - Name: instance.Name, - Type: instance.Type, - UpgradeAvailable: instance.UpgradeAvailable, - ServicePlanName: names.plan, - ServiceOfferingName: names.offering, - ServiceBrokerName: names.broker, - BoundApps: boundAppsNamesFromInstanceGUIDLookup[instance.GUID], - LastOperation: lastOperation(instance.LastOperation), - } - } - - return result, Warnings(warnings), nil -} - -func lastOperation(lo resources.LastOperation) string { - if lo.Type != "" && lo.State != "" { - return fmt.Sprintf("%s %s", lo.Type, lo.State) - } - return "" -} - -func buildPlanDetailsLookup(included ccv3.IncludedResources) map[string]planDetails { - brokerLookup := lookuptable.NameFromGUID(included.ServiceBrokers) - - type twoNames struct{ broker, offering string } - offeringLookup := make(map[string]twoNames) - for _, o := range included.ServiceOfferings { - brokerName := brokerLookup[o.ServiceBrokerGUID] - offeringLookup[o.GUID] = twoNames{ - broker: brokerName, - offering: o.Name, - } - } - - planLookup := make(map[string]planDetails) - for _, p := range included.ServicePlans { - names := offeringLookup[p.ServiceOfferingGUID] - planLookup[p.GUID] = planDetails{ - broker: names.broker, - offering: names.offering, - plan: p.Name, - } - } - return planLookup -} - -func buildBoundAppsLookup(bindings []resources.ServiceCredentialBinding, spaceGUID string) map[string][]string { - appsBoundLookup := make(map[string][]string) - for _, binding := range bindings { - if binding.Type == resources.AppBinding && binding.AppSpaceGUID == spaceGUID { - appsBoundLookup[binding.ServiceInstanceGUID] = append(appsBoundLookup[binding.ServiceInstanceGUID], binding.AppName) - } - } - return appsBoundLookup -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_sharing.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_sharing.go deleted file mode 100644 index d021185..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_instance_sharing.go +++ /dev/null @@ -1,97 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" - "code.cloudfoundry.org/cli/util/railway" -) - -type ServiceInstanceSharingParams struct { - SpaceName string - OrgName types.OptionalString -} - -func (actor Actor) ShareServiceInstanceToSpaceAndOrg( - serviceInstanceName, targetedSpaceGUID, targetedOrgGUID string, - sharedToDetails ServiceInstanceSharingParams, -) (Warnings, error) { - var serviceInstance resources.ServiceInstance - var shareSpace resources.Space - - return handleServiceInstanceErrors(railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, shareSpace, warnings, err = actor.validateSharingDetails(serviceInstanceName, targetedSpaceGUID, targetedOrgGUID, sharedToDetails) - return - }, - func() (warnings ccv3.Warnings, err error) { - _, warnings, err = actor.CloudControllerClient.ShareServiceInstanceToSpaces(serviceInstance.GUID, []string{shareSpace.GUID}) - return - }, - )) -} - -func (actor Actor) UnshareServiceInstanceFromSpaceAndOrg( - serviceInstanceName, targetedSpaceGUID, targetedOrgGUID string, - sharedToDetails ServiceInstanceSharingParams, -) (Warnings, error) { - var serviceInstance resources.ServiceInstance - var unshareSpace resources.Space - - return handleServiceInstanceErrors(railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, unshareSpace, warnings, err = actor.validateSharingDetails( - serviceInstanceName, - targetedSpaceGUID, - targetedOrgGUID, - sharedToDetails, - ) - return - }, - func() (warnings ccv3.Warnings, err error) { - warnings, err = actor.CloudControllerClient.UnshareServiceInstanceFromSpace(serviceInstance.GUID, unshareSpace.GUID) - return - }, - )) -} - -func (actor Actor) validateSharingDetails( - serviceInstanceName, targetedSpaceGUID, targetedOrgGUID string, - sharedToDetails ServiceInstanceSharingParams, -) (resources.ServiceInstance, resources.Space, ccv3.Warnings, error) { - var serviceInstance resources.ServiceInstance - var shareSpace resources.Space - var shareToOrgGUID = targetedOrgGUID - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.CloudControllerClient.GetServiceInstanceByNameAndSpace(serviceInstanceName, targetedSpaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - if sharedToDetails.OrgName.IsSet { - var ( - orgWarnings Warnings - organization resources.Organization - ) - - organization, orgWarnings, err = actor.GetOrganizationByName(sharedToDetails.OrgName.Value) - warnings = ccv3.Warnings(orgWarnings) - shareToOrgGUID = organization.GUID - } - return - }, - func() (warnings ccv3.Warnings, err error) { - var spaceWarnings Warnings - shareSpace, spaceWarnings, err = actor.GetSpaceByNameAndOrganization(sharedToDetails.SpaceName, shareToOrgGUID) - warnings = ccv3.Warnings(spaceWarnings) - return - }, - ) - - if err != nil { - return resources.ServiceInstance{}, resources.Space{}, warnings, err - } - - return serviceInstance, shareSpace, warnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_key.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_key.go deleted file mode 100644 index 0a31563..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_key.go +++ /dev/null @@ -1,170 +0,0 @@ -package v7action - -import ( - "fmt" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" - "code.cloudfoundry.org/cli/util/railway" -) - -type CreateServiceKeyParams struct { - SpaceGUID string - ServiceInstanceName string - ServiceKeyName string - Parameters types.OptionalObject -} - -func (actor Actor) CreateServiceKey(params CreateServiceKeyParams) (chan PollJobEvent, Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - jobURL ccv3.JobURL - stream chan PollJobEvent - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(params.ServiceInstanceName, params.SpaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.createServiceKey(serviceInstance.GUID, params.ServiceKeyName, params.Parameters) - return - }, - func() (warnings ccv3.Warnings, err error) { - stream = actor.PollJobToEventStream(jobURL) - return - }, - ) - - if err != nil { - return nil, Warnings(warnings), err - } - - return stream, Warnings(warnings), nil -} - -func (actor Actor) GetServiceKeysByServiceInstance(serviceInstanceName, spaceGUID string) ([]resources.ServiceCredentialBinding, Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - keys []resources.ServiceCredentialBinding - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - keys, warnings, err = actor.CloudControllerClient.GetServiceCredentialBindings( - ccv3.Query{Key: ccv3.ServiceInstanceGUIDFilter, Values: []string{serviceInstance.GUID}}, - ccv3.Query{Key: ccv3.TypeFilter, Values: []string{"key"}}, - ) - return - }, - ) - - return keys, Warnings(warnings), err -} - -func (actor Actor) GetServiceKeyByServiceInstanceAndName(serviceInstanceName, serviceKeyName, spaceGUID string) (resources.ServiceCredentialBinding, Warnings, error) { - key, warnings, err := actor.getServiceKeyByServiceInstanceAndName(serviceInstanceName, serviceKeyName, spaceGUID) - return key, Warnings(warnings), err -} - -func (actor Actor) GetServiceKeyDetailsByServiceInstanceAndName(serviceInstanceName, serviceKeyName, spaceGUID string) (resources.ServiceCredentialBindingDetails, Warnings, error) { - var ( - key resources.ServiceCredentialBinding - details resources.ServiceCredentialBindingDetails - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - key, warnings, err = actor.getServiceKeyByServiceInstanceAndName(serviceInstanceName, serviceKeyName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - details, warnings, err = actor.CloudControllerClient.GetServiceCredentialBindingDetails(key.GUID) - return - }, - ) - - return details, Warnings(warnings), err -} - -func (actor Actor) DeleteServiceKeyByServiceInstanceAndName(serviceInstanceName, serviceKeyName, spaceGUID string) (chan PollJobEvent, Warnings, error) { - var ( - key resources.ServiceCredentialBinding - jobURL ccv3.JobURL - stream chan PollJobEvent - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - key, warnings, err = actor.getServiceKeyByServiceInstanceAndName(serviceInstanceName, serviceKeyName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - jobURL, warnings, err = actor.CloudControllerClient.DeleteServiceCredentialBinding(key.GUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - stream = actor.PollJobToEventStream(jobURL) - return - }, - ) - - return stream, Warnings(warnings), err -} - -func (actor Actor) createServiceKey(serviceInstanceGUID, serviceKeyName string, parameters types.OptionalObject) (ccv3.JobURL, ccv3.Warnings, error) { - jobURL, warnings, err := actor.CloudControllerClient.CreateServiceCredentialBinding(resources.ServiceCredentialBinding{ - Type: resources.KeyBinding, - Name: serviceKeyName, - ServiceInstanceGUID: serviceInstanceGUID, - Parameters: parameters, - }) - switch err.(type) { - case nil: - return jobURL, warnings, nil - case ccerror.ServiceKeyTakenError: - return "", warnings, actionerror.ResourceAlreadyExistsError{ - Message: fmt.Sprintf("Service key %s already exists", serviceKeyName), - } - default: - return "", warnings, err - } -} - -func (actor Actor) getServiceKeyByServiceInstanceAndName(serviceInstanceName, serviceKeyName, spaceGUID string) (resources.ServiceCredentialBinding, ccv3.Warnings, error) { - var ( - serviceInstance resources.ServiceInstance - keys []resources.ServiceCredentialBinding - ) - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(serviceInstanceName, spaceGUID) - return - }, - func() (warnings ccv3.Warnings, err error) { - keys, warnings, err = actor.CloudControllerClient.GetServiceCredentialBindings( - ccv3.Query{Key: ccv3.ServiceInstanceGUIDFilter, Values: []string{serviceInstance.GUID}}, - ccv3.Query{Key: ccv3.TypeFilter, Values: []string{"key"}}, - ccv3.Query{Key: ccv3.NameFilter, Values: []string{serviceKeyName}}, - ) - return - }, - ) - switch { - case err != nil: - return resources.ServiceCredentialBinding{}, warnings, err - case len(keys) == 0: - return resources.ServiceCredentialBinding{}, warnings, actionerror.NewServiceKeyNotFoundError(serviceKeyName, serviceInstanceName) - default: - return keys[0], warnings, nil - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_offering.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_offering.go deleted file mode 100644 index 0b61ec4..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_offering.go +++ /dev/null @@ -1,25 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/railway" -) - -func (actor Actor) PurgeServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName string) (Warnings, error) { - var serviceOffering resources.ServiceOffering - - warnings, err := railway.Sequentially( - func() (warnings ccv3.Warnings, err error) { - serviceOffering, warnings, err = actor.CloudControllerClient.GetServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName) - err = actionerror.EnrichAPIErrors(err) - return - }, - func() (ccv3.Warnings, error) { - return actor.CloudControllerClient.PurgeServiceOffering(serviceOffering.GUID) - }, - ) - - return Warnings(warnings), err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_plan.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/service_plan.go deleted file mode 100644 index 0fcd237..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/service_plan.go +++ /dev/null @@ -1,39 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" -) - -func (actor Actor) GetServicePlanByNameOfferingAndBroker(servicePlanName, serviceOfferingName, serviceBrokerName string) (resources.ServicePlan, Warnings, error) { - query := []ccv3.Query{{Key: ccv3.NameFilter, Values: []string{servicePlanName}}} - if serviceBrokerName != "" { - query = append(query, ccv3.Query{Key: ccv3.ServiceBrokerNamesFilter, Values: []string{serviceBrokerName}}) - } - if serviceOfferingName != "" { - query = append(query, ccv3.Query{Key: ccv3.ServiceOfferingNamesFilter, Values: []string{serviceOfferingName}}) - } - - servicePlans, warnings, err := actor.CloudControllerClient.GetServicePlans(query...) - if err != nil { - return resources.ServicePlan{}, Warnings(warnings), err - } - - switch len(servicePlans) { - case 0: - return resources.ServicePlan{}, Warnings(warnings), actionerror.ServicePlanNotFoundError{ - PlanName: servicePlanName, - OfferingName: serviceOfferingName, - ServiceBrokerName: serviceBrokerName, - } - case 1: - return servicePlans[0], Warnings(warnings), nil - default: - return resources.ServicePlan{}, Warnings(warnings), actionerror.DuplicateServicePlanError{ - Name: servicePlanName, - ServiceOfferingName: serviceOfferingName, - ServiceBrokerName: serviceBrokerName, - } - } -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/shared_actor.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/shared_actor.go deleted file mode 100644 index 95dab5a..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/shared_actor.go +++ /dev/null @@ -1,12 +0,0 @@ -package v7action - -import "code.cloudfoundry.org/cli/actor/sharedaction" - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . SharedActor - -type SharedActor interface { - GatherArchiveResources(archivePath string) ([]sharedaction.Resource, error) - GatherDirectoryResources(sourceDir string) ([]sharedaction.Resource, error) - ZipArchiveResources(sourceArchivePath string, filesToInclude []sharedaction.Resource) (string, error) - ZipDirectoryResources(sourceDir string, filesToInclude []sharedaction.Resource) (string, error) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/space.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/space.go deleted file mode 100644 index 449c18d..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/space.go +++ /dev/null @@ -1,283 +0,0 @@ -package v7action - -import ( - "fmt" - "sort" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" -) - -type SpaceSummary struct { - Space resources.Space - Name string - OrgName string - AppNames []string - ServiceInstanceNames []string - IsolationSegmentName string - QuotaName string - RunningSecurityGroups []resources.SecurityGroup - StagingSecurityGroups []resources.SecurityGroup -} - -func (actor Actor) CreateSpace(spaceName, orgGUID string) (resources.Space, Warnings, error) { - allWarnings := Warnings{} - - space, apiWarnings, err := actor.CloudControllerClient.CreateSpace(resources.Space{ - Name: spaceName, - Relationships: resources.Relationships{ - constant.RelationshipTypeOrganization: resources.Relationship{GUID: orgGUID}, - }, - }) - - actorWarnings := Warnings(apiWarnings) - allWarnings = append(allWarnings, actorWarnings...) - - if _, ok := err.(ccerror.NameNotUniqueInOrgError); ok { - return resources.Space{}, allWarnings, actionerror.SpaceAlreadyExistsError{Space: spaceName} - } - return resources.Space{ - GUID: space.GUID, - Name: spaceName, - }, allWarnings, err -} - -// ResetSpaceIsolationSegment disassociates a space from an isolation segment. -// -// If the space's organization has a default isolation segment, return its -// name. Otherwise return the empty string. -func (actor Actor) ResetSpaceIsolationSegment(orgGUID string, spaceGUID string) (string, Warnings, error) { - var allWarnings Warnings - - _, apiWarnings, err := actor.CloudControllerClient.UpdateSpaceIsolationSegmentRelationship(spaceGUID, "") - allWarnings = append(allWarnings, apiWarnings...) - if err != nil { - return "", allWarnings, err - } - - isoSegRelationship, apiWarnings, err := actor.CloudControllerClient.GetOrganizationDefaultIsolationSegment(orgGUID) - allWarnings = append(allWarnings, apiWarnings...) - if err != nil { - return "", allWarnings, err - } - - var isoSegName string - if isoSegRelationship.GUID != "" { - isolationSegment, apiWarnings, err := actor.CloudControllerClient.GetIsolationSegment(isoSegRelationship.GUID) - allWarnings = append(allWarnings, apiWarnings...) - if err != nil { - return "", allWarnings, err - } - isoSegName = isolationSegment.Name - } - - return isoSegName, allWarnings, nil -} - -func (actor Actor) GetSpaceByNameAndOrganization(spaceName string, orgGUID string) (resources.Space, Warnings, error) { - ccv3Spaces, _, warnings, err := actor.CloudControllerClient.GetSpaces( - ccv3.Query{Key: ccv3.NameFilter, Values: []string{spaceName}}, - ccv3.Query{Key: ccv3.OrganizationGUIDFilter, Values: []string{orgGUID}}, - ) - - if err != nil { - return resources.Space{}, Warnings(warnings), err - } - - if len(ccv3Spaces) == 0 { - return resources.Space{}, Warnings(warnings), actionerror.SpaceNotFoundError{Name: spaceName} - } - - return resources.Space(ccv3Spaces[0]), Warnings(warnings), nil -} - -func (actor Actor) GetSpaceSummaryByNameAndOrganization(spaceName string, orgGUID string) (SpaceSummary, Warnings, error) { - var allWarnings Warnings - - org, warnings, err := actor.GetOrganizationByGUID(orgGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return SpaceSummary{}, allWarnings, err - } - - space, warnings, err := actor.GetSpaceByNameAndOrganization(spaceName, org.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return SpaceSummary{}, allWarnings, err - } - - apps, warnings, err := actor.GetApplicationsBySpace(space.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return SpaceSummary{}, allWarnings, err - } - - appNames := make([]string, len(apps)) - for i, app := range apps { - appNames[i] = app.Name - } - sort.Strings(appNames) - - serviceInstances, _, ccv3Warnings, err := actor.CloudControllerClient.GetServiceInstances( - ccv3.Query{ - Key: ccv3.SpaceGUIDFilter, - Values: []string{space.GUID}, - }) - allWarnings = append(allWarnings, Warnings(ccv3Warnings)...) - if err != nil { - return SpaceSummary{}, allWarnings, err - } - - serviceInstanceNames := make([]string, len(serviceInstances)) - for i, instance := range serviceInstances { - serviceInstanceNames[i] = instance.Name - } - sort.Strings(serviceInstanceNames) - - isoSegRelationship, ccv3Warnings, err := actor.CloudControllerClient.GetSpaceIsolationSegment(space.GUID) - allWarnings = append(allWarnings, Warnings(ccv3Warnings)...) - if err != nil { - return SpaceSummary{}, allWarnings, err - } - - isoSegName := "" - isoSegGUID := isoSegRelationship.GUID - isDefaultIsoSeg := false - - if isoSegGUID == "" { - defaultIsoSeg, ccv3Warnings, err := actor.CloudControllerClient.GetOrganizationDefaultIsolationSegment(org.GUID) - allWarnings = append(allWarnings, Warnings(ccv3Warnings)...) - if err != nil { - return SpaceSummary{}, allWarnings, err - } - isoSegGUID = defaultIsoSeg.GUID - if isoSegGUID != "" { - isDefaultIsoSeg = true - } - } - - if isoSegGUID != "" { - isoSeg, ccv3warnings, err := actor.CloudControllerClient.GetIsolationSegment(isoSegGUID) - allWarnings = append(allWarnings, Warnings(ccv3warnings)...) - if err != nil { - return SpaceSummary{}, allWarnings, err - } - if isDefaultIsoSeg { - isoSegName = fmt.Sprintf("%s (org default)", isoSeg.Name) - } else { - isoSegName = isoSeg.Name - } - } - - appliedQuotaRelationshipGUID := space.Relationships[constant.RelationshipTypeQuota].GUID - - var spaceQuota resources.SpaceQuota - if appliedQuotaRelationshipGUID != "" { - spaceQuota, ccv3Warnings, err = actor.CloudControllerClient.GetSpaceQuota(space.Relationships[constant.RelationshipTypeQuota].GUID) - allWarnings = append(allWarnings, Warnings(ccv3Warnings)...) - - if err != nil { - return SpaceSummary{}, allWarnings, err - } - } - - runningSecurityGroups, ccv3Warnings, err := actor.CloudControllerClient.GetRunningSecurityGroups(space.GUID) - allWarnings = append(allWarnings, ccv3Warnings...) - if err != nil { - return SpaceSummary{}, allWarnings, err - } - - stagingSecurityGroups, ccv3Warnings, err := actor.CloudControllerClient.GetStagingSecurityGroups(space.GUID) - allWarnings = append(allWarnings, ccv3Warnings...) - if err != nil { - return SpaceSummary{}, allWarnings, err - } - - spaceSummary := SpaceSummary{ - OrgName: org.Name, - Name: space.Name, - Space: space, - AppNames: appNames, - ServiceInstanceNames: serviceInstanceNames, - IsolationSegmentName: isoSegName, - QuotaName: spaceQuota.Name, - RunningSecurityGroups: runningSecurityGroups, - StagingSecurityGroups: stagingSecurityGroups, - } - - return spaceSummary, allWarnings, nil -} - -// GetOrganizationSpacesWithLabelSelector returns a list of spaces in the specified org -func (actor Actor) GetOrganizationSpacesWithLabelSelector(orgGUID string, labelSelector string) ([]resources.Space, Warnings, error) { - - queries := []ccv3.Query{ - ccv3.Query{Key: ccv3.OrganizationGUIDFilter, Values: []string{orgGUID}}, - ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.NameOrder}}, - } - if len(labelSelector) > 0 { - queries = append(queries, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}}) - } - - ccv3Spaces, _, warnings, err := actor.CloudControllerClient.GetSpaces(queries...) - if err != nil { - return []resources.Space{}, Warnings(warnings), err - } - - spaces := make([]resources.Space, len(ccv3Spaces)) - for i, ccv3Space := range ccv3Spaces { - spaces[i] = resources.Space(ccv3Space) - } - - return spaces, Warnings(warnings), nil -} - -// GetOrganizationSpaces returns a list of spaces in the specified org -func (actor Actor) GetOrganizationSpaces(orgGUID string) ([]resources.Space, Warnings, error) { - return actor.GetOrganizationSpacesWithLabelSelector(orgGUID, "") -} - -func (actor Actor) DeleteSpaceByNameAndOrganizationName(spaceName string, orgName string) (Warnings, error) { - var allWarnings Warnings - - org, actorWarnings, err := actor.GetOrganizationByName(orgName) - allWarnings = append(allWarnings, actorWarnings...) - if err != nil { - return allWarnings, err - } - - space, warnings, err := actor.GetSpaceByNameAndOrganization(spaceName, org.GUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - jobURL, deleteWarnings, err := actor.CloudControllerClient.DeleteSpace(space.GUID) - allWarnings = append(allWarnings, Warnings(deleteWarnings)...) - if err != nil { - return allWarnings, err - } - - ccWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, Warnings(ccWarnings)...) - - return allWarnings, err -} - -func (actor Actor) RenameSpaceByNameAndOrganizationGUID(oldSpaceName, newSpaceName, orgGUID string) (resources.Space, Warnings, error) { - var allWarnings Warnings - - space, getWarnings, err := actor.GetSpaceByNameAndOrganization(oldSpaceName, orgGUID) - allWarnings = append(allWarnings, getWarnings...) - if err != nil { - return resources.Space{}, allWarnings, err - } - - ccSpace, updateWarnings, err := actor.CloudControllerClient.UpdateSpace(resources.Space{GUID: space.GUID, Name: newSpaceName}) - allWarnings = append(allWarnings, Warnings(updateWarnings)...) - - return resources.Space(ccSpace), allWarnings, err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/space_feature.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/space_feature.go deleted file mode 100644 index d60a8d8..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/space_feature.go +++ /dev/null @@ -1,49 +0,0 @@ -package v7action - -import "code.cloudfoundry.org/cli/actor/actionerror" - -func (actor Actor) UpdateSpaceFeature(spaceName string, orgGUID string, enabled bool, feature string) (Warnings, error) { - var allWarnings Warnings - - space, warnings, err := actor.GetSpaceByNameAndOrganization(spaceName, orgGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - previousValue, ccv3Warnings, err := actor.CloudControllerClient.GetSpaceFeature(space.GUID, feature) - - allWarnings = append(allWarnings, ccv3Warnings...) - - if err != nil { - return allWarnings, err - } - - if (previousValue == enabled) && (feature == "ssh") { - if enabled { - return allWarnings, actionerror.SpaceSSHAlreadyEnabledError{Space: space.Name} - } else { - return allWarnings, actionerror.SpaceSSHAlreadyDisabledError{Space: space.Name} - } - } - - ccv3Warnings, err = actor.CloudControllerClient.UpdateSpaceFeature(space.GUID, enabled, feature) - allWarnings = append(allWarnings, Warnings(ccv3Warnings)...) - - return allWarnings, err -} - -func (actor Actor) GetSpaceFeature(spaceName string, orgGUID string, feature string) (bool, Warnings, error) { - var allWarnings Warnings - - space, warnings, err := actor.GetSpaceByNameAndOrganization(spaceName, orgGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return false, allWarnings, err - } - - enabled, ccv3Warnings, err := actor.CloudControllerClient.GetSpaceFeature(space.GUID, feature) - allWarnings = append(allWarnings, Warnings(ccv3Warnings)...) - - return enabled, allWarnings, err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/space_manifest.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/space_manifest.go deleted file mode 100644 index 763ccfc..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/space_manifest.go +++ /dev/null @@ -1,38 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/resources" -) - -func (actor Actor) DiffSpaceManifest(spaceGUID string, rawManifest []byte) (resources.ManifestDiff, Warnings, error) { - diff, warnings, err := actor.CloudControllerClient.GetSpaceManifestDiff( - spaceGUID, - rawManifest, - ) - - return diff, Warnings(warnings), err -} - -func (actor Actor) SetSpaceManifest(spaceGUID string, rawManifest []byte) (Warnings, error) { - var allWarnings Warnings - jobURL, applyManifestWarnings, err := actor.CloudControllerClient.UpdateSpaceApplyManifest( - spaceGUID, - rawManifest, - ) - allWarnings = append(allWarnings, applyManifestWarnings...) - if err != nil { - return allWarnings, err - } - - pollWarnings, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, pollWarnings...) - if err != nil { - if newErr, ok := err.(ccerror.V3JobFailedError); ok { - return allWarnings, actionerror.ApplicationManifestError{Message: newErr.Detail} - } - return allWarnings, err - } - return allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/space_quota.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/space_quota.go deleted file mode 100644 index 78f5acc..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/space_quota.go +++ /dev/null @@ -1,181 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" -) - -func (actor Actor) ApplySpaceQuotaByName(quotaName, spaceGUID, orgGUID string) (Warnings, error) { - var allWarnings Warnings - - spaceQuota, warnings, err := actor.GetSpaceQuotaByName(quotaName, orgGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - _, ccWarnings, err := actor.CloudControllerClient.ApplySpaceQuota(spaceQuota.GUID, spaceGUID) - allWarnings = append(allWarnings, ccWarnings...) - - return allWarnings, err -} - -func (actor Actor) CreateSpaceQuota(spaceQuotaName string, orgGuid string, limits QuotaLimits) (Warnings, error) { - allWarnings := Warnings{} - - spaceQuota := resources.SpaceQuota{ - Quota: resources.Quota{ - Name: spaceQuotaName, - Apps: resources.AppLimit{ - TotalMemory: limits.TotalMemoryInMB, - InstanceMemory: limits.PerProcessMemoryInMB, - TotalAppInstances: limits.TotalInstances, - }, - Services: resources.ServiceLimit{ - TotalServiceInstances: limits.TotalServiceInstances, - PaidServicePlans: limits.PaidServicesAllowed, - }, - Routes: resources.RouteLimit{ - TotalRoutes: limits.TotalRoutes, - TotalReservedPorts: limits.TotalReservedPorts, - }, - }, - OrgGUID: orgGuid, - SpaceGUIDs: nil, - } - - setZeroDefaultsForQuotaCreation(&spaceQuota.Apps, &spaceQuota.Routes, &spaceQuota.Services) - convertUnlimitedToNil(&spaceQuota.Apps, &spaceQuota.Routes, &spaceQuota.Services) - - _, warnings, err := actor.CloudControllerClient.CreateSpaceQuota(spaceQuota) - allWarnings = append(allWarnings, warnings...) - - return allWarnings, err -} - -func (actor Actor) DeleteSpaceQuotaByName(quotaName string, orgGUID string) (Warnings, error) { - var allWarnings Warnings - - quota, warnings, err := actor.GetSpaceQuotaByName(quotaName, orgGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - jobURL, ccv3Warnings, err := actor.CloudControllerClient.DeleteSpaceQuota(quota.GUID) - allWarnings = append(allWarnings, Warnings(ccv3Warnings)...) - if err != nil { - return allWarnings, err - } - - ccv3Warnings, err = actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, Warnings(ccv3Warnings)...) - if err != nil { - return allWarnings, err - } - - return allWarnings, nil -} - -func (actor Actor) GetSpaceQuotaByName(spaceQuotaName string, orgGUID string) (resources.SpaceQuota, Warnings, error) { - ccv3Quotas, warnings, err := actor.CloudControllerClient.GetSpaceQuotas( - ccv3.Query{ - Key: ccv3.OrganizationGUIDFilter, - Values: []string{orgGUID}, - }, - ccv3.Query{ - Key: ccv3.NameFilter, - Values: []string{spaceQuotaName}, - }, - ) - - if err != nil { - return resources.SpaceQuota{}, Warnings(warnings), err - } - - if len(ccv3Quotas) == 0 { - return resources.SpaceQuota{}, Warnings(warnings), actionerror.SpaceQuotaNotFoundForNameError{Name: spaceQuotaName} - } - - return ccv3Quotas[0], Warnings(warnings), nil -} - -func (actor Actor) GetSpaceQuotasByOrgGUID(orgGUID string) ([]resources.SpaceQuota, Warnings, error) { - spaceQuotas, warnings, err := actor.CloudControllerClient.GetSpaceQuotas( - ccv3.Query{ - Key: ccv3.OrganizationGUIDFilter, - Values: []string{orgGUID}, - }, - ) - - if err != nil { - return []resources.SpaceQuota{}, Warnings(warnings), err - } - - return spaceQuotas, Warnings(warnings), nil -} - -func (actor Actor) UpdateSpaceQuota(currentName, orgGUID, newName string, limits QuotaLimits) (Warnings, error) { - var allWarnings Warnings - - oldSpaceQuota, warnings, err := actor.GetSpaceQuotaByName(currentName, orgGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - if newName == "" { - newName = currentName - } - - newSpaceQuota := resources.SpaceQuota{ - Quota: resources.Quota{ - GUID: oldSpaceQuota.GUID, - Name: newName, - Apps: resources.AppLimit{ - TotalMemory: limits.TotalMemoryInMB, - InstanceMemory: limits.PerProcessMemoryInMB, - TotalAppInstances: limits.TotalInstances, - }, - Services: resources.ServiceLimit{ - TotalServiceInstances: limits.TotalServiceInstances, - PaidServicePlans: limits.PaidServicesAllowed, - }, - Routes: resources.RouteLimit{ - TotalRoutes: limits.TotalRoutes, - TotalReservedPorts: limits.TotalReservedPorts, - }, - }, - } - - convertUnlimitedToNil(&newSpaceQuota.Apps, &newSpaceQuota.Routes, &newSpaceQuota.Services) - - _, ccWarnings, err := actor.CloudControllerClient.UpdateSpaceQuota(newSpaceQuota) - allWarnings = append(allWarnings, ccWarnings...) - - return allWarnings, err -} - -func (actor Actor) UnsetSpaceQuota(spaceQuotaName, spaceName, orgGUID string) (Warnings, error) { - var allWarnings Warnings - space, warnings, err := actor.GetSpaceByNameAndOrganization(spaceName, orgGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - spaceQuota, warnings, err := actor.GetSpaceQuotaByName(spaceQuotaName, orgGUID) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - ccWarnings, err := actor.CloudControllerClient.UnsetSpaceQuota(spaceQuota.GUID, space.GUID) - allWarnings = append(allWarnings, ccWarnings...) - if err != nil { - return allWarnings, err - } - - return allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/ssh.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/ssh.go deleted file mode 100644 index 30fcc6f..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/ssh.go +++ /dev/null @@ -1,108 +0,0 @@ -package v7action - -import ( - "fmt" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/resources" -) - -type SSHAuthentication struct { - Endpoint string - HostKeyFingerprint string - Passcode string - Username string -} - -func (actor Actor) GetSSHPasscode() (string, error) { - return actor.UAAClient.GetSSHPasscode(actor.Config.AccessToken(), actor.Config.SSHOAuthClient()) -} - -// GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndex returns -// back the SSH authentication information for the SSH session. -func (actor Actor) GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndex( - appName string, spaceGUID string, processType string, processIndex uint, -) (SSHAuthentication, Warnings, error) { - var allWarnings Warnings - - rootInfo, warnings, err := actor.CloudControllerClient.GetInfo() - allWarnings = append(allWarnings, warnings...) - if err != nil { - return SSHAuthentication{}, allWarnings, err - } - - endpoint := rootInfo.AppSSHEndpoint() - if endpoint == "" { - return SSHAuthentication{}, nil, actionerror.SSHEndpointNotSetError{} - } - - fingerprint := rootInfo.AppSSHHostKeyFingerprint() - if fingerprint == "" { - return SSHAuthentication{}, nil, actionerror.SSHHostKeyFingerprintNotSetError{} - } - - passcode, err := actor.UAAClient.GetSSHPasscode(actor.Config.AccessToken(), actor.Config.SSHOAuthClient()) - if err != nil { - return SSHAuthentication{}, Warnings{}, err - } - - application, appWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID) - allWarnings = append(allWarnings, appWarnings...) - if err != nil { - return SSHAuthentication{}, allWarnings, err - } - - if !application.Started() { - return SSHAuthentication{}, allWarnings, actionerror.ApplicationNotStartedError{Name: appName} - } - - username, processWarnings, err := actor.getUsername(application, processType, processIndex) - allWarnings = append(allWarnings, processWarnings...) - if err != nil { - return SSHAuthentication{}, allWarnings, err - } - - return SSHAuthentication{ - Endpoint: endpoint, - HostKeyFingerprint: fingerprint, - Passcode: passcode, - Username: username, - }, allWarnings, err -} - -func (actor Actor) getUsername(application resources.Application, processType string, processIndex uint) (string, Warnings, error) { - processSummaries, processWarnings, err := actor.getProcessSummariesForApp(application.GUID, false) - if err != nil { - return "", processWarnings, err - } - - var processSummary ProcessSummary - for _, appProcessSummary := range processSummaries { - if appProcessSummary.Type == processType { - processSummary = appProcessSummary - break - } - } - - if processSummary.GUID == "" { - return "", processWarnings, actionerror.ProcessNotFoundError{ProcessType: processType} - } - - var processInstance ProcessInstance - for _, instance := range processSummary.InstanceDetails { - if uint(instance.Index) == processIndex { - processInstance = instance - break - } - } - - if processInstance == (ProcessInstance{}) { - return "", processWarnings, actionerror.ProcessInstanceNotFoundError{ProcessType: processType, InstanceIndex: processIndex} - } - - if !processInstance.Running() { - return "", processWarnings, actionerror.ProcessInstanceNotRunningError{ProcessType: processType, InstanceIndex: processIndex} - } - - return fmt.Sprintf("cf:%s/%d", processSummary.GUID, processIndex), processWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/ssh_actor.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/ssh_actor.go deleted file mode 100644 index 84fd260..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/ssh_actor.go +++ /dev/null @@ -1,9 +0,0 @@ -package v7action - -import "code.cloudfoundry.org/cli/actor/sharedaction" - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . SSHActor - -type SSHActor interface { - ExecuteSecureShell(sshOptions sharedaction.SSHOptions) error -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/stack.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/stack.go deleted file mode 100644 index 29ed497..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/stack.go +++ /dev/null @@ -1,46 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" -) - -func (actor *Actor) GetStackByName(stackName string) (resources.Stack, Warnings, error) { - stacks, warnings, err := actor.CloudControllerClient.GetStacks( - ccv3.Query{Key: ccv3.NameFilter, Values: []string{stackName}}, - ) - - if err != nil { - return resources.Stack{}, Warnings(warnings), err - } - - if len(stacks) == 0 { - return resources.Stack{}, Warnings(warnings), actionerror.StackNotFoundError{Name: stackName} - } - - return resources.Stack(stacks[0]), Warnings(warnings), nil -} - -func (actor Actor) GetStacks(labelSelector string) ([]resources.Stack, Warnings, error) { - var ( - stacks []resources.Stack - warnings ccv3.Warnings - err error - ) - if len(labelSelector) > 0 { - queries := []ccv3.Query{ - ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}}, - } - - stacks, warnings, err = actor.CloudControllerClient.GetStacks(queries...) - } else { - stacks, warnings, err = actor.CloudControllerClient.GetStacks() - } - - if err != nil { - return nil, Warnings(warnings), err - } - - return stacks, Warnings(warnings), nil -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/target.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/target.go deleted file mode 100644 index a63a027..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/target.go +++ /dev/null @@ -1,48 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/util/configv3" -) - -type TargetSettings ccv3.TargetSettings - -// SetTarget targets the Cloud Controller using the client and sets target -// information in the config based on the response. -func (actor Actor) SetTarget(settings TargetSettings) (Warnings, error) { - var allWarnings Warnings - - actor.CloudControllerClient.TargetCF(ccv3.TargetSettings(settings)) - - rootInfo, warnings, err := actor.CloudControllerClient.GetInfo() - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - - actor.Config.SetTargetInformation(configv3.TargetInformationArgs{ - Api: settings.URL, - ApiVersion: rootInfo.CloudControllerAPIVersion(), - Auth: rootInfo.Login(), - MinCLIVersion: "", // Oldest supported V3 version should be OK - Doppler: rootInfo.Logging(), - LogCache: rootInfo.LogCache(), - NetworkPolicyV1: rootInfo.NetworkPolicyV1(), - Routing: rootInfo.Routing(), - SkipSSLValidation: settings.SkipSSLValidation, - UAA: rootInfo.UAA(), - CFOnK8s: rootInfo.CFOnK8s, - }) - - actor.Config.SetTokenInformation("", "", "") - actor.Config.SetKubernetesAuthInfo("") - - return allWarnings, nil -} - -// ClearTarget clears target information from the config. -func (actor Actor) ClearTarget() { - actor.Config.SetTargetInformation(configv3.TargetInformationArgs{}) - actor.Config.SetTokenInformation("", "", "") - actor.Config.SetKubernetesAuthInfo("") -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/task.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/task.go deleted file mode 100644 index fd255bf..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/task.go +++ /dev/null @@ -1,69 +0,0 @@ -package v7action - -import ( - "strconv" - - "sort" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - "code.cloudfoundry.org/cli/resources" -) - -// Run resources.Task runs the provided command in the application environment associated -// with the provided application GUID. -func (actor Actor) RunTask(appGUID string, task resources.Task) (resources.Task, Warnings, error) { - createdTask, warnings, err := actor.CloudControllerClient.CreateApplicationTask(appGUID, resources.Task(task)) - if err != nil { - if e, ok := err.(ccerror.TaskWorkersUnavailableError); ok { - return resources.Task{}, Warnings(warnings), actionerror.TaskWorkersUnavailableError{Message: e.Error()} - } - } - - return resources.Task(createdTask), Warnings(warnings), err -} - -// GetApplicationTasks returns a list of tasks associated with the provided -// appplication GUID. -func (actor Actor) GetApplicationTasks(appGUID string, sortOrder SortOrder) ([]resources.Task, Warnings, error) { - tasks, warnings, err := actor.CloudControllerClient.GetApplicationTasks(appGUID) - actorWarnings := Warnings(warnings) - if err != nil { - return nil, actorWarnings, err - } - - allTasks := []resources.Task{} - for _, task := range tasks { - allTasks = append(allTasks, resources.Task(task)) - } - - if sortOrder == Descending { - sort.Slice(allTasks, func(i int, j int) bool { return allTasks[i].SequenceID > allTasks[j].SequenceID }) - } else { - sort.Slice(allTasks, func(i int, j int) bool { return allTasks[i].SequenceID < allTasks[j].SequenceID }) - } - - return allTasks, actorWarnings, nil -} - -func (actor Actor) GetTaskBySequenceIDAndApplication(sequenceID int, appGUID string) (resources.Task, Warnings, error) { - tasks, warnings, err := actor.CloudControllerClient.GetApplicationTasks( - appGUID, - ccv3.Query{Key: ccv3.SequenceIDFilter, Values: []string{strconv.Itoa(sequenceID)}}, - ) - if err != nil { - return resources.Task{}, Warnings(warnings), err - } - - if len(tasks) == 0 { - return resources.Task{}, Warnings(warnings), actionerror.TaskNotFoundError{SequenceID: sequenceID} - } - - return resources.Task(tasks[0]), Warnings(warnings), nil -} - -func (actor Actor) TerminateTask(taskGUID string) (resources.Task, Warnings, error) { - task, warnings, err := actor.CloudControllerClient.UpdateTaskCancel(taskGUID) - return resources.Task(task), Warnings(warnings), err -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/token.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/token.go deleted file mode 100644 index 158ea98..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/token.go +++ /dev/null @@ -1,43 +0,0 @@ -package v7action - -import ( - "strings" - "time" - - "github.com/SermoDigital/jose/jws" - "github.com/SermoDigital/jose/jwt" -) - -func (actor Actor) RefreshAccessToken() (string, error) { - var expiresIn time.Duration - - refreshToken := actor.Config.RefreshToken() - - accessTokenString := strings.TrimPrefix(actor.Config.AccessToken(), "bearer ") - token, err := jws.ParseJWT([]byte(accessTokenString)) - - if err == nil { - expiration, ok := token.Claims().Expiration() - if ok { - expiresIn = time.Until(expiration) - } - } - - if err != nil || expiresIn < time.Minute { - tokens, err := actor.UAAClient.RefreshAccessToken(refreshToken) - if err != nil { - return "", err - } - - actor.Config.SetAccessToken(tokens.AuthorizationToken()) - actor.Config.SetRefreshToken(tokens.RefreshToken) - - return tokens.AuthorizationToken(), nil - } - return actor.Config.AccessToken(), nil -} - -func (actor Actor) ParseAccessToken(accessToken string) (jwt.JWT, error) { - tokenStr := strings.TrimPrefix(accessToken, "bearer ") - return jws.ParseJWT([]byte(tokenStr)) -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/uaa_client.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/uaa_client.go deleted file mode 100644 index e11903e..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/uaa_client.go +++ /dev/null @@ -1,22 +0,0 @@ -package v7action - -import ( - "code.cloudfoundry.org/cli/api/uaa" - "code.cloudfoundry.org/cli/api/uaa/constant" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . UAAClient - -type UAAClient interface { - Authenticate(credentials map[string]string, origin string, grantType constant.GrantType) (string, string, error) - CreateUser(username string, password string, origin string) (uaa.User, error) - DeleteUser(userGuid string) (uaa.User, error) - GetAPIVersion() (string, error) - GetLoginPrompts() (map[string][]string, error) - GetSSHPasscode(accessToken string, sshOAuthClient string) (string, error) - ListUsers(userName, origin string) ([]uaa.User, error) - RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error) - UpdatePassword(userGUID string, oldPassword string, newPassword string) error - ValidateClientUser(clientID string) error - Revoke(token string) error -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/user.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/user.go deleted file mode 100644 index ceee43a..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/user.go +++ /dev/null @@ -1,106 +0,0 @@ -package v7action - -import ( - "sort" - - "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/resources" -) - -// CreateUser creates a new user in UAA and registers it with cloud controller. -func (actor Actor) CreateUser(username string, password string, origin string) (resources.User, Warnings, error) { - uaaUser, err := actor.UAAClient.CreateUser(username, password, origin) - if err != nil { - return resources.User{}, nil, err - } - - ccUser, ccWarnings, err := actor.CloudControllerClient.CreateUser(uaaUser.ID) - - return resources.User(ccUser), Warnings(ccWarnings), err -} - -// GetUser gets a user in UAA with the given username and (if provided) origin. -// It returns an error if no matching user is found. -// It returns an error if multiple matching users are found. -// NOTE: The UAA /Users endpoint used here requires admin scopes. -func (actor Actor) GetUser(username, origin string) (resources.User, error) { - uaaUsers, err := actor.UAAClient.ListUsers(username, origin) - if err != nil { - return resources.User{}, err - } - - if len(uaaUsers) == 0 { - return resources.User{}, actionerror.UserNotFoundError{Username: username, Origin: origin} - } - - if len(uaaUsers) > 1 { - var origins []string - for _, user := range uaaUsers { - origins = append(origins, user.Origin) - } - return resources.User{}, actionerror.MultipleUAAUsersFoundError{Username: username, Origins: origins} - } - - uaaUser := uaaUsers[0] - - v7actionUser := resources.User{ - GUID: uaaUser.ID, - Origin: uaaUser.Origin, - } - return v7actionUser, nil -} - -// DeleteUser -func (actor Actor) DeleteUser(userGuid string) (Warnings, error) { - var allWarnings Warnings - jobURL, ccWarningsDelete, err := actor.CloudControllerClient.DeleteUser(userGuid) - allWarnings = Warnings(ccWarningsDelete) - - // If there is an error that is not a ResourceNotFoundError - if _, ok := err.(ccerror.ResourceNotFoundError); !ok && err != nil { - return allWarnings, err - } - - ccWarningsPoll, err := actor.CloudControllerClient.PollJob(jobURL) - allWarnings = append(allWarnings, Warnings(ccWarningsPoll)...) - if err != nil { - return allWarnings, err - } - - _, err = actor.UAAClient.DeleteUser(userGuid) - - return allWarnings, err -} - -func (actor Actor) UpdateUserPassword(userGUID string, oldPassword string, newPassword string) error { - return actor.UAAClient.UpdatePassword(userGUID, oldPassword, newPassword) -} - -func SortUsers(users []resources.User) { - sort.Slice(users, func(i, j int) bool { - if users[i].PresentationName == users[j].PresentationName { - - if users[i].Origin == constant.DefaultOriginUaa || users[j].Origin == "" { - return true - } - - if users[j].Origin == constant.DefaultOriginUaa || users[i].Origin == "" { - return false - } - - return users[i].Origin < users[j].Origin - } - - return users[i].PresentationName < users[j].PresentationName - }) -} - -func GetHumanReadableOrigin(user resources.User) string { - if user.Origin == "" { - return "client" - } - - return user.Origin -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/v7action/version.go b/vendor/code.cloudfoundry.org/cli/actor/v7action/version.go deleted file mode 100644 index 59ff1e2..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/v7action/version.go +++ /dev/null @@ -1,11 +0,0 @@ -package v7action - -// GetUAAAPIVersion returns the UAA API version. -func (actor Actor) GetUAAAPIVersion() (string, error) { - // NOTE: We are making a request here because this method is currently only - // used in one branch of one command. However, we could probably do a refactor - // to store the UAA version in the config file upon login, like we do with the - // UAA URL, so we could just read from there instead of making a request here. - - return actor.UAAClient.GetAPIVersion() -} diff --git a/vendor/code.cloudfoundry.org/cli/actor/versioncheck/minimum_version_check.go b/vendor/code.cloudfoundry.org/cli/actor/versioncheck/minimum_version_check.go deleted file mode 100644 index 2d9e3eb..0000000 --- a/vendor/code.cloudfoundry.org/cli/actor/versioncheck/minimum_version_check.go +++ /dev/null @@ -1,27 +0,0 @@ -package versioncheck - -import ( - "github.com/blang/semver" -) - -func IsMinimumAPIVersionMet(current string, minimum string) (bool, error) { - if minimum == "" { - return true, nil - } - - currentSemver, err := semver.Make(current) - if err != nil { - return false, err - } - - minimumSemver, err := semver.Make(minimum) - if err != nil { - return false, err - } - - if currentSemver.GTE(minimumSemver) { - return true, nil - } - - return false, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/job_failed_no_error.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/job_failed_no_error.go deleted file mode 100644 index 65e3a8e..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/job_failed_no_error.go +++ /dev/null @@ -1,15 +0,0 @@ -package ccerror - -import ( - "fmt" -) - -// V3JobFailedError represents a failed Cloud Controller Job. It wraps the error -// returned back from the Cloud Controller. -type JobFailedNoErrorError struct { - JobGUID string -} - -func (e JobFailedNoErrorError) Error() string { - return fmt.Sprintf("Job (%s) failed with no error. This is unexpected, contact your operator for details.", e.JobGUID) -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/resource_alredy_exists_error.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/resource_alredy_exists_error.go deleted file mode 100644 index 9969d16..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/resource_alredy_exists_error.go +++ /dev/null @@ -1,11 +0,0 @@ -package ccerror - -// ResourceAlreadyExistsError is returned when a resource cannot be created -// because an identical resource already exists in the Cloud Controller. -type ResourceAlreadyExistsError struct { - Message string -} - -func (e ResourceAlreadyExistsError) Error() string { - return e.Message -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_not_found_error.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_not_found_error.go deleted file mode 100644 index c2fb76b..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_not_found_error.go +++ /dev/null @@ -1,13 +0,0 @@ -package ccerror - -import "fmt" - -// ServiceInstanceNotFoundError is returned when an endpoint cannot find the -// specified service instance -type ServiceInstanceNotFoundError struct { - Name, SpaceGUID string -} - -func (e ServiceInstanceNotFoundError) Error() string { - return fmt.Sprintf("Service instance '%s' not found in space '%s'.", e.Name, e.SpaceGUID) -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_operation_in_progress_error.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_operation_in_progress_error.go deleted file mode 100644 index 3f2373f..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_operation_in_progress_error.go +++ /dev/null @@ -1,11 +0,0 @@ -package ccerror - -// ServiceInstanceOperationInProgressError is returned when an operation -// cannot proceed because an operation is already in progress -type ServiceInstanceOperationInProgressError struct { - Message string -} - -func (e ServiceInstanceOperationInProgressError) Error() string { - return e.Message -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_parameters_fetch_not_supported_error.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_parameters_fetch_not_supported_error.go deleted file mode 100644 index 51ed9f5..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_instance_parameters_fetch_not_supported_error.go +++ /dev/null @@ -1,12 +0,0 @@ -package ccerror - -// ServiceInstanceParametersFetchNotSupportedError is returned when -// the service instance is user-provided or -// service instance fetching is not supported for managed instances -type ServiceInstanceParametersFetchNotSupportedError struct { - Message string -} - -func (e ServiceInstanceParametersFetchNotSupportedError) Error() string { - return e.Message -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_plan_not_found_error.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_plan_not_found_error.go deleted file mode 100644 index 87c4859..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccerror/service_plan_not_found_error.go +++ /dev/null @@ -1,7 +0,0 @@ -package ccerror - -type ServicePlanNotFound struct{} - -func (ServicePlanNotFound) Error() string { - return "The service plan was not found" -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/application.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/application.go new file mode 100644 index 0000000..9dc51f6 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/application.go @@ -0,0 +1,28 @@ +package constant + +// ApplicationHealthCheckType is the method to reach the applications health check +type ApplicationHealthCheckType string + +const ( + ApplicationHealthCheckHTTP ApplicationHealthCheckType = "http" + ApplicationHealthCheckPort ApplicationHealthCheckType = "port" + ApplicationHealthCheckProcess ApplicationHealthCheckType = "process" +) + +// ApplicationPackageState is the staging state of application bits. +type ApplicationPackageState string + +const ( + ApplicationPackageFailed ApplicationPackageState = "FAILED" + ApplicationPackagePending ApplicationPackageState = "PENDING" + ApplicationPackageStaged ApplicationPackageState = "STAGED" + ApplicationPackageUnknown ApplicationPackageState = "UNKNOWN" +) + +// ApplicationState is the running state of an application. +type ApplicationState string + +const ( + ApplicationStarted ApplicationState = "STARTED" + ApplicationStopped ApplicationState = "STOPPED" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/application_instance.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/application_instance.go new file mode 100644 index 0000000..5d1cbc1 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/application_instance.go @@ -0,0 +1,25 @@ +package constant + +// ApplicationInstanceState reflects the state of the individual app +// instance. +type ApplicationInstanceState string + +const ( + // ApplicationInstanceCrashed represents an application instance in the + // crashed state. + ApplicationInstanceCrashed ApplicationInstanceState = "CRASHED" + // ApplicationInstanceDown represents an application instance in the down + // state. + ApplicationInstanceDown ApplicationInstanceState = "DOWN" + // ApplicationInstanceFlapping represents an application instance that keeps + // failing after it starts. + ApplicationInstanceFlapping ApplicationInstanceState = "FLAPPING" + // ApplicationInstanceRunning represents an application instance that is + // currently running. + ApplicationInstanceRunning ApplicationInstanceState = "RUNNING" + // ApplicationInstanceStarting represents an application that is the process + // of starting. + ApplicationInstanceStarting ApplicationInstanceState = "STARTING" + // ApplicationInstanceUnknown represents a state that cannot be determined. + ApplicationInstanceUnknown ApplicationInstanceState = "UNKNOWN" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/domain.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/domain.go new file mode 100644 index 0000000..c329d2a --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/domain.go @@ -0,0 +1,8 @@ +package constant + +type DomainType string + +const ( + PrivateDomain DomainType = "owned" + SharedDomain DomainType = "shared" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/event.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/event.go new file mode 100644 index 0000000..098adce --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/event.go @@ -0,0 +1,298 @@ +package constant + +// EventType is the type of event that occurred in cloud foundry. +type EventType string + +const ( + // EventTypeApplicationCrash denotes an event where an application crashed. + EventTypeApplicationCrash EventType = "app.crash" + + // EventTypeAuditApplicationCopyBits denotes an event where the CC copies bits + // from one application to another + EventTypeAuditApplicationCopyBits EventType = "audit.app.copy-bits" + + // EventTypeAuditApplicationCreate denotes an event where the CC creates an + // applicaion. + EventTypeAuditApplicationCreate EventType = "audit.app.create" + + // EventTypeAuditApplicationDeleteRequest denotes an event where the CC + // receives a request to delete an application. + EventTypeAuditApplicationDeleteRequest EventType = "audit.app.delete-request" + + EventTypeAuditApplicationDropletMapped EventType = "audit.app.droplet.mapped" + + // EventTypeAuditApplicationMapRoute denotes an event where the CC maps an + // application to a route. + EventTypeAuditApplicationMapRoute EventType = "audit.app.map-route" + + // EventTypeAuditApplicationPackageCreate denotes an event where the CC creates an + // application package. + EventTypeAuditApplicationPackageCreate EventType = "audit.app.package.create" + + // EventTypeAuditApplicationPackageDelete denotes an event where the CC deletes an + // application package. + EventTypeAuditApplicationPackageDelete EventType = "audit.app.package.delete" + + // EventTypeAuditApplicationPackageDownload denotes an event where an application + // package is downloaded. + EventTypeAuditApplicationPackageDownload EventType = "audit.app.package.download" + + // EventTypeAuditApplicationPackageUpload denotes an event where an application + // package is uploaded. + EventTypeAuditApplicationPackageUpload EventType = "audit.app.package.upload" + + // EventTypeAuditApplicationRestage denotes an event where the CC restages an + // application. + EventTypeAuditApplicationRestage EventType = "audit.app.restage" + + EventTypeAuditApplicationSSHAuthorized EventType = "audit.app.ssh-authorized" + + EventTypeAuditApplicationSSHUnauthorized EventType = "audit.app.ssh-unauthorized" + + // EventTypeAuditApplicationStart denotes an event where the CC starts an + // application. + EventTypeAuditApplicationStart EventType = "audit.app.start" + + // EventTypeAuditApplicationStop denotes an event where the CC stops an + // application. + EventTypeAuditApplicationStop EventType = "audit.app.stop" + + // EventTypeAuditApplicationUnmapRoute denotes an event where the CC unmaps + // an application from a route. + EventTypeAuditApplicationUnmapRoute EventType = "audit.app.unmap-route" + + // EventTypeAuditApplicationUpdate denotes an event where the CC updates an + // application. + EventTypeAuditApplicationUpdate EventType = "audit.app.update" + + // EventTypeAuditApplicationUploadBits denotes an event where application + // bits are uploaded to the CC. + EventTypeAuditApplicationUploadBits EventType = "audit.app.upload-bits" + + // EventTypeOrganizationCreate denotes an event where the CC creates an + // organization. + EventTypeOrganizationCreate EventType = "audit.organization.create" + + // EventTypeOrganizationDeleteRequest denotes an event where the CC receives + // request to delete an organization. + EventTypeOrganizationDeleteRequest EventType = "audit.organization.delete-request" + + // EventTypeOrganizationUpdate denotes an event where the CC updates an + // organization. + EventTypeOrganizationUpdate EventType = "audit.organization.update" + + // EventTypeAuditRouteCreate denotes an event where the CC creates a route. + EventTypeAuditRouteCreate EventType = "audit.route.create" + + // EventTypeAuditRouteDeleteRequest denotes an event where the CC receives a + // request to delete a route. + EventTypeAuditRouteDeleteRequest EventType = "audit.route.delete-request" + + // EventTypeAuditRouteUpdate denotes an event where the CC updates a route. + EventTypeAuditRouteUpdate EventType = "audit.route.update" + + // EventTypeAuditServiceCreate denotes an event where the CC creates a service. + EventTypeAuditServiceCreate EventType = "audit.service.create" + + // EventTypeAuditServiceDelete denotes an event where the CC deletes a service. + EventTypeAuditServiceDelete EventType = "audit.service.delete" + + // EventTypeAuditServiceUpdate denotes an event where the CC updates a service. + EventTypeAuditServiceUpdate EventType = "audit.service.update" + + // EventTypeAuditServiceBindingCreate denotes an event where the CC creates + // a service binding. + EventTypeAuditServiceBindingCreate EventType = "audit.service_binding.create" + + // EventTypeAuditServiceBindingDelete denotes an event where the CC deletes + // a service binding. + EventTypeAuditServiceBindingDelete EventType = "audit.service_binding.delete" + + // EventTypeAuditServiceBrokerCreate denotes an event where the CC creates + // a service broker. + EventTypeAuditServiceBrokerCreate EventType = "audit.service_broker.create" + + // EventTypeAuditServiceBrokerDelete denotes an event where the CC deletes + // a service broker. + EventTypeAuditServiceBrokerDelete EventType = "audit.service_broker.delete" + + // EventTypeAuditServiceBrokerUpdate denotes an event where the CC updates + // a service broker. + EventTypeAuditServiceBrokerUpdate EventType = "audit.service_broker.update" + + EventTypeAuditServiceDashboardClientCreate EventType = "audit.service_dashboard_client.create" + + EventTypeAuditServiceDashboardClientDelete EventType = "audit.service_dashboard_client.delete" + + EventTypeServiceInstanceBindRoute EventType = "audit.service_instance.bind_route" + + // EventTypeAuditServiceInstanceCreate denotes an event where the CC creates + // a service instance. + EventTypeAuditServiceInstanceCreate EventType = "audit.service_instance.create" + + // EventTypeAuditServiceInstanceDelete denotes an event where the CC deletes + // a service instance. + EventTypeAuditServiceInstanceDelete EventType = "audit.service_instance.delete" + + EventTypeServiceInstanceUnbindRoute EventType = "audit.service_instance.unbind_route" + + // EventTypeAuditServiceInstanceUpdate denotes an event where the CC updates + // a service instance. + EventTypeAuditServiceInstanceUpdate EventType = "audit.service_instance.update" + + EventTypeAuditServiceKeyCreate EventType = "audit.service_key.create" + + EventTypeAuditServiceKeyDelete EventType = "audit.service_key.delete" + + // EventTypeAuditServicePlanCreate denotes an event where the CC creates + // a service plan. + EventTypeAuditServicePlanCreate EventType = "audit.service_plan.create" + + // EventTypeAuditServicePlanDelete denotes an event where the CC deletes + // a service plan. + EventTypeAuditServicePlanDelete EventType = "audit.service_plan.delete" + + // EventTypeAuditServicePlanUpdate denotes an event where the CC updates + // a service plan. + EventTypeAuditServicePlanUpdate EventType = "audit.service_plan.update" + + EventTypeAuditServicePlanVisibilityCreate EventType = "audit.service_plan_visibility.create" + + EventTypeAuditServicePlanVisibilityDelete EventType = "audit.service_plan_visibility.delete" + + EventTypeAuditServicePlanVisibilityUpdate EventType = "audit.service_plan_visibility.update" + + // EventTypeAuditSpaceCreate denotes an event where the CC creates a space. + EventTypeAuditSpaceCreate EventType = "audit.space.create" + + // EventTypeAuditSpaceDeleteRequest denotes an event where the CC receives a + // request to delete a space. + EventTypeAuditSpaceDeleteRequest EventType = "audit.space.delete-request" + + // EventTypeAuditSpaceUpdate denotes an event where the CC updates a space. + EventTypeAuditSpaceUpdate EventType = "audit.space.update" + + // EventTypeAuditUserProvidedServiceInstanceCreate denotes an event where the + // CC creates a user provided service instance. + EventTypeAuditUserProvidedServiceInstanceCreate EventType = "audit.user_provided_service_instance.create" + + // EventTypeAuditUserProvidedServiceInstanceDelete denotes an event where the + // CC deletes a user provided service instance. + EventTypeAuditUserProvidedServiceInstanceDelete EventType = "audit.user_provided_service_instance.delete" + + // EventTypeAuditUserProvidedServiceInstanceUpdate denotes an event where the + // CC updates a user provided service instance. + EventTypeAuditUserProvidedServiceInstanceUpdate EventType = "audit.user_provided_service_instance.update" + + // EventTypeAuditUserSpaceAuditorAdd denotes an event where the CC associates + // an auditor with a space. + EventTypeAuditUserSpaceAuditorAdd EventType = "audit.user.space_auditor_add" + + // EventTypeAuditUserSpaceAuditorRemove denotes an event where the CC removes + // an auditor from a space. + EventTypeAuditUserSpaceAuditorRemove EventType = "audit.user.space_auditor_remove" + + // EventTypeAuditUserSpaceManagerAdd denotes an event where the CC associates + // a manager with a space. + EventTypeAuditUserSpaceManagerAdd EventType = "audit.user.space_manager_add" + + // EventTypeAuditUserSpaceManagerRemove denotes an event where the CC removes + // a manager from a space. + EventTypeAuditUserSpaceManagerRemove EventType = "audit.user.space_manager_remove" + + // EventTypeAuditUserSpaceDeveloperAdd denotes an event where the CC + // associates a developer with a space. + EventTypeAuditUserSpaceDeveloperAdd EventType = "audit.user.space_developer_add" + + // EventTypeAuditUserSpaceDeveloperRemove denotes an event where the CC removes + // a developer from a space. + EventTypeAuditUserSpaceDeveloperRemove EventType = "audit.user.space_developer_remove" + + // EventTypeAuditUserOrganizationAuditorAdd denotes an event where the CC + // associates an auditor with an organization. + EventTypeAuditUserOrganizationAuditorAdd EventType = "audit.user.organization_auditor_add" + + // EventTypeAuditUserOrganizationAuditorRemove denotes an event where the CC + // removes an auditor from an organization. + EventTypeAuditUserOrganizationAuditorRemove EventType = "audit.user.organization_auditor_remove" + + // EventTypeAuditUserOrganizationBillingManagerAdd denotes an event where the CC + // associates a billing manager with an organization. + EventTypeAuditUserOrganizationBillingManagerAdd EventType = "audit.user.organization_billing_manager_add" + + // EventTypeAuditUserOrganizationBillingManagerRemove denotes an event where the CC + // removes a billing manager from an organization. + EventTypeAuditUserOrganizationBillingManagerRemove EventType = "audit.user.organization_billing_manager_remove" + + // EventTypeAuditUserOrganizationManagerAdd denotes an event where the CC + // associates a manager with an organization. + EventTypeAuditUserOrganizationManagerAdd EventType = "audit.user.organization_manager_add" + + // EventTypeAuditUserOrganizationManagerRemove denotes an event where the CC + // removes a manager from an organization. + EventTypeAuditUserOrganizationManagerRemove EventType = "audit.user.organization_manager_remove" + + // EventTypeAuditUserOrganizationUserAdd denotes an event where the CC associates + // an organization with a user. + EventTypeAuditUserOrganizationUserAdd EventType = "audit.user.organization_user_add" + + // EventTypeAuditUserOrganizationUserRemove denotes an event where the CC + // associates an organization with a user. + EventTypeAuditUserOrganizationUserRemove EventType = "audit.user.organization_user_remove" + + EventTypeBlobRemoveOrphan EventType = "blob.remove_orphan" + + // "experimental" events + + // EventTypeAuditApplicationBuildCreate denotes an event where an application + // build is created. + EventTypeAuditApplicationBuildCreate EventType = "audit.app.build.create" + + // EventTypeAuditApplicationDropletCreate denotes an event where an application + // droplet is created. + EventTypeAuditApplicationDropletCreate EventType = "audit.app.droplet.create" + + // EventTypeAuditApplicationDropletDelete denotes an event where an application + // droplet is deleted. + EventTypeAuditApplicationDropletDelete EventType = "audit.app.droplet.delete" + + // EventTypeAuditApplicationDropletDownload denotes an event where an application + // droplet is downloaded. + EventTypeAuditApplicationDropletDownload EventType = "audit.app.droplet.download" + + // EventTypeAuditApplicationProcessCrash denotes an event where an application + // process crashes. + EventTypeAuditApplicationProcessCrash EventType = "audit.app.process.crash" + + // EventTypeAuditApplicationProcessCreate denotes an event where the CC + // creates an application process. + EventTypeAuditApplicationProcessCreate EventType = "audit.app.process.create" + + // EventTypeAuditApplicationProcessDelete denotes an event where the CC + // deletes an application process. + EventTypeAuditApplicationProcessDelete EventType = "audit.app.process.delete" + + // EventTypeAuditApplicationProcessScale denotes an event where the CC scales + // an application process. + EventTypeAuditApplicationProcessScale EventType = "audit.app.process.scale" + + // EventTypeAuditApplicationProcessTerminateInstance denotes an event where + // the CC terminates an application process instance. + EventTypeAuditApplicationProcessTerminateInstance EventType = "audit.app.process.terminate_instance" + + // EventTypeAuditApplicationProcessUpdate denotes an event where the CC + // updates an application process. + EventTypeAuditApplicationProcessUpdate EventType = "audit.app.process.update" + + // EventTypeAuditApplicationTaskCancel denotes an event where the CC cancels + // a task. + EventTypeAuditApplicationTaskCancel EventType = "audit.app.task.cancel" + + // EventTypeAuditApplicationTaskCreate denotes an event where the CC creates + // a task. + EventTypeAuditApplicationTaskCreate EventType = "audit.app.task.create" + + EventTypeServiceInstanceShare EventType = "audit.service_instance.share" + + EventTypeServiceInstanceUnshare EventType = "audit.service_instance.unshare" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/feature_flag.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/feature_flag.go new file mode 100644 index 0000000..8275958 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/feature_flag.go @@ -0,0 +1,11 @@ +package constant + +// FeatureFlagName is the name of the feature flag given by the Cloud +// Controller. +type FeatureFlagName string + +const ( + // FeatureFlagServiceInstanceSharing is the name of the service instance + // sharing feature flag. + FeatureFlagServiceInstanceSharing FeatureFlagName = "service_instance_sharing" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/filter.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/filter.go new file mode 100644 index 0000000..1890ad8 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/filter.go @@ -0,0 +1,59 @@ +package constant + +// FilterType is the type of filter a Filter uses. +type FilterType string + +const ( + // AppGUIDFilter is the name of the 'app_guid' filter. + AppGUIDFilter FilterType = "app_guid" + // DomainGUIDFilter is the name of the 'domain_guid' filter. + DomainGUIDFilter FilterType = "domain_guid" + // OrganizationGUIDFilter is the name of the 'organization_guid' filter. + OrganizationGUIDFilter FilterType = "organization_guid" + // RouteGUIDFilter is the name of the 'route_guid' filter. + RouteGUIDFilter FilterType = "route_guid" + // ServiceBrokerGUIDFilter is the name of the 'service_broker_guid' filter. + ServiceBrokerGUIDFilter FilterType = "service_broker_guid" + // ServiceGUIDFilter is the name of the 'service_guid' filter. + ServiceGUIDFilter FilterType = "service_guid" + // ServiceInstanceGUIDFilter is the name of the 'service_instance_guid' filter. + ServiceInstanceGUIDFilter FilterType = "service_instance_guid" + // ServicePlanGUIDFilter is the name of the 'service_plan_guid' filter. + ServicePlanGUIDFilter FilterType = "service_plan_guid" + // SpaceGUIDFilter is the name of the 'space_guid' filter. + SpaceGUIDFilter FilterType = "space_guid" + + // LabelFilter is the name of the 'label' filter. + LabelFilter FilterType = "label" + // NameFilter is the name of the 'name' filter. + NameFilter FilterType = "name" + // HostFilter is the name of the 'host' filter. + HostFilter FilterType = "host" + // PathFilter is the name of the 'path' filter. + PathFilter FilterType = "path" + // PortFilter is the name of the 'port' filter. + PortFilter FilterType = "port" + // ProviderFilter is the name of the 'provider' filter. + // Deprecated: This is no longer supported on CF API versions above 2.46.0 + ProviderFilter FilterType = "provider" + //StackFilter is the name of the 'stack' filter. + StackFilter FilterType = "stack" + // TimestampFilter is the name of the 'timestamp' filter. + TimestampFilter FilterType = "timestamp" + // TypeFilter is the name of the 'type' filter. + TypeFilter FilterType = "type" +) + +// FilterOperator is the type of operation a Filter uses. +type FilterOperator string + +const ( + // EqualOperator is the Filter's equal operator. + EqualOperator FilterOperator = ":" + + // GreaterThanOperator is the query greater than operator. + GreaterThanOperator FilterOperator = ">" + + // InOperator is the Filter's "IN" operator. + InOperator FilterOperator = " IN " +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/godoc.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/godoc.go new file mode 100644 index 0000000..0d7df83 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/godoc.go @@ -0,0 +1,19 @@ +// Package constant contains types and constants used by the ccv2 package. +// +// Constant Naming Conventions: +// +// The standard naming for a constant is . The only +// exception is 'state' types, where the word 'state' is omitted from the enum +// values. +// +// For Example: +// Constant Type: PackageType +// Enum Name: Bits +// Enum Value: "bits" +// const PackageTypeBits PackageType = "bits" +// +// Constant Type: PackageState +// Enum Name: Expired +// Enum Value: "EXPIRED" +// const PackageExpired PackageState = "EXPIRED" +package constant diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/job.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/job.go new file mode 100644 index 0000000..66073d4 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/job.go @@ -0,0 +1,18 @@ +package constant + +// JobStatus is the current state of a job. +type JobStatus string + +const ( + // JobStatusFailed is when the job is no longer running due to a failure. + JobStatusFailed JobStatus = "failed" + + // JobStatusFinished is when the job is no longer and it was successful. + JobStatusFinished JobStatus = "finished" + + // JobStatusQueued is when the job is waiting to be run. + JobStatusQueued JobStatus = "queued" + + // JobStatusRunning is when the job is running. + JobStatusRunning JobStatus = "running" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/last_operation.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/last_operation.go new file mode 100644 index 0000000..2512314 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/last_operation.go @@ -0,0 +1,9 @@ +package constant + +type LastOperationState string + +const ( + LastOperationInProgress LastOperationState = "in progress" + LastOperationSucceeded LastOperationState = "succeeded" + LastOperationFailed LastOperationState = "failed" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/package.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/package.go new file mode 100644 index 0000000..b8d48fa --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/package.go @@ -0,0 +1,2 @@ +// Package constant contains types and constants used by the ccv2 package. +package constant diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/router_group_type.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/router_group_type.go new file mode 100644 index 0000000..6589db1 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/router_group_type.go @@ -0,0 +1,11 @@ +package constant + +// RouterGroupType is an enumeration of all possible router group types. +type RouterGroupType string + +const ( + // TCPRouterGroup represents a TCP router group. + TCPRouterGroup RouterGroupType = "tcp" + // HTTPRouterGroup represents a HTTP router group. + HTTPRouterGroup RouterGroupType = "http" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/security_group.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/security_group.go new file mode 100644 index 0000000..5f4cd24 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/security_group.go @@ -0,0 +1,13 @@ +package constant + +// SecurityGroupLifecycle represents the lifecycle phase of a security group +// binding. +type SecurityGroupLifecycle string + +const ( + // SecurityGroupLifecycleRunning indicates the lifecycle phase running. + SecurityGroupLifecycleRunning SecurityGroupLifecycle = "running" + + // SecurityGroupLifecycleStaging indicates the lifecycle phase staging. + SecurityGroupLifecycleStaging SecurityGroupLifecycle = "staging" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/service_instance.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/service_instance.go new file mode 100644 index 0000000..5286ec2 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv2/constant/service_instance.go @@ -0,0 +1,11 @@ +package constant + +type ServiceInstanceType string + +const ( + // UserProvidedService is a Service Instance that is created by a user. + UserProvidedService ServiceInstanceType = "user_provided_service_instance" + + // ManagedService is a Service Instance that is managed by a service broker. + ManagedService ServiceInstanceType = "managed_service_instance" +) diff --git a/vendor/code.cloudfoundry.org/cli/resources/api_links_resource.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/api_links.go similarity index 58% rename from vendor/code.cloudfoundry.org/cli/resources/api_links_resource.go rename to vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/api_links.go index cfb2c49..ef2a43c 100644 --- a/vendor/code.cloudfoundry.org/cli/resources/api_links_resource.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/api_links.go @@ -1,4 +1,4 @@ -package resources +package ccv3 // APILink represents a generic link from a response object. type APILink struct { @@ -9,18 +9,16 @@ type APILink struct { Method string `json:"method"` // Meta contains additional metadata about the API. - Meta APILinkMeta `json:"meta"` -} - -type APILinkMeta struct { - // Version of the API - Version string `json:"version"` + Meta struct { + // Version of the API + Version string `json:"version"` - // Fingerprint to authenticate api with - HostKeyFingerprint string `json:"host_key_fingerprint"` + // Fingerprint to authenticate api with + HostKeyFingerprint string `json:"host_key_fingerprint"` - // Identifier for UAA queries - OAuthClient string `json:"oath_client"` + // Identifier for UAA queries + OAuthClient string `json:"oath_client"` + } `json:"meta"` } // APILinks is a directory of follow-up urls for the resource. diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/build.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/build.go index 2c67189..c9e6760 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/build.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/build.go @@ -1,14 +1,78 @@ package ccv3 import ( + "encoding/json" + + "code.cloudfoundry.org/cli/api/cloudcontroller" + "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" ) +// Build represent the process of staging an application package. +type Build struct { + // CreatedAt is the time with zone when the build was created. + CreatedAt string + // DropletGUID is the unique identifier for the resulting droplet from the + // staging process. + DropletGUID string + // Error describes errors during the build process. + Error string + // GUID is the unique build identifier. + GUID string + // PackageGUID is the unique identifier for package that is the input to the + // staging process. + PackageGUID string + // State is the state of the build. + State constant.BuildState +} + +// MarshalJSON converts a Build into a Cloud Controller Application. +func (b Build) MarshalJSON() ([]byte, error) { + var ccBuild struct { + Package struct { + GUID string `json:"guid"` + } `json:"package"` + } + + ccBuild.Package.GUID = b.PackageGUID + + return json.Marshal(ccBuild) +} + +// UnmarshalJSON helps unmarshal a Cloud Controller Build response. +func (b *Build) UnmarshalJSON(data []byte) error { + var ccBuild struct { + CreatedAt string `json:"created_at,omitempty"` + GUID string `json:"guid,omitempty"` + Error string `json:"error"` + Package struct { + GUID string `json:"guid"` + } `json:"package"` + State constant.BuildState `json:"state,omitempty"` + Droplet struct { + GUID string `json:"guid"` + } `json:"droplet"` + } + + err := cloudcontroller.DecodeJSON(data, &ccBuild) + if err != nil { + return err + } + + b.GUID = ccBuild.GUID + b.CreatedAt = ccBuild.CreatedAt + b.Error = ccBuild.Error + b.PackageGUID = ccBuild.Package.GUID + b.State = ccBuild.State + b.DropletGUID = ccBuild.Droplet.GUID + + return nil +} + // CreateBuild creates the given build, requires Package GUID to be set on the // build. -func (client *Client) CreateBuild(build resources.Build) (resources.Build, Warnings, error) { - var responseBody resources.Build +func (client *Client) CreateBuild(build Build) (Build, Warnings, error) { + var responseBody Build _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostBuildRequest, @@ -20,8 +84,8 @@ func (client *Client) CreateBuild(build resources.Build) (resources.Build, Warni } // GetBuild gets the build with the given GUID. -func (client *Client) GetBuild(guid string) (resources.Build, Warnings, error) { - var responseBody resources.Build +func (client *Client) GetBuild(guid string) (Build, Warnings, error) { + var responseBody Build _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.GetBuildRequest, diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/buildpack.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/buildpack.go index 7846d58..fed2254 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/buildpack.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/buildpack.go @@ -1,17 +1,106 @@ package ccv3 import ( + "encoding/json" "io" + "code.cloudfoundry.org/cli/api/cloudcontroller" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/api/cloudcontroller/uploads" "code.cloudfoundry.org/cli/resources" + "code.cloudfoundry.org/cli/types" ) +// Buildpack represents a Cloud Controller V3 buildpack. +type Buildpack struct { + // Enabled is true when the buildpack can be used for staging. + Enabled types.NullBool + // Filename is the uploaded filename of the buildpack. + Filename string + // GUID is the unique identifier for the buildpack. + GUID string + // Locked is true when the buildpack cannot be updated. + Locked types.NullBool + // Name is the name of the buildpack. To be used by app buildpack field. + // (only alphanumeric characters) + Name string + // Position is the order in which the buildpacks are checked during buildpack + // auto-detection. + Position types.NullInt + // Stack is the name of the stack that the buildpack will use. + Stack string + // State is the current state of the buildpack. + State string + // Links are links to related resources. + Links APILinks + // resources.Metadata is used for custom tagging of API resources + Metadata *resources.Metadata +} + +// MarshalJSON converts a Package into a Cloud Controller Package. +func (buildpack Buildpack) MarshalJSON() ([]byte, error) { + ccBuildpack := struct { + Name string `json:"name,omitempty"` + Stack string `json:"stack,omitempty"` + Position *int `json:"position,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Locked *bool `json:"locked,omitempty"` + Metadata *resources.Metadata `json:"metadata,omitempty"` + }{ + Name: buildpack.Name, + Stack: buildpack.Stack, + } + + if buildpack.Position.IsSet { + ccBuildpack.Position = &buildpack.Position.Value + } + if buildpack.Enabled.IsSet { + ccBuildpack.Enabled = &buildpack.Enabled.Value + } + if buildpack.Locked.IsSet { + ccBuildpack.Locked = &buildpack.Locked.Value + } + + return json.Marshal(ccBuildpack) +} + +func (buildpack *Buildpack) UnmarshalJSON(data []byte) error { + var ccBuildpack struct { + GUID string `json:"guid,omitempty"` + Links APILinks `json:"links,omitempty"` + Name string `json:"name,omitempty"` + Filename string `json:"filename,omitempty"` + Stack string `json:"stack,omitempty"` + State string `json:"state,omitempty"` + Enabled types.NullBool `json:"enabled"` + Locked types.NullBool `json:"locked"` + Position types.NullInt `json:"position"` + Metadata *resources.Metadata `json:"metadata"` + } + + err := cloudcontroller.DecodeJSON(data, &ccBuildpack) + if err != nil { + return err + } + + buildpack.Enabled = ccBuildpack.Enabled + buildpack.Filename = ccBuildpack.Filename + buildpack.GUID = ccBuildpack.GUID + buildpack.Locked = ccBuildpack.Locked + buildpack.Name = ccBuildpack.Name + buildpack.Position = ccBuildpack.Position + buildpack.Stack = ccBuildpack.Stack + buildpack.State = ccBuildpack.State + buildpack.Links = ccBuildpack.Links + buildpack.Metadata = ccBuildpack.Metadata + + return nil +} + // CreateBuildpack creates a buildpack with the given settings, Type and the // ApplicationRelationship must be set. -func (client *Client) CreateBuildpack(bp resources.Buildpack) (resources.Buildpack, Warnings, error) { - var responseBody resources.Buildpack +func (client *Client) CreateBuildpack(bp Buildpack) (Buildpack, Warnings, error) { + var responseBody Buildpack _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostBuildpackRequest, @@ -33,24 +122,24 @@ func (client Client) DeleteBuildpack(buildpackGUID string) (JobURL, Warnings, er } // GetBuildpacks lists buildpacks with optional filters. -func (client *Client) GetBuildpacks(query ...Query) ([]resources.Buildpack, Warnings, error) { - var buildpacks []resources.Buildpack +func (client *Client) GetBuildpacks(query ...Query) ([]Buildpack, Warnings, error) { + var resources []Buildpack _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetBuildpacksRequest, Query: query, - ResponseBody: resources.Buildpack{}, + ResponseBody: Buildpack{}, AppendToList: func(item interface{}) error { - buildpacks = append(buildpacks, item.(resources.Buildpack)) + resources = append(resources, item.(Buildpack)) return nil }, }) - return buildpacks, warnings, err + return resources, warnings, err } -func (client Client) UpdateBuildpack(buildpack resources.Buildpack) (resources.Buildpack, Warnings, error) { - var responseBody resources.Buildpack +func (client Client) UpdateBuildpack(buildpack Buildpack) (Buildpack, Warnings, error) { + var responseBody Buildpack _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PatchBuildpackRequest, diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/clock.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/clock.go index b8f8c71..d1092df 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/clock.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/clock.go @@ -2,7 +2,7 @@ package ccv3 import "time" -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Clock +//go:generate counterfeiter . Clock type Clock interface { Now() time.Time diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/connection_wrapper.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/connection_wrapper.go index 376891c..c4b4a29 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/connection_wrapper.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/connection_wrapper.go @@ -2,7 +2,7 @@ package ccv3 import "code.cloudfoundry.org/cli/api/cloudcontroller" -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . ConnectionWrapper +//go:generate counterfeiter . ConnectionWrapper // ConnectionWrapper can wrap a given connection allowing the wrapper to modify // all requests going in and out of the given connection. diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/application.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/application.go index b0acd64..0a3884b 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/application.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/application.go @@ -19,9 +19,6 @@ const ( ApplicationStarting ApplicationAction = "Starting" // ApplicationRestarting indicates that the app is being restarted ApplicationRestarting ApplicationAction = "Restarting" - // ApplicationRollingBack indicates that the app is being rolled back to a - // prior revision - ApplicationRollingBack ApplicationAction = "Rolling Back" ) // ApplicationState represents the current desired state of the app. diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/job.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/job.go index 5cba85f..52894cc 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/job.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/job.go @@ -10,8 +10,6 @@ const ( JobFailed JobState = "FAILED" // JobProcessing is when the job is waiting to be run. JobProcessing JobState = "PROCESSING" - // JobPolling is when the job is waiting on an external resource to do the task - JobPolling JobState = "POLLING" ) // JobErrorCode is the numeric code for a particular error. diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/role_type.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/role_type.go index 70d3a59..117140b 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/role_type.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant/role_type.go @@ -11,5 +11,4 @@ const ( SpaceDeveloperRole RoleType = "space_developer" SpaceAuditorRole RoleType = "space_auditor" SpaceManagerRole RoleType = "space_manager" - SpaceSupporterRole RoleType = "space_supporter" ) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/deployment.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/deployment.go index a4dc7da..94c5723 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/deployment.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/deployment.go @@ -1,11 +1,86 @@ package ccv3 import ( + "encoding/json" + + "code.cloudfoundry.org/cli/api/cloudcontroller" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" ) +type Deployment struct { + GUID string + State constant.DeploymentState + StatusValue constant.DeploymentStatusValue + StatusReason constant.DeploymentStatusReason + RevisionGUID string + DropletGUID string + CreatedAt string + UpdatedAt string + Relationships resources.Relationships + NewProcesses []Process +} + +// MarshalJSON converts a Deployment into a Cloud Controller Deployment. +func (d Deployment) MarshalJSON() ([]byte, error) { + type Revision struct { + GUID string `json:"guid,omitempty"` + } + type Droplet struct { + GUID string `json:"guid,omitempty"` + } + + var ccDeployment struct { + Droplet *Droplet `json:"droplet,omitempty"` + Revision *Revision `json:"revision,omitempty"` + Relationships resources.Relationships `json:"relationships,omitempty"` + } + + if d.DropletGUID != "" { + ccDeployment.Droplet = &Droplet{d.DropletGUID} + } + + if d.RevisionGUID != "" { + ccDeployment.Revision = &Revision{d.RevisionGUID} + } + + ccDeployment.Relationships = d.Relationships + + return json.Marshal(ccDeployment) +} + +// UnmarshalJSON helps unmarshal a Cloud Controller Deployment response. +func (d *Deployment) UnmarshalJSON(data []byte) error { + var ccDeployment struct { + GUID string `json:"guid,omitempty"` + CreatedAt string `json:"created_at,omitempty"` + Relationships resources.Relationships `json:"relationships,omitempty"` + State constant.DeploymentState `json:"state,omitempty"` + Status struct { + Value constant.DeploymentStatusValue `json:"value"` + Reason constant.DeploymentStatusReason `json:"reason"` + } `json:"status"` + Droplet resources.Droplet `json:"droplet,omitempty"` + NewProcesses []Process `json:"new_processes,omitempty"` + } + err := cloudcontroller.DecodeJSON(data, &ccDeployment) + if err != nil { + return err + } + + d.GUID = ccDeployment.GUID + d.CreatedAt = ccDeployment.CreatedAt + d.Relationships = ccDeployment.Relationships + d.State = ccDeployment.State + d.StatusValue = ccDeployment.Status.Value + d.StatusReason = ccDeployment.Status.Reason + d.DropletGUID = ccDeployment.Droplet.GUID + d.NewProcesses = ccDeployment.NewProcesses + + return nil +} + func (client *Client) CancelDeployment(deploymentGUID string) (Warnings, error) { _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostApplicationDeploymentActionCancelRequest, @@ -16,12 +91,12 @@ func (client *Client) CancelDeployment(deploymentGUID string) (Warnings, error) } func (client *Client) CreateApplicationDeployment(appGUID string, dropletGUID string) (string, Warnings, error) { - dep := resources.Deployment{ + dep := Deployment{ DropletGUID: dropletGUID, Relationships: resources.Relationships{constant.RelationshipTypeApplication: resources.Relationship{GUID: appGUID}}, } - var responseBody resources.Deployment + var responseBody Deployment _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostApplicationDeploymentRequest, @@ -33,12 +108,12 @@ func (client *Client) CreateApplicationDeployment(appGUID string, dropletGUID st } func (client *Client) CreateApplicationDeploymentByRevision(appGUID string, revisionGUID string) (string, Warnings, error) { - dep := resources.Deployment{ + dep := Deployment{ RevisionGUID: revisionGUID, Relationships: resources.Relationships{constant.RelationshipTypeApplication: resources.Relationship{GUID: appGUID}}, } - var responseBody resources.Deployment + var responseBody Deployment _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostApplicationDeploymentRequest, @@ -49,8 +124,8 @@ func (client *Client) CreateApplicationDeploymentByRevision(appGUID string, revi return responseBody.GUID, warnings, err } -func (client *Client) GetDeployment(deploymentGUID string) (resources.Deployment, Warnings, error) { - var responseBody resources.Deployment +func (client *Client) GetDeployment(deploymentGUID string) (Deployment, Warnings, error) { + var responseBody Deployment _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.GetDeploymentRequest, @@ -61,18 +136,18 @@ func (client *Client) GetDeployment(deploymentGUID string) (resources.Deployment return responseBody, warnings, err } -func (client *Client) GetDeployments(query ...Query) ([]resources.Deployment, Warnings, error) { - var deployments []resources.Deployment +func (client *Client) GetDeployments(query ...Query) ([]Deployment, Warnings, error) { + var resources []Deployment _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetDeploymentsRequest, Query: query, - ResponseBody: resources.Deployment{}, + ResponseBody: Deployment{}, AppendToList: func(item interface{}) error { - deployments = append(deployments, item.(resources.Deployment)) + resources = append(resources, item.(Deployment)) return nil }, }) - return deployments, warnings, err + return resources, warnings, err } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/environment_variables.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/environment_variables.go index 22c50d8..847ba01 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/environment_variables.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/environment_variables.go @@ -1,17 +1,58 @@ package ccv3 import ( + "encoding/json" + + "code.cloudfoundry.org/cli/api/cloudcontroller" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" + "code.cloudfoundry.org/cli/types" ) // EnvironmentVariables represents the environment variables that can be set on // an application by the user. +type EnvironmentVariables map[string]types.FilteredString + +func (variables EnvironmentVariables) MarshalJSON() ([]byte, error) { + ccEnvVars := struct { + Var map[string]types.FilteredString `json:"var"` + }{ + Var: variables, + } + + return json.Marshal(ccEnvVars) +} + +func (variables *EnvironmentVariables) UnmarshalJSON(data []byte) error { + var ccEnvVars struct { + Var map[string]types.FilteredInterface `json:"var"` + } + + err := cloudcontroller.DecodeJSON(data, &ccEnvVars) + + *variables = EnvironmentVariables{} + + for envVarName, envVarValue := range ccEnvVars.Var { + var valueAsString string + if str, ok := envVarValue.Value.(string); ok { + valueAsString = str + } else { + bytes, err := json.Marshal(envVarValue.Value) + if err != nil { + return err + } + valueAsString = string(bytes) + } + + (*variables)[envVarName] = types.FilteredString{Value: valueAsString, IsSet: true} + } + + return err +} // GetEnvironmentVariableGroup gets the values of a particular environment variable group. -func (client *Client) GetEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName) (resources.EnvironmentVariables, Warnings, error) { - var responseBody resources.EnvironmentVariables +func (client *Client) GetEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName) (EnvironmentVariables, Warnings, error) { + var responseBody EnvironmentVariables _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.GetEnvironmentVariableGroupRequest, @@ -25,8 +66,8 @@ func (client *Client) GetEnvironmentVariableGroup(group constant.EnvironmentVari // UpdateApplicationEnvironmentVariables adds/updates the user provided // environment variables on an application. A restart is required for changes // to take effect. -func (client *Client) UpdateApplicationEnvironmentVariables(appGUID string, envVars resources.EnvironmentVariables) (resources.EnvironmentVariables, Warnings, error) { - var responseBody resources.EnvironmentVariables +func (client *Client) UpdateApplicationEnvironmentVariables(appGUID string, envVars EnvironmentVariables) (EnvironmentVariables, Warnings, error) { + var responseBody EnvironmentVariables _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PatchApplicationEnvironmentVariablesRequest, @@ -38,8 +79,8 @@ func (client *Client) UpdateApplicationEnvironmentVariables(appGUID string, envV return responseBody, warnings, err } -func (client *Client) UpdateEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName, envVars resources.EnvironmentVariables) (resources.EnvironmentVariables, Warnings, error) { - var responseBody resources.EnvironmentVariables +func (client *Client) UpdateEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName, envVars EnvironmentVariables) (EnvironmentVariables, Warnings, error) { + var responseBody EnvironmentVariables _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PatchEnvironmentVariableGroupRequest, diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/errors.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/errors.go index c89a60d..7c6fd0b 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/errors.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/errors.go @@ -10,10 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" ) -const ( - taskWorkersUnavailable = "CF-TaskWorkersUnavailable" - operationInProgress = "CF-AsyncServiceInstanceOperationInProgress" -) +const taskWorkersUnavailable = "CF-TaskWorkersUnavailable" // errorWrapper is the wrapper that converts responses with 4xx and 5xx status // codes to an error. @@ -74,17 +71,13 @@ func convert400(rawHTTPStatusErr ccerror.RawHTTPStatusError, request *cloudcontr return ccerror.TaskWorkersUnavailableError{Message: firstErr.Detail} } return ccerror.ServiceUnavailableError{Message: firstErr.Detail} - case http.StatusConflict: - if firstErr.Title == operationInProgress { - return ccerror.ServiceInstanceOperationInProgressError{Message: firstErr.Detail} + default: + return ccerror.V3UnexpectedResponseError{ + ResponseCode: rawHTTPStatusErr.StatusCode, + RequestIDs: rawHTTPStatusErr.RequestIDs, + V3ErrorResponse: errorResponse, } } - - return ccerror.V3UnexpectedResponseError{ - ResponseCode: rawHTTPStatusErr.StatusCode, - RequestIDs: rawHTTPStatusErr.RequestIDs, - V3ErrorResponse: errorResponse, - } } func convert500(rawHTTPStatusErr ccerror.RawHTTPStatusError) error { @@ -115,10 +108,9 @@ func handleBadRequest(errorResponse ccerror.V3Error, _ *cloudcontroller.Request) switch errorResponse.Detail { case "Bad request: Cannot stage package whose state is not ready.": return ccerror.InvalidStateError{} - case "This service does not support fetching service instance parameters.": - return ccerror.ServiceInstanceParametersFetchNotSupportedError{Message: errorResponse.Detail} default: return ccerror.BadRequestError{Message: errorResponse.Detail} + } } @@ -171,9 +163,6 @@ func handleUnprocessableEntity(errorResponse ccerror.V3Error) error { case strings.Contains(errorString, "Assign a droplet before starting this app."): return ccerror.InvalidStartError{} - case strings.Contains(errorString, - "The service instance name is taken"): - return ccerror.ServiceInstanceNameTakenError{Message: err.Message} case orgNameTakenRegexp.MatchString(errorString): return ccerror.OrganizationNameTakenError{UnprocessableEntityError: err} case roleExistsRegexp.MatchString(errorString): @@ -185,14 +174,6 @@ func handleUnprocessableEntity(errorResponse ccerror.V3Error) error { case strings.Contains(errorString, "Ensure the space is bound to this security group."): return ccerror.SecurityGroupNotBound{Message: err.Message} - case errorResponse.Title == "CF-ServiceInstanceAlreadyBoundToSameRoute": - return ccerror.ResourceAlreadyExistsError{Message: err.Message} - case strings.Contains(errorString, - "The app is already bound to the service instance"): - return ccerror.ResourceAlreadyExistsError{Message: err.Message} - case strings.Contains(errorString, - "Key binding names must be unique"): - return ccerror.ServiceKeyTakenError{Message: err.Message} default: return err } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/feature_flag.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/feature_flag.go index 80f775a..bd2c8aa 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/feature_flag.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/feature_flag.go @@ -1,12 +1,29 @@ package ccv3 import ( + "encoding/json" + "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" ) -func (client *Client) GetFeatureFlag(flagName string) (resources.FeatureFlag, Warnings, error) { - var responseBody resources.FeatureFlag +// FeatureFlag represents a Cloud Controller V3 Feature Flag. +type FeatureFlag struct { + Name string `json:"name"` + Enabled bool `json:"enabled"` +} + +func (f FeatureFlag) MarshalJSON() ([]byte, error) { + var ccBodyFlag struct { + Enabled bool `json:"enabled"` + } + + ccBodyFlag.Enabled = f.Enabled + + return json.Marshal(ccBodyFlag) +} + +func (client *Client) GetFeatureFlag(flagName string) (FeatureFlag, Warnings, error) { + var responseBody FeatureFlag _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.GetFeatureFlagRequest, @@ -18,23 +35,23 @@ func (client *Client) GetFeatureFlag(flagName string) (resources.FeatureFlag, Wa } // GetFeatureFlags lists feature flags. -func (client *Client) GetFeatureFlags() ([]resources.FeatureFlag, Warnings, error) { - var featureFlags []resources.FeatureFlag +func (client *Client) GetFeatureFlags() ([]FeatureFlag, Warnings, error) { + var resources []FeatureFlag _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetFeatureFlagsRequest, - ResponseBody: resources.FeatureFlag{}, + ResponseBody: FeatureFlag{}, AppendToList: func(item interface{}) error { - featureFlags = append(featureFlags, item.(resources.FeatureFlag)) + resources = append(resources, item.(FeatureFlag)) return nil }, }) - return featureFlags, warnings, err + return resources, warnings, err } -func (client *Client) UpdateFeatureFlag(flag resources.FeatureFlag) (resources.FeatureFlag, Warnings, error) { - var responseBody resources.FeatureFlag +func (client *Client) UpdateFeatureFlag(flag FeatureFlag) (FeatureFlag, Warnings, error) { + var responseBody FeatureFlag _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PatchFeatureFlagRequest, diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/included_resources.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/included_resources.go index 0044707..2d5325e 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/included_resources.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/included_resources.go @@ -6,9 +6,6 @@ type IncludedResources struct { Users []resources.User `json:"users,omitempty"` Organizations []resources.Organization `json:"organizations,omitempty"` Spaces []resources.Space `json:"spaces,omitempty"` - ServiceInstances []resources.ServiceInstance `json:"service_instances,omitempty"` ServiceOfferings []resources.ServiceOffering `json:"service_offerings,omitempty"` ServiceBrokers []resources.ServiceBroker `json:"service_brokers,omitempty"` - ServicePlans []resources.ServicePlan `json:"service_plans,omitempty"` - Apps []resources.Application `json:"apps,omitempty"` } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/info.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/info.go index 8a2e694..21dfc7a 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/info.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/info.go @@ -5,42 +5,40 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller" "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/resources" ) type InfoLinks struct { // AppSSH is the link for application ssh info. - AppSSH resources.APILink `json:"app_ssh"` + AppSSH APILink `json:"app_ssh"` // CCV3 is the link to the Cloud Controller V3 API. - CCV3 resources.APILink `json:"cloud_controller_v3"` + CCV3 APILink `json:"cloud_controller_v3"` // Logging is the link to the Logging API. - Logging resources.APILink `json:"logging"` + Logging APILink `json:"logging"` // Logging is the link to the Logging API. - LogCache resources.APILink `json:"log_cache"` + LogCache APILink `json:"log_cache"` // NetworkPolicyV1 is the link to the Container to Container Networking // API. - NetworkPolicyV1 resources.APILink `json:"network_policy_v1"` + NetworkPolicyV1 APILink `json:"network_policy_v1"` // Routing is the link to the routing API - Routing resources.APILink `json:"routing"` + Routing APILink `json:"routing"` // UAA is the link to the UAA API. - UAA resources.APILink `json:"uaa"` + UAA APILink `json:"uaa"` // Login is the link to the Login API. - Login resources.APILink `json:"login"` + Login APILink `json:"login"` } // Info represents a GET response from the '/' endpoint of the cloud // controller API. type Info struct { // Links is a list of top level Cloud Controller APIs. - Links InfoLinks `json:"links"` - CFOnK8s bool `json:"cf_on_k8s"` + Links InfoLinks `json:"links"` } // AppSSHEndpoint returns the HREF for SSHing into an app container. @@ -101,12 +99,12 @@ func (info Info) ccV3Link() string { } // ResourceLinks represents the information returned back from /v3. -type ResourceLinks map[string]resources.APILink +type ResourceLinks map[string]APILink // UnmarshalJSON helps unmarshal a Cloud Controller /v3 response. -func (links ResourceLinks) UnmarshalJSON(data []byte) error { +func (resources ResourceLinks) UnmarshalJSON(data []byte) error { var ccResourceLinks struct { - Links map[string]resources.APILink `json:"links"` + Links map[string]APILink `json:"links"` } err := cloudcontroller.DecodeJSON(data, &ccResourceLinks) if err != nil { @@ -114,20 +112,28 @@ func (links ResourceLinks) UnmarshalJSON(data []byte) error { } for key, val := range ccResourceLinks.Links { - links[key] = val + resources[key] = val } return nil } // GetInfo returns endpoint and API information from /v3. -func (client *Client) GetInfo() (Info, Warnings, error) { +func (client *Client) GetInfo() (Info, ResourceLinks, Warnings, error) { rootResponse, warnings, err := client.RootResponse() if err != nil { - return Info{}, warnings, err + return Info{}, ResourceLinks{}, warnings, err } - return rootResponse, warnings, err + info := ResourceLinks{} + + _, v3Warnings, err := client.MakeRequest(RequestParams{ + URL: rootResponse.ccV3Link(), + ResponseBody: &info, + }) + warnings = append(warnings, v3Warnings...) + + return rootResponse, info, warnings, err } // rootResponse returns the CC API root document. diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/api_resources.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/api_resources.go new file mode 100644 index 0000000..c761f3f --- /dev/null +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/api_resources.go @@ -0,0 +1,32 @@ +package internal + +// When adding a resource, also add it to the api/cloudcontroller/ccv3/ccv3_suite_test.go resources response +const ( + AppsResource = "apps" + BuildpacksResource = "buildpacks" + BuildsResource = "builds" + DeploymentsResource = "deployments" + DomainsResource = "domains" + DropletsResource = "droplets" + EventsResource = "audit_events" + EnvironmentVariableGroupsResource = "environment_variable_groups" + FeatureFlagsResource = "feature_flags" + IsolationSegmentsResource = "isolation_segments" + OrgsResource = "organizations" + OrgQuotasResource = "organization_quotas" + PackagesResource = "packages" + ProcessesResource = "processes" + ResourceMatches = "resource_matches" + SecurityGroupsResource = "security_groups" + ServiceBrokersResource = "service_brokers" + RolesResource = "roles" + RoutesResource = "routes" + ServiceInstancesResource = "service_instances" + ServiceOfferingsResource = "service_offerings" + ServicePlansResource = "service_plans" + SpaceQuotasResource = "space_quotas" + SpacesResource = "spaces" + StacksResource = "stacks" + TasksResource = "tasks" + UsersResource = "users" +) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/api_routes.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/api_routes.go index 8f22393..ce4e9e3 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/api_routes.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/api_routes.go @@ -18,16 +18,13 @@ const ( DeleteOrganizationRequest = "DeleteOrganization" DeleteOrganizationQuotaRequest = "DeleteOrganizationQuota" DeleteOrphanedRoutesRequest = "DeleteOrphanedRoutes" - DeleteRoleRequest = "DeleteRoleRequest" DeleteRouteRequest = "DeleteRouteRequest" - DeleteRouteBindingRequest = "DeleteRouteBinding" + DeleteRoleRequest = "DeleteRoleRequest" DeleteSecurityGroupRequest = "DeleteSecurityGroup" DeleteSecurityGroupStagingSpaceRequest = "DeleteSecurityGroupStagingSpace" DeleteSecurityGroupRunningSpaceRequest = "DeleteSecurityGroupRunningSpace" - DeleteServiceCredentialBindingRequest = "DeleteServiceCredentialBinding" DeleteServiceBrokerRequest = "DeleteServiceBrokerRequest" DeleteServiceInstanceRelationshipsSharedSpaceRequest = "DeleteServiceInstanceRelationshipsSharedSpace" - DeleteServiceInstanceRequest = "DeleteServiceInstance" DeleteServiceOfferingRequest = "DeleteServiceOffering" DeleteServicePlanVisibilityRequest = "DeleteServicePlanVisibility" DeleteSharedOrgFromDomainRequest = "DeleteSharedOrgFromDomain" @@ -42,7 +39,6 @@ const ( GetApplicationProcessRequest = "GetApplicationProcess" GetApplicationProcessesRequest = "GetApplicationProcesses" GetApplicationRevisionsRequest = "GetApplicationRevisions" - GetApplicationRevisionsDeployedRequest = "GetApplicationRevisionsDeployed" GetApplicationRoutesRequest = "GetApplicationRoutes" GetApplicationTasksRequest = "GetApplicationTasks" GetApplicationsRequest = "GetApplications" @@ -78,20 +74,12 @@ const ( GetProcessStatsRequest = "GetProcessStats" GetProcessSidecarsRequest = "GetProcessSidecars" GetRolesRequest = "GetRoles" - GetRouteBindingsRequest = "GetRouteBindings" GetRouteDestinationsRequest = "GetRouteDestinations" GetRoutesRequest = "GetRoutes" GetSecurityGroupsRequest = "GetSecurityGroups" GetServiceBrokersRequest = "GetServiceBrokers" - GetServiceCredentialBindingsRequest = "GetServiceCredentialBindings" - GetServiceCredentialBindingDetailsRequest = "GetServiceCredentialBindingDetails" - GetServiceInstanceParametersRequest = "GetServiceInstanceParameters" GetServiceInstancesRequest = "GetServiceInstances" - GetServiceInstanceRelationshipsSharedSpacesRequest = "GetServiceInstanceRelationshipSharedSpacesRequest" - GetServiceInstanceSharedSpacesUsageSummaryRequest = "GetServiceInstanceSharedSpacesUsageSummaryRequest" - GetServiceOfferingRequest = "GetServiceOffering" GetServiceOfferingsRequest = "GetServiceOfferings" - GetServicePlanRequest = "GetServicePlan" GetServicePlansRequest = "GetServicePlans" GetServicePlanVisibilityRequest = "GetServicePlanVisibility" GetSpaceFeatureRequest = "GetSpaceFeatureRequest" @@ -112,7 +100,6 @@ const ( PatchApplicationFeaturesRequest = "PatchApplicationFeatures" PatchEnvironmentVariableGroupRequest = "PatchEnvironmentVariableGroup" PatchBuildpackRequest = "PatchBuildpack" - PatchDestinationRequest = "PatchDestination" PatchDomainRequest = "PatchDomain" PatchFeatureFlagRequest = "PatchFeatureFlag" PatchOrganizationRelationshipDefaultIsolationSegmentRequest = "PatchOrganizationRelationshipDefaultIsolationSegment" @@ -122,7 +109,6 @@ const ( PatchRouteRequest = "PatchRoute" PatchSecurityGroupRequest = "PatchSecurityGroup" PatchServiceBrokerRequest = "PatchServiceBrokerRequest" - PatchServiceInstanceRequest = "PatchServiceInstance" PatchServiceOfferingRequest = "PatchServiceOfferingRequest" PatchServicePlanRequest = "PatchServicePlanRequest" PatchSpaceRelationshipIsolationSegmentRequest = "PatchSpaceRelationshipIsolationSegment" @@ -155,17 +141,13 @@ const ( PostResourceMatchesRequest = "PostResourceMatches" PostRoleRequest = "PostRole" PostRouteRequest = "PostRoute" - PostRouteBindingRequest = "PostRouteBinding" PostSecurityGroupRequest = "PostSecurityGroup" PostSecurityGroupStagingSpaceRequest = "PostSecurityGroupStagingSpace" PostSecurityGroupRunningSpaceRequest = "PostSecurityGroupRunningSpace" - PostServiceCredentialBindingRequest = "PostServiceCredentialBinding" PostServiceBrokerRequest = "PostServiceBroker" - PostServiceInstanceRequest = "PostServiceInstance" PostServiceInstanceRelationshipsSharedSpacesRequest = "PostServiceInstanceRelationshipsSharedSpaces" PostServicePlanVisibilityRequest = "PostServicePlanVisibility" PostSpaceActionApplyManifestRequest = "PostSpaceActionApplyManifest" - PostSpaceDiffManifestRequest = "PostSpaceDiffManifest" PostSpaceRequest = "PostSpace" PostSpaceQuotaRequest = "PostSpaceQuota" PostSpaceQuotaRelationshipsRequest = "PostSpaceQuotaRelationships" @@ -173,174 +155,154 @@ const ( PutTaskCancelRequest = "PutTaskCancel" SharePrivateDomainRequest = "SharePrivateDomainRequest" UnmapRouteRequest = "UnmapRoute" - WhoAmI = "WhoAmI" ) // APIRoutes is a list of routes used by the router to construct request URLs. -var APIRoutes = map[string]Route{ - GetApplicationsRequest: {Path: "/v3/apps", Method: http.MethodGet}, - PostApplicationRequest: {Path: "/v3/apps", Method: http.MethodPost}, - DeleteApplicationRequest: {Path: "/v3/apps/:app_guid", Method: http.MethodDelete}, - PatchApplicationRequest: {Path: "/v3/apps/:app_guid", Method: http.MethodPatch}, - PatchApplicationFeaturesRequest: {Path: "/v3/apps/:app_guid/features/:name", Method: http.MethodPatch}, - GetApplicationFeaturesRequest: {Path: "/v3/apps/:app_guid/features/:name", Method: http.MethodGet}, - PostApplicationActionApplyManifest: {Path: "/v3/apps/:app_guid/actions/apply_manifest", Method: http.MethodPost}, - PostApplicationActionRestartRequest: {Path: "/v3/apps/:app_guid/actions/restart", Method: http.MethodPost}, - PostApplicationActionStartRequest: {Path: "/v3/apps/:app_guid/actions/start", Method: http.MethodPost}, - PostApplicationActionStopRequest: {Path: "/v3/apps/:app_guid/actions/stop", Method: http.MethodPost}, - GetApplicationDropletCurrentRequest: {Path: "/v3/apps/:app_guid/droplets/current", Method: http.MethodGet}, - GetApplicationEnvRequest: {Path: "/v3/apps/:app_guid/env", Method: http.MethodGet}, - PatchApplicationEnvironmentVariablesRequest: {Path: "/v3/apps/:app_guid/environment_variables", Method: http.MethodPatch}, - GetApplicationManifestRequest: {Path: "/v3/apps/:app_guid/manifest", Method: http.MethodGet}, - GetApplicationProcessesRequest: {Path: "/v3/apps/:app_guid/processes", Method: http.MethodGet}, - GetApplicationProcessRequest: {Path: "/v3/apps/:app_guid/processes/:type", Method: http.MethodGet}, - PostApplicationProcessActionScaleRequest: {Path: "/v3/apps/:app_guid/processes/:type/actions/scale", Method: http.MethodPost}, - DeleteApplicationProcessInstanceRequest: {Path: "/v3/apps/:app_guid/processes/:type/instances/:index", Method: http.MethodDelete}, - PatchApplicationCurrentDropletRequest: {Path: "/v3/apps/:app_guid/relationships/current_droplet", Method: http.MethodPatch}, - GetApplicationRevisionsRequest: {Path: "/v3/apps/:app_guid/revisions", Method: http.MethodGet}, - GetApplicationRevisionsDeployedRequest: {Path: "/v3/apps/:app_guid/revisions/deployed", Method: http.MethodGet}, - GetApplicationRoutesRequest: {Path: "/v3/apps/:app_guid/routes", Method: http.MethodGet}, - GetSSHEnabled: {Path: "/v3/apps/:app_guid/ssh_enabled", Method: http.MethodGet}, - GetApplicationTasksRequest: {Path: "/v3/apps/:app_guid/tasks", Method: http.MethodGet}, - PostApplicationTasksRequest: {Path: "/v3/apps/:app_guid/tasks", Method: http.MethodPost}, - GetBuildpacksRequest: {Path: "/v3/buildpacks", Method: http.MethodGet}, - PostBuildpackRequest: {Path: "/v3/buildpacks/", Method: http.MethodPost}, - DeleteBuildpackRequest: {Path: "/v3/buildpacks/:buildpack_guid", Method: http.MethodDelete}, - PatchBuildpackRequest: {Path: "/v3/buildpacks/:buildpack_guid", Method: http.MethodPatch}, - PostBuildpackBitsRequest: {Path: "/v3/buildpacks/:buildpack_guid/upload", Method: http.MethodPost}, - PostBuildRequest: {Path: "/v3/builds", Method: http.MethodPost}, - GetBuildRequest: {Path: "/v3/builds/:build_guid", Method: http.MethodGet}, - GetDeploymentsRequest: {Path: "/v3/deployments", Method: http.MethodGet}, - PostApplicationDeploymentRequest: {Path: "/v3/deployments", Method: http.MethodPost}, - GetDeploymentRequest: {Path: "/v3/deployments/:deployment_guid", Method: http.MethodGet}, - PostApplicationDeploymentActionCancelRequest: {Path: "/v3/deployments/:deployment_guid/actions/cancel", Method: http.MethodPost}, - GetDomainsRequest: {Path: "/v3/domains", Method: http.MethodGet}, - PostDomainRequest: {Path: "/v3/domains", Method: http.MethodPost}, - DeleteDomainRequest: {Path: "/v3/domains/:domain_guid", Method: http.MethodDelete}, - GetDomainRequest: {Path: "/v3/domains/:domain_guid", Method: http.MethodGet}, - PatchDomainRequest: {Path: "/v3/domains/:domain_guid", Method: http.MethodPatch}, - SharePrivateDomainRequest: {Path: "/v3/domains/:domain_guid/relationships/shared_organizations", Method: http.MethodPost}, - DeleteSharedOrgFromDomainRequest: {Path: "/v3/domains/:domain_guid/relationships/shared_organizations/:org_guid", Method: http.MethodDelete}, - GetDomainRouteReservationsRequest: {Path: "/v3/domains/:domain_guid/route_reservations", Method: http.MethodGet}, - GetDropletsRequest: {Path: "/v3/droplets", Method: http.MethodGet}, - PostDropletRequest: {Path: "/v3/droplets", Method: http.MethodPost}, - GetDropletRequest: {Path: "/v3/droplets/:droplet_guid", Method: http.MethodGet}, - PostDropletBitsRequest: {Path: "/v3/droplets/:droplet_guid/upload", Method: http.MethodPost}, - GetDropletBitsRequest: {Path: "/v3/droplets/:droplet_guid/download", Method: http.MethodGet}, - GetEnvironmentVariableGroupRequest: {Path: "/v3/environment_variable_groups/:group_name", Method: http.MethodGet}, - PatchEnvironmentVariableGroupRequest: {Path: "/v3/environment_variable_groups/:group_name", Method: http.MethodPatch}, - GetEventsRequest: {Path: "/v3/audit_events", Method: http.MethodGet}, - GetFeatureFlagsRequest: {Path: "/v3/feature_flags", Method: http.MethodGet}, - GetFeatureFlagRequest: {Path: "/v3/feature_flags/:name", Method: http.MethodGet}, - PatchFeatureFlagRequest: {Path: "/v3/feature_flags/:name", Method: http.MethodPatch}, - GetIsolationSegmentsRequest: {Path: "/v3/isolation_segments", Method: http.MethodGet}, - PostIsolationSegmentsRequest: {Path: "/v3/isolation_segments", Method: http.MethodPost}, - DeleteIsolationSegmentRequest: {Path: "/v3/isolation_segments/:isolation_segment_guid", Method: http.MethodDelete}, - GetIsolationSegmentRequest: {Path: "/v3/isolation_segments/:isolation_segment_guid", Method: http.MethodGet}, - GetIsolationSegmentOrganizationsRequest: {Path: "/v3/isolation_segments/:isolation_segment_guid/organizations", Method: http.MethodGet}, - PostIsolationSegmentRelationshipOrganizationsRequest: {Path: "/v3/isolation_segments/:isolation_segment_guid/relationships/organizations", Method: http.MethodPost}, - DeleteIsolationSegmentRelationshipOrganizationRequest: {Path: "/v3/isolation_segments/:isolation_segment_guid/relationships/organizations/:organization_guid", Method: http.MethodDelete}, - GetOrganizationsRequest: {Path: "/v3/organizations", Method: http.MethodGet}, - PostOrganizationRequest: {Path: "/v3/organizations", Method: http.MethodPost}, - GetOrganizationRequest: {Path: "/v3/organizations/:organization_guid", Method: http.MethodGet}, - DeleteOrganizationRequest: {Path: "/v3/organizations/:organization_guid/", Method: http.MethodDelete}, - PatchOrganizationRequest: {Path: "/v3/organizations/:organization_guid/", Method: http.MethodPatch}, - GetOrganizationDomainsRequest: {Path: "/v3/organizations/:organization_guid/domains", Method: http.MethodGet}, - GetDefaultDomainRequest: {Path: "/v3/organizations/:organization_guid/domains/default", Method: http.MethodGet}, - GetOrganizationRelationshipDefaultIsolationSegmentRequest: {Path: "/v3/organizations/:organization_guid/relationships/default_isolation_segment", Method: http.MethodGet}, - PatchOrganizationRelationshipDefaultIsolationSegmentRequest: {Path: "/v3/organizations/:organization_guid/relationships/default_isolation_segment", Method: http.MethodPatch}, - PatchOrganizationQuotaRequest: {Path: "/v3/organization_quotas/:quota_guid", Method: http.MethodPatch}, - PostOrganizationQuotaRequest: {Path: "/v3/organization_quotas", Method: http.MethodPost}, - PostOrganizationQuotaApplyRequest: {Path: "/v3/organization_quotas/:quota_guid/relationships/organizations", Method: http.MethodPost}, - GetOrganizationQuotaRequest: {Path: "/v3/organization_quotas/:quota_guid", Method: http.MethodGet}, - GetOrganizationQuotasRequest: {Path: "/v3/organization_quotas", Method: http.MethodGet}, - DeleteOrganizationQuotaRequest: {Path: "/v3/organization_quotas/:quota_guid", Method: http.MethodDelete}, - GetPackagesRequest: {Path: "/v3/packages", Method: http.MethodGet}, - PostPackageRequest: {Path: "/v3/packages", Method: http.MethodPost}, - GetPackageRequest: {Path: "/v3/packages/:package_guid", Method: http.MethodGet}, - PostPackageBitsRequest: {Path: "/v3/packages/:package_guid/upload", Method: http.MethodPost}, - GetPackageDropletsRequest: {Path: "/v3/packages/:package_guid/droplets", Method: http.MethodGet}, - GetProcessRequest: {Path: "/v3/processes/:process_guid", Method: http.MethodGet}, - GetProcessesRequest: {Path: "/v3/processes", Method: http.MethodGet}, - PatchProcessRequest: {Path: "/v3/processes/:process_guid", Method: http.MethodPatch}, - GetProcessStatsRequest: {Path: "/v3/processes/:process_guid/stats", Method: http.MethodGet}, - GetProcessSidecarsRequest: {Path: "/v3/processes/:process_guid/sidecars", Method: http.MethodGet}, - PostResourceMatchesRequest: {Path: "/v3/resource_matches", Method: http.MethodPost}, - GetRolesRequest: {Path: "/v3/roles", Method: http.MethodGet}, - PostRoleRequest: {Path: "/v3/roles", Method: http.MethodPost}, - DeleteRoleRequest: {Path: "/v3/roles/:role_guid", Method: http.MethodDelete}, - GetRoutesRequest: {Path: "/v3/routes", Method: http.MethodGet}, - PostRouteRequest: {Path: "/v3/routes", Method: http.MethodPost}, - DeleteRouteRequest: {Path: "/v3/routes/:route_guid", Method: http.MethodDelete}, - PatchRouteRequest: {Path: "/v3/routes/:route_guid", Method: http.MethodPatch}, - GetRouteDestinationsRequest: {Path: "/v3/routes/:route_guid/destinations", Method: http.MethodGet}, - MapRouteRequest: {Path: "/v3/routes/:route_guid/destinations", Method: http.MethodPost}, - UnmapRouteRequest: {Path: "/v3/routes/:route_guid/destinations/:destination_guid", Method: http.MethodDelete}, - PatchDestinationRequest: {Path: "/v3/routes/:route_guid/destinations/:destination_guid", Method: http.MethodPatch}, - GetSecurityGroupsRequest: {Path: "/v3/security_groups", Method: http.MethodGet}, - PostSecurityGroupRequest: {Path: "/v3/security_groups", Method: http.MethodPost}, - DeleteSecurityGroupRequest: {Path: "/v3/security_groups/:security_group_guid", Method: http.MethodDelete}, - PostSecurityGroupStagingSpaceRequest: {Path: "/v3/security_groups/:security_group_guid/relationships/staging_spaces", Method: http.MethodPost}, - PostSecurityGroupRunningSpaceRequest: {Path: "/v3/security_groups/:security_group_guid/relationships/running_spaces", Method: http.MethodPost}, - DeleteSecurityGroupStagingSpaceRequest: {Path: "/v3/security_groups/:security_group_guid/relationships/staging_spaces/:space_guid", Method: http.MethodDelete}, - DeleteSecurityGroupRunningSpaceRequest: {Path: "/v3/security_groups/:security_group_guid/relationships/running_spaces/:space_guid", Method: http.MethodDelete}, - PatchSecurityGroupRequest: {Path: "/v3/security_groups/:security_group_guid", Method: http.MethodPatch}, - GetServiceBrokersRequest: {Path: "/v3/service_brokers", Method: http.MethodGet}, - PostServiceBrokerRequest: {Path: "/v3/service_brokers", Method: http.MethodPost}, - DeleteServiceBrokerRequest: {Path: "/v3/service_brokers/:service_broker_guid", Method: http.MethodDelete}, - PatchServiceBrokerRequest: {Path: "/v3/service_brokers/:service_broker_guid", Method: http.MethodPatch}, - PostServiceCredentialBindingRequest: {Path: "/v3/service_credential_bindings", Method: http.MethodPost}, - GetServiceCredentialBindingsRequest: {Path: "/v3/service_credential_bindings", Method: http.MethodGet}, - DeleteServiceCredentialBindingRequest: {Path: "/v3/service_credential_bindings/:service_credential_binding_guid", Method: http.MethodDelete}, - GetServiceCredentialBindingDetailsRequest: {Path: "/v3/service_credential_bindings/:service_credential_binding_guid/details", Method: http.MethodGet}, - GetServiceInstancesRequest: {Path: "/v3/service_instances", Method: http.MethodGet}, - PostServiceInstanceRequest: {Path: "/v3/service_instances", Method: http.MethodPost}, - GetServiceInstanceParametersRequest: {Path: "/v3/service_instances/:service_instance_guid/parameters", Method: http.MethodGet}, - PatchServiceInstanceRequest: {Path: "/v3/service_instances/:service_instance_guid", Method: http.MethodPatch}, - DeleteServiceInstanceRequest: {Path: "/v3/service_instances/:service_instance_guid", Method: http.MethodDelete}, - GetServiceInstanceSharedSpacesUsageSummaryRequest: {Path: "/v3/service_instances/:service_instance_guid/relationships/shared_spaces/usage_summary", Method: http.MethodGet}, - GetServiceInstanceRelationshipsSharedSpacesRequest: {Path: "/v3/service_instances/:service_instance_guid/relationships/shared_spaces", Method: http.MethodGet}, - PostServiceInstanceRelationshipsSharedSpacesRequest: {Path: "/v3/service_instances/:service_instance_guid/relationships/shared_spaces", Method: http.MethodPost}, - DeleteServiceInstanceRelationshipsSharedSpaceRequest: {Path: "/v3/service_instances/:service_instance_guid/relationships/shared_spaces/:space_guid", Method: http.MethodDelete}, - GetServiceOfferingRequest: {Path: "/v3/service_offerings/:service_offering_guid", Method: http.MethodGet}, - GetServiceOfferingsRequest: {Path: "/v3/service_offerings", Method: http.MethodGet}, - PatchServiceOfferingRequest: {Path: "/v3/service_offerings/:service_offering_guid", Method: http.MethodPatch}, - DeleteServiceOfferingRequest: {Path: "/v3/service_offerings/:service_offering_guid", Method: http.MethodDelete}, - GetServicePlanRequest: {Path: "/v3/service_plans/:service_plan_guid", Method: http.MethodGet}, - GetServicePlansRequest: {Path: "/v3/service_plans", Method: http.MethodGet}, - PatchServicePlanRequest: {Path: "/v3/service_plans/:service_plan_guid", Method: http.MethodPatch}, - GetServicePlanVisibilityRequest: {Path: "/v3/service_plans/:service_plan_guid/visibility", Method: http.MethodGet}, - PostServicePlanVisibilityRequest: {Path: "/v3/service_plans/:service_plan_guid/visibility", Method: http.MethodPost}, - DeleteServicePlanVisibilityRequest: {Path: "/v3/service_plans/:service_plan_guid/visibility/:organization_guid", Method: http.MethodDelete}, - PostRouteBindingRequest: {Path: "/v3/service_route_bindings", Method: http.MethodPost}, - GetRouteBindingsRequest: {Path: "/v3/service_route_bindings", Method: http.MethodGet}, - DeleteRouteBindingRequest: {Path: "/v3/service_route_bindings/:route_binding_guid", Method: http.MethodDelete}, - GetSpacesRequest: {Path: "/v3/spaces", Method: http.MethodGet}, - PostSpaceRequest: {Path: "/v3/spaces", Method: http.MethodPost}, - DeleteSpaceRequest: {Path: "/v3/spaces/:space_guid", Method: http.MethodDelete}, - PatchSpaceRequest: {Path: "/v3/spaces/:space_guid", Method: http.MethodPatch}, - PostSpaceActionApplyManifestRequest: {Path: "/v3/spaces/:space_guid/actions/apply_manifest", Method: http.MethodPost}, - PostSpaceDiffManifestRequest: {Path: "/v3/spaces/:space_guid/manifest_diff", Method: http.MethodPost}, - GetSpaceRelationshipIsolationSegmentRequest: {Path: "/v3/spaces/:space_guid/relationships/isolation_segment", Method: http.MethodGet}, - PatchSpaceRelationshipIsolationSegmentRequest: {Path: "/v3/spaces/:space_guid/relationships/isolation_segment", Method: http.MethodPatch}, - DeleteOrphanedRoutesRequest: {Path: "/v3/spaces/:space_guid/routes", Method: http.MethodDelete}, - GetSpaceRunningSecurityGroupsRequest: {Path: "/v3/spaces/:space_guid/running_security_groups", Method: http.MethodGet}, - GetSpaceStagingSecurityGroupsRequest: {Path: "/v3/spaces/:space_guid/staging_security_groups", Method: http.MethodGet}, - PatchSpaceFeaturesRequest: {Path: "/v3/spaces/:space_guid/features/:feature", Method: http.MethodPatch}, - GetSpaceFeatureRequest: {Path: "/v3/spaces/:space_guid/features/:feature", Method: http.MethodGet}, - PostSpaceQuotaRequest: {Path: "/v3/space_quotas", Method: http.MethodPost}, - GetSpaceQuotaRequest: {Path: "/v3/space_quotas/:quota_guid", Method: http.MethodGet}, - DeleteSpaceQuotaRequest: {Path: "/v3/space_quotas/:quota_guid", Method: http.MethodDelete}, - PostSpaceQuotaRelationshipsRequest: {Path: "/v3/space_quotas/:quota_guid/relationships/spaces", Method: http.MethodPost}, - GetSpaceQuotasRequest: {Path: "/v3/space_quotas", Method: http.MethodGet}, - PatchSpaceQuotaRequest: {Path: "/v3/space_quotas/:quota_guid", Method: http.MethodPatch}, - DeleteSpaceQuotaFromSpaceRequest: {Path: "/v3/space_quotas/:quota_guid/relationships/spaces/:space_guid", Method: http.MethodDelete}, - GetStacksRequest: {Path: "/v3/stacks", Method: http.MethodGet}, - PatchStackRequest: {Path: "/v3/stacks/:stack_guid", Method: http.MethodPatch}, - PutTaskCancelRequest: {Path: "/v3/tasks/:task_guid/cancel", Method: http.MethodPut}, - GetUsersRequest: {Path: "/v3/users", Method: http.MethodGet}, - GetUserRequest: {Path: "/v3/users/:user_guid", Method: http.MethodGet}, - PostUserRequest: {Path: "/v3/users", Method: http.MethodPost}, - DeleteUserRequest: {Path: "/v3/users/:user_guid", Method: http.MethodDelete}, - WhoAmI: {Path: "/whoami", Method: http.MethodGet}, +var APIRoutes = []Route{ + {Resource: AppsResource, Path: "/", Method: http.MethodGet, Name: GetApplicationsRequest}, + {Resource: AppsResource, Path: "/", Method: http.MethodPost, Name: PostApplicationRequest}, + {Resource: AppsResource, Path: "/:app_guid", Method: http.MethodDelete, Name: DeleteApplicationRequest}, + {Resource: AppsResource, Path: "/:app_guid", Method: http.MethodPatch, Name: PatchApplicationRequest}, + {Resource: AppsResource, Path: "/:app_guid/features/:name", Method: http.MethodPatch, Name: PatchApplicationFeaturesRequest}, + {Resource: AppsResource, Path: "/:app_guid/features/:name", Method: http.MethodGet, Name: GetApplicationFeaturesRequest}, + {Resource: AppsResource, Path: "/:app_guid/actions/apply_manifest", Method: http.MethodPost, Name: PostApplicationActionApplyManifest}, + {Resource: AppsResource, Path: "/:app_guid/actions/restart", Method: http.MethodPost, Name: PostApplicationActionRestartRequest}, + {Resource: AppsResource, Path: "/:app_guid/actions/start", Method: http.MethodPost, Name: PostApplicationActionStartRequest}, + {Resource: AppsResource, Path: "/:app_guid/actions/stop", Method: http.MethodPost, Name: PostApplicationActionStopRequest}, + {Resource: AppsResource, Path: "/:app_guid/droplets/current", Method: http.MethodGet, Name: GetApplicationDropletCurrentRequest}, + {Resource: AppsResource, Path: "/:app_guid/env", Method: http.MethodGet, Name: GetApplicationEnvRequest}, + {Resource: AppsResource, Path: "/:app_guid/environment_variables", Method: http.MethodPatch, Name: PatchApplicationEnvironmentVariablesRequest}, + {Resource: AppsResource, Path: "/:app_guid/manifest", Method: http.MethodGet, Name: GetApplicationManifestRequest}, + {Resource: AppsResource, Path: "/:app_guid/processes", Method: http.MethodGet, Name: GetApplicationProcessesRequest}, + {Resource: AppsResource, Path: "/:app_guid/processes/:type", Method: http.MethodGet, Name: GetApplicationProcessRequest}, + {Resource: AppsResource, Path: "/:app_guid/processes/:type/actions/scale", Method: http.MethodPost, Name: PostApplicationProcessActionScaleRequest}, + {Resource: AppsResource, Path: "/:app_guid/processes/:type/instances/:index", Method: http.MethodDelete, Name: DeleteApplicationProcessInstanceRequest}, + {Resource: AppsResource, Path: "/:app_guid/relationships/current_droplet", Method: http.MethodPatch, Name: PatchApplicationCurrentDropletRequest}, + {Resource: AppsResource, Path: "/:app_guid/revisions", Method: http.MethodGet, Name: GetApplicationRevisionsRequest}, + {Resource: AppsResource, Path: "/:app_guid/routes", Method: http.MethodGet, Name: GetApplicationRoutesRequest}, + {Resource: AppsResource, Path: "/:app_guid/ssh_enabled", Method: http.MethodGet, Name: GetSSHEnabled}, + {Resource: AppsResource, Path: "/:app_guid/tasks", Method: http.MethodGet, Name: GetApplicationTasksRequest}, + {Resource: AppsResource, Path: "/:app_guid/tasks", Method: http.MethodPost, Name: PostApplicationTasksRequest}, + {Resource: BuildpacksResource, Path: "/", Method: http.MethodGet, Name: GetBuildpacksRequest}, + {Resource: BuildpacksResource, Path: "/", Method: http.MethodPost, Name: PostBuildpackRequest}, + {Resource: BuildpacksResource, Path: "/:buildpack_guid", Method: http.MethodDelete, Name: DeleteBuildpackRequest}, + {Resource: BuildpacksResource, Path: "/:buildpack_guid", Method: http.MethodPatch, Name: PatchBuildpackRequest}, + {Resource: BuildpacksResource, Path: "/:buildpack_guid/upload", Method: http.MethodPost, Name: PostBuildpackBitsRequest}, + {Resource: BuildsResource, Path: "/", Method: http.MethodPost, Name: PostBuildRequest}, + {Resource: BuildsResource, Path: "/:build_guid", Method: http.MethodGet, Name: GetBuildRequest}, + {Resource: DeploymentsResource, Path: "/", Method: http.MethodGet, Name: GetDeploymentsRequest}, + {Resource: DeploymentsResource, Path: "/", Method: http.MethodPost, Name: PostApplicationDeploymentRequest}, + {Resource: DeploymentsResource, Path: "/:deployment_guid", Method: http.MethodGet, Name: GetDeploymentRequest}, + {Resource: DeploymentsResource, Path: "/:deployment_guid/actions/cancel", Method: http.MethodPost, Name: PostApplicationDeploymentActionCancelRequest}, + {Resource: DomainsResource, Path: "/", Method: http.MethodGet, Name: GetDomainsRequest}, + {Resource: DomainsResource, Path: "/", Method: http.MethodPost, Name: PostDomainRequest}, + {Resource: DomainsResource, Path: "/:domain_guid", Method: http.MethodDelete, Name: DeleteDomainRequest}, + {Resource: DomainsResource, Path: "/:domain_guid", Method: http.MethodGet, Name: GetDomainRequest}, + {Resource: DomainsResource, Path: "/:domain_guid", Method: http.MethodPatch, Name: PatchDomainRequest}, + {Resource: DomainsResource, Path: "/:domain_guid/relationships/shared_organizations", Method: http.MethodPost, Name: SharePrivateDomainRequest}, + {Resource: DomainsResource, Path: "/:domain_guid/relationships/shared_organizations/:org_guid", Method: http.MethodDelete, Name: DeleteSharedOrgFromDomainRequest}, + {Resource: DomainsResource, Path: "/:domain_guid/route_reservations", Method: http.MethodGet, Name: GetDomainRouteReservationsRequest}, + {Resource: DropletsResource, Path: "/", Method: http.MethodGet, Name: GetDropletsRequest}, + {Resource: DropletsResource, Path: "/", Method: http.MethodPost, Name: PostDropletRequest}, + {Resource: DropletsResource, Path: "/:droplet_guid", Method: http.MethodGet, Name: GetDropletRequest}, + {Resource: DropletsResource, Path: "/:droplet_guid/upload", Method: http.MethodPost, Name: PostDropletBitsRequest}, + {Resource: DropletsResource, Path: "/:droplet_guid/download", Method: http.MethodGet, Name: GetDropletBitsRequest}, + {Resource: EnvironmentVariableGroupsResource, Path: "/:group_name", Method: http.MethodGet, Name: GetEnvironmentVariableGroupRequest}, + {Resource: EnvironmentVariableGroupsResource, Path: "/:group_name", Method: http.MethodPatch, Name: PatchEnvironmentVariableGroupRequest}, + {Resource: EventsResource, Path: "/", Method: http.MethodGet, Name: GetEventsRequest}, + {Resource: FeatureFlagsResource, Path: "/", Method: http.MethodGet, Name: GetFeatureFlagsRequest}, + {Resource: FeatureFlagsResource, Path: "/:name", Method: http.MethodGet, Name: GetFeatureFlagRequest}, + {Resource: FeatureFlagsResource, Path: "/:name", Method: http.MethodPatch, Name: PatchFeatureFlagRequest}, + {Resource: IsolationSegmentsResource, Path: "/", Method: http.MethodGet, Name: GetIsolationSegmentsRequest}, + {Resource: IsolationSegmentsResource, Path: "/", Method: http.MethodPost, Name: PostIsolationSegmentsRequest}, + {Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid", Method: http.MethodDelete, Name: DeleteIsolationSegmentRequest}, + {Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid", Method: http.MethodGet, Name: GetIsolationSegmentRequest}, + {Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid/organizations", Method: http.MethodGet, Name: GetIsolationSegmentOrganizationsRequest}, + {Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid/relationships/organizations", Method: http.MethodPost, Name: PostIsolationSegmentRelationshipOrganizationsRequest}, + {Resource: IsolationSegmentsResource, Path: "/:isolation_segment_guid/relationships/organizations/:organization_guid", Method: http.MethodDelete, Name: DeleteIsolationSegmentRelationshipOrganizationRequest}, + {Resource: OrgsResource, Path: "/", Method: http.MethodGet, Name: GetOrganizationsRequest}, + {Resource: OrgsResource, Path: "/", Method: http.MethodPost, Name: PostOrganizationRequest}, + {Resource: OrgsResource, Path: "/:organization_guid", Method: http.MethodGet, Name: GetOrganizationRequest}, + {Resource: OrgsResource, Path: "/:organization_guid/", Method: http.MethodDelete, Name: DeleteOrganizationRequest}, + {Resource: OrgsResource, Path: "/:organization_guid/", Method: http.MethodPatch, Name: PatchOrganizationRequest}, + {Resource: OrgsResource, Path: "/:organization_guid/domains", Method: http.MethodGet, Name: GetOrganizationDomainsRequest}, + {Resource: OrgsResource, Path: "/:organization_guid/domains/default", Method: http.MethodGet, Name: GetDefaultDomainRequest}, + {Resource: OrgsResource, Path: "/:organization_guid/relationships/default_isolation_segment", Method: http.MethodGet, Name: GetOrganizationRelationshipDefaultIsolationSegmentRequest}, + {Resource: OrgsResource, Path: "/:organization_guid/relationships/default_isolation_segment", Method: http.MethodPatch, Name: PatchOrganizationRelationshipDefaultIsolationSegmentRequest}, + {Resource: OrgQuotasResource, Path: "/:quota_guid", Method: http.MethodPatch, Name: PatchOrganizationQuotaRequest}, + {Resource: OrgQuotasResource, Path: "/", Method: http.MethodPost, Name: PostOrganizationQuotaRequest}, + {Resource: OrgQuotasResource, Path: "/:quota_guid/relationships/organizations", Method: http.MethodPost, Name: PostOrganizationQuotaApplyRequest}, + {Resource: OrgQuotasResource, Path: "/:quota_guid", Method: http.MethodGet, Name: GetOrganizationQuotaRequest}, + {Resource: OrgQuotasResource, Path: "/", Method: http.MethodGet, Name: GetOrganizationQuotasRequest}, + {Resource: OrgQuotasResource, Path: "/:quota_guid", Method: http.MethodDelete, Name: DeleteOrganizationQuotaRequest}, + {Resource: PackagesResource, Path: "/", Method: http.MethodGet, Name: GetPackagesRequest}, + {Resource: PackagesResource, Path: "/", Method: http.MethodPost, Name: PostPackageRequest}, + {Resource: PackagesResource, Path: "/:package_guid", Method: http.MethodGet, Name: GetPackageRequest}, + {Resource: PackagesResource, Path: "/:package_guid/upload", Method: http.MethodPost, Name: PostPackageBitsRequest}, + {Resource: PackagesResource, Path: "/:package_guid/droplets", Method: http.MethodGet, Name: GetPackageDropletsRequest}, + {Resource: ProcessesResource, Path: "/:process_guid", Method: http.MethodGet, Name: GetProcessRequest}, + {Resource: ProcessesResource, Path: "/", Method: http.MethodGet, Name: GetProcessesRequest}, + {Resource: ProcessesResource, Path: "/:process_guid", Method: http.MethodPatch, Name: PatchProcessRequest}, + {Resource: ProcessesResource, Path: "/:process_guid/stats", Method: http.MethodGet, Name: GetProcessStatsRequest}, + {Resource: ProcessesResource, Path: "/:process_guid/sidecars", Method: http.MethodGet, Name: GetProcessSidecarsRequest}, + {Resource: ResourceMatches, Path: "/", Method: http.MethodPost, Name: PostResourceMatchesRequest}, + {Resource: RolesResource, Path: "/", Method: http.MethodGet, Name: GetRolesRequest}, + {Resource: RolesResource, Path: "/", Method: http.MethodPost, Name: PostRoleRequest}, + {Resource: RoutesResource, Path: "/", Method: http.MethodGet, Name: GetRoutesRequest}, + {Resource: RoutesResource, Path: "/", Method: http.MethodPost, Name: PostRouteRequest}, + {Resource: RoutesResource, Path: "/:route_guid", Method: http.MethodDelete, Name: DeleteRouteRequest}, + {Resource: RoutesResource, Path: "/:route_guid", Method: http.MethodPatch, Name: PatchRouteRequest}, + {Resource: RoutesResource, Path: "/:route_guid/destinations", Method: http.MethodGet, Name: GetRouteDestinationsRequest}, + {Resource: RoutesResource, Path: "/:route_guid/destinations", Method: http.MethodPost, Name: MapRouteRequest}, + {Resource: RoutesResource, Path: "/:route_guid/destinations/:destination_guid", Method: http.MethodDelete, Name: UnmapRouteRequest}, + {Resource: RolesResource, Path: "/:role_guid", Method: http.MethodDelete, Name: DeleteRoleRequest}, + {Resource: SecurityGroupsResource, Path: "/", Method: http.MethodGet, Name: GetSecurityGroupsRequest}, + {Resource: SecurityGroupsResource, Path: "/", Method: http.MethodPost, Name: PostSecurityGroupRequest}, + {Resource: SecurityGroupsResource, Path: "/:security_group_guid", Method: http.MethodDelete, Name: DeleteSecurityGroupRequest}, + {Resource: SecurityGroupsResource, Path: "/:security_group_guid/relationships/staging_spaces", Method: http.MethodPost, Name: PostSecurityGroupStagingSpaceRequest}, + {Resource: SecurityGroupsResource, Path: "/:security_group_guid/relationships/running_spaces", Method: http.MethodPost, Name: PostSecurityGroupRunningSpaceRequest}, + {Resource: SecurityGroupsResource, Path: "/:security_group_guid/relationships/staging_spaces/:space_guid", Method: http.MethodDelete, Name: DeleteSecurityGroupStagingSpaceRequest}, + {Resource: SecurityGroupsResource, Path: "/:security_group_guid/relationships/running_spaces/:space_guid", Method: http.MethodDelete, Name: DeleteSecurityGroupRunningSpaceRequest}, + {Resource: SecurityGroupsResource, Path: "/:security_group_guid", Method: http.MethodPatch, Name: PatchSecurityGroupRequest}, + {Resource: ServiceBrokersResource, Path: "/", Method: http.MethodGet, Name: GetServiceBrokersRequest}, + {Resource: ServiceBrokersResource, Path: "/", Method: http.MethodPost, Name: PostServiceBrokerRequest}, + {Resource: ServiceBrokersResource, Path: "/:service_broker_guid", Method: http.MethodDelete, Name: DeleteServiceBrokerRequest}, + {Resource: ServiceBrokersResource, Path: "/:service_broker_guid", Method: http.MethodPatch, Name: PatchServiceBrokerRequest}, + {Resource: ServiceInstancesResource, Path: "/", Method: http.MethodGet, Name: GetServiceInstancesRequest}, + {Resource: ServiceInstancesResource, Path: "/:service_instance_guid/relationships/shared_spaces", Method: http.MethodPost, Name: PostServiceInstanceRelationshipsSharedSpacesRequest}, + {Resource: ServiceInstancesResource, Path: "/:service_instance_guid/relationships/shared_spaces/:space_guid", Method: http.MethodDelete, Name: DeleteServiceInstanceRelationshipsSharedSpaceRequest}, + {Resource: ServiceOfferingsResource, Path: "/", Method: http.MethodGet, Name: GetServiceOfferingsRequest}, + {Resource: ServiceOfferingsResource, Path: "/:service_offering_guid", Method: http.MethodPatch, Name: PatchServiceOfferingRequest}, + {Resource: ServiceOfferingsResource, Path: "/:service_offering_guid", Method: http.MethodDelete, Name: DeleteServiceOfferingRequest}, + {Resource: ServicePlansResource, Path: "/", Method: http.MethodGet, Name: GetServicePlansRequest}, + {Resource: ServicePlansResource, Path: "/:service_plan_guid", Method: http.MethodPatch, Name: PatchServicePlanRequest}, + {Resource: ServicePlansResource, Path: "/:service_plan_guid/visibility", Method: http.MethodGet, Name: GetServicePlanVisibilityRequest}, + {Resource: ServicePlansResource, Path: "/:service_plan_guid/visibility", Method: http.MethodPost, Name: PostServicePlanVisibilityRequest}, + {Resource: ServicePlansResource, Path: "/:service_plan_guid/visibility/:organization_guid", Method: http.MethodDelete, Name: DeleteServicePlanVisibilityRequest}, + {Resource: SpacesResource, Path: "/", Method: http.MethodGet, Name: GetSpacesRequest}, + {Resource: SpacesResource, Path: "/", Method: http.MethodPost, Name: PostSpaceRequest}, + {Resource: SpacesResource, Path: "/:space_guid", Method: http.MethodDelete, Name: DeleteSpaceRequest}, + {Resource: SpacesResource, Path: "/:space_guid", Method: http.MethodPatch, Name: PatchSpaceRequest}, + {Resource: SpacesResource, Path: "/:space_guid/actions/apply_manifest", Method: http.MethodPost, Name: PostSpaceActionApplyManifestRequest}, + {Resource: SpacesResource, Path: "/:space_guid/relationships/isolation_segment", Method: http.MethodGet, Name: GetSpaceRelationshipIsolationSegmentRequest}, + {Resource: SpacesResource, Path: "/:space_guid/relationships/isolation_segment", Method: http.MethodPatch, Name: PatchSpaceRelationshipIsolationSegmentRequest}, + {Resource: SpacesResource, Path: "/:space_guid/routes", Method: http.MethodDelete, Name: DeleteOrphanedRoutesRequest}, + {Resource: SpacesResource, Path: "/:space_guid/running_security_groups", Method: http.MethodGet, Name: GetSpaceRunningSecurityGroupsRequest}, + {Resource: SpacesResource, Path: "/:space_guid/staging_security_groups", Method: http.MethodGet, Name: GetSpaceStagingSecurityGroupsRequest}, + {Resource: SpacesResource, Path: "/:space_guid/features/:feature", Method: http.MethodPatch, Name: PatchSpaceFeaturesRequest}, + {Resource: SpacesResource, Path: "/:space_guid/features/:feature", Method: http.MethodGet, Name: GetSpaceFeatureRequest}, + {Resource: SpaceQuotasResource, Path: "/", Method: http.MethodPost, Name: PostSpaceQuotaRequest}, + {Resource: SpaceQuotasResource, Path: "/:quota_guid", Method: http.MethodGet, Name: GetSpaceQuotaRequest}, + {Resource: SpaceQuotasResource, Path: "/:quota_guid", Method: http.MethodDelete, Name: DeleteSpaceQuotaRequest}, + {Resource: SpaceQuotasResource, Path: "/:quota_guid/relationships/spaces", Method: http.MethodPost, Name: PostSpaceQuotaRelationshipsRequest}, + {Resource: SpaceQuotasResource, Path: "/", Method: http.MethodGet, Name: GetSpaceQuotasRequest}, + {Resource: SpaceQuotasResource, Path: "/:quota_guid", Method: http.MethodPatch, Name: PatchSpaceQuotaRequest}, + {Resource: SpaceQuotasResource, Path: "/:quota_guid/relationships/spaces/:space_guid", Method: http.MethodDelete, Name: DeleteSpaceQuotaFromSpaceRequest}, + {Resource: StacksResource, Path: "/", Method: http.MethodGet, Name: GetStacksRequest}, + {Resource: StacksResource, Path: "/:stack_guid", Method: http.MethodPatch, Name: PatchStackRequest}, + {Resource: TasksResource, Path: "/:task_guid/cancel", Method: http.MethodPut, Name: PutTaskCancelRequest}, + {Resource: UsersResource, Path: "/", Method: http.MethodGet, Name: GetUsersRequest}, + {Resource: UsersResource, Path: "/:user_guid", Method: http.MethodGet, Name: GetUserRequest}, + {Resource: UsersResource, Path: "/", Method: http.MethodPost, Name: PostUserRequest}, + {Resource: UsersResource, Path: "/:user_guid", Method: http.MethodDelete, Name: DeleteUserRequest}, } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/routing.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/routing.go index 4b818cf..fa9b1fd 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/routing.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal/routing.go @@ -56,10 +56,16 @@ type Params map[string]string // /foo // /foo/bar type Route struct { + // Name is a key specifying which HTTP route the router should associate with + // the endpoint at runtime. + Name string // Method is any valid HTTP method Method string // Path contains a path pattern Path string + // Resource is a key specifying which resource root the router should + // associate with the endpoint at runtime. + Resource string } // CreatePath combines the route's path pattern with a Params map @@ -89,15 +95,19 @@ func (r Route) CreatePath(params Params) (string, error) { // Router combines route and resource information in order to generate HTTP // requests. type Router struct { - routes map[string]Route - baseURL string + routes map[string]Route + resources map[string]string } // NewRouter returns a pointer to a new Router. -func NewRouter(routes map[string]Route, baseURL string) *Router { +func NewRouter(routes []Route, resources map[string]string) *Router { + mappedRoutes := map[string]Route{} + for _, route := range routes { + mappedRoutes[route.Name] = route + } return &Router{ - routes: routes, - baseURL: baseURL, + routes: mappedRoutes, + resources: resources, } } @@ -114,7 +124,12 @@ func (router Router) CreateRequest(name string, params Params, body io.Reader) ( return &http.Request{}, err } - url, err := router.urlFrom(router.baseURL, uri) + resource, ok := router.resources[route.Resource] + if !ok { + return &http.Request{}, fmt.Errorf("no resource exists with the name %s, did you add it to 'api/cloudcontroller/ccv3/internal/api_routes.go'? ", route.Resource) + } + + url, err := router.urlFrom(resource, uri) if err != nil { return &http.Request{}, err } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/isolation_segment.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/isolation_segment.go index 16dbd4e..63527e9 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/isolation_segment.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/isolation_segment.go @@ -2,14 +2,21 @@ package ccv3 import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" ) +// IsolationSegment represents a Cloud Controller Isolation Segment. +type IsolationSegment struct { + //GUID is the unique ID of the isolation segment. + GUID string `json:"guid,omitempty"` + //Name is the name of the isolation segment. + Name string `json:"name"` +} + // CreateIsolationSegment will create an Isolation Segment on the Cloud // Controller. Note: This will not validate that the placement tag exists in // the diego cluster. -func (client *Client) CreateIsolationSegment(isolationSegment resources.IsolationSegment) (resources.IsolationSegment, Warnings, error) { - var responseBody resources.IsolationSegment +func (client *Client) CreateIsolationSegment(isolationSegment IsolationSegment) (IsolationSegment, Warnings, error) { + var responseBody IsolationSegment _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostIsolationSegmentsRequest, @@ -34,8 +41,8 @@ func (client *Client) DeleteIsolationSegment(guid string) (Warnings, error) { // GetIsolationSegment returns back the requested isolation segment that // matches the GUID. -func (client *Client) GetIsolationSegment(guid string) (resources.IsolationSegment, Warnings, error) { - var responseBody resources.IsolationSegment +func (client *Client) GetIsolationSegment(guid string) (IsolationSegment, Warnings, error) { + var responseBody IsolationSegment _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.GetIsolationSegmentRequest, @@ -47,18 +54,18 @@ func (client *Client) GetIsolationSegment(guid string) (resources.IsolationSegme } // GetIsolationSegments lists isolation segments with optional filters. -func (client *Client) GetIsolationSegments(query ...Query) ([]resources.IsolationSegment, Warnings, error) { - var isolationSegments []resources.IsolationSegment +func (client *Client) GetIsolationSegments(query ...Query) ([]IsolationSegment, Warnings, error) { + var resources []IsolationSegment _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetIsolationSegmentsRequest, Query: query, - ResponseBody: resources.IsolationSegment{}, + ResponseBody: IsolationSegment{}, AppendToList: func(item interface{}) error { - isolationSegments = append(isolationSegments, item.(resources.IsolationSegment)) + resources = append(resources, item.(IsolationSegment)) return nil }, }) - return isolationSegments, warnings, err + return resources, warnings, err } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/job.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/job.go index a0704a8..a770b74 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/job.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/job.go @@ -56,11 +56,6 @@ func (job Job) IsComplete() bool { return job.State == constant.JobComplete } -// IsAt returns true when the job has reached the desired state. -func (job Job) IsAt(state constant.JobState) bool { - return job.State == state -} - type jobWarning struct { Detail string `json:"detail"` } @@ -95,14 +90,6 @@ func (client *Client) GetJob(jobURL JobURL) (Job, Warnings, error) { // error is encountered, or config.OverallPollingTimeout is reached. In the // last case, a JobTimeoutError is returned. func (client *Client) PollJob(jobURL JobURL) (Warnings, error) { - return client.PollJobForState(jobURL, constant.JobComplete) -} - -func (client *Client) PollJobForState(jobURL JobURL, state constant.JobState) (Warnings, error) { - if jobURL == "" { - return nil, nil - } - var ( err error warnings Warnings @@ -119,24 +106,14 @@ func (client *Client) PollJobForState(jobURL JobURL, state constant.JobState) (W } if job.HasFailed() { - if len(job.Errors()) > 0 { - firstError := job.Errors()[0] - return allWarnings, firstError - } else { - return allWarnings, ccerror.JobFailedNoErrorError{ - JobGUID: job.GUID, - } - } + firstError := job.Errors()[0] + return allWarnings, firstError } if job.IsComplete() { return allWarnings, nil } - if job.IsAt(state) { - return allWarnings, nil - } - time.Sleep(client.jobPollingInterval) } @@ -145,55 +122,3 @@ func (client *Client) PollJobForState(jobURL JobURL, state constant.JobState) (W Timeout: client.jobPollingTimeout, } } - -type PollJobEvent struct { - State constant.JobState - Err error - Warnings Warnings -} - -func (client *Client) PollJobToEventStream(jobURL JobURL) chan PollJobEvent { - stream := make(chan PollJobEvent) - - if jobURL == "" { - close(stream) - return stream - } - - go func() { - var end bool - - startTime := client.clock.Now() - for !end { - job, warnings, err := client.GetJob(jobURL) - event := PollJobEvent{ - State: job.State, - Err: err, - Warnings: warnings, - } - - switch { - case event.Err != nil: - end = true - case job.IsComplete(): - end = true - case job.HasFailed(): - event.Err = job.Errors()[0] - end = true - case client.clock.Now().Sub(startTime) > client.jobPollingTimeout: - event.Err = ccerror.JobTimeoutError{ - JobGUID: job.GUID, - Timeout: client.jobPollingTimeout, - } - end = true - } - - stream <- event - time.Sleep(client.jobPollingInterval) - } - - close(stream) - }() - - return stream -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/manifest.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/manifest.go index fba84e1..7d5bb8e 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/manifest.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/manifest.go @@ -2,7 +2,6 @@ package ccv3 import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" ) // GetApplicationManifest returns a (YAML) manifest for an application and its @@ -16,17 +15,3 @@ func (client *Client) GetApplicationManifest(appGUID string) ([]byte, Warnings, return bytes, warnings, err } - -func (client *Client) GetSpaceManifestDiff(spaceGUID string, rawManifest []byte) (resources.ManifestDiff, Warnings, error) { - var responseBody resources.ManifestDiff - - _, warnings, err := client.MakeRequestSendRaw( - internal.PostSpaceDiffManifestRequest, - internal.Params{"space_guid": spaceGUID}, - rawManifest, - "application/x-yaml", - &responseBody, - ) - - return responseBody, warnings, err -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/metadata.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/metadata.go index a909e49..0bad649 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/metadata.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/metadata.go @@ -48,12 +48,6 @@ func (client *Client) UpdateResourceMetadata(resource string, resourceGUID strin URIParams: internal.Params{"service_broker_guid": resourceGUID}, RequestBody: resources.ResourceMetadata{Metadata: &metadata}, } - case "service-instance": - params = RequestParams{ - RequestName: internal.PatchServiceInstanceRequest, - URIParams: internal.Params{"service_instance_guid": resourceGUID}, - RequestBody: resources.ResourceMetadata{Metadata: &metadata}, - } case "service-offering": params = RequestParams{ RequestName: internal.PatchServiceOfferingRequest, diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/package.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/package.go index 0dcdfca..f00a8c1 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/package.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/package.go @@ -15,12 +15,109 @@ import ( "code.cloudfoundry.org/cli/resources" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 io.Reader +//go:generate counterfeiter io.Reader + +// Package represents a Cloud Controller V3 Package. +type Package struct { + // CreatedAt is the time with zone when the object was created. + CreatedAt string + + // DockerImage is the registry address of the docker image. + DockerImage string + + // DockerPassword is the password for the docker image's registry. + DockerPassword string + + // DockerUsername is the username for the docker image's registry. + DockerUsername string + + // GUID is the unique identifier of the package. + GUID string + + // Links are links to related resources. + Links APILinks + + // Relationships are a list of relationships to other resources. + Relationships resources.Relationships + + // State is the state of the package. + State constant.PackageState + + // Type is the package type. + Type constant.PackageType +} + +// MarshalJSON converts a Package into a Cloud Controller Package. +func (p Package) MarshalJSON() ([]byte, error) { + type ccPackageData struct { + Image string `json:"image,omitempty"` + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` + } + var ccPackage struct { + GUID string `json:"guid,omitempty"` + CreatedAt string `json:"created_at,omitempty"` + Links APILinks `json:"links,omitempty"` + Relationships resources.Relationships `json:"relationships,omitempty"` + State constant.PackageState `json:"state,omitempty"` + Type constant.PackageType `json:"type,omitempty"` + Data *ccPackageData `json:"data,omitempty"` + } + + ccPackage.GUID = p.GUID + ccPackage.CreatedAt = p.CreatedAt + ccPackage.Links = p.Links + ccPackage.Relationships = p.Relationships + ccPackage.State = p.State + ccPackage.Type = p.Type + if p.DockerImage != "" { + ccPackage.Data = &ccPackageData{ + Image: p.DockerImage, + Username: p.DockerUsername, + Password: p.DockerPassword, + } + } + + return json.Marshal(ccPackage) +} + +// UnmarshalJSON helps unmarshal a Cloud Controller Package response. +func (p *Package) UnmarshalJSON(data []byte) error { + var ccPackage struct { + GUID string `json:"guid,omitempty"` + CreatedAt string `json:"created_at,omitempty"` + Links APILinks `json:"links,omitempty"` + Relationships resources.Relationships `json:"relationships,omitempty"` + State constant.PackageState `json:"state,omitempty"` + Type constant.PackageType `json:"type,omitempty"` + Data struct { + Image string `json:"image"` + Username string `json:"username"` + Password string `json:"password"` + } `json:"data"` + } + err := cloudcontroller.DecodeJSON(data, &ccPackage) + if err != nil { + return err + } + + p.GUID = ccPackage.GUID + p.CreatedAt = ccPackage.CreatedAt + p.Links = ccPackage.Links + p.Relationships = ccPackage.Relationships + p.State = ccPackage.State + p.Type = ccPackage.Type + p.DockerImage = ccPackage.Data.Image + p.DockerUsername = ccPackage.Data.Username + p.DockerPassword = ccPackage.Data.Password + + return nil +} // CreatePackage creates a package with the given settings, Type and the // ApplicationRelationship must be set. -func (client *Client) CreatePackage(pkg resources.Package) (resources.Package, Warnings, error) { - var responseBody resources.Package +func (client *Client) CreatePackage(pkg Package) (Package, Warnings, error) { + var responseBody Package _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostPackageRequest, @@ -32,8 +129,8 @@ func (client *Client) CreatePackage(pkg resources.Package) (resources.Package, W } // GetPackage returns the package with the given GUID. -func (client *Client) GetPackage(packageGUID string) (resources.Package, Warnings, error) { - var responseBody resources.Package +func (client *Client) GetPackage(packageGUID string) (Package, Warnings, error) { + var responseBody Package _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.GetPackageRequest, @@ -45,20 +142,20 @@ func (client *Client) GetPackage(packageGUID string) (resources.Package, Warning } // GetPackages returns the list of packages. -func (client *Client) GetPackages(query ...Query) ([]resources.Package, Warnings, error) { - var packages []resources.Package +func (client *Client) GetPackages(query ...Query) ([]Package, Warnings, error) { + var resources []Package _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetPackagesRequest, Query: query, - ResponseBody: resources.Package{}, + ResponseBody: Package{}, AppendToList: func(item interface{}) error { - packages = append(packages, item.(resources.Package)) + resources = append(resources, item.(Package)) return nil }, }) - return packages, warnings, err + return resources, warnings, err } // UploadBitsPackage uploads the newResources and a list of existing resources @@ -70,9 +167,9 @@ func (client *Client) GetPackages(query ...Query) ([]resources.Package, Warnings // // Note: In order to determine if package creation is successful, poll the // Package's state field for more information. -func (client *Client) UploadBitsPackage(pkg resources.Package, matchedResources []Resource, newResources io.Reader, newResourcesLength int64) (resources.Package, Warnings, error) { +func (client *Client) UploadBitsPackage(pkg Package, matchedResources []Resource, newResources io.Reader, newResourcesLength int64) (Package, Warnings, error) { if matchedResources == nil { - return resources.Package{}, nil, ccerror.NilObjectError{Object: "matchedResources"} + return Package{}, nil, ccerror.NilObjectError{Object: "matchedResources"} } if newResources == nil { @@ -84,13 +181,13 @@ func (client *Client) UploadBitsPackage(pkg resources.Package, matchedResources // UploadPackage uploads a file to a given package's Upload resource. Note: // fileToUpload is read entirely into memory prior to sending data to CC. -func (client *Client) UploadPackage(pkg resources.Package, fileToUpload string) (resources.Package, Warnings, error) { +func (client *Client) UploadPackage(pkg Package, fileToUpload string) (Package, Warnings, error) { body, contentType, err := client.createUploadBuffer(fileToUpload, "bits") if err != nil { - return resources.Package{}, nil, err + return Package{}, nil, err } - responsePackage := resources.Package{} + responsePackage := Package{} _, warnings, err := client.MakeRequestSendRaw( internal.PostPackageBitsRequest, internal.Params{"package_guid": pkg.GUID}, @@ -104,8 +201,8 @@ func (client *Client) UploadPackage(pkg resources.Package, fileToUpload string) // CopyPackage copies a package from a source package to a destination package // Note: source app guid is in URL; dest app guid is in body -func (client *Client) CopyPackage(sourcePkgGUID string, targetAppGUID string) (resources.Package, Warnings, error) { - var targetPackage resources.Package +func (client *Client) CopyPackage(sourcePkgGUID string, targetAppGUID string) (Package, Warnings, error) { + var targetPackage Package _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostPackageRequest, @@ -213,25 +310,25 @@ func (*Client) createUploadBuffer(path string, paramName string) (bytes.Buffer, return body, writer.FormDataContentType(), err } -func (client *Client) uploadExistingResourcesOnly(packageGUID string, matchedResources []Resource) (resources.Package, Warnings, error) { +func (client *Client) uploadExistingResourcesOnly(packageGUID string, matchedResources []Resource) (Package, Warnings, error) { jsonResources, err := json.Marshal(matchedResources) if err != nil { - return resources.Package{}, nil, err + return Package{}, nil, err } body := bytes.NewBuffer(nil) form := multipart.NewWriter(body) err = form.WriteField("resources", string(jsonResources)) if err != nil { - return resources.Package{}, nil, err + return Package{}, nil, err } err = form.Close() if err != nil { - return resources.Package{}, nil, err + return Package{}, nil, err } - responsePackage := resources.Package{} + responsePackage := Package{} _, warnings, err := client.MakeRequestSendRaw( internal.PostPackageBitsRequest, @@ -244,15 +341,15 @@ func (client *Client) uploadExistingResourcesOnly(packageGUID string, matchedRes return responsePackage, warnings, err } -func (client *Client) uploadNewAndExistingResources(packageGUID string, matchedResources []Resource, newResources io.Reader, newResourcesLength int64) (resources.Package, Warnings, error) { +func (client *Client) uploadNewAndExistingResources(packageGUID string, matchedResources []Resource, newResources io.Reader, newResourcesLength int64) (Package, Warnings, error) { contentLength, err := client.calculateAppBitsRequestSize(matchedResources, newResourcesLength) if err != nil { - return resources.Package{}, nil, err + return Package{}, nil, err } contentType, body, writeErrors := client.createMultipartBodyAndHeaderForAppBits(matchedResources, newResources, newResourcesLength) - responseBody := resources.Package{} + responseBody := Package{} _, warnings, err := client.MakeRequestUploadAsync( internal.PostPackageBitsRequest, internal.Params{"package_guid": packageGUID}, diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/paginate.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/paginate.go index 2fcf46a..6b5a3b1 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/paginate.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/paginate.go @@ -17,14 +17,11 @@ func (requester RealRequester) paginate(request *cloudcontroller.Request, obj in return IncludedResources{}, fullWarningsList, err } - includes.Apps = append(includes.Apps, wrapper.IncludedResources.Apps...) includes.Users = append(includes.Users, wrapper.IncludedResources.Users...) includes.Organizations = append(includes.Organizations, wrapper.IncludedResources.Organizations...) includes.Spaces = append(includes.Spaces, wrapper.IncludedResources.Spaces...) - includes.ServiceBrokers = append(includes.ServiceBrokers, wrapper.IncludedResources.ServiceBrokers...) - includes.ServiceInstances = append(includes.ServiceInstances, wrapper.IncludedResources.ServiceInstances...) includes.ServiceOfferings = append(includes.ServiceOfferings, wrapper.IncludedResources.ServiceOfferings...) - includes.ServicePlans = append(includes.ServicePlans, wrapper.IncludedResources.ServicePlans...) + includes.ServiceBrokers = append(includes.ServiceBrokers, wrapper.IncludedResources.ServiceBrokers...) if wrapper.NextPage() == "" { break diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/process.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/process.go index d03f288..e93de48 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/process.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/process.go @@ -1,14 +1,86 @@ package ccv3 import ( + "encoding/json" + "fmt" + + "code.cloudfoundry.org/cli/api/cloudcontroller" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" + "code.cloudfoundry.org/cli/types" ) +type Process struct { + GUID string + Type string + // Command is the process start command. Note: This value will be obfuscated when obtained from listing. + Command types.FilteredString + HealthCheckType constant.HealthCheckType + HealthCheckEndpoint string + HealthCheckInvocationTimeout int64 + HealthCheckTimeout int64 + Instances types.NullInt + MemoryInMB types.NullUint64 + DiskInMB types.NullUint64 + AppGUID string +} + +func (p Process) MarshalJSON() ([]byte, error) { + var ccProcess marshalProcess + + marshalCommand(p, &ccProcess) + marshalInstances(p, &ccProcess) + marshalMemory(p, &ccProcess) + marshalDisk(p, &ccProcess) + marshalHealthCheck(p, &ccProcess) + + return json.Marshal(ccProcess) +} + +func (p *Process) UnmarshalJSON(data []byte) error { + var ccProcess struct { + Command types.FilteredString `json:"command"` + DiskInMB types.NullUint64 `json:"disk_in_mb"` + GUID string `json:"guid"` + Instances types.NullInt `json:"instances"` + MemoryInMB types.NullUint64 `json:"memory_in_mb"` + Type string `json:"type"` + Relationships resources.Relationships `json:"relationships"` + + HealthCheck struct { + Type constant.HealthCheckType `json:"type"` + Data struct { + Endpoint string `json:"endpoint"` + InvocationTimeout int64 `json:"invocation_timeout"` + Timeout int64 `json:"timeout"` + } `json:"data"` + } `json:"health_check"` + } + + err := cloudcontroller.DecodeJSON(data, &ccProcess) + if err != nil { + return err + } + + p.Command = ccProcess.Command + p.DiskInMB = ccProcess.DiskInMB + p.GUID = ccProcess.GUID + p.HealthCheckEndpoint = ccProcess.HealthCheck.Data.Endpoint + p.HealthCheckInvocationTimeout = ccProcess.HealthCheck.Data.InvocationTimeout + p.HealthCheckTimeout = ccProcess.HealthCheck.Data.Timeout + p.HealthCheckType = ccProcess.HealthCheck.Type + p.Instances = ccProcess.Instances + p.MemoryInMB = ccProcess.MemoryInMB + p.Type = ccProcess.Type + p.AppGUID = ccProcess.Relationships[constant.RelationshipTypeApplication].GUID + + return nil +} + // CreateApplicationProcessScale updates process instances count, memory or disk -func (client *Client) CreateApplicationProcessScale(appGUID string, process resources.Process) (resources.Process, Warnings, error) { - var responseBody resources.Process +func (client *Client) CreateApplicationProcessScale(appGUID string, process Process) (Process, Warnings, error) { + var responseBody Process _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostApplicationProcessActionScaleRequest, @@ -21,8 +93,8 @@ func (client *Client) CreateApplicationProcessScale(appGUID string, process reso } // GetApplicationProcessByType returns application process of specified type -func (client *Client) GetApplicationProcessByType(appGUID string, processType string) (resources.Process, Warnings, error) { - var responseBody resources.Process +func (client *Client) GetApplicationProcessByType(appGUID string, processType string) (Process, Warnings, error) { + var responseBody Process _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.GetApplicationProcessRequest, @@ -35,26 +107,26 @@ func (client *Client) GetApplicationProcessByType(appGUID string, processType st // GetApplicationProcesses lists processes for a given application. **Note**: // Due to security, the API obfuscates certain values such as `command`. -func (client *Client) GetApplicationProcesses(appGUID string) ([]resources.Process, Warnings, error) { - var processes []resources.Process +func (client *Client) GetApplicationProcesses(appGUID string) ([]Process, Warnings, error) { + var resources []Process _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetApplicationProcessesRequest, URIParams: internal.Params{"app_guid": appGUID}, - ResponseBody: resources.Process{}, + ResponseBody: Process{}, AppendToList: func(item interface{}) error { - processes = append(processes, item.(resources.Process)) + resources = append(resources, item.(Process)) return nil }, }) - return processes, warnings, err + return resources, warnings, err } // GetNewApplicationProcesses gets processes for an application in the middle of a deployment. // The app's processes will include a web process that will be removed when the deployment completes, // so exclude that soon-to-be-removed process from the result. -func (client *Client) GetNewApplicationProcesses(appGUID string, deploymentGUID string) ([]resources.Process, Warnings, error) { +func (client *Client) GetNewApplicationProcesses(appGUID string, deploymentGUID string) ([]Process, Warnings, error) { var allWarnings Warnings deployment, warnings, err := client.GetDeployment(deploymentGUID) @@ -76,7 +148,7 @@ func (client *Client) GetNewApplicationProcesses(appGUID string, deploymentGUID } } - var processesList []resources.Process + var processesList []Process for _, process := range allProcesses { if process.Type == constant.ProcessTypeWeb { if process.GUID == newWebProcessGUID { @@ -91,8 +163,8 @@ func (client *Client) GetNewApplicationProcesses(appGUID string, deploymentGUID } // GetProcess returns a process with the given guid -func (client *Client) GetProcess(processGUID string) (resources.Process, Warnings, error) { - var responseBody resources.Process +func (client *Client) GetProcess(processGUID string) (Process, Warnings, error) { + var responseBody Process _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.GetProcessRequest, @@ -103,32 +175,32 @@ func (client *Client) GetProcess(processGUID string) (resources.Process, Warning return responseBody, warnings, err } -func (client Client) GetProcesses(query ...Query) ([]resources.Process, Warnings, error) { - var processes []resources.Process +func (client Client) GetProcesses(query ...Query) ([]Process, Warnings, error) { + var resources []Process _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetProcessesRequest, Query: query, - ResponseBody: resources.Process{}, + ResponseBody: Process{}, AppendToList: func(item interface{}) error { - processes = append(processes, item.(resources.Process)) + resources = append(resources, item.(Process)) return nil }, }) - return processes, warnings, err + return resources, warnings, err } // UpdateProcess updates the process's command or health check settings. GUID // is always required; HealthCheckType is only required when updating health // check settings. -func (client *Client) UpdateProcess(process resources.Process) (resources.Process, Warnings, error) { - var responseBody resources.Process +func (client *Client) UpdateProcess(process Process) (Process, Warnings, error) { + var responseBody Process _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PatchProcessRequest, URIParams: internal.Params{"process_guid": process.GUID}, - RequestBody: resources.Process{ + RequestBody: Process{ Command: process.Command, HealthCheckType: process.HealthCheckType, HealthCheckEndpoint: process.HealthCheckEndpoint, @@ -140,3 +212,57 @@ func (client *Client) UpdateProcess(process resources.Process) (resources.Proces return responseBody, warnings, err } + +type healthCheck struct { + Type constant.HealthCheckType `json:"type,omitempty"` + Data struct { + Endpoint interface{} `json:"endpoint,omitempty"` + InvocationTimeout int64 `json:"invocation_timeout,omitempty"` + Timeout int64 `json:"timeout,omitempty"` + } `json:"data"` +} + +type marshalProcess struct { + Command interface{} `json:"command,omitempty"` + Instances json.Number `json:"instances,omitempty"` + MemoryInMB json.Number `json:"memory_in_mb,omitempty"` + DiskInMB json.Number `json:"disk_in_mb,omitempty"` + + HealthCheck *healthCheck `json:"health_check,omitempty"` +} + +func marshalCommand(p Process, ccProcess *marshalProcess) { + if p.Command.IsSet { + ccProcess.Command = &p.Command + } +} + +func marshalDisk(p Process, ccProcess *marshalProcess) { + if p.DiskInMB.IsSet { + ccProcess.DiskInMB = json.Number(fmt.Sprint(p.DiskInMB.Value)) + } +} + +func marshalHealthCheck(p Process, ccProcess *marshalProcess) { + if p.HealthCheckType != "" || p.HealthCheckEndpoint != "" || p.HealthCheckInvocationTimeout != 0 || p.HealthCheckTimeout != 0 { + ccProcess.HealthCheck = new(healthCheck) + ccProcess.HealthCheck.Type = p.HealthCheckType + ccProcess.HealthCheck.Data.InvocationTimeout = p.HealthCheckInvocationTimeout + ccProcess.HealthCheck.Data.Timeout = p.HealthCheckTimeout + if p.HealthCheckEndpoint != "" { + ccProcess.HealthCheck.Data.Endpoint = p.HealthCheckEndpoint + } + } +} + +func marshalInstances(p Process, ccProcess *marshalProcess) { + if p.Instances.IsSet { + ccProcess.Instances = json.Number(fmt.Sprint(p.Instances.Value)) + } +} + +func marshalMemory(p Process, ccProcess *marshalProcess) { + if p.MemoryInMB.IsSet { + ccProcess.MemoryInMB = json.Number(fmt.Sprint(p.MemoryInMB.Value)) + } +} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/query.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/query.go index 6761676..d5280cc 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/query.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/query.go @@ -11,8 +11,6 @@ type QueryKey string const ( // AppGUIDFilter is a query parameter for listing objects by app GUID. AppGUIDFilter QueryKey = "app_guids" - // AvailableFilter is a query parameter for listing available resources - AvailableFilter QueryKey = "available" // GUIDFilter is a query parameter for listing objects by GUID. GUIDFilter QueryKey = "guids" // LabelSelectorFilter is a query parameter for listing objects by label @@ -25,10 +23,6 @@ const ( OrganizationGUIDFilter QueryKey = "organization_guids" // SequenceIDFilter is a query parameter for listing objects by sequence ID. SequenceIDFilter QueryKey = "sequence_ids" - // RouteGUIDFilter is a query parameter for listing objects by Route GUID. - RouteGUIDFilter QueryKey = "route_guids" - // ServiceInstanceGUIDFilter is a query parameter for listing objects by Service Instance GUID. - ServiceInstanceGUIDFilter QueryKey = "service_instance_guids" // SpaceGUIDFilter is a query parameter for listing objects by Space GUID. SpaceGUIDFilter QueryKey = "space_guids" // StatusValueFilter is a query parameter for listing deployments by status.value @@ -55,8 +49,6 @@ const ( RoleTypesFilter QueryKey = "types" // StackFilter is a query parameter for listing objects by stack name StackFilter QueryKey = "stacks" - // TypeFiler is a query parameter for selecting binding type - TypeFilter QueryKey = "type" // UnmappedFilter is a query parameter specifying unmapped routes UnmappedFilter QueryKey = "unmapped" // UserGUIDFilter is a query parameter when getting a user by GUID @@ -64,8 +56,6 @@ const ( // UsernamesFilter is a query parameter when getting a user by username UsernamesFilter QueryKey = "usernames" // StatesFilter is a query parameter when getting a package's droplets by state - VersionsFilter QueryKey = "versions" - // VersionsFilter is a query parameter when getting an apps revisions by version StatesFilter QueryKey = "states" // ServiceBrokerNamesFilter is a query parameter when getting plans or offerings according to the Service Brokers that it relates to ServiceBrokerNamesFilter QueryKey = "service_broker_names" @@ -79,16 +69,6 @@ const ( FieldsServiceOfferingServiceBroker QueryKey = "fields[service_offering.service_broker]" // FieldsServiceBroker is a query parameter to include specific fields from a service broker in an offering response FieldsServiceBroker QueryKey = "fields[service_broker]" - // FieldsServicePlan is a query parameter to include specific fields from a service plan - FieldsServicePlan QueryKey = "fields[service_plan]" - // FieldsServicePlanServiceOffering is a query parameter to include specific fields from a service offering - FieldsServicePlanServiceOffering QueryKey = "fields[service_plan.service_offering]" - // FieldsServicePlanServiceOfferingServiceBroker is a query parameter to include specific fields from a service broker - FieldsServicePlanServiceOfferingServiceBroker QueryKey = "fields[service_plan.service_offering.service_broker]" - // FieldsSpace is a query parameter to include specific fields from a space - FieldsSpace QueryKey = "fields[space]" - // FieldsSpaceOrganization is a query parameter to include specific fields from a organization - FieldsSpaceOrganization QueryKey = "fields[space.organization]" // OrderBy is a query parameter to specify how to order objects. OrderBy QueryKey = "order_by" @@ -122,9 +102,6 @@ const ( // Purge is a query parameter used on a Delete request to indicate that dependent resources should also be deleted Purge = "purge" - - // MaxPerPage is the largest value of "per_page" that should be used - MaxPerPage = "5000" ) // Query is additional settings that can be passed to some requests that can diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/relationship.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/relationship.go index e4ed3b8..c121c3c 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/relationship.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/relationship.go @@ -16,6 +16,17 @@ func (client *Client) DeleteIsolationSegmentOrganization(isolationSegmentGUID st return warnings, err } +// DeleteServiceInstanceRelationshipsSharedSpace will delete the sharing relationship +// between the service instance and the shared-to space provided. +func (client *Client) DeleteServiceInstanceRelationshipsSharedSpace(serviceInstanceGUID string, spaceGUID string) (Warnings, error) { + _, warnings, err := client.MakeRequest(RequestParams{ + RequestName: internal.DeleteServiceInstanceRelationshipsSharedSpaceRequest, + URIParams: internal.Params{"service_instance_guid": serviceInstanceGUID, "space_guid": spaceGUID}, + }) + + return warnings, err +} + // GetOrganizationDefaultIsolationSegment returns the relationship between an // organization and it's default isolation segment. func (client *Client) GetOrganizationDefaultIsolationSegment(orgGUID string) (resources.Relationship, Warnings, error) { diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/relationship_list.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/relationship_list.go index a60adef..6a927b5 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/relationship_list.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/relationship_list.go @@ -19,3 +19,18 @@ func (client *Client) EntitleIsolationSegmentToOrganizations(isolationSegmentGUI return responseBody, warnings, err } + +// ShareServiceInstanceToSpaces will create a sharing relationship between +// the service instance and the shared-to space for each space provided. +func (client *Client) ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (resources.RelationshipList, Warnings, error) { + var responseBody resources.RelationshipList + + _, warnings, err := client.MakeRequest(RequestParams{ + RequestName: internal.PostServiceInstanceRelationshipsSharedSpacesRequest, + URIParams: internal.Params{"service_instance_guid": serviceInstanceGUID}, + RequestBody: resources.RelationshipList{GUIDs: spaceGUIDs}, + ResponseBody: &responseBody, + }) + + return responseBody, warnings, err +} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/request.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/request.go index dc799fc..366d533 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/request.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/request.go @@ -20,8 +20,7 @@ type requestOptions struct { // RequestName is the name of the request (see routes) RequestName string - // Header contains custom headers to pass to the request. - Header http.Header + // Method is the HTTP method. Method string // URL is the request path. @@ -51,25 +50,15 @@ func (requester *RealRequester) newHTTPRequest(passedRequest requestOptions) (*c if err != nil { return nil, err } - if passedRequest.Query != nil { request.URL.RawQuery = FormatQueryParameters(passedRequest.Query).Encode() } request.Header = http.Header{} - if passedRequest.Header != nil { - request.Header = passedRequest.Header - } - - if request.Header.Get("User-Agent") == "" { - request.Header.Set("User-Agent", requester.userAgent) - } - - if request.Header.Get("Accept") == "" { - request.Header.Set("Accept", "application/json") - } + request.Header.Set("Accept", "application/json") + request.Header.Set("User-Agent", requester.userAgent) - if request.Header.Get("Content-Type") == "" { + if passedRequest.Body != nil { request.Header.Set("Content-Type", "application/json") } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/requester.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/requester.go index f811a00..3633e81 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/requester.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/requester.go @@ -5,29 +5,29 @@ import ( "encoding/json" "fmt" "io" - "net/http" "runtime" "code.cloudfoundry.org/cli/api/cloudcontroller" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Requester +//go:generate counterfeiter . Requester type RequestParams struct { - RequestName string - URIParams internal.Params - Query []Query - RequestBody interface{} - ResponseBody interface{} - URL string - AppendToList func(item interface{}) error + RequestName string + URIParams internal.Params + Query []Query + RequestBody interface{} + RequestHeaders [][]string + ResponseBody interface{} + URL string + AppendToList func(item interface{}) error } type Requester interface { InitializeConnection(settings TargetSettings) - InitializeRouter(baseURL string) + InitializeRouter(resources map[string]string) MakeListRequest(requestParams RequestParams) (IncludedResources, Warnings, error) @@ -47,13 +47,6 @@ type Requester interface { responseBody interface{}, ) (string, Warnings, error) - MakeRequestSendReceiveRaw( - Method string, - URL string, - headers http.Header, - requestBody []byte, - ) ([]byte, *http.Response, error) - MakeRequestUploadAsync( requestName string, uriParams internal.Params, @@ -85,8 +78,8 @@ func (requester *RealRequester) InitializeConnection(settings TargetSettings) { } } -func (requester *RealRequester) InitializeRouter(baseURL string) { - requester.router = internal.NewRouter(internal.APIRoutes, baseURL) +func (requester *RealRequester) InitializeRouter(resources map[string]string) { + requester.router = internal.NewRouter(internal.APIRoutes, resources) } func (requester *RealRequester) MakeListRequest(requestParams RequestParams) (IncludedResources, Warnings, error) { @@ -136,29 +129,6 @@ func (requester *RealRequester) MakeRequestReceiveRaw( return response.RawResponse, response.Warnings, err } -func (requester *RealRequester) MakeRequestSendReceiveRaw( - Method string, - URL string, - headers http.Header, - requestBody []byte, -) ([]byte, *http.Response, error) { - request, err := requester.newHTTPRequest(requestOptions{ - URL: URL, - Method: Method, - Body: bytes.NewReader(requestBody), - Header: headers, - }) - if err != nil { - return nil, nil, err - } - - response := cloudcontroller.Response{} - - err = requester.connection.Make(request, &response) - - return response.RawResponse, response.HTTPResponse, err -} - func (requester *RealRequester) MakeRequestSendRaw( requestName string, uriParams internal.Params, diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/revisions.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/revisions.go index 67b14a0..ea1e889 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/revisions.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/revisions.go @@ -20,18 +20,3 @@ func (client *Client) GetApplicationRevisions(appGUID string, query ...Query) ([ }) return revisions, warnings, err } - -func (client *Client) GetApplicationRevisionsDeployed(appGUID string) ([]resources.Revision, Warnings, error) { - var revisions []resources.Revision - - _, warnings, err := client.MakeListRequest(RequestParams{ - RequestName: internal.GetApplicationRevisionsDeployedRequest, - URIParams: internal.Params{"app_guid": appGUID}, - ResponseBody: resources.Revision{}, - AppendToList: func(item interface{}) error { - revisions = append(revisions, item.(resources.Revision)) - return nil - }, - }) - return revisions, warnings, err -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/route.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/route.go index b40aed9..d38aa0b 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/route.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/route.go @@ -82,7 +82,7 @@ func (client Client) GetRoutes(query ...Query) ([]resources.Route, Warnings, err return routes, warnings, err } -func (client Client) MapRoute(routeGUID string, appGUID string, destinationProtocol string) (Warnings, error) { +func (client Client) MapRoute(routeGUID string, appGUID string) (Warnings, error) { type destinationProcess struct { ProcessType string `json:"process_type"` } @@ -92,8 +92,7 @@ func (client Client) MapRoute(routeGUID string, appGUID string, destinationProto Process *destinationProcess `json:"process,omitempty"` } type destination struct { - App destinationApp `json:"app"` - Protocol string `json:"protocol,omitempty"` + App destinationApp `json:"app"` } type body struct { @@ -102,14 +101,9 @@ func (client Client) MapRoute(routeGUID string, appGUID string, destinationProto requestBody := body{ Destinations: []destination{ - { - App: destinationApp{GUID: appGUID}, - }, + {App: destinationApp{GUID: appGUID}}, }, } - if destinationProtocol != "" { - requestBody.Destinations[0].Protocol = destinationProtocol - } _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.MapRouteRequest, @@ -121,7 +115,7 @@ func (client Client) MapRoute(routeGUID string, appGUID string, destinationProto } func (client Client) UnmapRoute(routeGUID string, destinationGUID string) (Warnings, error) { - var responseBody resources.Build + var responseBody Build _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.UnmapRouteRequest, @@ -131,20 +125,3 @@ func (client Client) UnmapRoute(routeGUID string, destinationGUID string) (Warni return warnings, err } - -func (client Client) UpdateDestination(routeGUID string, destinationGUID string, protocol string) (Warnings, error) { - type body struct { - Protocol string `json:"protocol"` - } - requestBody := body{ - Protocol: protocol, - } - var responseBody resources.Build - _, warnings, err := client.MakeRequest(RequestParams{ - RequestName: internal.PatchDestinationRequest, - URIParams: internal.Params{"route_guid": routeGUID, "destination_guid": destinationGUID}, - RequestBody: &requestBody, - ResponseBody: &responseBody, - }) - return warnings, err -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/route_binding.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/route_binding.go deleted file mode 100644 index 643479d..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/route_binding.go +++ /dev/null @@ -1,36 +0,0 @@ -package ccv3 - -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" -) - -func (client *Client) CreateRouteBinding(binding resources.RouteBinding) (JobURL, Warnings, error) { - return client.MakeRequest(RequestParams{ - RequestName: internal.PostRouteBindingRequest, - RequestBody: binding, - }) -} - -func (client *Client) GetRouteBindings(query ...Query) ([]resources.RouteBinding, IncludedResources, Warnings, error) { - var result []resources.RouteBinding - - included, warnings, err := client.MakeListRequest(RequestParams{ - RequestName: internal.GetRouteBindingsRequest, - Query: query, - ResponseBody: resources.RouteBinding{}, - AppendToList: func(item interface{}) error { - result = append(result, item.(resources.RouteBinding)) - return nil - }, - }) - - return result, included, warnings, err -} - -func (client *Client) DeleteRouteBinding(guid string) (JobURL, Warnings, error) { - return client.MakeRequest(RequestParams{ - RequestName: internal.DeleteRouteBindingRequest, - URIParams: internal.Params{"route_binding_guid": guid}, - }) -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_credential_binding.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_credential_binding.go deleted file mode 100644 index 8d39102..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_credential_binding.go +++ /dev/null @@ -1,60 +0,0 @@ -package ccv3 - -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/lookuptable" -) - -func (client *Client) CreateServiceCredentialBinding(binding resources.ServiceCredentialBinding) (JobURL, Warnings, error) { - return client.MakeRequest(RequestParams{ - RequestName: internal.PostServiceCredentialBindingRequest, - RequestBody: binding, - }) -} - -// GetServiceCredentialBindings queries the CC API with the specified query -// and returns a slice of ServiceCredentialBindings. Additionally if Apps are -// included in the API response (by having `include=app` in the query) then the -// App names will be added into each ServiceCredentialBinding for app bindings -func (client *Client) GetServiceCredentialBindings(query ...Query) ([]resources.ServiceCredentialBinding, Warnings, error) { - var result []resources.ServiceCredentialBinding - - included, warnings, err := client.MakeListRequest(RequestParams{ - RequestName: internal.GetServiceCredentialBindingsRequest, - Query: query, - ResponseBody: resources.ServiceCredentialBinding{}, - AppendToList: func(item interface{}) error { - result = append(result, item.(resources.ServiceCredentialBinding)) - return nil - }, - }) - - if len(included.Apps) > 0 { - appLookup := lookuptable.AppFromGUID(included.Apps) - - for i := range result { - result[i].AppName = appLookup[result[i].AppGUID].Name - result[i].AppSpaceGUID = appLookup[result[i].AppGUID].SpaceGUID - } - } - - return result, warnings, err -} - -func (client *Client) DeleteServiceCredentialBinding(guid string) (JobURL, Warnings, error) { - return client.MakeRequest(RequestParams{ - RequestName: internal.DeleteServiceCredentialBindingRequest, - URIParams: internal.Params{"service_credential_binding_guid": guid}, - }) -} - -func (client *Client) GetServiceCredentialBindingDetails(guid string) (details resources.ServiceCredentialBindingDetails, warnings Warnings, err error) { - _, warnings, err = client.MakeRequest(RequestParams{ - RequestName: internal.GetServiceCredentialBindingDetailsRequest, - URIParams: internal.Params{"service_credential_binding_guid": guid}, - ResponseBody: &details, - }) - - return -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_instance.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_instance.go index 5a0b590..de87f47 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_instance.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_instance.go @@ -1,25 +1,15 @@ package ccv3 import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/types" - "code.cloudfoundry.org/cli/util/lookuptable" ) -type SpaceWithOrganization struct { - SpaceGUID string - SpaceName string - OrganizationName string -} - // GetServiceInstances lists service instances with optional filters. -func (client *Client) GetServiceInstances(query ...Query) ([]resources.ServiceInstance, IncludedResources, Warnings, error) { +func (client *Client) GetServiceInstances(query ...Query) ([]resources.ServiceInstance, Warnings, error) { var result []resources.ServiceInstance - included, warnings, err := client.MakeListRequest(RequestParams{ + _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetServiceInstancesRequest, Query: query, ResponseBody: resources.ServiceInstance{}, @@ -29,143 +19,5 @@ func (client *Client) GetServiceInstances(query ...Query) ([]resources.ServiceIn }, }) - return result, included, warnings, err -} - -func (client *Client) GetServiceInstanceByNameAndSpace(name, spaceGUID string, query ...Query) (resources.ServiceInstance, IncludedResources, Warnings, error) { - query = append(query, - Query{ - Key: NameFilter, - Values: []string{name}, - }, - Query{ - Key: SpaceGUIDFilter, - Values: []string{spaceGUID}, - }, - ) - - instances, included, warnings, err := client.GetServiceInstances(query...) - - if err != nil { - return resources.ServiceInstance{}, IncludedResources{}, warnings, err - } - - if len(instances) == 0 { - return resources.ServiceInstance{}, - IncludedResources{}, - warnings, - ccerror.ServiceInstanceNotFoundError{ - Name: name, - SpaceGUID: spaceGUID, - } - } - - return instances[0], included, warnings, nil -} - -func (client *Client) GetServiceInstanceParameters(serviceInstanceGUID string) (parameters types.JSONObject, warnings Warnings, err error) { - _, warnings, err = client.MakeRequest(RequestParams{ - RequestName: internal.GetServiceInstanceParametersRequest, - URIParams: internal.Params{"service_instance_guid": serviceInstanceGUID}, - ResponseBody: ¶meters, - }) - - return -} - -func (client *Client) CreateServiceInstance(serviceInstance resources.ServiceInstance) (JobURL, Warnings, error) { - return client.MakeRequest(RequestParams{ - RequestName: internal.PostServiceInstanceRequest, - RequestBody: serviceInstance, - }) -} - -func (client *Client) UpdateServiceInstance(serviceInstanceGUID string, serviceInstanceUpdates resources.ServiceInstance) (JobURL, Warnings, error) { - return client.MakeRequest(RequestParams{ - RequestName: internal.PatchServiceInstanceRequest, - URIParams: internal.Params{"service_instance_guid": serviceInstanceGUID}, - RequestBody: serviceInstanceUpdates, - }) -} - -func (client *Client) DeleteServiceInstance(serviceInstanceGUID string, query ...Query) (JobURL, Warnings, error) { - return client.MakeRequest(RequestParams{ - RequestName: internal.DeleteServiceInstanceRequest, - URIParams: internal.Params{"service_instance_guid": serviceInstanceGUID}, - Query: query, - }) -} - -// ShareServiceInstanceToSpaces will create a sharing relationship between -// the service instance and the shared-to space for each space provided. -func (client *Client) ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (resources.RelationshipList, Warnings, error) { - var responseBody resources.RelationshipList - - _, warnings, err := client.MakeRequest(RequestParams{ - RequestName: internal.PostServiceInstanceRelationshipsSharedSpacesRequest, - URIParams: internal.Params{"service_instance_guid": serviceInstanceGUID}, - RequestBody: resources.RelationshipList{GUIDs: spaceGUIDs}, - ResponseBody: &responseBody, - }) - - return responseBody, warnings, err -} - -// UnshareServiceInstanceFromSpace will delete the sharing relationship -// between the service instance and the shared-to space provided. -func (client *Client) UnshareServiceInstanceFromSpace(serviceInstanceGUID string, spaceGUID string) (Warnings, error) { - _, warnings, err := client.MakeRequest(RequestParams{ - RequestName: internal.DeleteServiceInstanceRelationshipsSharedSpaceRequest, - URIParams: internal.Params{"service_instance_guid": serviceInstanceGUID, "space_guid": spaceGUID}, - }) - - return warnings, err -} - -// GetServiceInstanceSharedSpaces will fetch relationships between -// a service instance and the shared-to spaces for that service. -func (client *Client) GetServiceInstanceSharedSpaces(serviceInstanceGUID string) ([]SpaceWithOrganization, Warnings, error) { - var responseBody resources.SharedToSpacesListWrapper - query := []Query{ - { - Key: FieldsSpace, - Values: []string{"guid", "name", "relationships.organization"}, - }, - { - Key: FieldsSpaceOrganization, - Values: []string{"guid", "name"}, - }, - } - _, warnings, err := client.MakeRequest(RequestParams{ - RequestName: internal.GetServiceInstanceRelationshipsSharedSpacesRequest, - URIParams: internal.Params{"service_instance_guid": serviceInstanceGUID}, - Query: query, - ResponseBody: &responseBody, - }) - return mapRelationshipsToSpaces(responseBody), warnings, err -} - -func (client *Client) GetServiceInstanceUsageSummary(serviceInstanceGUID string) ([]resources.ServiceInstanceUsageSummary, Warnings, error) { - var result resources.ServiceInstanceUsageSummaryList - - _, warnings, err := client.MakeRequest(RequestParams{ - RequestName: internal.GetServiceInstanceSharedSpacesUsageSummaryRequest, - URIParams: internal.Params{"service_instance_guid": serviceInstanceGUID}, - ResponseBody: &result, - }) - return result.UsageSummary, warnings, err -} - -func mapRelationshipsToSpaces(sharedToSpaces resources.SharedToSpacesListWrapper) []SpaceWithOrganization { - var spacesToReturn []SpaceWithOrganization - - guidToOrgNameLookup := lookuptable.NameFromGUID(sharedToSpaces.Organizations) - - for _, s := range sharedToSpaces.Spaces { - org := s.Relationships[constant.RelationshipTypeOrganization] - space := SpaceWithOrganization{SpaceGUID: s.GUID, SpaceName: s.Name, OrganizationName: guidToOrgNameLookup[org.GUID]} - spacesToReturn = append(spacesToReturn, space) - } - - return spacesToReturn + return result, warnings, err } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_offering.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_offering.go index 86567c5..8e1fddb 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_offering.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_offering.go @@ -4,7 +4,6 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/lookuptable" ) // GetServiceOffering lists service offering with optional filters. @@ -23,7 +22,10 @@ func (client *Client) GetServiceOfferings(query ...Query) ([]resources.ServiceOf }, }) - brokerNameLookup := lookuptable.NameFromGUID(included.ServiceBrokers) + brokerNameLookup := make(map[string]string) + for _, b := range included.ServiceBrokers { + brokerNameLookup[b.GUID] = b.Name + } for i, _ := range result { result[i].ServiceBrokerName = brokerNameLookup[result[i].ServiceBrokerGUID] @@ -32,22 +34,6 @@ func (client *Client) GetServiceOfferings(query ...Query) ([]resources.ServiceOf return result, warnings, err } -func (client *Client) GetServiceOfferingByGUID(guid string) (resources.ServiceOffering, Warnings, error) { - if guid == "" { - return resources.ServiceOffering{}, nil, ccerror.ServiceOfferingNotFoundError{} - } - - var result resources.ServiceOffering - - _, warnings, err := client.MakeRequest(RequestParams{ - RequestName: internal.GetServiceOfferingRequest, - URIParams: internal.Params{"service_offering_guid": guid}, - ResponseBody: &result, - }) - - return result, warnings, err -} - func (client *Client) GetServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName string) (resources.ServiceOffering, Warnings, error) { query := []Query{{Key: NameFilter, Values: []string{serviceOfferingName}}} if serviceBrokerName != "" { diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_plan.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_plan.go index e61a462..20d5d8c 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_plan.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/service_plan.go @@ -1,29 +1,11 @@ package ccv3 import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" - "code.cloudfoundry.org/cli/util/lookuptable" ) -func (client *Client) GetServicePlanByGUID(guid string) (resources.ServicePlan, Warnings, error) { - if guid == "" { - return resources.ServicePlan{}, nil, ccerror.ServicePlanNotFound{} - } - - var result resources.ServicePlan - - _, warnings, err := client.MakeRequest(RequestParams{ - RequestName: internal.GetServicePlanRequest, - URIParams: internal.Params{"service_plan_guid": guid}, - ResponseBody: &result, - }) - - return result, warnings, err -} - // GetServicePlans lists service plan with optional filters. func (client *Client) GetServicePlans(query ...Query) ([]resources.ServicePlan, Warnings, error) { plans, _, warnings, err := client.getServicePlans(query...) @@ -108,16 +90,14 @@ type ServiceOfferingWithPlans struct { } func (client *Client) GetServicePlansWithOfferings(query ...Query) ([]ServiceOfferingWithPlans, Warnings, error) { - query = append(query, - Query{ - Key: Include, - Values: []string{"service_offering"}, - }, - Query{ - Key: FieldsServiceOfferingServiceBroker, - Values: []string{"name,guid"}, - }, - ) + query = append(query, Query{ + Key: Include, + Values: []string{"service_offering"}, + }) + query = append(query, Query{ + Key: FieldsServiceOfferingServiceBroker, + Values: []string{"name,guid"}, + }) plans, included, warnings, err := client.getServicePlans(query...) if err != nil { @@ -139,7 +119,10 @@ func (client *Client) GetServicePlansWithOfferings(query ...Query) ([]ServiceOff return i } - brokerNameLookup := lookuptable.NameFromGUID(included.ServiceBrokers) + brokerNameLookup := make(map[string]string) + for _, b := range included.ServiceBrokers { + brokerNameLookup[b.GUID] = b.Name + } for _, p := range plans { i := indexOfOffering(p.ServiceOfferingGUID) @@ -157,7 +140,10 @@ func (client *Client) GetServicePlansWithOfferings(query ...Query) ([]ServiceOff } func computeSpaceDetailsTable(included IncludedResources) map[string]planSpaceDetails { - orgNameFromGUID := lookuptable.NameFromGUID(included.Organizations) + orgNameFromGUID := make(map[string]string) + for _, org := range included.Organizations { + orgNameFromGUID[org.GUID] = org.Name + } spaceDetailsFromGUID := make(map[string]planSpaceDetails) for _, space := range included.Spaces { diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/sidecar.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/sidecar.go index f9e59c9..d804979 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/sidecar.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/sidecar.go @@ -2,21 +2,28 @@ package ccv3 import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" + + "code.cloudfoundry.org/cli/types" ) -func (client *Client) GetProcessSidecars(processGuid string) ([]resources.Sidecar, Warnings, error) { - var sidecars []resources.Sidecar +type Sidecar struct { + GUID string `json:"guid"` + Name string `json:"name"` + Command types.FilteredString `json:"command"` +} + +func (client *Client) GetProcessSidecars(processGuid string) ([]Sidecar, Warnings, error) { + var resources []Sidecar _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetProcessSidecarsRequest, URIParams: internal.Params{"process_guid": processGuid}, - ResponseBody: resources.Sidecar{}, + ResponseBody: Sidecar{}, AppendToList: func(item interface{}) error { - sidecars = append(sidecars, item.(resources.Sidecar)) + resources = append(resources, item.(Sidecar)) return nil }, }) - return sidecars, warnings, err + return resources, warnings, err } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/space_feature.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/space_feature.go index 462295b..4abbc8d 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/space_feature.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/space_feature.go @@ -2,11 +2,15 @@ package ccv3 import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" ) +type SpaceFeature struct { + Name string + Enabled bool +} + func (client *Client) GetSpaceFeature(spaceGUID string, featureName string) (bool, Warnings, error) { - var responseBody resources.SpaceFeature + var responseBody SpaceFeature _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.GetSpaceFeatureRequest, diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/stack.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/stack.go index e1704a3..d4bc55e 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/stack.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/stack.go @@ -5,19 +5,31 @@ import ( "code.cloudfoundry.org/cli/resources" ) +type Stack struct { + // GUID is a unique stack identifier. + GUID string `json:"guid"` + // Name is the name of the stack. + Name string `json:"name"` + // Description is the description for the stack + Description string `json:"description"` + + // Metadata is used for custom tagging of API resources + Metadata *resources.Metadata `json:"metadata,omitempty"` +} + // GetStacks lists stacks with optional filters. -func (client *Client) GetStacks(query ...Query) ([]resources.Stack, Warnings, error) { - var stacks []resources.Stack +func (client *Client) GetStacks(query ...Query) ([]Stack, Warnings, error) { + var resources []Stack _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetStacksRequest, Query: query, - ResponseBody: resources.Stack{}, + ResponseBody: Stack{}, AppendToList: func(item interface{}) error { - stacks = append(stacks, item.(resources.Stack)) + resources = append(resources, item.(Stack)) return nil }, }) - return stacks, warnings, err + return resources, warnings, err } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/target.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/target.go index 9d83183..9bad798 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/target.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/target.go @@ -26,8 +26,22 @@ type TargetSettings struct { // TargetCF sets the client to use the Cloud Controller specified in the // configuration. Any other configuration is also applied to the client. -func (client *Client) TargetCF(settings TargetSettings) { +func (client *Client) TargetCF(settings TargetSettings) (Info, Warnings, error) { client.CloudControllerURL = settings.URL client.InitializeConnection(settings) - client.InitializeRouter(settings.URL) + + rootInfo, resourceLinks, warnings, err := client.GetInfo() + if err != nil { + return Info{}, warnings, err + } + + client.Info = rootInfo + + resources := map[string]string{} + for resource, link := range resourceLinks { + resources[resource] = link.HREF + } + client.InitializeRouter(resources) + + return rootInfo, warnings, nil } diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/task.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/task.go index 2b67040..da818d1 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/task.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/task.go @@ -1,14 +1,50 @@ package ccv3 import ( + "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - "code.cloudfoundry.org/cli/resources" ) -// CreateApplication resources.Task runs a command in the Application environment +// Task represents a Cloud Controller V3 Task. +type Task struct { + // Command represents the command that will be executed. May be excluded + // based on the user's role. + Command string `json:"command,omitempty"` + // CreatedAt represents the time with zone when the object was created. + CreatedAt string `json:"created_at,omitempty"` + // DiskInMB represents the disk in MB allocated for the task. + DiskInMB uint64 `json:"disk_in_mb,omitempty"` + // GUID represents the unique task identifier. + GUID string `json:"guid,omitempty"` + // MemoryInMB represents the memory in MB allocated for the task. + MemoryInMB uint64 `json:"memory_in_mb,omitempty"` + // Name represents the name of the task. + Name string `json:"name,omitempty"` + // SequenceID represents the user-facing id of the task. This number is + // unique for every task associated with a given app. + SequenceID int64 `json:"sequence_id,omitempty"` + // State represents the task state. + State constant.TaskState `json:"state,omitempty"` + // Tasks can use a process as a template to fill in + // command, memory, disk values + // + // Using a pointer so that it can be set to nil to prevent + // json serialization when no template is used + Template *TaskTemplate `json:"template,omitempty"` +} + +type TaskTemplate struct { + Process TaskProcessTemplate `json:"process,omitempty"` +} + +type TaskProcessTemplate struct { + Guid string `json:"guid,omitempty"` +} + +// CreateApplicationTask runs a command in the Application environment // associated with the provided Application GUID. -func (client *Client) CreateApplicationTask(appGUID string, task resources.Task) (resources.Task, Warnings, error) { - var responseBody resources.Task +func (client *Client) CreateApplicationTask(appGUID string, task Task) (Task, Warnings, error) { + var responseBody Task _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PostApplicationTasksRequest, @@ -22,26 +58,26 @@ func (client *Client) CreateApplicationTask(appGUID string, task resources.Task) // GetApplicationTasks returns a list of tasks associated with the provided // application GUID. Results can be filtered by providing URL queries. -func (client *Client) GetApplicationTasks(appGUID string, query ...Query) ([]resources.Task, Warnings, error) { - var tasks []resources.Task +func (client *Client) GetApplicationTasks(appGUID string, query ...Query) ([]Task, Warnings, error) { + var resources []Task _, warnings, err := client.MakeListRequest(RequestParams{ RequestName: internal.GetApplicationTasksRequest, URIParams: internal.Params{"app_guid": appGUID}, Query: query, - ResponseBody: resources.Task{}, + ResponseBody: Task{}, AppendToList: func(item interface{}) error { - tasks = append(tasks, item.(resources.Task)) + resources = append(resources, item.(Task)) return nil }, }) - return tasks, warnings, err + return resources, warnings, err } // UpdateTaskCancel cancels a task. -func (client *Client) UpdateTaskCancel(taskGUID string) (resources.Task, Warnings, error) { - var responseBody resources.Task +func (client *Client) UpdateTaskCancel(taskGUID string) (Task, Warnings, error) { + var responseBody Task _, warnings, err := client.MakeRequest(RequestParams{ RequestName: internal.PutTaskCancelRequest, diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/user.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/user.go index 7b2aa8e..8841234 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/user.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/user.go @@ -60,14 +60,3 @@ func (client *Client) GetUsers(query ...Query) ([]resources.User, Warnings, erro return users, warnings, err } - -func (client *Client) WhoAmI() (resources.K8sUser, Warnings, error) { - var user resources.K8sUser - - _, warnings, err := client.MakeRequest(RequestParams{ - RequestName: internal.WhoAmI, - ResponseBody: &user, - }) - - return user, warnings, err -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccversion/maximum_version.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccversion/maximum_version.go deleted file mode 100644 index 8be3114..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccversion/maximum_version.go +++ /dev/null @@ -1,5 +0,0 @@ -package ccversion - -const ( - MaxVersionServiceProviderV2 = "2.46.0" -) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccversion/minimum_version.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccversion/minimum_version.go deleted file mode 100644 index 524f740..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/ccversion/minimum_version.go +++ /dev/null @@ -1,16 +0,0 @@ -package ccversion - -const ( - MinSupportedV2ClientVersion = "2.128.0" - MinSupportedClientVersionV8 = "3.99.0" - - MinVersionUpdateServiceNameWhenPlanNotVisibleV2 = "2.131.0" - MinVersionUpdateServiceInstanceMaintenanceInfoV2 = "2.135.0" - MinVersionMaintenanceInfoInSummaryV2 = "2.138.0" - - MinVersionCreateServiceBrokerV3 = "3.72.0" - MinVersionCreateSpaceScopedServiceBrokerV3 = "3.75.0" - - MinVersionHTTP2RoutingV3 = "3.104.0" - MinVersionSpaceSupporterV3 = "3.104.0" -) diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/connection.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/connection.go index 65ab216..d667b5e 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/connection.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/connection.go @@ -10,7 +10,7 @@ // the V2 and V3 api respectively. package cloudcontroller -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Connection +//go:generate counterfeiter . Connection // Connection creates and executes http requests type Connection interface { diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/kubernetes_authentication.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/kubernetes_authentication.go deleted file mode 100644 index 622bd58..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/kubernetes_authentication.go +++ /dev/null @@ -1,67 +0,0 @@ -package wrapper - -import ( - "net/http" - - "code.cloudfoundry.org/cli/actor/v7action" - "code.cloudfoundry.org/cli/api/cloudcontroller" - "code.cloudfoundry.org/cli/api/shared" - "code.cloudfoundry.org/cli/command" -) - -type KubernetesAuthentication struct { - connection cloudcontroller.Connection - config command.Config - k8sConfigGetter v7action.KubernetesConfigGetter -} - -func NewKubernetesAuthentication( - config command.Config, - k8sConfigGetter v7action.KubernetesConfigGetter, -) *KubernetesAuthentication { - - return &KubernetesAuthentication{ - config: config, - k8sConfigGetter: k8sConfigGetter, - } -} - -func (a *KubernetesAuthentication) Make(request *cloudcontroller.Request, passedResponse *cloudcontroller.Response) error { - roundTripper, err := shared.WrapForCFOnK8sAuth(a.config, a.k8sConfigGetter, connectionRoundTripper{ - connection: a.connection, - ccRequest: request, - ccResponse: passedResponse, - }) - if err != nil { - return err - } - - _, err = roundTripper.RoundTrip(request.Request) - - return err -} - -func (a *KubernetesAuthentication) Wrap(innerconnection cloudcontroller.Connection) cloudcontroller.Connection { - a.connection = innerconnection - - return a -} - -type connectionRoundTripper struct { - connection cloudcontroller.Connection - ccRequest *cloudcontroller.Request - ccResponse *cloudcontroller.Response -} - -func (rt connectionRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - // The passed `*req` is a shallow clone of the original `*req` with the auth header added. - // So we need to reset it on the `ccRequest`. - rt.ccRequest.Request = req - - err := rt.connection.Make(rt.ccRequest, rt.ccResponse) - if err != nil { - return nil, err - } - - return rt.ccResponse.HTTPResponse, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/request_logger.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/request_logger.go index e354cad..6c4ee57 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/request_logger.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/request_logger.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . RequestLoggerOutput +//go:generate counterfeiter . RequestLoggerOutput // RequestLoggerOutput is the interface for displaying logs type RequestLoggerOutput interface { diff --git a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/uaa_authentication.go b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/uaa_authentication.go index d11ae16..5150d29 100644 --- a/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/uaa_authentication.go +++ b/vendor/code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/uaa_authentication.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/uaa" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . UAAClient +//go:generate counterfeiter . UAAClient const accessTokenExpirationMargin = time.Minute @@ -19,7 +19,7 @@ type UAAClient interface { RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error) } -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . TokenCache +//go:generate counterfeiter . TokenCache // TokenCache is where the UAA token information is stored. type TokenCache interface { @@ -50,13 +50,16 @@ func NewUAAAuthentication(client UAAClient, cache TokenCache) *UAAAuthentication // wrapped connection's Make. If the client is not set on the wrapper, it will // not add any header or handle any authentication errors. func (t *UAAAuthentication) Make(request *cloudcontroller.Request, passedResponse *cloudcontroller.Response) error { - if request.Header.Get("Authorization") == "" && (t.cache.AccessToken() != "" || t.cache.RefreshToken() != "") { + if t.client == nil { + return t.connection.Make(request, passedResponse) + } + + if t.cache.AccessToken() != "" || t.cache.RefreshToken() != "" { // assert a valid access token for authenticated requests - err := t.refreshTokenIfNecessary(t.cache.AccessToken()) + err := t.refreshToken() if nil != err { return err } - request.Header.Set("Authorization", t.cache.AccessToken()) } @@ -77,10 +80,10 @@ func (t *UAAAuthentication) Wrap(innerconnection cloudcontroller.Connection) clo // refreshToken refreshes the JWT access token if it is expired or about to expire. // If the access token is not yet expired, no action is performed. -func (t *UAAAuthentication) refreshTokenIfNecessary(accessToken string) error { +func (t *UAAAuthentication) refreshToken() error { var expiresIn time.Duration - tokenStr := strings.TrimPrefix(accessToken, "bearer ") + tokenStr := strings.TrimPrefix(t.cache.AccessToken(), "bearer ") token, err := jws.ParseJWT([]byte(tokenStr)) if err == nil { diff --git a/vendor/code.cloudfoundry.org/cli/api/router/connection.go b/vendor/code.cloudfoundry.org/cli/api/router/connection.go index 9570fab..0075df8 100644 --- a/vendor/code.cloudfoundry.org/cli/api/router/connection.go +++ b/vendor/code.cloudfoundry.org/cli/api/router/connection.go @@ -1,7 +1,7 @@ // Package router contains utilities to make call to the router API package router -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Connection +//go:generate counterfeiter . Connection // Connection creates and executes http requests type Connection interface { diff --git a/vendor/code.cloudfoundry.org/cli/api/router/connection_wrapper.go b/vendor/code.cloudfoundry.org/cli/api/router/connection_wrapper.go index 61ade20..cd407d1 100644 --- a/vendor/code.cloudfoundry.org/cli/api/router/connection_wrapper.go +++ b/vendor/code.cloudfoundry.org/cli/api/router/connection_wrapper.go @@ -1,6 +1,6 @@ package router -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . ConnectionWrapper +//go:generate counterfeiter . ConnectionWrapper // ConnectionWrapper can wrap a given connection allowing the wrapper to modify // all requests going in and out of the given connection. diff --git a/vendor/code.cloudfoundry.org/cli/api/router/wrapper/request_logger.go b/vendor/code.cloudfoundry.org/cli/api/router/wrapper/request_logger.go index e843d15..3057d98 100644 --- a/vendor/code.cloudfoundry.org/cli/api/router/wrapper/request_logger.go +++ b/vendor/code.cloudfoundry.org/cli/api/router/wrapper/request_logger.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/api/router" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . RequestLoggerOutput +//go:generate counterfeiter . RequestLoggerOutput // RequestLoggerOutput is the interface for displaying logs type RequestLoggerOutput interface { diff --git a/vendor/code.cloudfoundry.org/cli/api/router/wrapper/uaa_authentication.go b/vendor/code.cloudfoundry.org/cli/api/router/wrapper/uaa_authentication.go index 6fca8a0..ca4ce5b 100644 --- a/vendor/code.cloudfoundry.org/cli/api/router/wrapper/uaa_authentication.go +++ b/vendor/code.cloudfoundry.org/cli/api/router/wrapper/uaa_authentication.go @@ -6,14 +6,14 @@ import ( "code.cloudfoundry.org/cli/api/uaa" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . UAAClient +//go:generate counterfeiter . UAAClient // UAAClient is the interface for getting a valid access token type UAAClient interface { RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error) } -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . TokenCache +//go:generate counterfeiter . TokenCache // TokenCache is where the UAA token information is stored. type TokenCache interface { diff --git a/vendor/code.cloudfoundry.org/cli/api/shared/wrap_for_cf_on_k8s.go b/vendor/code.cloudfoundry.org/cli/api/shared/wrap_for_cf_on_k8s.go deleted file mode 100644 index d5734d6..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/shared/wrap_for_cf_on_k8s.go +++ /dev/null @@ -1,124 +0,0 @@ -package shared - -import ( - "bytes" - "crypto/tls" - "crypto/x509" - "encoding/base64" - "encoding/pem" - "errors" - "fmt" - "net/http" - - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/client-go/transport" - - "code.cloudfoundry.org/cli/actor/v7action" - "code.cloudfoundry.org/cli/command" - - // imported for the side effects - _ "k8s.io/client-go/plugin/pkg/client/auth/azure" - _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" - _ "k8s.io/client-go/plugin/pkg/client/auth/oidc" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 net/http.RoundTripper - -func WrapForCFOnK8sAuth(config command.Config, k8sConfigGetter v7action.KubernetesConfigGetter, roundTripper http.RoundTripper) (http.RoundTripper, error) { - username, err := config.CurrentUserName() - if err != nil { - return nil, err - } - if username == "" { - return nil, errors.New("current user not set") - } - - k8sConfig, err := k8sConfigGetter.Get() - if err != nil { - return nil, err - } - - restConfig, err := clientcmd.NewDefaultClientConfig( - *k8sConfig, - &clientcmd.ConfigOverrides{ - Context: api.Context{AuthInfo: username}, - }, - ).ClientConfig() - if err != nil { - return nil, err - } - - // Special case for certs, since we don't want mtls - cert, err := getCert(restConfig) - if err != nil { - return nil, err - } - - transportConfig, err := restConfig.TransportConfig() - if err != nil { - return nil, fmt.Errorf("failed to get transport config: %w", err) - } - - if cert != nil { - return certRoundTripper{ - cert: cert, - roundTripper: roundTripper, - }, nil - } - - if transportConfig.WrapTransport == nil { - // i.e. not auth-provider or exec plugin - return transport.HTTPWrappersForConfig(transportConfig, roundTripper) - } - - // using auth provider to generate token - return transportConfig.WrapTransport(roundTripper), nil -} - -func getCert(restConfig *rest.Config) (*tls.Certificate, error) { - tlsConfig, err := rest.TLSConfigFor(restConfig) - if err != nil { - return nil, fmt.Errorf("failed to get tls config: %w", err) - } - - if tlsConfig != nil && tlsConfig.GetClientCertificate != nil { - cert, err := tlsConfig.GetClientCertificate(nil) - if err != nil { - return nil, fmt.Errorf("failed to get client certificate: %w", err) - } - - if len(cert.Certificate) > 0 && cert.PrivateKey != nil { - return cert, nil - } - } - return nil, nil -} - -type certRoundTripper struct { - cert *tls.Certificate - roundTripper http.RoundTripper -} - -func (rt certRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - var buf bytes.Buffer - - if err := pem.Encode(&buf, &pem.Block{Type: "CERTIFICATE", Bytes: rt.cert.Certificate[0]}); err != nil { - return nil, fmt.Errorf("could not convert certificate to PEM format: %w", err) - } - - key, err := x509.MarshalPKCS8PrivateKey(rt.cert.PrivateKey) - if err != nil { - return nil, fmt.Errorf("could not marshal private key: %w", err) - } - - if err := pem.Encode(&buf, &pem.Block{Type: "PRIVATE KEY", Bytes: key}); err != nil { - return nil, fmt.Errorf("could not convert key to PEM format: %w", err) - } - - auth := "ClientCert " + base64.StdEncoding.EncodeToString(buf.Bytes()) - req.Header.Set("Authorization", auth) - - return rt.roundTripper.RoundTrip(req) -} diff --git a/vendor/code.cloudfoundry.org/cli/api/uaa/config.go b/vendor/code.cloudfoundry.org/cli/api/uaa/config.go index 729d3fa..33e7289 100644 --- a/vendor/code.cloudfoundry.org/cli/api/uaa/config.go +++ b/vendor/code.cloudfoundry.org/cli/api/uaa/config.go @@ -2,7 +2,7 @@ package uaa import "time" -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Config +//go:generate counterfeiter . Config // Config allows the Client to be configured type Config interface { diff --git a/vendor/code.cloudfoundry.org/cli/api/uaa/connection.go b/vendor/code.cloudfoundry.org/cli/api/uaa/connection.go index 2192413..f75c7d7 100644 --- a/vendor/code.cloudfoundry.org/cli/api/uaa/connection.go +++ b/vendor/code.cloudfoundry.org/cli/api/uaa/connection.go @@ -2,7 +2,7 @@ package uaa import "net/http" -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Connection +//go:generate counterfeiter . Connection // Connection creates and executes http requests type Connection interface { diff --git a/vendor/code.cloudfoundry.org/cli/api/uaa/connection_wrapper.go b/vendor/code.cloudfoundry.org/cli/api/uaa/connection_wrapper.go index 18ede34..9490e8d 100644 --- a/vendor/code.cloudfoundry.org/cli/api/uaa/connection_wrapper.go +++ b/vendor/code.cloudfoundry.org/cli/api/uaa/connection_wrapper.go @@ -1,6 +1,6 @@ package uaa -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . ConnectionWrapper +//go:generate counterfeiter . ConnectionWrapper // ConnectionWrapper can wrap a given connection allowing the wrapper to modify // all requests going in and out of the given connection. diff --git a/vendor/code.cloudfoundry.org/cli/api/uaa/info.go b/vendor/code.cloudfoundry.org/cli/api/uaa/info.go index dc24ae8..66ef075 100644 --- a/vendor/code.cloudfoundry.org/cli/api/uaa/info.go +++ b/vendor/code.cloudfoundry.org/cli/api/uaa/info.go @@ -2,10 +2,19 @@ package uaa // Info represents a GET response from a login server type Info struct { + App struct { + Version string `json:"version"` + } `json:"app"` Links struct { UAA string `json:"uaa"` Login string `json:"login"` } `json:"links"` + Prompts map[string][]string `json:"prompts"` +} + +// APIVersion is the version of the server. +func (info Info) APIVersion() string { + return info.App.Version } // LoginLink is the URL to the login server. @@ -13,15 +22,19 @@ func (info Info) LoginLink() string { return info.Links.Login } +func (info Info) LoginPrompts() map[string][]string { + return info.Prompts +} + // UAALink is the URL to the UAA server. func (info Info) UAALink() string { return info.Links.UAA } // NewInfo returns back a new -func NewInfo(uaaURL string, loginURL string) Info { +func NewInfo(link string) Info { var info Info - info.Links.Login = loginURL - info.Links.UAA = uaaURL + info.Links.Login = link + info.Links.UAA = link return info } diff --git a/vendor/code.cloudfoundry.org/cli/api/uaa/prompts.go b/vendor/code.cloudfoundry.org/cli/api/uaa/prompts.go deleted file mode 100644 index f65d379..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/uaa/prompts.go +++ /dev/null @@ -1,32 +0,0 @@ -package uaa - -import ( - "fmt" - "net/http" -) - -func (client *Client) GetLoginPrompts() (map[string][]string, error) { - type loginResponse struct { - Prompts map[string][]string `json:"prompts"` - } - - request, err := client.newRequest(requestOptions{ - Method: http.MethodGet, - URL: fmt.Sprintf("%s/login", client.LoginLink()), - }) - if err != nil { - return nil, err - } - - info := loginResponse{} - response := Response{ - Result: &info, - } - - err = client.connection.Make(request, &response) - if err != nil { - return nil, err - } - - return info.Prompts, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/api/uaa/resources.go b/vendor/code.cloudfoundry.org/cli/api/uaa/resources.go index 5a674db..92a8899 100644 --- a/vendor/code.cloudfoundry.org/cli/api/uaa/resources.go +++ b/vendor/code.cloudfoundry.org/cli/api/uaa/resources.go @@ -1,22 +1,42 @@ package uaa import ( + "fmt" + "net/http" + "code.cloudfoundry.org/cli/api/uaa/internal" ) // SetupResources configures the client to use the specified settings and diescopers the UAA and Authentication resources -func (client *Client) SetupResources(uaaURL string, loginURL string) error { - info := NewInfo(uaaURL, loginURL) +func (client *Client) SetupResources(bootstrapURL string) error { + request, err := client.newRequest(requestOptions{ + Method: http.MethodGet, + URL: fmt.Sprintf("%s/login", bootstrapURL), + }) + + if err != nil { + return err + } + + info := NewInfo(bootstrapURL) + response := Response{ + Result: &info, + } + + err = client.connection.Make(request, &response) + if err != nil { + return err + } resources := map[string]string{ - "uaa": uaaURL, - "authorization_endpoint": loginURL, + "uaa": info.UAALink(), + "authorization_endpoint": bootstrapURL, } client.router = internal.NewRouter(internal.APIRoutes, resources) client.Info = info - client.config.SetUAAEndpoint(uaaURL) + client.config.SetUAAEndpoint(info.UAALink()) return nil } diff --git a/vendor/code.cloudfoundry.org/cli/api/uaa/version.go b/vendor/code.cloudfoundry.org/cli/api/uaa/version.go deleted file mode 100644 index 9e3a63c..0000000 --- a/vendor/code.cloudfoundry.org/cli/api/uaa/version.go +++ /dev/null @@ -1,35 +0,0 @@ -package uaa - -import ( - "fmt" - "net/http" -) - -func (client *Client) GetAPIVersion() (string, error) { - type loginResponse struct { - App struct { - Version string `json:"version"` - } `json:"app"` - } - - request, err := client.newRequest(requestOptions{ - Method: http.MethodGet, - URL: fmt.Sprintf("%s/login", client.LoginLink()), - }) - - if err != nil { - return "", err - } - - info := loginResponse{} - response := Response{ - Result: &info, - } - - err = client.connection.Make(request, &response) - if err != nil { - return "", err - } - - return info.App.Version, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/api/uaa/wrapper/request_logger.go b/vendor/code.cloudfoundry.org/cli/api/uaa/wrapper/request_logger.go index e68a8ad..058edf6 100644 --- a/vendor/code.cloudfoundry.org/cli/api/uaa/wrapper/request_logger.go +++ b/vendor/code.cloudfoundry.org/cli/api/uaa/wrapper/request_logger.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/api/uaa" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . RequestLoggerOutput +//go:generate counterfeiter . RequestLoggerOutput // RequestLoggerOutput is the interface for displaying logs type RequestLoggerOutput interface { diff --git a/vendor/code.cloudfoundry.org/cli/api/uaa/wrapper/uaa_authentication.go b/vendor/code.cloudfoundry.org/cli/api/uaa/wrapper/uaa_authentication.go index 10b1268..911bdf1 100644 --- a/vendor/code.cloudfoundry.org/cli/api/uaa/wrapper/uaa_authentication.go +++ b/vendor/code.cloudfoundry.org/cli/api/uaa/wrapper/uaa_authentication.go @@ -9,14 +9,14 @@ import ( "code.cloudfoundry.org/cli/api/uaa" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . UAAClient +//go:generate counterfeiter . UAAClient // UAAClient is the interface for getting a valid access token type UAAClient interface { RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error) } -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . TokenCache +//go:generate counterfeiter . TokenCache // TokenCache is where the UAA token information is stored. type TokenCache interface { diff --git a/vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor.go b/vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor.go deleted file mode 100644 index 53ae6af..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor.go +++ /dev/null @@ -1,90 +0,0 @@ -package configuration - -import ( - "io/ioutil" - "os" -) - -const ( - filePermissions = 0600 - dirPermissions = 0700 -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Persistor - -type Persistor interface { - Delete() - Exists() bool - Load(DataInterface) error - Save(DataInterface) error -} - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . DataInterface - -type DataInterface interface { - JSONMarshalV3() ([]byte, error) - JSONUnmarshalV3([]byte) error -} - -type DiskPersistor struct { - filePath string -} - -func NewDiskPersistor(path string) DiskPersistor { - return DiskPersistor{ - filePath: path, - } -} - -func (dp DiskPersistor) Exists() bool { - _, err := os.Stat(dp.filePath) - if err != nil && !os.IsExist(err) { - return false - } - return true -} - -func (dp DiskPersistor) Delete() { - _ = os.Remove(dp.filePath) -} - -func (dp DiskPersistor) Load(data DataInterface) error { - err := dp.read(data) - if os.IsPermission(err) { - return err - } - - if err != nil { - err = dp.write(data) - } - return err -} - -func (dp DiskPersistor) Save(data DataInterface) error { - return dp.write(data) -} - -func (dp DiskPersistor) read(data DataInterface) error { - err := dp.makeDirectory() - if err != nil { - return err - } - - jsonBytes, err := ioutil.ReadFile(dp.filePath) - if err != nil { - return err - } - - err = data.JSONUnmarshalV3(jsonBytes) - return err -} - -func (dp DiskPersistor) write(data DataInterface) error { - bytes, err := data.JSONMarshalV3() - if err != nil { - return err - } - - err = ioutil.WriteFile(dp.filePath, bytes, filePermissions) - return err -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor_unix.go b/vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor_unix.go deleted file mode 100644 index bdbfb3d..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor_unix.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build !windows -// +build !windows - -package configuration - -import ( - "os" - "path/filepath" -) - -func (dp DiskPersistor) makeDirectory() error { - return os.MkdirAll(filepath.Dir(dp.filePath), dirPermissions) -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor_win.go b/vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor_win.go deleted file mode 100644 index 663a768..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/configuration/config_disk_persistor_win.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build windows -// +build windows - -package configuration - -import ( - "os" - "path/filepath" - "syscall" -) - -func (dp DiskPersistor) makeDirectory() error { - dir := filepath.Dir(dp.filePath) - - err := os.MkdirAll(dir, dirPermissions) - if err != nil { - return err - } - - p, err := syscall.UTF16PtrFromString(dir) - if err != nil { - return err - } - - attrs, err := syscall.GetFileAttributes(p) - if err != nil { - return err - } - - return syscall.SetFileAttributes(p, attrs|syscall.FILE_ATTRIBUTE_HIDDEN) -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/access_token.go b/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/access_token.go deleted file mode 100644 index 0ee7171..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/access_token.go +++ /dev/null @@ -1,61 +0,0 @@ -package coreconfig - -import ( - "encoding/base64" - "encoding/json" - "strings" -) - -type TokenInfo struct { - Username string `json:"user_name"` - ClientID string `json:"client_id"` - Email string `json:"email"` - UserGUID string `json:"user_id"` -} - -func NewTokenInfo(accessToken string) (info TokenInfo) { - tokenJSON, err := DecodeAccessToken(accessToken) - if err != nil { - return TokenInfo{} - } - - info = TokenInfo{} - err = json.Unmarshal(tokenJSON, &info) - if err != nil { - return TokenInfo{} - } - - return info -} - -func DecodeAccessToken(accessToken string) (tokenJSON []byte, err error) { - tokenParts := strings.Split(accessToken, " ") - - if len(tokenParts) < 2 { - return - } - - token := tokenParts[1] - encodedParts := strings.Split(token, ".") - - if len(encodedParts) < 3 { - return - } - - encodedTokenJSON := encodedParts[1] - return base64Decode(encodedTokenJSON) -} - -func base64Decode(encodedData string) ([]byte, error) { - return base64.StdEncoding.DecodeString(restorePadding(encodedData)) -} - -func restorePadding(seg string) string { - switch len(seg) % 4 { - case 2: - seg = seg + "==" - case 3: - seg = seg + "=" - } - return seg -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/api_config_refresher.go b/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/api_config_refresher.go deleted file mode 100644 index 3e933ce..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/api_config_refresher.go +++ /dev/null @@ -1,55 +0,0 @@ -package coreconfig - -import ( - "strings" - - . "code.cloudfoundry.org/cli/cf/i18n" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . EndpointRepository - -type EndpointRepository interface { - GetCCInfo(string) (*CCInfo, string, error) -} - -type APIConfigRefresher struct { - EndpointRepo EndpointRepository - Config ReadWriter - Endpoint string -} - -func (a APIConfigRefresher) Refresh() (Warning, error) { - ccInfo, endpoint, err := a.EndpointRepo.GetCCInfo(a.Endpoint) - if err != nil { - return nil, err - } - - if endpoint != a.Config.APIEndpoint() { - a.Config.ClearSession() - } - - a.Config.SetAPIEndpoint(endpoint) - a.Config.SetAPIVersion(ccInfo.APIVersion) - a.Config.SetAuthenticationEndpoint(ccInfo.AuthorizationEndpoint) - a.Config.SetSSHOAuthClient(ccInfo.SSHOAuthClient) - a.Config.SetMinCLIVersion(ccInfo.MinCLIVersion) - a.Config.SetMinRecommendedCLIVersion(ccInfo.MinRecommendedCLIVersion) - - a.Config.SetDopplerEndpoint(ccInfo.DopplerEndpoint) - a.Config.SetRoutingAPIEndpoint(ccInfo.RoutingAPIEndpoint) - - if !strings.HasPrefix(endpoint, "https://") { - return new(insecureWarning), nil - } - return nil, nil -} - -type Warning interface { - Warn() string -} - -type insecureWarning struct{} - -func (w insecureWarning) Warn() string { - return T("Warning: Insecure http API endpoint detected: secure https API endpoints are recommended\n") -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/config_data.go b/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/config_data.go deleted file mode 100644 index a5314a1..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/config_data.go +++ /dev/null @@ -1,77 +0,0 @@ -package coreconfig - -import ( - "encoding/json" - - "code.cloudfoundry.org/cli/cf/models" - "code.cloudfoundry.org/cli/util/configv3" -) - -type AuthPromptType string - -const ( - AuthPromptTypeText AuthPromptType = "TEXT" - AuthPromptTypePassword AuthPromptType = "PASSWORD" - AuthPromptTypeMenu AuthPromptType = "MENU" -) - -type AuthPrompt struct { - Type AuthPromptType - DisplayName string - Entries []string -} - -type Data struct { - AccessToken string - APIVersion string - AsyncTimeout uint - AuthorizationEndpoint string - ColorEnabled string - ConfigVersion int - DopplerEndPoint string - Locale string - LogCacheEndPoint string - MinCLIVersion string - MinRecommendedCLIVersion string - OrganizationFields models.OrganizationFields - PluginRepos []models.PluginRepo - RefreshToken string - RoutingAPIEndpoint string - SpaceFields models.SpaceFields - SSHOAuthClient string - SSLDisabled bool - Target string - Trace string - UaaEndpoint string - UAAGrantType string - UAAOAuthClient string - UAAOAuthClientSecret string -} - -func NewData() *Data { - data := new(Data) - - data.UAAOAuthClient = "cf" - data.UAAOAuthClientSecret = "" - - return data -} - -func (d *Data) JSONMarshalV3() ([]byte, error) { - d.ConfigVersion = configv3.CurrentConfigVersion - return json.MarshalIndent(d, "", " ") -} - -func (d *Data) JSONUnmarshalV3(input []byte) error { - err := json.Unmarshal(input, d) - if err != nil { - return err - } - - if d.ConfigVersion != configv3.CurrentConfigVersion { - *d = Data{} - return nil - } - - return nil -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/config_repository.go b/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/config_repository.go deleted file mode 100644 index d3a6006..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/configuration/coreconfig/config_repository.go +++ /dev/null @@ -1,607 +0,0 @@ -package coreconfig - -import ( - "strings" - "sync" - - "code.cloudfoundry.org/cli/cf/configuration" - "code.cloudfoundry.org/cli/cf/models" - "code.cloudfoundry.org/cli/version" - "github.com/blang/semver" -) - -type ConfigRepository struct { - CFCLIVersion string - data *Data - mutex *sync.RWMutex - initOnce *sync.Once - persistor configuration.Persistor - onError func(error) -} - -type CCInfo struct { - APIVersion string `json:"api_version"` - AuthorizationEndpoint string `json:"authorization_endpoint"` - DopplerEndpoint string `json:"doppler_logging_endpoint"` - LogCacheEndpoint string `json:"log_cache_endpoint"` - MinCLIVersion string `json:"min_cli_version"` - MinRecommendedCLIVersion string `json:"min_recommended_cli_version"` - SSHOAuthClient string `json:"app_ssh_oauth_client"` - RoutingAPIEndpoint string `json:"routing_endpoint"` -} - -func NewRepositoryFromFilepath(filepath string, errorHandler func(error)) Repository { - if errorHandler == nil { - return nil - } - return NewRepositoryFromPersistor(configuration.NewDiskPersistor(filepath), errorHandler) -} - -func NewRepositoryFromPersistor(persistor configuration.Persistor, errorHandler func(error)) Repository { - data := NewData() - if !persistor.Exists() { - //set default plugin repo - data.PluginRepos = append(data.PluginRepos, models.PluginRepo{ - Name: "CF-Community", - URL: "https://plugins.cloudfoundry.org", - }) - } - - return &ConfigRepository{ - data: data, - mutex: new(sync.RWMutex), - initOnce: new(sync.Once), - persistor: persistor, - onError: errorHandler, - } -} - -type Reader interface { - APIEndpoint() string - APIVersion() string - HasAPIEndpoint() bool - - AuthenticationEndpoint() string - DopplerEndpoint() string - LogCacheEndpoint() string - UaaEndpoint() string - RoutingAPIEndpoint() string - AccessToken() string - UAAOAuthClient() string - UAAOAuthClientSecret() string - SSHOAuthClient() string - RefreshToken() string - - OrganizationFields() models.OrganizationFields - HasOrganization() bool - - SpaceFields() models.SpaceFields - HasSpace() bool - - Username() string - UserGUID() string - UserEmail() string - IsLoggedIn() bool - IsSSLDisabled() bool - IsMinAPIVersion(semver.Version) bool - IsMinCLIVersion(string) bool - MinCLIVersion() string - MinRecommendedCLIVersion() string - CLIVersion() string - - AsyncTimeout() uint - Trace() string - - ColorEnabled() string - - Locale() string - - PluginRepos() []models.PluginRepo -} - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . ReadWriter - -type ReadWriter interface { - Reader - ClearSession() - SetAccessToken(string) - SetAPIEndpoint(string) - SetAPIVersion(string) - SetAsyncTimeout(uint) - SetAuthenticationEndpoint(string) - SetCLIVersion(string) - SetColorEnabled(string) - SetDopplerEndpoint(string) - SetLogCacheEndpoint(string) - SetLocale(string) - SetMinCLIVersion(string) - SetMinRecommendedCLIVersion(string) - SetOrganizationFields(models.OrganizationFields) - SetPluginRepo(models.PluginRepo) - SetRefreshToken(string) - SetRoutingAPIEndpoint(string) - SetSpaceFields(models.SpaceFields) - SetSSHOAuthClient(string) - SetSSLDisabled(bool) - SetTrace(string) - SetUaaEndpoint(string) - SetUAAGrantType(string) - SetUAAOAuthClient(string) - SetUAAOAuthClientSecret(string) - UAAGrantType() string - UnSetPluginRepo(int) -} - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Repository - -type Repository interface { - ReadWriter - Close() -} - -// ACCESS CONTROL - -func (c *ConfigRepository) init() { - c.initOnce.Do(func() { - err := c.persistor.Load(c.data) - if err != nil { - c.onError(err) - } - }) -} - -func (c *ConfigRepository) read(cb func()) { - c.mutex.RLock() - defer c.mutex.RUnlock() - c.init() - - cb() -} - -func (c *ConfigRepository) write(cb func()) { - c.mutex.Lock() - defer c.mutex.Unlock() - c.init() - - cb() - - err := c.persistor.Save(c.data) - if err != nil { - c.onError(err) - } -} - -// CLOSERS - -func (c *ConfigRepository) Close() { - c.read(func() { - // perform a read to ensure write lock has been cleared - }) -} - -// GETTERS - -func (c *ConfigRepository) APIVersion() (apiVersion string) { - c.read(func() { - apiVersion = c.data.APIVersion - }) - return -} - -func (c *ConfigRepository) AuthenticationEndpoint() (authEndpoint string) { - c.read(func() { - authEndpoint = c.data.AuthorizationEndpoint - }) - return -} - -func (c *ConfigRepository) DopplerEndpoint() (dopplerEndpoint string) { - c.read(func() { - dopplerEndpoint = c.data.DopplerEndPoint - }) - - return -} - -func (c *ConfigRepository) LogCacheEndpoint() (logCacheEndpoint string) { - c.read(func() { - logCacheEndpoint = c.data.LogCacheEndPoint - }) - - return -} - -func (c *ConfigRepository) UaaEndpoint() (uaaEndpoint string) { - c.read(func() { - uaaEndpoint = c.data.UaaEndpoint - }) - return -} - -func (c *ConfigRepository) RoutingAPIEndpoint() (routingAPIEndpoint string) { - c.read(func() { - routingAPIEndpoint = c.data.RoutingAPIEndpoint - }) - return -} - -func (c *ConfigRepository) APIEndpoint() string { - var apiEndpoint string - c.read(func() { - apiEndpoint = c.data.Target - }) - apiEndpoint = strings.TrimRight(apiEndpoint, "/") - - return apiEndpoint -} - -func (c *ConfigRepository) HasAPIEndpoint() (hasEndpoint bool) { - c.read(func() { - hasEndpoint = c.data.APIVersion != "" && c.data.Target != "" - }) - return -} - -func (c *ConfigRepository) AccessToken() (accessToken string) { - c.read(func() { - accessToken = c.data.AccessToken - }) - return -} - -func (c *ConfigRepository) UAAOAuthClient() (clientID string) { - c.read(func() { - clientID = c.data.UAAOAuthClient - }) - return -} - -func (c *ConfigRepository) UAAOAuthClientSecret() (clientID string) { - c.read(func() { - clientID = c.data.UAAOAuthClientSecret - }) - return -} - -func (c *ConfigRepository) SSHOAuthClient() (clientID string) { - c.read(func() { - clientID = c.data.SSHOAuthClient - }) - return -} - -func (c *ConfigRepository) RefreshToken() (refreshToken string) { - c.read(func() { - refreshToken = c.data.RefreshToken - }) - return -} - -func (c *ConfigRepository) OrganizationFields() (org models.OrganizationFields) { - c.read(func() { - org = c.data.OrganizationFields - }) - return -} - -func (c *ConfigRepository) SpaceFields() (space models.SpaceFields) { - c.read(func() { - space = c.data.SpaceFields - }) - return -} - -func (c *ConfigRepository) UserEmail() (email string) { - c.read(func() { - email = NewTokenInfo(c.data.AccessToken).Email - }) - return -} - -func (c *ConfigRepository) UserGUID() (guid string) { - c.read(func() { - guid = NewTokenInfo(c.data.AccessToken).UserGUID - }) - return -} - -func (c *ConfigRepository) Username() (name string) { - c.read(func() { - t := NewTokenInfo(c.data.AccessToken) - if t.Username != "" { - name = t.Username - } else { - name = t.ClientID - } - }) - return -} - -func (c *ConfigRepository) IsLoggedIn() (loggedIn bool) { - c.read(func() { - loggedIn = c.data.AccessToken != "" - }) - return -} - -func (c *ConfigRepository) HasOrganization() (hasOrg bool) { - c.read(func() { - hasOrg = c.data.OrganizationFields.GUID != "" && c.data.OrganizationFields.Name != "" - }) - return -} - -func (c *ConfigRepository) HasSpace() (hasSpace bool) { - c.read(func() { - hasSpace = c.data.SpaceFields.GUID != "" && c.data.SpaceFields.Name != "" - }) - return -} - -func (c *ConfigRepository) IsSSLDisabled() (isSSLDisabled bool) { - c.read(func() { - isSSLDisabled = c.data.SSLDisabled - }) - return -} - -// SetCLIVersion should only be used in testing -func (c *ConfigRepository) SetCLIVersion(v string) { - c.CFCLIVersion = v -} - -func (c *ConfigRepository) CLIVersion() string { - if c.CFCLIVersion == "" { - return version.VersionString() - } else { - return c.CFCLIVersion - } -} - -func (c *ConfigRepository) IsMinAPIVersion(requiredVersion semver.Version) bool { - var apiVersion string - c.read(func() { - apiVersion = c.data.APIVersion - }) - - actualVersion, err := semver.Make(apiVersion) - if err != nil { - return false - } - return actualVersion.GTE(requiredVersion) -} - -func (c *ConfigRepository) IsMinCLIVersion(checkVersion string) bool { - if checkVersion == version.DefaultVersion { - return true - } - var minCLIVersion string - c.read(func() { - minCLIVersion = c.data.MinCLIVersion - }) - if minCLIVersion == "" { - return true - } - - actualVersion, err := semver.Make(checkVersion) - if err != nil { - return false - } - requiredVersion, err := semver.Make(minCLIVersion) - if err != nil { - return false - } - return actualVersion.GTE(requiredVersion) -} - -func (c *ConfigRepository) MinCLIVersion() (minCLIVersion string) { - c.read(func() { - minCLIVersion = c.data.MinCLIVersion - }) - return -} - -func (c *ConfigRepository) MinRecommendedCLIVersion() (minRecommendedCLIVersion string) { - c.read(func() { - minRecommendedCLIVersion = c.data.MinRecommendedCLIVersion - }) - return -} - -func (c *ConfigRepository) AsyncTimeout() (timeout uint) { - c.read(func() { - timeout = c.data.AsyncTimeout - }) - return -} - -func (c *ConfigRepository) Trace() (trace string) { - c.read(func() { - trace = c.data.Trace - }) - return -} - -func (c *ConfigRepository) ColorEnabled() (enabled string) { - c.read(func() { - enabled = c.data.ColorEnabled - }) - return -} - -func (c *ConfigRepository) Locale() (locale string) { - c.read(func() { - locale = c.data.Locale - }) - return -} - -func (c *ConfigRepository) PluginRepos() (repos []models.PluginRepo) { - c.read(func() { - repos = c.data.PluginRepos - }) - return -} - -// SETTERS - -func (c *ConfigRepository) ClearSession() { - c.write(func() { - c.data.AccessToken = "" - c.data.RefreshToken = "" - c.data.OrganizationFields = models.OrganizationFields{} - c.data.SpaceFields = models.SpaceFields{} - }) -} - -func (c *ConfigRepository) SetAPIEndpoint(endpoint string) { - c.write(func() { - c.data.Target = endpoint - }) -} - -func (c *ConfigRepository) SetAPIVersion(version string) { - c.write(func() { - c.data.APIVersion = version - }) -} - -func (c *ConfigRepository) SetMinCLIVersion(version string) { - c.write(func() { - c.data.MinCLIVersion = version - }) -} - -func (c *ConfigRepository) SetMinRecommendedCLIVersion(version string) { - c.write(func() { - c.data.MinRecommendedCLIVersion = version - }) -} - -func (c *ConfigRepository) SetAuthenticationEndpoint(endpoint string) { - c.write(func() { - c.data.AuthorizationEndpoint = endpoint - }) -} - -func (c *ConfigRepository) SetDopplerEndpoint(endpoint string) { - c.write(func() { - c.data.DopplerEndPoint = endpoint - }) -} - -func (c *ConfigRepository) SetLogCacheEndpoint(endpoint string) { - c.write(func() { - c.data.LogCacheEndPoint = endpoint - }) -} - -func (c *ConfigRepository) SetUaaEndpoint(uaaEndpoint string) { - c.write(func() { - c.data.UaaEndpoint = uaaEndpoint - }) -} - -func (c *ConfigRepository) SetRoutingAPIEndpoint(routingAPIEndpoint string) { - c.write(func() { - c.data.RoutingAPIEndpoint = routingAPIEndpoint - }) -} - -func (c *ConfigRepository) SetAccessToken(token string) { - c.write(func() { - c.data.AccessToken = token - }) -} - -func (c *ConfigRepository) SetUAAOAuthClient(clientID string) { - c.write(func() { - c.data.UAAOAuthClient = clientID - }) -} - -func (c *ConfigRepository) SetUAAOAuthClientSecret(clientID string) { - c.write(func() { - c.data.UAAOAuthClientSecret = clientID - }) -} - -func (c *ConfigRepository) SetSSHOAuthClient(clientID string) { - c.write(func() { - c.data.SSHOAuthClient = clientID - }) -} - -func (c *ConfigRepository) SetRefreshToken(token string) { - c.write(func() { - c.data.RefreshToken = token - }) -} - -func (c *ConfigRepository) SetOrganizationFields(org models.OrganizationFields) { - c.write(func() { - c.data.OrganizationFields = org - }) -} - -func (c *ConfigRepository) SetSpaceFields(space models.SpaceFields) { - c.write(func() { - c.data.SpaceFields = space - }) -} - -func (c *ConfigRepository) SetSSLDisabled(disabled bool) { - c.write(func() { - c.data.SSLDisabled = disabled - }) -} - -func (c *ConfigRepository) SetAsyncTimeout(timeout uint) { - c.write(func() { - c.data.AsyncTimeout = timeout - }) -} - -func (c *ConfigRepository) SetTrace(value string) { - c.write(func() { - c.data.Trace = value - }) -} - -func (c *ConfigRepository) SetColorEnabled(enabled string) { - c.write(func() { - c.data.ColorEnabled = enabled - }) -} - -func (c *ConfigRepository) SetLocale(locale string) { - c.write(func() { - c.data.Locale = locale - }) -} - -func (c *ConfigRepository) SetPluginRepo(repo models.PluginRepo) { - c.write(func() { - c.data.PluginRepos = append(c.data.PluginRepos, repo) - }) -} - -func (c *ConfigRepository) UnSetPluginRepo(index int) { - c.write(func() { - c.data.PluginRepos = append(c.data.PluginRepos[:index], c.data.PluginRepos[index+1:]...) - }) -} - -func (c *ConfigRepository) UAAGrantType() string { - grantType := "" - c.read(func() { - grantType = c.data.UAAGrantType - }) - return grantType -} - -func (c *ConfigRepository) SetUAAGrantType(grantType string) { - c.write(func() { - c.data.UAAGrantType = grantType - }) -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/formatters/bools.go b/vendor/code.cloudfoundry.org/cli/cf/formatters/bools.go deleted file mode 100644 index 4ce3d0c..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/formatters/bools.go +++ /dev/null @@ -1,12 +0,0 @@ -package formatters - -import ( - . "code.cloudfoundry.org/cli/cf/i18n" -) - -func Allowed(allowed bool) string { - if allowed { - return T("allowed") - } - return T("disallowed") -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/formatters/bytes.go b/vendor/code.cloudfoundry.org/cli/cf/formatters/bytes.go deleted file mode 100644 index bdd76a6..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/formatters/bytes.go +++ /dev/null @@ -1,82 +0,0 @@ -package formatters - -import ( - "errors" - "fmt" - "regexp" - "strconv" - "strings" - - . "code.cloudfoundry.org/cli/cf/i18n" -) - -const ( - BYTE = 1.0 - KILOBYTE = 1024 * BYTE - MEGABYTE = 1024 * KILOBYTE - GIGABYTE = 1024 * MEGABYTE - TERABYTE = 1024 * GIGABYTE -) - -func ByteSize(bytes int64) string { - unit := "" - value := float32(bytes) - - switch { - case bytes >= TERABYTE: - unit = "T" - value = value / TERABYTE - case bytes >= GIGABYTE: - unit = "G" - value = value / GIGABYTE - case bytes >= MEGABYTE: - unit = "M" - value = value / MEGABYTE - case bytes >= KILOBYTE: - unit = "K" - value = value / KILOBYTE - case bytes == 0: - return "0" - case bytes < KILOBYTE: - unit = "B" - } - - stringValue := fmt.Sprintf("%.1f", value) - stringValue = strings.TrimSuffix(stringValue, ".0") - return fmt.Sprintf("%s%s", stringValue, unit) -} - -func ToMegabytes(s string) (int64, error) { - parts := bytesPattern.FindStringSubmatch(strings.TrimSpace(s)) - if len(parts) < 3 { - return 0, invalidByteQuantityError() - } - - value, err := strconv.ParseInt(parts[1], 10, 0) - if err != nil { - return 0, invalidByteQuantityError() - } - - var bytes int64 - unit := strings.ToUpper(parts[2]) - switch unit { - case "T": - bytes = value * TERABYTE - case "G": - bytes = value * GIGABYTE - case "M": - bytes = value * MEGABYTE - case "K": - bytes = value * KILOBYTE - } - - return bytes / MEGABYTE, nil -} - -var ( - bytesPattern = regexp.MustCompile(`(?i)^(-?\d+)([KMGT])B?$`) -) - -func invalidByteQuantityError() error { - return errors.New(T("Byte quantity must be an integer with a unit of measurement like M, MB, G, or GB")) -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/formatters/memoryLimit.go b/vendor/code.cloudfoundry.org/cli/cf/formatters/memoryLimit.go deleted file mode 100644 index 8017ea8..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/formatters/memoryLimit.go +++ /dev/null @@ -1,11 +0,0 @@ -package formatters - -import "strconv" - -func InstanceMemoryLimit(limit int64) string { - if limit == -1 { - return "unlimited" - } - - return strconv.FormatInt(limit, 10) + "M" -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/formatters/string.go b/vendor/code.cloudfoundry.org/cli/cf/formatters/string.go deleted file mode 100644 index fc09732..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/formatters/string.go +++ /dev/null @@ -1,16 +0,0 @@ -package formatters - -import ( - "fmt" - "reflect" -) - -func MapStr(args interface{}) []string { - r := reflect.ValueOf(args) - rval := make([]string, r.Len()) - for i := 0; i < r.Len(); i++ { - rval[i] = r.Index(i).Interface().(fmt.Stringer).String() - } - return rval - -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/i18n/README-i18n.md b/vendor/code.cloudfoundry.org/cli/cf/i18n/README-i18n.md deleted file mode 100644 index 6b4e1d5..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/i18n/README-i18n.md +++ /dev/null @@ -1,48 +0,0 @@ -# CLI i18n Support - -The CLI currently supports a variety of languages. These translations can be accessed by setting either LC_ALL or LANG in your environment, or by setting your locale within the cli via `cf config --locale your_LOCALE # (e.g. fr_FR)`. - -Translations only affect messages generated by the CLI. Responses from server side components (Cloud Controller, etc.) will be internationalized separately and are likely to be English. - -If you are interested in submitting translations for a currently unsupported language/locale, please communicate with us via the [cf-dev](https://lists.cloudfoundry.org/archives/list/cf-dev@lists.cloudfoundry.org/) mailing list. - -## How can you contribute? - -If you see typos, errors in grammar, ambiguous strings or English after setting your locale, please find the appropriate entry in the corresponding `i18n/resources/_.all.json` file and submit a [pull request](https://help.github.com/articles/creating-a-pull-request/) with the fix(es). It is much better to submit small pull requests as you complete translations, rather than submitting a large one. This makes it much easier to rapidly merge your changes in. You can also report translations needing fixes as an issue in Github. - -Pull requests should only contain changes to "translation" values; the "id" value should not change as it is the key which is used to find the translations, and will always be English. For example: - -Given a missing translation for "Create an org": -``` -[ - { - "id":"Create an org", - "translation":"" - }, - ... -] -``` - -Adding the translation would look like: -``` -[ - { - "id":"Create an org", - "translation":"Créez un org" - }, - ... -] -``` - -Finally, it is also important not to translate the argument names in templated strings. Templated strings are the ones which contain arguments, e.g., `{{.Name}}` or `{{.Username}}` and so on. The arguments can move to a different location on the translated string, however, the arguments cannot change, should not be translated, and should not be removed or new ones added. So for instance, the following string is translated in French as follows: - -``` -[ - ..., - { - "id": "Creating quota {{.QuotaName}} as {{.Username}}...", - "translation": "Créez quota {{.QuotaName}} étant {{.Username}}..." - }, - ... -] -``` diff --git a/vendor/code.cloudfoundry.org/cli/cf/i18n/excluded.json b/vendor/code.cloudfoundry.org/cli/cf/i18n/excluded.json deleted file mode 100644 index ede5b16..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/i18n/excluded.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "excludedStrings" : [ - "", - " ", - "\n", - "\t", - "\n\t", - "extract_strings", - "excluded.json", - "i18n4go", - ".en.json", - ".extracted.json", - "recursive:", - ".json", - ".po", - ", column: ", - ", line: ", - ", offset: ", - "msgid ", - "msgstr ", - "# filename: ", - ".", - "\\", - "help", - ".go", - "", - "/", - "false", - "true", - - "allow-paid-service-plans" - ], - "excludedRegexps" : [ - "^\\d+$", - "^[-%]?\\w$", - "^\\w$", - "^json:", - "^\\w*[-]?quota[-]?\\w*$", - "^\\w+-paid-service-plans$" - ] -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/i18n/i18n.go b/vendor/code.cloudfoundry.org/cli/cf/i18n/i18n.go deleted file mode 100644 index 4084738..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/i18n/i18n.go +++ /dev/null @@ -1,14 +0,0 @@ -package i18n - -import "code.cloudfoundry.org/cli/util/ui" - -var T ui.TranslateFunc - -type LocaleReader interface { - Locale() string -} - -func Init(config LocaleReader) ui.TranslateFunc { - t, _ := ui.GetTranslationFunc(config) - return t -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/i18n/locale.go b/vendor/code.cloudfoundry.org/cli/cf/i18n/locale.go deleted file mode 100644 index 3857d1e..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/i18n/locale.go +++ /dev/null @@ -1,61 +0,0 @@ -package i18n - -import ( - "path" - "strings" - - "code.cloudfoundry.org/cli/i18n/resources" - "code.cloudfoundry.org/cli/util/ui" -) - -const resourceSuffix = ".all.json" - -func SupportedLocales() []string { - languages := supportedLanguages() - localeNames := make([]string, len(languages)) - - for i, l := range languages { - localeParts := strings.Split(l, "-") - lang := localeParts[0] - regionOrScript := localeParts[1] - - switch len(regionOrScript) { - case 2: // Region - localeNames[i] = lang + "-" + strings.ToUpper(regionOrScript) - case 4: // Script - localeNames[i] = lang + "-" + strings.Title(regionOrScript) - default: - localeNames[i] = l - } - } - - return localeNames -} - -func IsSupportedLocale(locale string) bool { - sanitizedLocale, err := ui.ParseLocale(locale) - if err != nil { - return false - } - - for _, supportedLanguage := range supportedLanguages() { - if supportedLanguage == sanitizedLocale { - return true - } - } - - return false -} - -func supportedLanguages() []string { - assetNames := resources.AssetNames() - - var languages []string - for _, assetName := range assetNames { - assetLocale := strings.TrimSuffix(path.Base(assetName), resourceSuffix) - locale, _ := ui.ParseLocale(assetLocale) - languages = append(languages, locale) - } - - return languages -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/app_event.go b/vendor/code.cloudfoundry.org/cli/cf/models/app_event.go deleted file mode 100644 index 2292fea..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/app_event.go +++ /dev/null @@ -1,12 +0,0 @@ -package models - -import "time" - -type EventFields struct { - GUID string - Name string - Timestamp time.Time - Description string - Actor string - ActorName string -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/app_file.go b/vendor/code.cloudfoundry.org/cli/cf/models/app_file.go deleted file mode 100644 index 33f23d3..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/app_file.go +++ /dev/null @@ -1,8 +0,0 @@ -package models - -type AppFileFields struct { - Path string - Sha1 string - Size int64 - Mode string -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/app_instance.go b/vendor/code.cloudfoundry.org/cli/cf/models/app_instance.go deleted file mode 100644 index 3be7f8e..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/app_instance.go +++ /dev/null @@ -1,24 +0,0 @@ -package models - -import "time" - -type InstanceState string - -const ( - InstanceStarting InstanceState = "starting" - InstanceRunning InstanceState = "running" - InstanceFlapping InstanceState = "flapping" - InstanceDown InstanceState = "down" - InstanceCrashed InstanceState = "crashed" -) - -type AppInstanceFields struct { - State InstanceState - Details string - Since time.Time - CPUUsage float64 // percentage - DiskQuota int64 // in bytes - DiskUsage int64 - MemQuota int64 - MemUsage int64 -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/application.go b/vendor/code.cloudfoundry.org/cli/cf/models/application.go deleted file mode 100644 index 53fd219..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/application.go +++ /dev/null @@ -1,222 +0,0 @@ -package models - -import ( - "os" - "reflect" - "strings" - "time" -) - -type Application struct { - ApplicationFields - Stack *Stack - Routes []RouteSummary - Services []ServicePlanSummary -} - -func (model Application) HasRoute(route Route) bool { - for _, boundRoute := range model.Routes { - if boundRoute.GUID == route.GUID { - return true - } - } - return false -} - -func (model Application) ToParams() AppParams { - state := strings.ToUpper(model.State) - params := AppParams{ - GUID: &model.GUID, - Name: &model.Name, - BuildpackURL: &model.BuildpackURL, - Command: &model.Command, - DiskQuota: &model.DiskQuota, - InstanceCount: &model.InstanceCount, - HealthCheckType: &model.HealthCheckType, - HealthCheckHTTPEndpoint: &model.HealthCheckHTTPEndpoint, - Memory: &model.Memory, - State: &state, - SpaceGUID: &model.SpaceGUID, - EnvironmentVars: &model.EnvironmentVars, - DockerImage: &model.DockerImage, - } - - if model.Stack != nil { - params.StackGUID = &model.Stack.GUID - } - - return params -} - -type ApplicationFields struct { - GUID string - Name string - BuildpackURL string - Command string - Diego bool - DetectedStartCommand string - DiskQuota int64 // in Megabytes - EnvironmentVars map[string]interface{} - InstanceCount int - Memory int64 // in Megabytes - RunningInstances int - HealthCheckType string - HealthCheckHTTPEndpoint string - HealthCheckTimeout int - State string - SpaceGUID string - StackGUID string - PackageUpdatedAt *time.Time - PackageState string - StagingFailedReason string - Buildpack string - DetectedBuildpack string - DockerImage string - EnableSSH bool -} - -const ( - ApplicationStateStopped = "stopped" - ApplicationStateStarted = "started" - ApplicationStateRunning = "running" - ApplicationStateCrashed = "crashed" - ApplicationStateFlapping = "flapping" - ApplicationStateDown = "down" - ApplicationStateStarting = "starting" -) - -type AppParams struct { - BuildpackURL *string - Buildpacks []string - Command *string - DiskQuota *int64 - Domains []string - EnvironmentVars *map[string]interface{} - GUID *string - HealthCheckType *string - HealthCheckHTTPEndpoint *string - HealthCheckTimeout *int - DockerImage *string - DockerUsername *string - DockerPassword *string - EnableSSH *bool - Hosts []string - RoutePath *string - InstanceCount *int - Memory *int64 - Name *string - NoHostname *bool - NoRoute bool - UseRandomRoute bool - UseRandomPort bool - Path *string - ServicesToBind []string - SpaceGUID *string - StackGUID *string - StackName *string - State *string - PackageUpdatedAt *time.Time - Routes []ManifestRoute -} - -func (app *AppParams) Merge(flagContext *AppParams) { - if flagContext.BuildpackURL != nil { - app.BuildpackURL = flagContext.BuildpackURL - } - if flagContext.Command != nil { - app.Command = flagContext.Command - } - if flagContext.DiskQuota != nil { - app.DiskQuota = flagContext.DiskQuota - } - if flagContext.DockerImage != nil { - app.DockerImage = flagContext.DockerImage - } - - switch { - case flagContext.DockerUsername != nil: - app.DockerUsername = flagContext.DockerUsername - // the password is always non-nil after we parse the flag context - app.DockerPassword = flagContext.DockerPassword - case app.DockerUsername != nil: - password := os.Getenv("CF_DOCKER_PASSWORD") - // if the password is empty, we will get a CC error - app.DockerPassword = &password - } - - if flagContext.Domains != nil { - app.Domains = flagContext.Domains - } - if flagContext.EnableSSH != nil { - app.EnableSSH = flagContext.EnableSSH - } - if flagContext.EnvironmentVars != nil { - app.EnvironmentVars = flagContext.EnvironmentVars - } - if flagContext.GUID != nil { - app.GUID = flagContext.GUID - } - if flagContext.HealthCheckType != nil { - app.HealthCheckType = flagContext.HealthCheckType - } - if flagContext.HealthCheckHTTPEndpoint != nil { - app.HealthCheckHTTPEndpoint = flagContext.HealthCheckHTTPEndpoint - } - if flagContext.HealthCheckTimeout != nil { - app.HealthCheckTimeout = flagContext.HealthCheckTimeout - } - if flagContext.Hosts != nil { - app.Hosts = flagContext.Hosts - } - if flagContext.InstanceCount != nil { - app.InstanceCount = flagContext.InstanceCount - } - if flagContext.Memory != nil { - app.Memory = flagContext.Memory - } - if flagContext.Name != nil { - app.Name = flagContext.Name - } - if flagContext.Path != nil { - app.Path = flagContext.Path - } - if flagContext.RoutePath != nil { - app.RoutePath = flagContext.RoutePath - } - if flagContext.ServicesToBind != nil { - app.ServicesToBind = flagContext.ServicesToBind - } - if flagContext.SpaceGUID != nil { - app.SpaceGUID = flagContext.SpaceGUID - } - if flagContext.StackGUID != nil { - app.StackGUID = flagContext.StackGUID - } - if flagContext.StackName != nil { - app.StackName = flagContext.StackName - } - if flagContext.State != nil { - app.State = flagContext.State - } - - app.NoRoute = app.NoRoute || flagContext.NoRoute - noHostBool := app.IsNoHostnameTrue() || flagContext.IsNoHostnameTrue() - app.NoHostname = &noHostBool - app.UseRandomRoute = app.UseRandomRoute || flagContext.UseRandomRoute -} - -func (app *AppParams) IsEmpty() bool { - noHostBool := false - return reflect.DeepEqual(*app, AppParams{NoHostname: &noHostBool}) -} - -func (app *AppParams) IsHostEmpty() bool { - return app.Hosts == nil || len(app.Hosts) == 0 -} - -func (app *AppParams) IsNoHostnameTrue() bool { - if app.NoHostname == nil { - return false - } - return *app.NoHostname -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/buildpack.go b/vendor/code.cloudfoundry.org/cli/cf/models/buildpack.go deleted file mode 100644 index a13df73..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/buildpack.go +++ /dev/null @@ -1,12 +0,0 @@ -package models - -type Buildpack struct { - GUID string - Name string - Stack string - Position *int - Enabled *bool - Key string - Filename string - Locked *bool -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/docker.go b/vendor/code.cloudfoundry.org/cli/cf/models/docker.go deleted file mode 100644 index ab3eaff..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/docker.go +++ /dev/null @@ -1,6 +0,0 @@ -package models - -type ManifestDocker struct { - Image string - Username string -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/domain.go b/vendor/code.cloudfoundry.org/cli/cf/models/domain.go deleted file mode 100644 index 5f25e4f..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/domain.go +++ /dev/null @@ -1,19 +0,0 @@ -package models - -type DomainFields struct { - GUID string - Name string - OwningOrganizationGUID string - RouterGroupGUID string - RouterGroupType string - Shared bool -} - -func (model DomainFields) URLForHostAndPath(host, path string, port int) string { - return (&RoutePresenter{ - Host: host, - Domain: model.Name, - Path: path, - Port: port, - }).URL() -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/environment.go b/vendor/code.cloudfoundry.org/cli/cf/models/environment.go deleted file mode 100644 index 48a6fe7..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/environment.go +++ /dev/null @@ -1,19 +0,0 @@ -package models - -func NewEnvironment() *Environment { - return &Environment{ - System: make(map[string]interface{}), - Application: make(map[string]interface{}), - Environment: make(map[string]interface{}), - Running: make(map[string]interface{}), - Staging: make(map[string]interface{}), - } -} - -type Environment struct { - System map[string]interface{} `json:"system_env_json,omitempty"` - Environment map[string]interface{} `json:"environment_json,omitempty"` - Running map[string]interface{} `json:"running_env_json,omitempty"` - Staging map[string]interface{} `json:"staging_env_json,omitempty"` - Application map[string]interface{} `json:"application_env_json,omitempty"` -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/environment_variable.go b/vendor/code.cloudfoundry.org/cli/cf/models/environment_variable.go deleted file mode 100644 index 09872bc..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/environment_variable.go +++ /dev/null @@ -1,22 +0,0 @@ -package models - -import "strings" - -type EnvironmentVariable struct { - Name string - Value string -} - -type EnvironmentVariableList []EnvironmentVariable - -func (evl EnvironmentVariableList) Len() int { - return len(evl) -} - -func (evl EnvironmentVariableList) Swap(i, j int) { - evl[i], evl[j] = evl[j], evl[i] -} - -func (evl EnvironmentVariableList) Less(i, j int) bool { - return strings.Compare(strings.ToLower(evl[i].Name), strings.ToLower(evl[j].Name)) == -1 -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/feature_flag.go b/vendor/code.cloudfoundry.org/cli/cf/models/feature_flag.go deleted file mode 100644 index f50389c..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/feature_flag.go +++ /dev/null @@ -1,7 +0,0 @@ -package models - -type FeatureFlag struct { - Name string `json:"name"` - Enabled bool `json:"enabled"` - ErrorMessage string `json:"error_message"` -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/organization.go b/vendor/code.cloudfoundry.org/cli/cf/models/organization.go deleted file mode 100644 index 12ed3fa..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/organization.go +++ /dev/null @@ -1,14 +0,0 @@ -package models - -type OrganizationFields struct { - GUID string - Name string - QuotaDefinition QuotaFields -} - -type Organization struct { - OrganizationFields - Spaces []SpaceFields - Domains []DomainFields - SpaceQuotas []SpaceQuota -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/plugin_repo.go b/vendor/code.cloudfoundry.org/cli/cf/models/plugin_repo.go deleted file mode 100644 index 6e0398d..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/plugin_repo.go +++ /dev/null @@ -1,6 +0,0 @@ -package models - -type PluginRepo struct { - Name string - URL string -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/quota.go b/vendor/code.cloudfoundry.org/cli/cf/models/quota.go deleted file mode 100644 index 77712d9..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/quota.go +++ /dev/null @@ -1,27 +0,0 @@ -package models - -import "encoding/json" - -type QuotaFields struct { - GUID string `json:"guid,omitempty"` - Name string `json:"name"` - MemoryLimit int64 `json:"memory_limit"` // in Megabytes - InstanceMemoryLimit int64 `json:"instance_memory_limit"` // in Megabytes - RoutesLimit int `json:"total_routes"` - ServicesLimit int `json:"total_services"` - NonBasicServicesAllowed bool `json:"non_basic_services_allowed"` - AppInstanceLimit int `json:"app_instance_limit"` - ReservedRoutePorts json.Number `json:"total_reserved_route_ports,omitempty"` -} - -type QuotaResponse struct { - GUID string `json:"guid,omitempty"` - Name string `json:"name"` - MemoryLimit int64 `json:"memory_limit"` // in Megabytes - InstanceMemoryLimit int64 `json:"instance_memory_limit"` // in Megabytes - RoutesLimit int `json:"total_routes"` - ServicesLimit int `json:"total_services"` - NonBasicServicesAllowed bool `json:"non_basic_services_allowed"` - AppInstanceLimit json.Number `json:"app_instance_limit"` - ReservedRoutePorts json.Number `json:"total_reserved_route_ports"` -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/role.go b/vendor/code.cloudfoundry.org/cli/cf/models/role.go deleted file mode 100644 index 3670e07..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/role.go +++ /dev/null @@ -1,67 +0,0 @@ -package models - -import ( - "errors" - "strings" -) - -type Role int - -const ( - RoleUnknown Role = iota - 1 - RoleOrgUser - RoleOrgManager - RoleBillingManager - RoleOrgAuditor - RoleSpaceManager - RoleSpaceDeveloper - RoleSpaceAuditor -) - -var ErrUnknownRole = errors.New("Unknown Role") - -func RoleFromString(roleString string) (Role, error) { - switch strings.ToLower(roleString) { - case "orgmanager": - return RoleOrgManager, nil - case "billingmanager": - return RoleBillingManager, nil - case "orgauditor": - return RoleOrgAuditor, nil - case "spacemanager": - return RoleSpaceManager, nil - case "spacedeveloper": - return RoleSpaceDeveloper, nil - case "spaceauditor": - return RoleSpaceAuditor, nil - default: - return RoleUnknown, ErrUnknownRole - } -} - -func (r Role) ToString() string { - switch r { - case RoleUnknown: - return "RoleUnknown" - case RoleOrgUser: - return "RoleOrgUser" - case RoleOrgManager: - return "RoleOrgManager" - case RoleBillingManager: - return "RoleBillingManager" - case RoleOrgAuditor: - return "RoleOrgAuditor" - case RoleSpaceManager: - return "RoleSpaceManager" - case RoleSpaceDeveloper: - return "RoleSpaceDeveloper" - case RoleSpaceAuditor: - return "RoleSpaceAuditor" - default: - return "" - } -} - -func (r Role) Display() string { - return strings.TrimPrefix(r.ToString(), "Role") -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/route.go b/vendor/code.cloudfoundry.org/cli/cf/models/route.go deleted file mode 100644 index f1dcb1a..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/route.go +++ /dev/null @@ -1,59 +0,0 @@ -package models - -import ( - "fmt" - "net/url" - "strings" -) - -type Route struct { - GUID string - Host string - Domain DomainFields - Path string - Port int - - Space SpaceFields - Apps []ApplicationFields - ServiceInstance ServiceInstanceFields -} - -func (r Route) URL() string { - return (&RoutePresenter{ - Host: r.Host, - Domain: r.Domain.Name, - Path: r.Path, - Port: r.Port, - }).URL() -} - -type RoutePresenter struct { - Host string - Domain string - Path string - Port int -} - -func (r *RoutePresenter) URL() string { - var host string - if r.Host != "" { - host = r.Host + "." + r.Domain - } else { - host = r.Domain - } - - if r.Port != 0 { - host = fmt.Sprintf("%s:%d", host, r.Port) - } - - u := url.URL{ - Host: host, - Path: r.Path, - } - - return strings.TrimPrefix(u.String(), "//") // remove the empty scheme -} - -type ManifestRoute struct { - Route string -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/route_summary.go b/vendor/code.cloudfoundry.org/cli/cf/models/route_summary.go deleted file mode 100644 index 20e7b9d..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/route_summary.go +++ /dev/null @@ -1,18 +0,0 @@ -package models - -type RouteSummary struct { - GUID string - Host string - Domain DomainFields - Path string - Port int -} - -func (r RouteSummary) URL() string { - return (&RoutePresenter{ - Host: r.Host, - Domain: r.Domain.Name, - Path: r.Path, - Port: r.Port, - }).URL() -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/router_group.go b/vendor/code.cloudfoundry.org/cli/cf/models/router_group.go deleted file mode 100644 index 38414d7..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/router_group.go +++ /dev/null @@ -1,9 +0,0 @@ -package models - -type RouterGroups []RouterGroup - -type RouterGroup struct { - GUID string `json:"guid"` - Name string `json:"name"` - Type string `json:"type"` -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/security_group.go b/vendor/code.cloudfoundry.org/cli/cf/models/security_group.go deleted file mode 100644 index ca23693..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/security_group.go +++ /dev/null @@ -1,22 +0,0 @@ -package models - -// represents just the attributes for an security group -type SecurityGroupFields struct { - Name string - GUID string - SpaceURL string `json:"spaces_url,omitempty"` - Rules []map[string]interface{} -} - -// represents the JSON that we send up to CC when the user creates / updates a record -type SecurityGroupParams struct { - Name string `json:"name,omitempty"` - GUID string `json:"guid,omitempty"` - Rules []map[string]interface{} `json:"rules"` -} - -// represents a fully instantiated model returned by the CC (e.g.: with its attributes and the fields for its child objects) -type SecurityGroup struct { - SecurityGroupFields - Spaces []Space -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/service_auth_token.go b/vendor/code.cloudfoundry.org/cli/cf/models/service_auth_token.go deleted file mode 100644 index 9b2b097..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/service_auth_token.go +++ /dev/null @@ -1,8 +0,0 @@ -package models - -type ServiceAuthTokenFields struct { - GUID string - Label string - Provider string - Token string -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/service_binding.go b/vendor/code.cloudfoundry.org/cli/cf/models/service_binding.go deleted file mode 100644 index 248d8c6..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/service_binding.go +++ /dev/null @@ -1,13 +0,0 @@ -package models - -type ServiceBindingRequest struct { - AppGUID string `json:"app_guid"` - ServiceInstanceGUID string `json:"service_instance_guid"` - Params map[string]interface{} `json:"parameters,omitempty"` -} - -type ServiceBindingFields struct { - GUID string - URL string - AppGUID string -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/service_broker.go b/vendor/code.cloudfoundry.org/cli/cf/models/service_broker.go deleted file mode 100644 index 23ea66b..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/service_broker.go +++ /dev/null @@ -1,10 +0,0 @@ -package models - -type ServiceBroker struct { - GUID string - Name string - Username string - Password string - URL string - Services []ServiceOffering -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/service_instance.go b/vendor/code.cloudfoundry.org/cli/cf/models/service_instance.go deleted file mode 100644 index e3e55ec..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/service_instance.go +++ /dev/null @@ -1,48 +0,0 @@ -package models - -type LastOperationFields struct { - Type string - State string - Description string - CreatedAt string - UpdatedAt string -} - -type ServiceInstanceCreateRequest struct { - Name string `json:"name"` - SpaceGUID string `json:"space_guid"` - PlanGUID string `json:"service_plan_guid,omitempty"` - Params map[string]interface{} `json:"parameters,omitempty"` - Tags []string `json:"tags,omitempty"` -} - -type ServiceInstanceUpdateRequest struct { - PlanGUID string `json:"service_plan_guid,omitempty"` - Params map[string]interface{} `json:"parameters,omitempty"` - Tags *[]string `json:"tags,omitempty"` -} - -type ServiceInstanceFields struct { - GUID string - Name string - LastOperation LastOperationFields - SysLogDrainURL string - RouteServiceURL string - ApplicationNames []string - Params map[string]interface{} - DashboardURL string - Type string - Tags []string -} - -type ServiceInstance struct { - ServiceInstanceFields - ServiceBindings []ServiceBindingFields - ServiceKeys []ServiceKeyFields - ServicePlan ServicePlanFields - ServiceOffering ServiceOfferingFields -} - -func (inst ServiceInstance) IsUserProvided() bool { - return inst.Type == "user_provided_service_instance" -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/service_key.go b/vendor/code.cloudfoundry.org/cli/cf/models/service_key.go deleted file mode 100644 index ba48599..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/service_key.go +++ /dev/null @@ -1,20 +0,0 @@ -package models - -type ServiceKeyFields struct { - Name string - GUID string - URL string - ServiceInstanceGUID string - ServiceInstanceURL string -} - -type ServiceKeyRequest struct { - Name string `json:"name"` - ServiceInstanceGUID string `json:"service_instance_guid"` - Params map[string]interface{} `json:"parameters,omitempty"` -} - -type ServiceKey struct { - Fields ServiceKeyFields - Credentials map[string]interface{} -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/service_offering.go b/vendor/code.cloudfoundry.org/cli/cf/models/service_offering.go deleted file mode 100644 index efd8766..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/service_offering.go +++ /dev/null @@ -1,31 +0,0 @@ -package models - -type ServiceOfferingFields struct { - GUID string - BrokerGUID string - Label string - Provider string - Version string - Description string - DocumentationURL string - Requires []string -} - -type ServiceOffering struct { - ServiceOfferingFields - Plans []ServicePlanFields -} - -type ServiceOfferings []ServiceOffering - -func (s ServiceOfferings) Len() int { - return len(s) -} - -func (s ServiceOfferings) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s ServiceOfferings) Less(i, j int) bool { - return s[i].Label < s[j].Label -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/service_plan.go b/vendor/code.cloudfoundry.org/cli/cf/models/service_plan.go deleted file mode 100644 index 4c7e65d..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/service_plan.go +++ /dev/null @@ -1,34 +0,0 @@ -package models - -type ServicePlanFields struct { - GUID string - Name string - Free bool - Public bool - Description string - Active bool - ServiceOfferingGUID string - OrgNames []string -} - -type ServicePlan struct { - ServicePlanFields - ServiceOffering ServiceOfferingFields -} - -type ServicePlanSummary struct { - GUID string - Name string -} - -func (servicePlanFields ServicePlanFields) OrgHasVisibility(orgName string) bool { - if servicePlanFields.Public { - return true - } - for _, org := range servicePlanFields.OrgNames { - if org == orgName { - return true - } - } - return false -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/service_plan_visibility.go b/vendor/code.cloudfoundry.org/cli/cf/models/service_plan_visibility.go deleted file mode 100644 index b50bb41..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/service_plan_visibility.go +++ /dev/null @@ -1,7 +0,0 @@ -package models - -type ServicePlanVisibilityFields struct { - GUID string `json:"guid"` - ServicePlanGUID string `json:"service_plan_guid"` - OrganizationGUID string `json:"organization_guid"` -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/space.go b/vendor/code.cloudfoundry.org/cli/cf/models/space.go deleted file mode 100644 index 43e492a..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/space.go +++ /dev/null @@ -1,17 +0,0 @@ -package models - -type SpaceFields struct { - GUID string - Name string - AllowSSH bool -} - -type Space struct { - SpaceFields - Organization OrganizationFields - Applications []ApplicationFields - ServiceInstances []ServiceInstanceFields - Domains []DomainFields - SecurityGroups []SecurityGroupFields - SpaceQuotaGUID string -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/space_quota.go b/vendor/code.cloudfoundry.org/cli/cf/models/space_quota.go deleted file mode 100644 index 4edf299..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/space_quota.go +++ /dev/null @@ -1,75 +0,0 @@ -package models - -import ( - "encoding/json" - "strconv" - - "code.cloudfoundry.org/cli/cf/formatters" - . "code.cloudfoundry.org/cli/cf/i18n" -) - -type SpaceQuota struct { - GUID string `json:"guid,omitempty"` - Name string `json:"name"` - MemoryLimit int64 `json:"memory_limit"` // in Megabytes - InstanceMemoryLimit int64 `json:"instance_memory_limit"` // in Megabytes - RoutesLimit int `json:"total_routes"` - ServicesLimit int `json:"total_services"` - NonBasicServicesAllowed bool `json:"non_basic_services_allowed"` - OrgGUID string `json:"organization_guid"` - AppInstanceLimit int `json:"app_instance_limit"` - ReservedRoutePortsLimit json.Number `json:"total_reserved_route_ports,omitempty"` -} - -const UnlimitedDisplay = "unlimited" - -func (q SpaceQuota) FormattedMemoryLimit() string { - return formatters.ByteSize(q.MemoryLimit * formatters.MEGABYTE) -} - -func (q SpaceQuota) FormattedInstanceMemoryLimit() string { - if q.InstanceMemoryLimit == -1 { - return T(UnlimitedDisplay) - } - return formatters.ByteSize(q.InstanceMemoryLimit * formatters.MEGABYTE) -} - -func (q SpaceQuota) FormattedAppInstanceLimit() string { - appInstanceLimit := T(UnlimitedDisplay) - if q.AppInstanceLimit != -1 { //TODO - figure out how to use resources.UnlimitedAppInstances - appInstanceLimit = strconv.Itoa(q.AppInstanceLimit) - } - - return appInstanceLimit -} - -func (q SpaceQuota) FormattedServicesLimit() string { - servicesLimit := T(UnlimitedDisplay) - if q.ServicesLimit != -1 { - servicesLimit = strconv.Itoa(q.ServicesLimit) - } - - return servicesLimit -} - -func (q SpaceQuota) FormattedRoutePortsLimit() string { - reservedRoutePortsLimit := T(UnlimitedDisplay) - if q.ReservedRoutePortsLimit != "-1" { - reservedRoutePortsLimit = string(q.ReservedRoutePortsLimit) - } - - return reservedRoutePortsLimit -} - -type SpaceQuotaResponse struct { - GUID string `json:"guid,omitempty"` - Name string `json:"name"` - MemoryLimit int64 `json:"memory_limit"` // in Megabytes - InstanceMemoryLimit int64 `json:"instance_memory_limit"` // in Megabytes - RoutesLimit int `json:"total_routes"` - ServicesLimit int `json:"total_services"` - NonBasicServicesAllowed bool `json:"non_basic_services_allowed"` - OrgGUID string `json:"organization_guid"` - AppInstanceLimit json.Number `json:"app_instance_limit"` - ReservedRoutePortsLimit json.Number `json:"total_reserved_route_ports"` -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/stack.go b/vendor/code.cloudfoundry.org/cli/cf/models/stack.go deleted file mode 100644 index 9e30f66..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/stack.go +++ /dev/null @@ -1,7 +0,0 @@ -package models - -type Stack struct { - GUID string - Name string - Description string -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/user.go b/vendor/code.cloudfoundry.org/cli/cf/models/user.go deleted file mode 100644 index afccd1f..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/user.go +++ /dev/null @@ -1,8 +0,0 @@ -package models - -type UserFields struct { - GUID string - Username string - Password string - IsAdmin bool -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/models/user_provided_service.go b/vendor/code.cloudfoundry.org/cli/cf/models/user_provided_service.go deleted file mode 100644 index ec83a78..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/models/user_provided_service.go +++ /dev/null @@ -1,19 +0,0 @@ -package models - -type UserProvidedServiceSummary struct { - Total int `json:"total_results"` - Resources []UserProvidedServiceEntity `json:"resources"` -} - -type UserProvidedService struct { - Name string `json:"name,omitempty"` - Credentials map[string]interface{} `json:"credentials"` - SpaceGUID string `json:"space_guid,omitempty"` - SysLogDrainURL string `json:"syslog_drain_url"` - RouteServiceURL string `json:"route_service_url"` - Tags []string `json:"tags,omitempty"` -} - -type UserProvidedServiceEntity struct { - UserProvidedService `json:"entity"` -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/ssh/sigwinch/sigwinch.go b/vendor/code.cloudfoundry.org/cli/cf/ssh/sigwinch/sigwinch.go deleted file mode 100644 index 6eab1ee..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/ssh/sigwinch/sigwinch.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build !windows -// +build !windows - -package sigwinch - -import "syscall" - -func SIGWINCH() syscall.Signal { - return syscall.SIGWINCH -} diff --git a/vendor/code.cloudfoundry.org/cli/cf/ssh/sigwinch/sigwinch_win.go b/vendor/code.cloudfoundry.org/cli/cf/ssh/sigwinch/sigwinch_win.go deleted file mode 100644 index 045da2d..0000000 --- a/vendor/code.cloudfoundry.org/cli/cf/ssh/sigwinch/sigwinch_win.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build windows -// +build windows - -package sigwinch - -import "syscall" - -func SIGWINCH() syscall.Signal { - panic("Not supported on windows") -} diff --git a/vendor/code.cloudfoundry.org/cli/command/api_version_warning.go b/vendor/code.cloudfoundry.org/cli/command/api_version_warning.go deleted file mode 100644 index db206ed..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/api_version_warning.go +++ /dev/null @@ -1,75 +0,0 @@ -package command - -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" - "code.cloudfoundry.org/cli/version" - "github.com/blang/semver" -) - -type APIVersionTooHighError struct{} - -func (a APIVersionTooHighError) Error() string { - return "" -} - -func WarnIfCLIVersionBelowAPIDefinedMinimum(config Config, apiVersion string, ui UI) error { - minVer := config.MinCLIVersion() - currentVer := config.BinaryVersion() - - isOutdated, err := CheckVersionOutdated(currentVer, minVer) - if err != nil { - return err - } - - if isOutdated { - ui.DisplayWarning("Cloud Foundry API version {{.APIVersion}} requires CLI version {{.MinCLIVersion}}. You are currently on version {{.BinaryVersion}}. To upgrade your CLI, please visit: https://github.com/cloudfoundry/cli#downloads", - map[string]interface{}{ - "APIVersion": apiVersion, - "MinCLIVersion": minVer, - "BinaryVersion": currentVer, - }) - } - - return nil -} - -func WarnIfAPIVersionBelowSupportedMinimum(apiVersion string, ui UI) error { - isOutdated, err := CheckVersionOutdated(apiVersion, ccversion.MinSupportedV2ClientVersion) - if err != nil { - return err - } - - if isOutdated { - ui.DisplayWarning("Your CF API version ({{.APIVersion}}) is no longer supported. "+ - "Upgrade to a newer version of the API (minimum version {{.MinSupportedVersion}}). Please refer to "+ - "https://github.com/cloudfoundry/cli/wiki/Versioning-Policy#cf-cli-minimum-supported-version", - map[string]interface{}{ - "APIVersion": apiVersion, - "MinSupportedVersion": ccversion.MinSupportedV2ClientVersion, - }) - } - - return nil -} - -func CheckVersionOutdated(current string, minimum string) (bool, error) { - if current == version.DefaultVersion || minimum == "" { - return false, nil - } - - currentSemver, err := semver.Make(current) - if err != nil { - return false, err - } - - minimumSemver, err := semver.Make(minimum) - if err != nil { - return false, err - } - - if currentSemver.Compare(minimumSemver) == -1 { - return true, nil - } - - return false, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/command/config.go b/vendor/code.cloudfoundry.org/cli/command/config.go deleted file mode 100644 index 44b30e5..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/config.go +++ /dev/null @@ -1,85 +0,0 @@ -package command - -import ( - "time" - - "code.cloudfoundry.org/cli/util/configv3" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Config - -// Config a way of getting basic CF configuration -type Config interface { - AccessToken() string - AddPlugin(configv3.Plugin) - AddPluginRepository(name string, url string) - AuthorizationEndpoint() string - APIVersion() string - BinaryName() string - BinaryVersion() string - CFPassword() string - CFUsername() string - ColorEnabled() configv3.ColorSetting - CurrentUser() (configv3.User, error) - CurrentUserName() (string, error) - DialTimeout() time.Duration - DockerPassword() string - Experimental() bool - GetPlugin(pluginName string) (configv3.Plugin, bool) - GetPluginCaseInsensitive(pluginName string) (configv3.Plugin, bool) - HasTargetedOrganization() bool - HasTargetedSpace() bool - IsTTY() bool - Locale() string - LogCacheEndpoint() string - MinCLIVersion() string - NOAARequestRetryCount() int - NetworkPolicyV1Endpoint() string - OverallPollingTimeout() time.Duration - PluginHome() string - PluginRepositories() []configv3.PluginRepository - Plugins() []configv3.Plugin - PollingInterval() time.Duration - RefreshToken() string - RemovePlugin(string) - RequestRetryCount() int - RoutingEndpoint() string - SetAsyncTimeout(timeout int) - SetAccessToken(token string) - SetColorEnabled(enabled string) - SetLocale(locale string) - SetMinCLIVersion(version string) - SetOrganizationInformation(guid string, name string) - SetRefreshToken(token string) - SetSpaceInformation(guid string, name string, allowSSH bool) - V7SetSpaceInformation(guid string, name string) - SetTargetInformation(args configv3.TargetInformationArgs) - SetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string) - SetTrace(trace string) - SetUAAClientCredentials(client string, clientSecret string) - SetUAAEndpoint(uaaEndpoint string) - SetUAAGrantType(uaaGrantType string) - SkipSSLValidation() bool - SSHOAuthClient() string - StagingTimeout() time.Duration - StartupTimeout() time.Duration - // TODO: Rename to APITarget() - Target() string - TargetedOrganization() configv3.Organization - TargetedOrganizationName() string - TargetedSpace() configv3.Space - TerminalWidth() int - UAADisableKeepAlives() bool - UAAEndpoint() string - UAAGrantType() string - UAAOAuthClient() string - UAAOAuthClientSecret() string - UnsetOrganizationAndSpaceInformation() - UnsetSpaceInformation() - UnsetUserInformation() - Verbose() (bool, []string) - WritePluginConfig() error - WriteConfig() error - IsCFOnK8s() bool - SetKubernetesAuthInfo(authInfo string) -} diff --git a/vendor/code.cloudfoundry.org/cli/command/display_not_logged_in.go b/vendor/code.cloudfoundry.org/cli/command/display_not_logged_in.go deleted file mode 100644 index 085d90d..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/display_not_logged_in.go +++ /dev/null @@ -1,11 +0,0 @@ -package command - -import "fmt" - -func DisplayNotLoggedInText(binaryName string, ui UI) { - ui.DisplayText("Not logged in. Use '{{.CFLoginCommand}}' or '{{.CFLoginCommandSSO}}' to log in.", - map[string]interface{}{ - "CFLoginCommand": fmt.Sprintf("%s login", binaryName), - "CFLoginCommandSSO": fmt.Sprintf("%s login --sso", binaryName), - }) -} diff --git a/vendor/code.cloudfoundry.org/cli/command/experimental_warning.go b/vendor/code.cloudfoundry.org/cli/command/experimental_warning.go deleted file mode 100644 index c3c630e..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/experimental_warning.go +++ /dev/null @@ -1,3 +0,0 @@ -package command - -const ExperimentalWarning = "This command is in EXPERIMENTAL stage and may change without notice" diff --git a/vendor/code.cloudfoundry.org/cli/command/extended_commander.go b/vendor/code.cloudfoundry.org/cli/command/extended_commander.go deleted file mode 100644 index d380403..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/extended_commander.go +++ /dev/null @@ -1,11 +0,0 @@ -package command - -import "github.com/jessevdk/go-flags" - -// ExtendedCommander extends the go-flags Command interface by forcing a Setup -// function on all commands. This setup function should setup all command -// dependencies. -type ExtendedCommander interface { - flags.Commander - Setup(Config, UI) error -} diff --git a/vendor/code.cloudfoundry.org/cli/command/godoc.go b/vendor/code.cloudfoundry.org/cli/command/godoc.go deleted file mode 100644 index af10252..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/godoc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package command should not be imported by external consumers. It was not -// designed for external use. -package command diff --git a/vendor/code.cloudfoundry.org/cli/command/minimum_version_check.go b/vendor/code.cloudfoundry.org/cli/command/minimum_version_check.go deleted file mode 100644 index 9fa7aeb..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/minimum_version_check.go +++ /dev/null @@ -1,53 +0,0 @@ -package command - -import ( - "code.cloudfoundry.org/cli/command/translatableerror" - log "github.com/sirupsen/logrus" -) - -func MinimumCCAPIVersionCheck(current string, minimum string, customCommand ...string) error { - log.WithFields(log.Fields{"current": current, "minimum": minimum}).Debug("minimum api version") - var command string - if len(customCommand) > 0 { - command = customCommand[0] - } - - isOutdated, err := CheckVersionOutdated(current, minimum) - if err != nil { - return err - } - - if isOutdated { - log.WithFields(log.Fields{"current": current, "minimum": minimum}).Error("minimum not met") - return translatableerror.MinimumCFAPIVersionNotMetError{ - Command: command, - CurrentVersion: current, - MinimumVersion: minimum, - } - } - - return nil -} - -func MinimumUAAAPIVersionCheck(current string, minimum string, customCommand ...string) error { - log.WithFields(log.Fields{"current": current, "minimum": minimum}).Debug("minimum api version") - var command string - if len(customCommand) > 0 { - command = customCommand[0] - } - - isOutdated, err := CheckVersionOutdated(current, minimum) - if err != nil { - return err - } - - if isOutdated { - log.WithFields(log.Fields{"current": current, "minimum": minimum}).Error("minimum not met") - return translatableerror.MinimumUAAAPIVersionNotMetError{ - Command: command, - MinimumVersion: minimum, - } - } - - return nil -} diff --git a/vendor/code.cloudfoundry.org/cli/command/shared_actor.go b/vendor/code.cloudfoundry.org/cli/command/shared_actor.go deleted file mode 100644 index 79a2661..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/shared_actor.go +++ /dev/null @@ -1,13 +0,0 @@ -package command - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . SharedActor - -type SharedActor interface { - IsLoggedIn() bool - IsSpaceTargeted() bool - IsOrgTargeted() bool - - CheckTarget(targetedOrganizationRequired bool, targetedSpaceRequired bool) error - RequireCurrentUser() (string, error) - RequireTargetedOrg() (string, error) -} diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/convert_to_translatable_error.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/convert_to_translatable_error.go index 4bcacac..b03c31d 100644 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/convert_to_translatable_error.go +++ b/vendor/code.cloudfoundry.org/cli/command/translatableerror/convert_to_translatable_error.go @@ -12,6 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/clissh/ssherror" "code.cloudfoundry.org/cli/util/download" "code.cloudfoundry.org/cli/util/manifest" + "code.cloudfoundry.org/cli/util/v6manifestparser" log "github.com/sirupsen/logrus" ) @@ -28,6 +29,8 @@ func ConvertToTranslatableError(err error) error { return ApplicationNotStartedError(e) case actionerror.AppNotFoundInManifestError: return AppNotFoundInManifestError(e) + case v6manifestparser.AppNotInManifestError: + return AppNotFoundInManifestError(e) case actionerror.AssignDropletError: return AssignDropletError(e) case actionerror.BuildpackNotFoundError: @@ -80,6 +83,8 @@ func ConvertToTranslatableError(err error) error { return NoMatchingDomainError(e) case actionerror.NonexistentAppPathError: return FileNotFoundError(e) + case v6manifestparser.InvalidManifestApplicationPathError: + return FileNotFoundError(e) case actionerror.NoOrganizationTargetedError: return NoOrganizationTargetedError(e) case actionerror.NoSpaceTargetedError: @@ -110,10 +115,6 @@ func ConvertToTranslatableError(err error) error { return RepositoryNameTakenError(e) case actionerror.RepositoryNotRegisteredError: return RepositoryNotRegisteredError(e) - case actionerror.RevisionNotFoundError: - return RevisionNotFoundError(e) - case actionerror.RevisionAmbiguousError: - return RevisionAmbiguousError(e) case actionerror.RouteInDifferentSpaceError: return RouteInDifferentSpaceError(e) case actionerror.RoutePathWithTCPDomainError: @@ -179,8 +180,6 @@ func ConvertToTranslatableError(err error) error { return JobFailedError{JobGUID: e.JobGUID, Message: e.Detail} case ccerror.JobTimeoutError: return JobTimeoutError{JobGUID: e.JobGUID} - case ccerror.JobFailedNoErrorError: - return JobFailedNoErrorError{JobGUID: e.JobGUID} case ccerror.MultiError: return MultiError{Messages: e.Details()} case ccerror.UnprocessableEntityError: @@ -194,7 +193,7 @@ func ConvertToTranslatableError(err error) error { // Manifest Errors case manifest.ManifestCreationError: - return FileCreationError(e) + return ManifestCreationError(e) case manifest.InheritanceFieldError: return TriggerLegacyPushError{InheritanceRelated: true} case manifest.GlobalFieldsError: @@ -202,6 +201,12 @@ func ConvertToTranslatableError(err error) error { case manifest.InterpolationError: return InterpolationError(e) + // ManifestParser Errors + case v6manifestparser.InterpolationError: + return InterpolationError(e) + case v6manifestparser.InvalidYAMLError: + return InvalidYAMLError(e) + // Plugin Execution Errors case pluginerror.RawHTTPStatusError: return DownloadPluginHTTPError{Message: e.Status} diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/curl_exit_22_error.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/curl_exit_22_error.go deleted file mode 100644 index 68c6da3..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/curl_exit_22_error.go +++ /dev/null @@ -1,15 +0,0 @@ -package translatableerror - -type CurlExit22Error struct { - StatusCode int -} - -func (e CurlExit22Error) Error() string { - return "The requested URL returned error: {{.StatusCode}}" -} - -func (e CurlExit22Error) Translate(translate func(string, ...interface{}) string) string { - return translate(e.Error(), - map[string]interface{}{"StatusCode": e.StatusCode}, - ) -} diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/job_failed_no_error.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/job_failed_no_error.go deleted file mode 100644 index 919aae8..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/job_failed_no_error.go +++ /dev/null @@ -1,17 +0,0 @@ -package translatableerror - -// RevisionAmbiguousError is returned when multiple revisions with the same -// version are returned -type JobFailedNoErrorError struct { - JobGUID string -} - -func (e JobFailedNoErrorError) Error() string { - return "Job {{.JobGUID}} failed with no error. This is unexpected, contact your operator for details." -} - -func (e JobFailedNoErrorError) Translate(translate func(string, ...interface{}) string) string { - return translate(e.Error(), map[string]interface{}{ - "JobGUID": e.JobGUID, - }) -} diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/manifest_creation_error.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/manifest_creation_error.go index 0fc0c9b..19174da 100644 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/manifest_creation_error.go +++ b/vendor/code.cloudfoundry.org/cli/command/translatableerror/manifest_creation_error.go @@ -1,14 +1,14 @@ package translatableerror -type FileCreationError struct { +type ManifestCreationError struct { Err error } -func (FileCreationError) Error() string { - return "Error creating file: {{.Error}}" +func (ManifestCreationError) Error() string { + return "Error creating manifest file: {{.Error}}" } -func (e FileCreationError) Translate(translate func(string, ...interface{}) string) string { +func (e ManifestCreationError) Translate(translate func(string, ...interface{}) string) string { return translate(e.Error(), map[string]interface{}{ "Error": e.Err, }) diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/not_supported_on_k8s_error.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/not_supported_on_k8s_error.go deleted file mode 100644 index 630edef..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/not_supported_on_k8s_error.go +++ /dev/null @@ -1,19 +0,0 @@ -package translatableerror - -// NotSupportedOnKubernetesArgumentError represents an error caused by using an -// argument that is not supported on kubernetes -type NotSupportedOnKubernetesArgumentError struct { - Arg string -} - -func (NotSupportedOnKubernetesArgumentError) DisplayUsage() {} - -func (NotSupportedOnKubernetesArgumentError) Error() string { - return "The argument {{.Arg}} is not supported on Kubernetes" -} - -func (e NotSupportedOnKubernetesArgumentError) Translate(translate func(string, ...interface{}) string) string { - return translate(e.Error(), map[string]interface{}{ - "Arg": e.Arg, - }) -} diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/request_creation_error.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/request_creation_error.go deleted file mode 100644 index 7c870ee..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/request_creation_error.go +++ /dev/null @@ -1,15 +0,0 @@ -package translatableerror - -type RequestCreationError struct { - Err error -} - -func (RequestCreationError) Error() string { - return "Error creating request: {{.Error}}" -} - -func (e RequestCreationError) Translate(translate func(string, ...interface{}) string) string { - return translate(e.Error(), map[string]interface{}{ - "Error": e.Err, - }) -} diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/revision_ambiguous.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/revision_ambiguous.go deleted file mode 100644 index b0a2430..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/revision_ambiguous.go +++ /dev/null @@ -1,17 +0,0 @@ -package translatableerror - -// RevisionAmbiguousError is returned when multiple revisions with the same -// version are returned -type RevisionAmbiguousError struct { - Version int -} - -func (e RevisionAmbiguousError) Error() string { - return "More than one revision '{{.RevisionVersion}}' found" -} - -func (e RevisionAmbiguousError) Translate(translate func(string, ...interface{}) string) string { - return translate(e.Error(), map[string]interface{}{ - "RevisionVersion": e.Version, - }) -} diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/revision_not_found.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/revision_not_found.go deleted file mode 100644 index ad35d35..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/revision_not_found.go +++ /dev/null @@ -1,17 +0,0 @@ -package translatableerror - -// RevisionNotFoundError is returned when a requested revision is not -// found. -type RevisionNotFoundError struct { - Version int -} - -func (e RevisionNotFoundError) Error() string { - return "Revision '{{.RevisionVersion}}' not found" -} - -func (e RevisionNotFoundError) Translate(translate func(string, ...interface{}) string) string { - return translate(e.Error(), map[string]interface{}{ - "RevisionVersion": e.Version, - }) -} diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/service_instance_not_found_error.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/service_instance_not_found_error.go index 5904e77..f134636 100644 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/service_instance_not_found_error.go +++ b/vendor/code.cloudfoundry.org/cli/command/translatableerror/service_instance_not_found_error.go @@ -9,7 +9,7 @@ func (e ServiceInstanceNotFoundError) Error() string { if e.Name == "" { return "Service instance (GUID: {{.GUID}}) not found" } - return "Service instance '{{.ServiceInstance}}' not found" + return "Service instance {{.ServiceInstance}} not found" } func (e ServiceInstanceNotFoundError) Translate(translate func(string, ...interface{}) string) string { diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/service_plan_not_found_error.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/service_plan_not_found_error.go index aefe130..d413b94 100644 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/service_plan_not_found_error.go +++ b/vendor/code.cloudfoundry.org/cli/command/translatableerror/service_plan_not_found_error.go @@ -1,26 +1,20 @@ package translatableerror type ServicePlanNotFoundError struct { - PlanName string - OfferingName string - ServiceBrokerName string + PlanName string + OfferingName string } func (e ServicePlanNotFoundError) Error() string { if e.OfferingName == "" { return "Service plan '{{.PlanName}}' not found." } - if e.OfferingName != "" && e.PlanName != "" && e.ServiceBrokerName != "" { - return "The plan '{{.PlanName}}' could not be found for service offering '{{.OfferingName}}' and broker '{{.ServiceBrokerName}}'." - } - - return "The plan '{{.PlanName}}' could not be found for service offering '{{.OfferingName}}'." + return "The plan {{.PlanName}} could not be found for service {{.OfferingName}}." } func (e ServicePlanNotFoundError) Translate(translate func(string, ...interface{}) string) string { return translate(e.Error(), map[string]interface{}{ - "PlanName": e.PlanName, - "OfferingName": e.OfferingName, - "ServiceBrokerName": e.ServiceBrokerName, + "PlanName": e.PlanName, + "OfferingName": e.OfferingName, }) } diff --git a/vendor/code.cloudfoundry.org/cli/command/translatableerror/translatable_error.go b/vendor/code.cloudfoundry.org/cli/command/translatableerror/translatable_error.go index a9791c3..8daf778 100644 --- a/vendor/code.cloudfoundry.org/cli/command/translatableerror/translatable_error.go +++ b/vendor/code.cloudfoundry.org/cli/command/translatableerror/translatable_error.go @@ -1,6 +1,6 @@ package translatableerror -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . TranslatableError +//go:generate counterfeiter . TranslatableError // TranslatableError it wraps the error interface adding a way to set the // translation function on the error diff --git a/vendor/code.cloudfoundry.org/cli/command/ui.go b/vendor/code.cloudfoundry.org/cli/command/ui.go deleted file mode 100644 index aedbe16..0000000 --- a/vendor/code.cloudfoundry.org/cli/command/ui.go +++ /dev/null @@ -1,49 +0,0 @@ -package command - -import ( - "io" - "time" - - "code.cloudfoundry.org/cli/util/ui" -) - -// UI is the interface to STDOUT, STDERR, and STDIN. -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . UI -type UI interface { - DeferText(template string, data ...map[string]interface{}) - DisplayBoolPrompt(defaultResponse bool, template string, templateValues ...map[string]interface{}) (bool, error) - DisplayChangesForPush(changeSet []ui.Change) error - DisplayDeprecationWarning() - DisplayDiffAddition(line string, depth int, addHyphen bool) - DisplayDiffRemoval(line string, depth int, addHyphen bool) - DisplayDiffUnchanged(line string, depth int, addHyphen bool) - DisplayError(err error) - DisplayFileDeprecationWarning() - DisplayHeader(text string) - DisplayInstancesTableForApp(table [][]string) - DisplayJSON(name string, jsonData interface{}) error - DisplayKeyValueTable(prefix string, table [][]string, padding int) - DisplayKeyValueTableForApp(table [][]string) - DisplayLogMessage(message ui.LogMessage, displayHeader bool) - DisplayNewline() - DisplayNonWrappingTable(prefix string, table [][]string, padding int) - DisplayOK() - DisplayOptionalTextPrompt(defaultValue string, template string, templateValues ...map[string]interface{}) (string, error) - DisplayPasswordPrompt(template string, templateValues ...map[string]interface{}) (string, error) - DisplayTableWithHeader(prefix string, table [][]string, padding int) - DisplayText(template string, data ...map[string]interface{}) - DisplayTextMenu(choices []string, promptTemplate string, templateValues ...map[string]interface{}) (string, error) - DisplayTextPrompt(template string, templateValues ...map[string]interface{}) (string, error) - DisplayTextWithBold(text string, keys ...map[string]interface{}) - DisplayTextWithFlavor(text string, keys ...map[string]interface{}) - DisplayWarning(formattedString string, keys ...map[string]interface{}) - DisplayWarnings(warnings []string) - GetErr() io.Writer - GetIn() io.Reader - GetOut() io.Writer - RequestLoggerFileWriter(filePaths []string) *ui.RequestLoggerFileWriter - RequestLoggerTerminalDisplay() *ui.RequestLoggerTerminalDisplay - TranslateText(template string, data ...map[string]interface{}) string - UserFriendlyDate(input time.Time) string - Writer() io.Writer -} diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/README.md b/vendor/code.cloudfoundry.org/cli/i18n/resources/README.md deleted file mode 100644 index e2cfa23..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# DO NOT CHANGE ANYTHING IN THIS DIRECTORY -This directory will get populated by the pipeline during the `build-binaries` job. Do NOT modify otherwise. - -## How this file was generated -``` -$ cd code.cloudfoundry.org/cli/i18n -$ go-bindata -nometadata -pkg resources -ignore ".go" -o resources/i18n_resources.go resources/*.all.json -``` diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/de-de.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/de-de.all.json deleted file mode 100644 index d1fd5dd..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/de-de.all.json +++ /dev/null @@ -1,77 +0,0 @@ -[ - { - "id": "\nApp started\n", - "translation": "\nApp gestartet\n", - "modified": false - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "modified": false - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nTIP: Use '{{.Command}}' to target new org", - "modified": false - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " View allowable quotas with 'CF_NAME quotas'", - "modified": false - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "modified": false - }, - { - "id": "Also delete any mapped routes", - "translation": "Also delete any mapped routes", - "modified": false - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "App {{.AppName}} does not exist.", - "modified": false - }, - { - "id": "FEATURE FLAGS", - "translation": "FEATURE FLAGS", - "modified": false - }, - { - "id": "Name", - "translation": "Name", - "modified": false - }, - { - "id": "api endpoint:", - "translation": "api endpoint:", - "modified": false - }, - { - "id": "api version:", - "translation": "api version:", - "modified": false - }, - { - "id": "org:", - "translation": "org:", - "modified": false - }, - { - "id": "space:api version:", - "translation": "space:api version:", - "modified": false - }, - { - "id": "user:", - "translation": "user:", - "modified": false - }, - { - "id": "Temporary Authentication Code ( Get one at {{.AuthenticationEndpoint}}/passcode )", - "translation": "Temporärer Authentifizierungscode ( Hier erhalten {{.AuthenticationEndpoint}}/passcode )", - "modified": false - } -] \ No newline at end of file diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/en-us.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/en-us.all.json deleted file mode 100644 index 5789ff6..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/en-us.all.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "id": "\nApp started\n", - "translation": "\nApp started\n" - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nTIP: Use '{{.Command}}' to target new org" - }, - { - "id": "Name", - "translation": "Name" - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "App {{.AppName}} does not exist." - }, - { - "id": "FEATURE FLAGS", - "translation": "FEATURE FLAGS" - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " View allowable quotas with 'CF_NAME quotas'" - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted." - }, - { - "id": "Also delete any mapped routes", - "translation": "Also delete any mapped routes" - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n" - }, - { - "id": "api endpoint:", - "translation": "api endpoint:" - }, - { - "id": "api version:", - "translation": "api version:" - }, - { - "id": "user:", - "translation": "user:" - }, - { - "id": "org:", - "translation": "org:" - }, - { - "id": "space:api version:", - "translation": "space:api version:" - }, - { - "id": "Email", - "translation": "Email", - "modified": false - }, - { - "id": "Password", - "translation": "Password", - "modified": false - }, - { - "id": "Temporary Authentication Code ( Get one at {{.AuthenticationEndpoint}}/passcode )", - "translation": "Temporary Authentication Code ( Get one at {{.AuthenticationEndpoint}}/passcode )" - } -] diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/es-es.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/es-es.all.json deleted file mode 100644 index 48f4b5b..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/es-es.all.json +++ /dev/null @@ -1,87 +0,0 @@ -[ - { - "id": "\nApp started\n", - "translation": "\nApp iniciada\n", - "modified": false - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "modified": false - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nTIP: Use '{{.Command}}' to target new org", - "modified": false - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " View allowable quotas with 'CF_NAME quotas'", - "modified": false - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "modified": false - }, - { - "id": "Also delete any mapped routes", - "translation": "Also delete any mapped routes", - "modified": false - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "App {{.AppName}} does not exist.", - "modified": false - }, - { - "id": "FEATURE FLAGS", - "translation": "FEATURE FLAGS", - "modified": false - }, - { - "id": "Name", - "translation": "Name", - "modified": false - }, - { - "id": "api endpoint:", - "translation": "api endpoint:", - "modified": false - }, - { - "id": "api version:", - "translation": "api version:", - "modified": false - }, - { - "id": "org:", - "translation": "org:", - "modified": false - }, - { - "id": "space:api version:", - "translation": "space:api version:", - "modified": false - }, - { - "id": "user:", - "translation": "user:", - "modified": false - }, - { - "id": "Email", - "translation": "Correo electrónico", - "modified": false - }, - { - "id": "Password", - "translation": "Contraseña", - "modified": false - }, - { - "id": "Temporary Authentication Code ( Get one at {{.AuthenticationEndpoint}}/passcode )", - "translation": "Código de autenticación temporal (obtenlo en {{.AuthenticationEndpoint}}/passcode )", - "modified": false - } -] diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/fr-fr.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/fr-fr.all.json deleted file mode 100644 index 33cac24..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/fr-fr.all.json +++ /dev/null @@ -1,93 +0,0 @@ -[ - { - "id": "Push a new app or sync changes to an existing app", - "translation": "Envoyer par commande push une nouvelle application ou synchroniser les modifications dans une application existante" - }, - { - "id": "USAGE:", - "translation": "SYNTAXE :" - }, - { - "id": "Path to app directory or to a zip file of the contents of the app directory", - "translation": "Chemin d'accès au répertoire de l'application ou à un fichier zip du contenu du répertoire de l'application" - }, - { - "id": "Number of instances", - "translation": "Nombre d'instances" - }, - { - "id": "\nApp started\n", - "translation": "\nApplication démarrée\n", - "modified": false - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nL'application {{.AppName}} a été démarrée avec la commande `some-command-name`\n", - "modified": false - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nASTUCE : utilisez '{{.Command}}' pour cibler une nouvelle organisation", - "modified": false - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " Affichez les quotas pouvant être alloués avec 'CF_NAME quotas'", - "modified": false - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' et '{{.VersionLong}}' sont également acceptés.\n", - "modified": false - }, - { - "id": "Also delete any mapped routes", - "translation": "Supprimer aussi les routes mappées\n", - "modified": false - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "L'application {{.AppName}} n'existe pas.\n", - "modified": false - }, - { - "id": "FEATURE FLAGS", - "translation": "INDICATEURS DE FONCTION", - "modified": false - }, - { - "id": "Name", - "translation": "Nom", - "modified": false - }, - { - "id": "api endpoint:", - "translation": "api endpoint:", - "modified": false - }, - { - "id": "api version:", - "translation": "api version:", - "modified": false - }, - { - "id": "org:", - "translation": "org:", - "modified": false - }, - { - "id": "space:api version:", - "translation": "space:api version:", - "modified": false - }, - { - "id": "user:", - "translation": "user:", - "modified": false - }, - { - "id": "Temporary Authentication Code ( Get one at {{.AuthenticationEndpoint}}/passcode )", - "translation": "Code d’authentication temporaire ( obtenez nouveau à {{.AuthenticationEndpoint}}/passcode )", - "modified": false - } -] diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/i18n_resources.go b/vendor/code.cloudfoundry.org/cli/i18n/resources/i18n_resources.go deleted file mode 100644 index 3ba2b2f..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/i18n_resources.go +++ /dev/null @@ -1,444 +0,0 @@ -// Code generated by go-bindata. -// sources: -// resources/de-de.all.json -// resources/en-us.all.json -// resources/es-es.all.json -// resources/fr-fr.all.json -// resources/it-it.all.json -// resources/ja-jp.all.json -// resources/ko-kr.all.json -// resources/pt-br.all.json -// resources/zh-hans.all.json -// resources/zh-hant.all.json -// DO NOT EDIT! - -package resources - -import ( - "bytes" - "compress/gzip" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "strings" - "time" -) - -func bindataRead(data []byte, name string) ([]byte, error) { - gz, err := gzip.NewReader(bytes.NewBuffer(data)) - if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) - } - - var buf bytes.Buffer - _, err = io.Copy(&buf, gz) - clErr := gz.Close() - - if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) - } - if clErr != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -type asset struct { - bytes []byte - info os.FileInfo -} - -type bindataFileInfo struct { - name string - size int64 - mode os.FileMode - modTime time.Time -} - -func (fi bindataFileInfo) Name() string { - return fi.name -} -func (fi bindataFileInfo) Size() int64 { - return fi.size -} -func (fi bindataFileInfo) Mode() os.FileMode { - return fi.mode -} -func (fi bindataFileInfo) ModTime() time.Time { - return fi.modTime -} -func (fi bindataFileInfo) IsDir() bool { - return false -} -func (fi bindataFileInfo) Sys() interface{} { - return nil -} - -var _resourcesDeDeAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\x4d\x6f\xd4\x30\x10\x86\xef\xfd\x15\xaf\xf6\x92\x4b\xb5\x3f\x20\xb7\xa8\xda\x45\x48\xa5\x42\xf4\xe3\x42\x11\x1d\xe2\x69\xd6\x52\xe2\x31\xf6\x84\x80\xa2\xfc\x77\x64\x96\x8a\x6d\xc1\x8b\x5b\xf5\x12\x45\x33\xe3\xe7\x7d\x26\x1f\x1f\x4f\x00\xcc\xe9\x02\x60\x65\xcd\xaa\xc6\xea\xd6\x35\xde\x23\x2a\x05\x65\x73\xeb\x56\xa7\x0f\x6d\x0d\xe4\x62\x4f\x6a\xc5\xfd\x99\xeb\x78\x3f\xa9\x87\x93\x83\x18\x7b\x6f\x39\xe1\xee\xa9\x8f\x9c\xea\xcb\x69\x36\x6b\x9e\xd7\x8d\xf7\x17\x34\xf0\xb2\x60\xa2\xf8\x10\x8e\x31\x5a\xd7\x41\x77\x36\xa2\x95\x61\x20\x67\x70\x37\xcf\xeb\xb3\xfd\xfd\xb2\xdc\xfd\x57\xef\x75\xd0\xcf\xd8\xe7\xea\xed\xfb\x1a\xd7\x91\x51\x1d\xd2\x2a\xa8\x40\x29\x74\xac\x70\x3c\x41\x42\x77\x44\xfc\x05\x8c\x62\x43\x00\x37\x96\x27\x50\xdf\xcb\x44\x5f\x7a\xc6\xd7\x51\x94\x22\x26\xab\x3b\x54\x67\xdb\xcf\x17\xcd\xbb\xcd\xef\x62\x95\x95\x7c\x29\xa6\xd8\x33\xad\x7e\xc3\x21\x5a\x71\x97\x3b\x09\x9a\xf6\x4f\x2f\xe9\xa0\x7e\x2e\xae\xfb\x55\x0e\x0c\xea\xa3\x80\xda\x96\xbd\xb2\x59\x67\xb5\x5f\x89\x5a\xbc\x45\x93\x00\x86\x7b\x56\x06\xb9\x1f\x18\xc8\x7b\x36\x08\x32\x2a\xc7\xac\x65\xe1\xa9\x72\x8b\xa7\x3f\x82\x11\x8e\x70\xa2\xe0\xef\x36\x6a\xfe\x71\x95\x1f\x2c\x76\xd9\x6e\x9a\xab\xeb\x0f\x1b\x6c\xcf\x9b\x37\x97\xd9\xe0\xcc\x54\x71\x4a\xd2\xcd\xc2\x1f\x37\x8b\x99\xe4\x2d\xd8\x19\x2f\xd6\x69\x9d\x85\x67\xa6\x9e\x95\xf2\x6d\xff\x25\x1e\x0f\xf9\x7b\xa8\x38\x43\x42\x97\x67\x3f\x6e\x16\x33\xa3\xa7\x96\xeb\x22\xfb\x63\xa3\xc5\x79\x63\xe4\x90\x8f\x78\xd2\xfd\x27\xf5\xe4\xd3\xcf\x00\x00\x00\xff\xff\xf6\x15\xfb\x1f\xfe\x06\x00\x00") - -func resourcesDeDeAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesDeDeAllJson, - "resources/de-de.all.json", - ) -} - -func resourcesDeDeAllJson() (*asset, error) { - bytes, err := resourcesDeDeAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/de-de.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _resourcesEnUsAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x93\xcd\x6e\xdb\x30\x10\x84\xef\x7a\x8a\x81\x2f\xbe\x04\x7e\x00\xdf\x84\xc0\x2e\x0a\xa4\x41\xd0\xfc\x5c\x9a\xa2\xd9\x9a\x1b\x99\x00\x45\xb2\xdc\x75\xd5\x42\xd0\xbb\x17\xb2\x93\x22\x86\xc8\xfc\xc0\x57\xce\xcc\xb7\x2b\xed\xee\xb7\x0a\xe8\x2b\x00\x98\x59\x33\x5b\x62\x76\xef\xeb\x18\x21\x4a\x49\xd9\xdc\xfb\xd9\xd9\x41\xd4\x44\x5e\x1c\xa9\x0d\x3e\xe7\xaa\x80\xe1\x6c\x8a\xba\xf9\x7c\xb5\xc4\xad\x30\xe6\x7d\xbf\x38\x0f\x6d\x4b\xde\x0c\xc3\x1c\x1a\xa0\x94\x1a\x56\x78\xee\x10\x52\x53\x2c\xf3\x7e\x42\xb6\x85\x4b\x6a\xb9\xc0\xde\x4b\xd9\xd0\xf8\x69\x7d\xbf\xa8\x63\x1c\x3d\xc3\x00\x13\x58\xe0\x83\x82\xff\x58\xd1\x45\x01\xf8\x66\x2c\x5b\x6c\xbd\xaa\x6f\x6e\xbf\xae\xb0\xbe\xa8\x3f\x5d\x17\xc8\xc7\x9e\x2c\x06\xc0\x9d\xe5\x0e\xe4\x5c\xe8\xe8\xa7\x63\xfc\xda\x05\x25\x41\x67\x75\x8b\xf9\xf9\xfa\xc7\x65\xfd\x65\xf5\xf4\x38\x2f\xd4\xf9\x20\x24\xdb\xc8\x38\xa7\x3b\x4e\x62\x83\xbf\xde\x86\xa4\xe3\xb0\xc8\x1b\xbc\x78\xbf\x08\xbe\xd9\x3f\x27\x06\x39\x09\xa0\xcd\x86\xa3\xb2\x29\xfd\xd9\xd3\x98\xf9\x19\x8f\x1e\xc3\x8e\x95\x41\xfe\x2f\x5a\x8a\x91\x0d\x52\xd8\x29\x4b\x69\xc0\xaf\x66\x0a\x27\x30\xd9\x8a\x8e\xe4\xf9\x70\xb0\x13\xeb\x1b\xe8\xd6\x0a\x36\x87\xdd\xc6\xc3\xcb\x3d\x7f\x78\xe3\x00\x4f\x02\x67\x1b\xa6\x68\xc1\xde\xc4\x60\xbd\x2e\x0b\xb5\x8f\x3d\x45\xcc\xef\xc3\x64\x5e\xa3\xfc\xb7\x64\x21\x3b\xe1\x54\x4a\x1f\xb4\x6c\x2c\xa4\xa6\x94\xda\x4b\xd9\x90\x44\xda\xf0\xf2\x1d\x6d\x67\x8c\xc7\xc0\x67\xe2\xaa\x25\xeb\x9e\x20\x13\xca\xb1\xd8\x06\x63\x1f\x2d\x8f\xb1\x47\x72\xc2\x79\xe0\x15\x89\x74\x21\x99\x12\x73\xa2\x4f\xb1\x43\xf5\xbd\xfa\x17\x00\x00\xff\xff\xcf\x2f\x17\x9b\xf2\x05\x00\x00") - -func resourcesEnUsAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesEnUsAllJson, - "resources/en-us.all.json", - ) -} - -func resourcesEnUsAllJson() (*asset, error) { - bytes, err := resourcesEnUsAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/en-us.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _resourcesEsEsAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\xcd\x6a\xdb\x40\x10\xc7\xef\x79\x8a\x3f\xbe\xf8\x12\xfc\x00\xbe\x09\x63\x97\x42\x1a\x42\xf3\x71\x69\x4a\x33\xd5\x4e\xec\x05\x69\x67\xbb\x33\xae\x5a\x84\x1e\xaa\xf4\x11\xf2\x62\x45\x4d\x43\x9d\x84\x75\x36\x26\x17\x21\x66\x66\x7f\xff\xdf\xe8\xe3\xd3\x11\x80\x7e\xbc\x00\x98\x78\x37\x99\x63\x72\x1d\xaa\x18\xa1\x46\xc9\xd8\x5d\x87\xc9\xf1\x43\xdb\x12\x05\x6d\xc8\xbc\x84\xff\x73\x3e\xf8\xda\x93\xa3\xdd\xc1\x56\x9c\xbf\xf5\x3c\xd2\x6e\xa9\x51\x1e\xeb\xc3\x71\x36\xaa\xef\x67\x55\x8c\xa7\xd4\xf2\x30\xa0\x23\x7d\xc8\xc6\x56\x7d\x58\xc3\x36\x5e\x51\x4b\xdb\x52\x70\xb8\xe9\xfb\xd9\xe2\xfe\x7e\x18\x6e\x5e\xb4\x7b\x1b\xf4\x2b\xf6\xb9\x78\x7f\x36\xc7\xa5\x32\xa6\xbb\xb4\x29\x4c\x60\x94\xd6\x6c\x08\xdc\x41\xd2\x7a\x8f\xf8\x01\x8c\x62\x43\x00\x57\x9e\x3b\x50\xd3\x48\x47\x5f\x1b\xc6\xb7\xad\x18\x29\x3a\x6f\x1b\x4c\x17\xab\x2f\xa7\xd5\x87\xe5\xbf\xe2\x34\x2b\x79\x28\xa6\xd8\x73\x5c\xfd\x8a\x93\x7a\x09\xe7\x1b\x49\x36\xee\x3f\xbe\xa4\x9d\xfa\x89\x84\xf5\xdf\x72\x62\x50\xa3\x02\xaa\x6b\x8e\xc6\x6e\x96\xd5\x7e\x23\x6a\xf1\x16\xd5\x08\x70\xdc\xb0\x31\x28\xfc\x44\x4b\x31\xb2\x43\x92\xad\xb1\x66\x2d\x0b\x4f\x95\x5b\x3c\xfd\x11\x9c\xb0\x22\x88\x81\x7f\x78\xb5\xfc\xe3\x2a\x3f\x58\xec\xb2\x5a\x56\x17\x97\x1f\x97\x58\x9d\x54\xef\xce\xb3\xc1\x99\xa9\xe2\x94\x51\x37\x0b\x7f\xdc\x2c\x66\x52\xf4\xe0\xe0\xa2\xf8\x60\xf3\x2c\x3c\x33\xf5\xaa\x94\xef\xf7\x5f\xe2\xfe\x90\xe7\x43\xc5\x19\x92\xd6\x79\xf6\xe3\x66\x31\x53\x23\xd5\x3c\x2f\xb2\xdf\x37\x5a\x9c\xb7\x55\x4e\xf9\x88\x27\xdd\x62\xea\xb2\x25\xdf\x64\xa9\x0b\x49\x89\x05\xdc\x70\x6d\xe9\xee\x77\xf0\xb5\x1c\x90\x71\x46\xaa\x9d\x24\xb7\x27\x26\x58\x22\xe5\xbb\x5f\xf4\x02\xfe\xe8\xf3\x9f\x00\x00\x00\xff\xff\xd2\x34\xa6\x99\xc0\x07\x00\x00") - -func resourcesEsEsAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesEsEsAllJson, - "resources/es-es.all.json", - ) -} - -func resourcesEsEsAllJson() (*asset, error) { - bytes, err := resourcesEsEsAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/es-es.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _resourcesFrFrAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x95\xc1\x6e\xdb\x46\x10\x86\xef\x7e\x8a\x1f\xba\xe8\x92\xf8\x01\x74\x23\x14\x3a\x30\xe0\x2a\x46\x24\x05\x2d\x9a\xa2\x1e\x93\x23\x71\x01\x72\x77\xbb\xb3\x2b\xd7\x16\xf4\x2e\x3d\x96\x7d\x0d\xbe\x58\xb1\x94\xdc\x48\xae\x56\x51\x74\x31\xc4\xe5\xcc\xf7\xff\x33\x9c\x59\xff\x7a\x05\x60\x1d\xff\x00\x18\xa8\x72\x30\xc2\xe0\x3e\x48\x05\x82\xe6\x27\x90\xb5\x30\x0e\xf2\xac\x0b\x14\x15\xe9\x25\x0b\xbc\x01\x69\xf0\x9f\x4a\xbc\xd2\xcb\x18\x32\x78\xf7\x0a\xf0\x8e\xb4\xd4\xe4\x95\xd1\x91\x94\xeb\x95\x79\x66\x07\x4b\x0e\x85\x69\x1a\xd2\x25\xc3\x46\x7c\xd0\x0c\x6d\xc2\x8a\xeb\x9a\x23\xa2\x56\x45\x9f\x05\x13\x7a\xb5\xca\x19\xad\x84\x1d\x6a\x16\x34\xa6\x54\x8b\x5d\x80\xa0\x24\x2d\x7d\xfe\x7e\x5a\x6f\x87\xb4\xe7\x41\xb4\xb2\x79\x77\xa4\xac\xf9\x34\xfb\x98\x8f\x92\x5e\xa7\xbf\x4c\x66\xd9\xcf\x39\x46\x69\xc2\x3d\xf9\xaa\x2f\xdf\x5a\x94\xca\x71\xe1\x8d\x7b\x8e\xfd\x89\x67\x78\x51\x16\x0b\x55\x33\xcc\x02\xbe\x62\x14\x46\x7b\xd6\x5e\x5e\x9f\x0f\xb2\x92\x36\xc6\x15\x37\x4a\xa3\x1c\x52\x51\x74\x7f\x0b\x28\xc0\x75\xad\x65\xe7\x8d\x72\x8c\x92\x51\x0f\xdf\xf4\xab\xfb\x0b\x41\x63\xa1\x8a\x4a\xb1\xeb\x6d\x94\x61\xa7\x1e\xe2\xcf\x53\xf9\xe9\x62\x27\xa1\x79\x64\x17\xcd\x2b\x1d\x5b\x5b\xb0\x24\x4d\x4f\x4c\xf3\x18\xe1\xc3\x6f\xa1\x49\xee\x57\x9d\x59\x0b\xf1\xe4\x3c\x97\x5f\x75\x92\xd9\xc7\xfd\x57\x66\xd9\xb5\x0d\x39\xd7\xb5\xbc\x9f\xb2\x1d\x0c\x8e\xdc\x05\xd5\xc2\xdf\x11\x5d\xaf\xaf\x33\x6b\x27\xd4\xf0\x66\x83\x27\x92\x57\x17\x08\x12\x27\xd9\x57\x4a\x5e\xc7\x14\x0f\xeb\xf5\xf5\x78\xfb\x7b\xb3\x79\x38\xe9\xf3\xee\xe0\x83\x1c\x88\x10\xba\xd6\x77\xed\x9e\x7d\xd0\x8a\x0b\xd4\xf4\x6d\x1f\x1e\xc4\x34\xfc\x7e\xf7\xf8\x5e\x53\xc3\x0f\x17\xd6\x38\xbb\xbd\x1f\x61\x2e\x8c\xe1\xbe\xf9\x61\x1c\x4f\x4f\x6e\xc9\xbe\xdf\x69\xe3\x96\xa7\x9a\x3e\x9d\xcd\xc7\x39\x46\x08\x5e\xd5\x4a\xf8\xe5\x2d\xcc\x9a\xe0\x50\xa8\xc7\x9a\xdd\xe1\x16\x1b\xb7\x24\xad\x64\xcb\xfa\x71\xfb\x00\xbe\xa8\x78\xe5\xd4\xb5\x79\xa2\xc7\x9a\xf1\x47\x30\x9e\x04\x4f\xca\x57\x18\x8e\x6f\x7e\x9f\x64\x3f\xe5\xbb\xc3\x61\xb2\x02\x00\xd9\x22\xee\x02\xbf\xf4\x77\xc7\x0e\x62\x4d\x58\x91\xf6\xe8\xfe\xf1\x8e\x7b\x8d\xd0\xb5\xb2\xfd\x18\x69\xf6\xd9\xe6\x63\x8f\xbe\xb0\x13\x65\xf4\xb4\x32\xce\xc7\x46\xc5\x29\xda\x3b\xbf\x33\x7a\xd9\x1f\xf7\xfa\x62\x40\x45\xc1\xd6\x73\x79\x9d\xac\xe5\x18\x95\xfd\x31\xa8\x98\x58\x5b\xbb\xa4\x9a\x1b\xd6\x7e\xc7\xee\x5a\xb9\xbe\x68\x94\xb2\xe8\xaf\xe4\x9a\x3d\x83\xf4\x33\x1a\xb2\x96\x4b\x38\x13\xfc\x89\x5b\x60\x1a\xac\x75\xaa\x61\x07\x0a\x22\xaa\x6f\xff\x36\xa5\x07\x74\x2d\xcb\x65\x6e\xde\xae\x6e\x69\x58\xa0\x8d\xdf\xde\xfa\xe9\xfe\x9d\x58\x4c\x3d\xec\x73\x19\x96\x2e\xec\xd1\x4d\x9e\xcd\xe6\x9f\x73\xdc\xdc\x65\x1f\xa7\x49\x0b\xb7\x93\x0f\xb7\xe3\x6c\x96\xcf\x3f\x4f\xf1\x21\xc7\xcd\xa7\xc9\x78\x76\xfb\x69\x72\x81\x5e\x34\x7e\xea\x02\xbe\x00\x49\x56\x81\x75\x69\x8d\xd2\x3e\xfd\x8f\x31\x11\xf5\x43\x2a\xab\xed\xb8\x9e\x16\xf9\x7f\xd0\xd9\x1a\xc6\x2d\xd3\xec\xc3\x97\x67\x33\xc5\x52\xc1\xa3\xb3\xdc\x9f\x0a\x3d\x5b\x2f\x08\xbb\xb4\xc4\x9b\xb7\x47\xa9\x57\xbf\x5d\xfd\x1b\x00\x00\xff\xff\xe5\x46\x71\xdf\xd0\x09\x00\x00") - -func resourcesFrFrAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesFrFrAllJson, - "resources/fr-fr.all.json", - ) -} - -func resourcesFrFrAllJson() (*asset, error) { - bytes, err := resourcesFrFrAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/fr-fr.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _resourcesItItAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\x4d\x6f\x13\x31\x10\x86\xef\xfd\x15\xaf\x72\xc9\xa5\xca\x0f\xc8\x6d\x55\x25\x08\xa9\x54\x88\x7e\x5c\x28\xa2\xc3\x7a\xba\xb1\xe4\xf5\x18\x7b\x92\x05\x56\xfb\xdf\x91\x29\x45\x69\xc1\xc1\xad\x72\x59\xad\x66\xc6\xcf\xfb\xcc\x7e\x7c\x3c\x01\x30\xe6\x0b\x80\x99\x35\xb3\x25\x66\xb7\xbe\x09\x01\x49\x29\x2a\x9b\x5b\x3f\x3b\x7d\x6c\x6b\x24\x9f\x1c\xa9\x15\xff\x67\xce\xd9\x96\x7e\x58\xf1\x0c\xda\xed\x2c\x29\xed\x1f\xe8\xc5\xd8\x7b\xcb\x99\x7a\x4f\x2e\x71\xae\x4f\xa7\xc5\xc8\x71\x5c\x34\x21\x5c\x50\xcf\xd3\x84\x81\xd2\xa3\x03\xb6\xc9\xfa\x0e\xba\xb1\x09\xad\xf4\x3d\x79\x83\xbb\x71\x5c\x9c\x3d\xdc\x4f\xd3\xdd\xff\x2c\x8f\x84\x7e\xc1\x3e\x57\x6f\xdf\x2f\x71\x9d\x18\xf3\x7d\xda\x1c\x2a\x50\x8a\x1d\x2b\x3c\x0f\x90\xd8\x1d\x10\x7f\x05\xa3\xda\x10\xc0\x8d\xe5\x01\xe4\x9c\x0c\xf4\xc5\x31\xbe\x6e\x45\x29\x61\xb0\xba\xc1\xfc\x6c\xfd\xf9\xa2\x79\xb7\xfa\x5d\x9c\x17\x25\x5f\x8b\xa9\xf6\xcc\xab\xdf\x70\x4c\x56\xfc\xe5\x46\xa2\xe6\xfd\xf3\x4b\xda\xab\x9f\x8b\xef\x7e\x95\x23\x83\x5c\x12\x50\xdb\x72\x50\x36\x8b\xa2\xf6\x91\xa8\xd5\x5b\x34\x19\x60\xd8\xb1\x32\xc8\x7f\x47\x4f\x21\xb0\x41\x94\xad\x72\x2a\x5a\x56\x9e\xaa\xb7\x78\xfe\x23\x18\xe1\x04\x2f\x0a\xfe\x66\x93\x96\x1f\x57\xfd\xc1\x6a\x97\xf5\xaa\xb9\xba\xfe\xb0\xc2\xfa\xbc\x79\x73\x59\x0c\x2e\x4c\x55\xa7\x64\xdd\x22\xfc\x69\xb3\x9a\x49\xc1\x82\xbd\x09\x62\xbd\x2e\x8b\xf0\xc2\xd4\x8b\x52\x76\x0f\x5f\xe2\xe1\x90\xbf\x87\xaa\x33\x24\x76\x65\xf6\xd3\x66\x35\x33\x05\x6a\x79\x59\x65\x7f\x68\xb4\x3a\x6f\x9b\x38\x96\x23\x9e\x75\xff\x49\x3d\xf9\xf4\x33\x00\x00\xff\xff\xdc\xca\x3a\xfd\x05\x07\x00\x00") - -func resourcesItItAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesItItAllJson, - "resources/it-it.all.json", - ) -} - -func resourcesItItAllJson() (*asset, error) { - bytes, err := resourcesItItAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/it-it.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _resourcesJaJpAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\xcd\x6a\x14\x4d\x14\x86\xf7\xb9\x8a\x97\xd9\xcc\x26\xcc\x05\xcc\xae\x09\x33\x1f\x1f\xc4\x20\xe6\x67\x63\xc4\x1c\xa7\x4e\x7a\x0a\xba\xab\xca\xaa\x33\xb6\xd2\xf4\xa2\x93\x65\xb2\xd5\x2c\x05\x37\x82\x17\xe1\xcd\x14\x2e\xbc\x0b\x69\xc7\xc0\x24\x5a\x43\x25\x64\xd3\x34\xe7\x9c\x7a\xde\xe7\xf4\xcf\xcb\x1d\x00\xed\x70\x01\x30\xd2\x6a\x34\xc5\xe8\xd4\x14\xce\x21\x08\x79\x61\x75\x6a\x46\xbb\xb7\x6d\xf1\x64\x42\x45\xa2\xad\x59\xcf\xc5\x8b\x2f\xf1\xf2\x26\x5e\x7e\x8b\xfd\xf5\xcf\x4f\x57\x3f\xbe\x5e\xc5\xfe\x63\xbc\xb8\x8e\xfd\xf7\xd8\xdf\xc4\xfe\xf3\xe6\xe9\xda\x2a\x7d\xae\x79\x88\x38\xa7\x2a\xf0\x50\xef\x76\x93\xf9\x6d\x3b\x29\x9c\x3b\xa0\x9a\xbb\x0e\x0d\x85\x5b\x21\xac\x82\x36\x25\x64\xa9\x03\x16\xb6\xae\xc9\x28\x9c\xb5\xed\x64\x6f\x7d\xdf\x75\x67\x5b\x95\x9f\x0e\xfd\x80\x7d\x8e\xfe\x7f\x3e\xc5\x71\x60\x8c\x37\x69\x63\x88\x85\x90\x2f\x59\x60\xb8\x81\xf5\xe5\x16\xf1\x47\x30\xb2\x0d\x01\x9c\x68\x6e\x40\x55\x65\x1b\x7a\x53\x31\xde\xae\xac\x50\x40\xa3\x65\x89\xf1\xde\xfc\xf5\x41\xf1\x6c\xf6\xa7\x38\x4e\x4a\x3e\x16\x93\xed\x39\xac\x7e\xc2\x3e\x68\x6b\x0e\x97\xd6\xcb\xb0\xff\xf0\x92\x36\xea\xfb\xd6\x94\xbf\xcb\x9e\x41\x55\xb0\xa0\xc5\x82\x9d\xb0\x9a\x24\xb5\x9f\x88\x9a\xbd\x45\x31\x00\x14\x57\x2c\x0c\x32\x1f\x50\x93\x73\xac\xe0\xed\x4a\x38\x24\x2d\x33\x4f\xe5\x5b\xdc\xff\x11\x94\xe5\x00\x63\x05\xfc\x5e\x07\x49\x3f\xae\xfc\x83\xd9\x2e\xf3\x59\x71\x74\xfc\x62\x86\xf9\x7e\xf1\xdf\x61\x32\x38\x31\x95\x9d\x32\xe8\x26\xe1\x77\x9b\xd9\x4c\x72\x1a\x6c\x94\xb3\xda\xc8\x34\x09\x4f\x4c\x3d\x28\xe5\xdd\xfa\x4b\xdc\x1e\xf2\xf7\x50\x76\x86\xf5\x65\x9a\x7d\xb7\x99\xcd\x0c\x8e\x16\x3c\xcd\xb2\xdf\x36\x9a\x9d\xb7\x0a\xec\xd3\x11\xf7\xba\xff\xa4\xee\xbc\xfa\x15\x00\x00\xff\xff\x04\xa3\x79\xe1\x12\x07\x00\x00") - -func resourcesJaJpAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesJaJpAllJson, - "resources/ja-jp.all.json", - ) -} - -func resourcesJaJpAllJson() (*asset, error) { - bytes, err := resourcesJaJpAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/ja-jp.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _resourcesKoKrAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\xbd\x6e\x13\x41\x10\xc7\xfb\x3c\xc5\x5f\x6e\xdc\x44\x7e\x00\x77\xa7\xc8\x46\x48\x21\x42\xe4\xa3\x21\x88\x0c\xde\xc9\x79\xa5\xbb\x9d\x65\x77\xcc\x81\x4e\xf7\x04\x34\x50\xd0\x21\x6a\x5a\x9e\x0b\x3f\x04\x5a\x4c\x24\x27\x64\x4f\x9b\x28\xcd\xe9\x34\x33\xfb\xfb\xff\xe6\x3e\x5e\x1f\x00\xe8\xd3\x05\xc0\xc4\x9a\xc9\x1c\x93\x4b\x57\x79\x8f\xa8\x14\x94\xcd\xa5\x9b\x1c\xde\xb4\x35\x90\x8b\x0d\xa9\x15\xb7\x9b\xdb\x7e\xfb\x85\xed\xe7\xef\xdb\x1f\x5f\x7f\x7f\xf9\xb9\x3f\xd9\x8a\xb1\xd7\x96\x13\xee\x9a\x9a\xc8\xa9\x3e\x1c\x66\xb3\xfa\x7e\x56\x79\x7f\x42\x2d\x0f\x03\x3a\x8a\x37\xe1\xd8\x44\xeb\x6a\xe8\xda\x46\xac\xa4\x6d\xc9\x19\x5c\xf5\xfd\xec\x68\x77\x3f\x0c\x57\xa3\x7a\x4f\x87\x7e\xc0\x3e\x67\xcf\x5f\xce\x71\x1e\x19\xd3\x7d\xda\x14\x2a\x50\x0a\x35\x2b\x1c\x77\x90\x50\x8f\x88\x3f\x82\x51\x6c\x08\xe0\xc2\x72\x07\x6a\x1a\xe9\xe8\x5d\xc3\x78\xbf\x11\xa5\x88\xce\xea\x1a\xd3\xa3\xe5\xdb\x93\xea\xc5\xe2\x5f\x71\x9a\x95\x7c\x2c\xa6\xd8\x33\xad\x7e\xc1\x21\x5a\x71\xa7\x6b\x09\x9a\xf6\x4f\x2f\x69\xaf\x7e\x2c\xae\xfe\x5b\x0e\x0c\x6a\xa2\x80\x56\x2b\xf6\xca\x66\x96\xd5\x7e\x22\x6a\xf1\x16\x55\x02\x18\x6e\x58\x19\xe4\x3e\xa1\x25\xef\xd9\x20\xc8\x46\x39\x66\x2d\x0b\x4f\x95\x5b\xdc\xfd\x11\x8c\x70\x84\x13\x05\x7f\xb4\x51\xf3\x8f\xab\xfc\x60\xb1\xcb\x72\x51\x9d\x9d\xbf\x5a\x60\x79\x5c\x3d\x3b\xcd\x06\x67\xa6\x8a\x53\x92\x6e\x16\x7e\xbb\x59\xcc\x24\x6f\xc1\xce\x78\xb1\x4e\xe7\x59\x78\x66\xea\x41\x29\x1f\x76\x5f\xe2\x78\xc8\xff\x43\xc5\x19\x12\xea\x3c\xfb\x76\xb3\x98\x19\x3d\xad\x78\x5e\x64\x3f\x36\x5a\x9c\xb7\x89\x1c\xf2\x11\x77\xba\xf7\x52\x0f\xde\xfc\x09\x00\x00\xff\xff\xc9\xe7\x7a\x82\xfe\x06\x00\x00") - -func resourcesKoKrAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesKoKrAllJson, - "resources/ko-kr.all.json", - ) -} - -func resourcesKoKrAllJson() (*asset, error) { - bytes, err := resourcesKoKrAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/ko-kr.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _resourcesPtBrAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\x4d\x6f\xd4\x30\x10\x86\xef\xfd\x15\xaf\xf6\x92\x4b\xb5\x3f\x20\xb7\xa8\xda\x45\x48\xa5\x42\xf4\xe3\x42\x11\x1d\xe2\x69\xd6\x52\xe2\x31\xf6\x84\x80\xa2\xfc\x77\x64\x4a\xc5\xb6\xe0\xc5\xad\xf6\x12\x45\x33\xe3\xe7\x7d\x26\x1f\x1f\x4f\x00\xcc\xe9\x02\x60\x65\xcd\xaa\xc6\xea\xd6\x35\xde\x23\x2a\x05\x65\x73\xeb\x56\xa7\x8f\x6d\x0d\xe4\x62\x4f\x6a\xc5\xfd\x99\xb3\xce\xb6\x96\x8c\xec\x0f\x0e\x62\xec\xbd\xe5\x44\xbb\xa7\x3e\x72\xaa\x2f\xa7\xd9\xa8\x79\x5e\x37\xde\x5f\xd0\xc0\xcb\x82\x89\xe2\x63\x36\xc6\x68\x5d\x07\xdd\xd9\x88\x56\x86\x81\x9c\xc1\xdd\x3c\xaf\xcf\x1e\xee\x97\xe5\xee\xbf\x76\xc7\x41\xbf\x60\x9f\xab\xb7\xef\x6b\x5c\x47\x46\xb5\x4f\xab\xa0\x02\xa5\xd0\xb1\xc2\xf1\x04\x09\xdd\x01\xf1\x57\x30\x8a\x0d\x01\xdc\x58\x9e\x40\x7d\x2f\x13\x7d\xe9\x19\x5f\x47\x51\x8a\x98\xac\xee\x50\x9d\x6d\x3f\x5f\x34\xef\x36\xbf\x8b\x55\x56\xf2\xb5\x98\x62\xcf\xb4\xfa\x0d\x87\x68\xc5\x5d\xee\x24\x68\xda\x3f\xbd\xa4\xbd\xfa\xb9\xb8\xee\x57\x39\x30\xa8\x8f\x02\x6a\x5b\xf6\xca\x66\x9d\xd5\x3e\x12\xb5\x78\x8b\x26\x01\x0c\xf7\xac\x0c\x72\x3f\x30\x90\xf7\x6c\x10\x64\x54\x8e\x59\xcb\xc2\x53\xe5\x16\xcf\x7f\x04\x23\x1c\xe1\x44\xc1\xdf\x6d\xd4\xfc\xe3\x2a\x3f\x58\xec\xb2\xdd\x34\x57\xd7\x1f\x36\xd8\x9e\x37\x6f\x2e\xb3\xc1\x99\xa9\xe2\x94\xa4\x9b\x85\x3f\x6d\x16\x33\xc9\x5b\xb0\x33\x5e\xac\xd3\x3a\x0b\xcf\x4c\xbd\x28\xe5\xdb\xc3\x97\x78\x38\xe4\xef\xa1\xe2\x0c\x09\x5d\x9e\xfd\xb4\x59\xcc\x8c\x9e\x5a\xae\x8b\xec\x0f\x8d\x16\xe7\x8d\x91\x43\x3e\xe2\x59\xf7\x9f\xd4\x93\x4f\x3f\x03\x00\x00\xff\xff\xbc\x94\x72\xe2\xfd\x06\x00\x00") - -func resourcesPtBrAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesPtBrAllJson, - "resources/pt-br.all.json", - ) -} - -func resourcesPtBrAllJson() (*asset, error) { - bytes, err := resourcesPtBrAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/pt-br.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _resourcesZhHansAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\xcd\x6a\xdb\x40\x10\xc7\xef\x79\x8a\x3f\xbe\xf8\x12\xfc\x00\xbe\x89\x60\x97\x42\x1a\x4a\xf3\x71\x69\x4a\x33\xf5\x4e\xe4\x05\x69\x67\xbb\x3b\xae\x5a\x84\x5e\xa0\x3d\xb4\x87\x3c\x84\x6f\x85\x5e\x0a\x79\x1f\x91\xd7\x28\xaa\x1b\x70\xd2\xac\xd9\x84\x5c\x84\x98\x99\xfd\xfd\x7f\xa3\x8f\xb7\x7b\x00\xda\xe1\x02\x60\x64\xcd\x68\x8a\xd1\xb9\x2b\xbc\x47\x54\x0a\xca\xe6\xdc\x8d\xf6\x6f\xdb\x1a\xc8\xc5\x8a\xd4\x8a\xdb\xcc\xf5\xd7\x57\x37\x57\xeb\x9b\xf5\xb7\xfe\xfa\x7b\xff\xfb\x57\xff\xe3\x67\xff\x75\xbd\x7d\xa2\x16\x63\x2f\x2d\x0f\xd8\x4b\xaa\x22\x0f\xf5\x6e\x3f\x99\xd9\xb6\x93\xc2\xfb\x23\xaa\xb9\xeb\xd0\x50\xbc\x95\xc0\x2a\x5a\x57\x42\x97\x36\x62\x21\x75\x4d\xce\xe0\xa2\x6d\x27\x07\x9b\xfb\xae\xbb\xd8\xa9\xf9\x7c\xe8\x47\xec\x73\xf2\xf2\xf5\x14\xa7\x91\x31\xde\xa6\x8d\xa1\x02\xa5\x50\xb2\xc2\x71\x03\x09\xe5\x0e\xf1\x27\x30\xb2\x0d\x01\x9c\x59\x6e\x40\x55\x25\x0d\x7d\xa8\x18\x1f\x57\xa2\x14\xd1\x58\x5d\x62\x7c\x30\x7f\x7f\x54\xbc\x9a\xfd\x2b\x8e\x93\x92\x4f\xc5\x64\x7b\x0e\xab\x9f\x71\x88\x56\xdc\xf1\x52\x82\x0e\xfb\x0f\x2f\x69\xab\x7e\x28\xae\xfc\x5b\x0e\x0c\xaa\xa2\x80\x16\x0b\xf6\xca\x66\x92\xd4\x7e\x26\x6a\xf6\x16\xc5\x00\x30\x5c\xb1\x32\xc8\x7d\x41\x4d\xde\xb3\x41\x90\x95\x72\x4c\x5a\x66\x9e\xca\xb7\xb8\xff\x23\x18\xe1\x08\x27\x0a\xfe\x6c\xa3\xa6\x1f\x57\xfe\xc1\x6c\x97\xf9\xac\x38\x39\x7d\x33\xc3\xfc\xb0\x78\x71\x9c\x0c\x4e\x4c\x65\xa7\x0c\xba\x49\xf8\xdd\x66\x36\x93\xbc\x05\x3b\xe3\xc5\x3a\x9d\x26\xe1\x89\xa9\x47\xa5\x7c\xda\x7c\x89\xbb\x43\xfe\x1f\xca\xce\x90\x50\xa6\xd9\x77\x9b\xd9\xcc\xe8\x69\xc1\xd3\x2c\xfb\x5d\xa3\xd9\x79\xab\xc8\x21\x1d\x71\xaf\xfb\x20\x75\xef\xdd\x9f\x00\x00\x00\xff\xff\x0c\xe7\xa4\xba\x06\x07\x00\x00") - -func resourcesZhHansAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesZhHansAllJson, - "resources/zh-hans.all.json", - ) -} - -func resourcesZhHansAllJson() (*asset, error) { - bytes, err := resourcesZhHansAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/zh-hans.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _resourcesZhHantAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x93\xbd\x6e\x13\x41\x10\xc7\xfb\x3c\xc5\x5f\x6e\xdc\x44\x7e\x00\x77\xa7\xc8\x46\x48\x21\x42\xe4\xa3\x21\x88\x0c\xde\xc9\x79\xa5\xbb\x9d\x65\x77\xcc\x81\x4e\x57\x23\x94\x82\x86\xd4\xb4\xa9\x69\x68\x78\x1d\x93\xd7\x40\x87\x89\xe4\x84\xec\x69\x13\xa5\x39\x9d\x66\x66\x7f\xff\xdf\xdc\xc7\xeb\x1d\x00\x6d\x7f\x01\x30\xb2\x66\x34\xc5\xe8\xd4\x15\xde\x23\x2a\x05\x65\x73\xea\x46\xbb\x37\x6d\x0d\xe4\x62\x45\x6a\xc5\x6d\xe6\xd6\x3f\x7f\xac\x2f\xbf\xaf\x2f\x2e\x7f\x7f\xfe\x72\xfd\xed\xea\xfa\xea\x62\xfd\xeb\xeb\xf6\x89\x5a\x8c\x3d\xb7\xdc\x63\xcf\xa9\x8a\xdc\xd7\xbb\xdd\x64\x66\xdb\x4e\x0a\xef\x0f\xa8\xe6\xae\x43\x43\xf1\x46\x02\xab\x68\x5d\x09\x5d\xda\x88\x85\xd4\x35\x39\x83\xb3\xb6\x9d\xec\x6d\xee\xbb\xee\x6c\x50\xf3\xe9\xd0\x0f\xd8\xe7\xe8\xf9\xcb\x29\x8e\x23\x63\xbc\x4d\x1b\x43\x05\x4a\xa1\x64\x85\xe3\x06\x12\xca\x01\xf1\x47\x30\xb2\x0d\x01\x9c\x58\x6e\x40\x55\x25\x0d\xbd\xab\x18\xef\x57\xa2\x14\xd1\x58\x5d\x62\xbc\x37\x7f\x7b\x50\xbc\x98\xfd\x2b\x8e\x93\x92\x8f\xc5\x64\x7b\xf6\xab\x9f\x70\x88\x56\xdc\xe1\x52\x82\xf6\xfb\xf7\x2f\x69\xab\xbe\x2f\xae\xfc\x5b\x0e\x0c\xaa\xa2\x80\x16\x0b\xf6\xca\x66\x92\xd4\x7e\x22\x6a\xf6\x16\x45\x0f\x30\x5c\xb1\x32\xc8\x7d\x42\x4d\xde\xb3\x41\x90\x95\x72\x4c\x5a\x66\x9e\xca\xb7\xb8\xfb\x23\x18\xe1\x08\x27\x0a\xfe\x68\xa3\xa6\x1f\x57\xfe\xc1\x6c\x97\xf9\xac\x38\x3a\x7e\x35\xc3\x7c\xbf\x78\x76\x98\x0c\x4e\x4c\x65\xa7\xf4\xba\x49\xf8\xed\x66\x36\x93\xbc\x05\x3b\xe3\xc5\x3a\x9d\x26\xe1\x89\xa9\x07\xa5\x7c\xd8\x7c\x89\xc3\x21\xff\x0f\x65\x67\x48\x28\xd3\xec\xdb\xcd\x6c\x66\xf4\xb4\xe0\x69\x96\xfd\xd0\x68\x76\xde\x2a\x72\x48\x47\xdc\xe9\xde\x4b\xdd\x79\xf3\x27\x00\x00\xff\xff\xa1\x62\x3d\xd9\x06\x07\x00\x00") - -func resourcesZhHantAllJsonBytes() ([]byte, error) { - return bindataRead( - _resourcesZhHantAllJson, - "resources/zh-hant.all.json", - ) -} - -func resourcesZhHantAllJson() (*asset, error) { - bytes, err := resourcesZhHantAllJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "resources/zh-hant.all.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -// Asset loads and returns the asset for the given name. -// It returns an error if the asset could not be found or -// could not be loaded. -func Asset(name string) ([]byte, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { - a, err := f() - if err != nil { - return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) - } - return a.bytes, nil - } - return nil, fmt.Errorf("Asset %s not found", name) -} - -// MustAsset is like Asset but panics when Asset would return an error. -// It simplifies safe initialization of global variables. -func MustAsset(name string) []byte { - a, err := Asset(name) - if err != nil { - panic("asset: Asset(" + name + "): " + err.Error()) - } - - return a -} - -// AssetInfo loads and returns the asset info for the given name. -// It returns an error if the asset could not be found or -// could not be loaded. -func AssetInfo(name string) (os.FileInfo, error) { - cannonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[cannonicalName]; ok { - a, err := f() - if err != nil { - return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) - } - return a.info, nil - } - return nil, fmt.Errorf("AssetInfo %s not found", name) -} - -// AssetNames returns the names of the assets. -func AssetNames() []string { - names := make([]string, 0, len(_bindata)) - for name := range _bindata { - names = append(names, name) - } - return names -} - -// _bindata is a table, holding each asset generator, mapped to its name. -var _bindata = map[string]func() (*asset, error){ - "resources/de-de.all.json": resourcesDeDeAllJson, - "resources/en-us.all.json": resourcesEnUsAllJson, - "resources/es-es.all.json": resourcesEsEsAllJson, - "resources/fr-fr.all.json": resourcesFrFrAllJson, - "resources/it-it.all.json": resourcesItItAllJson, - "resources/ja-jp.all.json": resourcesJaJpAllJson, - "resources/ko-kr.all.json": resourcesKoKrAllJson, - "resources/pt-br.all.json": resourcesPtBrAllJson, - "resources/zh-hans.all.json": resourcesZhHansAllJson, - "resources/zh-hant.all.json": resourcesZhHantAllJson, -} - -// AssetDir returns the file names below a certain -// directory embedded in the file by go-bindata. -// For example if you run go-bindata on data/... and data contains the -// following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png -// then AssetDir("data") would return []string{"foo.txt", "img"} -// AssetDir("data/img") would return []string{"a.png", "b.png"} -// AssetDir("foo.txt") and AssetDir("notexist") would return an error -// AssetDir("") will return []string{"data"}. -func AssetDir(name string) ([]string, error) { - node := _bintree - if len(name) != 0 { - cannonicalName := strings.Replace(name, "\\", "/", -1) - pathList := strings.Split(cannonicalName, "/") - for _, p := range pathList { - node = node.Children[p] - if node == nil { - return nil, fmt.Errorf("Asset %s not found", name) - } - } - } - if node.Func != nil { - return nil, fmt.Errorf("Asset %s not found", name) - } - rv := make([]string, 0, len(node.Children)) - for childName := range node.Children { - rv = append(rv, childName) - } - return rv, nil -} - -type bintree struct { - Func func() (*asset, error) - Children map[string]*bintree -} - -var _bintree = &bintree{nil, map[string]*bintree{ - "resources": &bintree{nil, map[string]*bintree{ - "de-de.all.json": &bintree{resourcesDeDeAllJson, map[string]*bintree{}}, - "en-us.all.json": &bintree{resourcesEnUsAllJson, map[string]*bintree{}}, - "es-es.all.json": &bintree{resourcesEsEsAllJson, map[string]*bintree{}}, - "fr-fr.all.json": &bintree{resourcesFrFrAllJson, map[string]*bintree{}}, - "it-it.all.json": &bintree{resourcesItItAllJson, map[string]*bintree{}}, - "ja-jp.all.json": &bintree{resourcesJaJpAllJson, map[string]*bintree{}}, - "ko-kr.all.json": &bintree{resourcesKoKrAllJson, map[string]*bintree{}}, - "pt-br.all.json": &bintree{resourcesPtBrAllJson, map[string]*bintree{}}, - "zh-hans.all.json": &bintree{resourcesZhHansAllJson, map[string]*bintree{}}, - "zh-hant.all.json": &bintree{resourcesZhHantAllJson, map[string]*bintree{}}, - }}, -}} - -// RestoreAsset restores an asset under the given directory -func RestoreAsset(dir, name string) error { - data, err := Asset(name) - if err != nil { - return err - } - info, err := AssetInfo(name) - if err != nil { - return err - } - err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) - if err != nil { - return err - } - err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) - if err != nil { - return err - } - err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) - if err != nil { - return err - } - return nil -} - -// RestoreAssets restores an asset under the given directory recursively -func RestoreAssets(dir, name string) error { - children, err := AssetDir(name) - // File - if err != nil { - return RestoreAsset(dir, name) - } - // Dir - for _, child := range children { - err = RestoreAssets(dir, filepath.Join(name, child)) - if err != nil { - return err - } - } - return nil -} - -func _filePath(dir, name string) string { - cannonicalName := strings.Replace(name, "\\", "/", -1) - return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) -} diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/it-it.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/it-it.all.json deleted file mode 100644 index 9e4b443..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/it-it.all.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "id": "\nApp started\n", - "translation": "\nApplicazione avviata\n", - "modified": false - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "modified": false - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nTIP: Use '{{.Command}}' to target new org", - "modified": false - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " View allowable quotas with 'CF_NAME quotas'", - "modified": false - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "modified": false - }, - { - "id": "Also delete any mapped routes", - "translation": "Also delete any mapped routes", - "modified": false - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "App {{.AppName}} does not exist.", - "modified": false - }, - { - "id": "FEATURE FLAGS", - "translation": "FEATURE FLAGS", - "modified": false - }, - { - "id": "Name", - "translation": "Name", - "modified": false - }, - { - "id": "api endpoint:", - "translation": "api endpoint:", - "modified": false - }, - { - "id": "api version:", - "translation": "api version:", - "modified": false - }, - { - "id": "org:", - "translation": "org:", - "modified": false - }, - { - "id": "space:api version:", - "translation": "space:api version:", - "modified": false - }, - { - "id": "user:", - "translation": "user:", - "modified": false - } -] \ No newline at end of file diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/ja-jp.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/ja-jp.all.json deleted file mode 100644 index d0a5aa3..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/ja-jp.all.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "id": "\nApp started\n", - "translation": "\nアプリãŒé–‹å§‹ã•ã‚Œã¾ã—ãŸ\n", - "modified": false - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "modified": false - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nTIP: Use '{{.Command}}' to target new org", - "modified": false - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " View allowable quotas with 'CF_NAME quotas'", - "modified": false - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "modified": false - }, - { - "id": "Also delete any mapped routes", - "translation": "Also delete any mapped routes", - "modified": false - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "App {{.AppName}} does not exist.", - "modified": false - }, - { - "id": "FEATURE FLAGS", - "translation": "FEATURE FLAGS", - "modified": false - }, - { - "id": "Name", - "translation": "Name", - "modified": false - }, - { - "id": "api endpoint:", - "translation": "api endpoint:", - "modified": false - }, - { - "id": "api version:", - "translation": "api version:", - "modified": false - }, - { - "id": "org:", - "translation": "org:", - "modified": false - }, - { - "id": "space:api version:", - "translation": "space:api version:", - "modified": false - }, - { - "id": "user:", - "translation": "user:", - "modified": false - } -] \ No newline at end of file diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/ko-kr.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/ko-kr.all.json deleted file mode 100644 index f464583..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/ko-kr.all.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "id": "\nApp started\n", - "translation": "\n앱 시작ë¨\n", - "modified": false - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "modified": false - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nTIP: Use '{{.Command}}' to target new org", - "modified": false - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " View allowable quotas with 'CF_NAME quotas'", - "modified": false - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "modified": false - }, - { - "id": "Also delete any mapped routes", - "translation": "Also delete any mapped routes", - "modified": false - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "App {{.AppName}} does not exist.", - "modified": false - }, - { - "id": "FEATURE FLAGS", - "translation": "FEATURE FLAGS", - "modified": false - }, - { - "id": "Name", - "translation": "Name", - "modified": false - }, - { - "id": "api endpoint:", - "translation": "api endpoint:", - "modified": false - }, - { - "id": "api version:", - "translation": "api version:", - "modified": false - }, - { - "id": "org:", - "translation": "org:", - "modified": false - }, - { - "id": "space:api version:", - "translation": "space:api version:", - "modified": false - }, - { - "id": "user:", - "translation": "user:", - "modified": false - } -] \ No newline at end of file diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/pt-br.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/pt-br.all.json deleted file mode 100644 index 14be10b..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/pt-br.all.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "id": "\nApp started\n", - "translation": "\nApp iniciado\n", - "modified": false - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "modified": false - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nTIP: Use '{{.Command}}' to target new org", - "modified": false - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " View allowable quotas with 'CF_NAME quotas'", - "modified": false - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "modified": false - }, - { - "id": "Also delete any mapped routes", - "translation": "Also delete any mapped routes", - "modified": false - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "App {{.AppName}} does not exist.", - "modified": false - }, - { - "id": "FEATURE FLAGS", - "translation": "FEATURE FLAGS", - "modified": false - }, - { - "id": "Name", - "translation": "Name", - "modified": false - }, - { - "id": "api endpoint:", - "translation": "api endpoint:", - "modified": false - }, - { - "id": "api version:", - "translation": "api version:", - "modified": false - }, - { - "id": "org:", - "translation": "org:", - "modified": false - }, - { - "id": "space:api version:", - "translation": "space:api version:", - "modified": false - }, - { - "id": "user:", - "translation": "user:", - "modified": false - } -] \ No newline at end of file diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/zh-hans.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/zh-hans.all.json deleted file mode 100644 index 404c208..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/zh-hans.all.json +++ /dev/null @@ -1,77 +0,0 @@ -[ - { - "id": "\nApp started\n", - "translation": "\n应用程åºå·²å¯åŠ¨\n", - "modified": false - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "modified": false - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nTIP: Use '{{.Command}}' to target new org", - "modified": false - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " View allowable quotas with 'CF_NAME quotas'", - "modified": false - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "modified": false - }, - { - "id": "Also delete any mapped routes", - "translation": "Also delete any mapped routes", - "modified": false - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "App {{.AppName}} does not exist.", - "modified": false - }, - { - "id": "FEATURE FLAGS", - "translation": "FEATURE FLAGS", - "modified": false - }, - { - "id": "Name", - "translation": "Name", - "modified": false - }, - { - "id": "api endpoint:", - "translation": "api endpoint:", - "modified": false - }, - { - "id": "api version:", - "translation": "api version:", - "modified": false - }, - { - "id": "org:", - "translation": "org:", - "modified": false - }, - { - "id": "space:api version:", - "translation": "space:api version:", - "modified": false - }, - { - "id": "user:", - "translation": "user:", - "modified": false - }, - { - "id": "Temporary Authentication Code ( Get one at {{.AuthenticationEndpoint}}/passcode )", - "translation": "临时验è¯ç ï¼ˆä»Ž{{.AuthenticationEndpoint}}/passcode获å–)", - "modified": false - } -] \ No newline at end of file diff --git a/vendor/code.cloudfoundry.org/cli/i18n/resources/zh-hant.all.json b/vendor/code.cloudfoundry.org/cli/i18n/resources/zh-hant.all.json deleted file mode 100644 index 6ab37c1..0000000 --- a/vendor/code.cloudfoundry.org/cli/i18n/resources/zh-hant.all.json +++ /dev/null @@ -1,77 +0,0 @@ -[ - { - "id": "\nApp started\n", - "translation": "\n已啟動應用程å¼\n", - "modified": false - }, - { - "id": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "translation": "\nApp {{.AppName}} was started using this command `{{.Command}}`\n", - "modified": false - }, - { - "id": "\nTIP: Use '{{.Command}}' to target new org", - "translation": "\nTIP: Use '{{.Command}}' to target new org", - "modified": false - }, - { - "id": " View allowable quotas with 'CF_NAME quotas'", - "translation": " View allowable quotas with 'CF_NAME quotas'", - "modified": false - }, - { - "id": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "translation": "'{{.VersionShort}}' and '{{.VersionLong}}' are also accepted.", - "modified": false - }, - { - "id": "Also delete any mapped routes", - "translation": "Also delete any mapped routes", - "modified": false - }, - { - "id": "App {{.AppName}} does not exist.", - "translation": "App {{.AppName}} does not exist.", - "modified": false - }, - { - "id": "FEATURE FLAGS", - "translation": "FEATURE FLAGS", - "modified": false - }, - { - "id": "Name", - "translation": "Name", - "modified": false - }, - { - "id": "api endpoint:", - "translation": "api endpoint:", - "modified": false - }, - { - "id": "api version:", - "translation": "api version:", - "modified": false - }, - { - "id": "org:", - "translation": "org:", - "modified": false - }, - { - "id": "space:api version:", - "translation": "space:api version:", - "modified": false - }, - { - "id": "user:", - "translation": "user:", - "modified": false - }, - { - "id": "Temporary Authentication Code ( Get one at {{.AuthenticationEndpoint}}/passcode )", - "translation": "臨時驗證碼(從{{.AuthenticationEndpoint}}/passcodeç²å–)", - "modified": false - } -] \ No newline at end of file diff --git a/vendor/code.cloudfoundry.org/cli/resources/application_resource.go b/vendor/code.cloudfoundry.org/cli/resources/application_resource.go index b663ce8..00d0a0b 100644 --- a/vendor/code.cloudfoundry.org/cli/resources/application_resource.go +++ b/vendor/code.cloudfoundry.org/cli/resources/application_resource.go @@ -1,9 +1,10 @@ package resources import ( + "encoding/json" + "code.cloudfoundry.org/cli/api/cloudcontroller" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "encoding/json" ) // Application represents a Cloud Controller V3 Application. diff --git a/vendor/code.cloudfoundry.org/cli/resources/build_resource.go b/vendor/code.cloudfoundry.org/cli/resources/build_resource.go deleted file mode 100644 index e190de9..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/build_resource.go +++ /dev/null @@ -1,69 +0,0 @@ -package resources - -import ( - "encoding/json" - - "code.cloudfoundry.org/cli/api/cloudcontroller" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" -) - -// Build represent the process of staging an application package. -type Build struct { - // CreatedAt is the time with zone when the build was created. - CreatedAt string - // DropletGUID is the unique identifier for the resulting droplet from the - // staging process. - DropletGUID string - // Error describes errors during the build process. - Error string - // GUID is the unique build identifier. - GUID string - // PackageGUID is the unique identifier for package that is the input to the - // staging process. - PackageGUID string - // State is the state of the build. - State constant.BuildState -} - -// MarshalJSON converts a Build into a Cloud Controller Application. -func (b Build) MarshalJSON() ([]byte, error) { - var ccBuild struct { - Package struct { - GUID string `json:"guid"` - } `json:"package"` - } - - ccBuild.Package.GUID = b.PackageGUID - - return json.Marshal(ccBuild) -} - -// UnmarshalJSON helps unmarshal a Cloud Controller Build response. -func (b *Build) UnmarshalJSON(data []byte) error { - var ccBuild struct { - CreatedAt string `json:"created_at,omitempty"` - GUID string `json:"guid,omitempty"` - Error string `json:"error"` - Package struct { - GUID string `json:"guid"` - } `json:"package"` - State constant.BuildState `json:"state,omitempty"` - Droplet struct { - GUID string `json:"guid"` - } `json:"droplet"` - } - - err := cloudcontroller.DecodeJSON(data, &ccBuild) - if err != nil { - return err - } - - b.GUID = ccBuild.GUID - b.CreatedAt = ccBuild.CreatedAt - b.Error = ccBuild.Error - b.PackageGUID = ccBuild.Package.GUID - b.State = ccBuild.State - b.DropletGUID = ccBuild.Droplet.GUID - - return nil -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/buildpack_resource.go b/vendor/code.cloudfoundry.org/cli/resources/buildpack_resource.go deleted file mode 100644 index 04d29e2..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/buildpack_resource.go +++ /dev/null @@ -1,94 +0,0 @@ -package resources - -import ( - "encoding/json" - - "code.cloudfoundry.org/cli/api/cloudcontroller" - "code.cloudfoundry.org/cli/types" -) - -// Buildpack represents a Cloud Controller V3 buildpack. -type Buildpack struct { - // Enabled is true when the buildpack can be used for staging. - Enabled types.NullBool - // Filename is the uploaded filename of the buildpack. - Filename string - // GUID is the unique identifier for the buildpack. - GUID string - // Locked is true when the buildpack cannot be updated. - Locked types.NullBool - // Name is the name of the buildpack. To be used by app buildpack field. - // (only alphanumeric characters) - Name string - // Position is the order in which the buildpacks are checked during buildpack - // auto-detection. - Position types.NullInt - // Stack is the name of the stack that the buildpack will use. - Stack string - // State is the current state of the buildpack. - State string - // Links are links to related resources. - Links APILinks - // Metadata is used for custom tagging of API resources - Metadata *Metadata -} - -// MarshalJSON converts a Package into a Cloud Controller Package. -func (buildpack Buildpack) MarshalJSON() ([]byte, error) { - ccBuildpack := struct { - Name string `json:"name,omitempty"` - Stack string `json:"stack,omitempty"` - Position *int `json:"position,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - Locked *bool `json:"locked,omitempty"` - Metadata *Metadata `json:"metadata,omitempty"` - }{ - Name: buildpack.Name, - Stack: buildpack.Stack, - } - - if buildpack.Position.IsSet { - ccBuildpack.Position = &buildpack.Position.Value - } - if buildpack.Enabled.IsSet { - ccBuildpack.Enabled = &buildpack.Enabled.Value - } - if buildpack.Locked.IsSet { - ccBuildpack.Locked = &buildpack.Locked.Value - } - - return json.Marshal(ccBuildpack) -} - -func (buildpack *Buildpack) UnmarshalJSON(data []byte) error { - var ccBuildpack struct { - GUID string `json:"guid,omitempty"` - Links APILinks `json:"links,omitempty"` - Name string `json:"name,omitempty"` - Filename string `json:"filename,omitempty"` - Stack string `json:"stack,omitempty"` - State string `json:"state,omitempty"` - Enabled types.NullBool `json:"enabled"` - Locked types.NullBool `json:"locked"` - Position types.NullInt `json:"position"` - Metadata *Metadata `json:"metadata"` - } - - err := cloudcontroller.DecodeJSON(data, &ccBuildpack) - if err != nil { - return err - } - - buildpack.Enabled = ccBuildpack.Enabled - buildpack.Filename = ccBuildpack.Filename - buildpack.GUID = ccBuildpack.GUID - buildpack.Locked = ccBuildpack.Locked - buildpack.Name = ccBuildpack.Name - buildpack.Position = ccBuildpack.Position - buildpack.Stack = ccBuildpack.Stack - buildpack.State = ccBuildpack.State - buildpack.Links = ccBuildpack.Links - buildpack.Metadata = ccBuildpack.Metadata - - return nil -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/deployment_resource.go b/vendor/code.cloudfoundry.org/cli/resources/deployment_resource.go deleted file mode 100644 index 144ac07..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/deployment_resource.go +++ /dev/null @@ -1,80 +0,0 @@ -package resources - -import ( - "encoding/json" - - "code.cloudfoundry.org/cli/api/cloudcontroller" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" -) - -type Deployment struct { - GUID string - State constant.DeploymentState - StatusValue constant.DeploymentStatusValue - StatusReason constant.DeploymentStatusReason - RevisionGUID string - DropletGUID string - CreatedAt string - UpdatedAt string - Relationships Relationships - NewProcesses []Process -} - -// MarshalJSON converts a Deployment into a Cloud Controller Deployment. -func (d Deployment) MarshalJSON() ([]byte, error) { - type Revision struct { - GUID string `json:"guid,omitempty"` - } - type Droplet struct { - GUID string `json:"guid,omitempty"` - } - - var ccDeployment struct { - Droplet *Droplet `json:"droplet,omitempty"` - Revision *Revision `json:"revision,omitempty"` - Relationships Relationships `json:"relationships,omitempty"` - } - - if d.DropletGUID != "" { - ccDeployment.Droplet = &Droplet{d.DropletGUID} - } - - if d.RevisionGUID != "" { - ccDeployment.Revision = &Revision{d.RevisionGUID} - } - - ccDeployment.Relationships = d.Relationships - - return json.Marshal(ccDeployment) -} - -// UnmarshalJSON helps unmarshal a Cloud Controller Deployment response. -func (d *Deployment) UnmarshalJSON(data []byte) error { - var ccDeployment struct { - GUID string `json:"guid,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - Relationships Relationships `json:"relationships,omitempty"` - State constant.DeploymentState `json:"state,omitempty"` - Status struct { - Value constant.DeploymentStatusValue `json:"value"` - Reason constant.DeploymentStatusReason `json:"reason"` - } `json:"status"` - Droplet Droplet `json:"droplet,omitempty"` - NewProcesses []Process `json:"new_processes,omitempty"` - } - err := cloudcontroller.DecodeJSON(data, &ccDeployment) - if err != nil { - return err - } - - d.GUID = ccDeployment.GUID - d.CreatedAt = ccDeployment.CreatedAt - d.Relationships = ccDeployment.Relationships - d.State = ccDeployment.State - d.StatusValue = ccDeployment.Status.Value - d.StatusReason = ccDeployment.Status.Reason - d.DropletGUID = ccDeployment.Droplet.GUID - d.NewProcesses = ccDeployment.NewProcesses - - return nil -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/environment_variables_resource.go b/vendor/code.cloudfoundry.org/cli/resources/environment_variables_resource.go deleted file mode 100644 index 357641d..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/environment_variables_resource.go +++ /dev/null @@ -1,47 +0,0 @@ -package resources - -import ( - "encoding/json" - - "code.cloudfoundry.org/cli/api/cloudcontroller" - "code.cloudfoundry.org/cli/types" -) - -type EnvironmentVariables map[string]types.FilteredString - -func (variables EnvironmentVariables) MarshalJSON() ([]byte, error) { - ccEnvVars := struct { - Var map[string]types.FilteredString `json:"var"` - }{ - Var: variables, - } - - return json.Marshal(ccEnvVars) -} - -func (variables *EnvironmentVariables) UnmarshalJSON(data []byte) error { - var ccEnvVars struct { - Var map[string]types.FilteredInterface `json:"var"` - } - - err := cloudcontroller.DecodeJSON(data, &ccEnvVars) - - *variables = EnvironmentVariables{} - - for envVarName, envVarValue := range ccEnvVars.Var { - var valueAsString string - if str, ok := envVarValue.Value.(string); ok { - valueAsString = str - } else { - bytes, err := json.Marshal(envVarValue.Value) - if err != nil { - return err - } - valueAsString = string(bytes) - } - - (*variables)[envVarName] = types.FilteredString{Value: valueAsString, IsSet: true} - } - - return err -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/feature_flag_resource.go b/vendor/code.cloudfoundry.org/cli/resources/feature_flag_resource.go deleted file mode 100644 index f6d24c5..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/feature_flag_resource.go +++ /dev/null @@ -1,18 +0,0 @@ -package resources - -import "encoding/json" - -type FeatureFlag struct { - Name string `json:"name"` - Enabled bool `json:"enabled"` -} - -func (f FeatureFlag) MarshalJSON() ([]byte, error) { - var bodyFlag struct { - Enabled bool `json:"enabled"` - } - - bodyFlag.Enabled = f.Enabled - - return json.Marshal(bodyFlag) -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/isolation_segment_resource.go b/vendor/code.cloudfoundry.org/cli/resources/isolation_segment_resource.go deleted file mode 100644 index 4ad2827..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/isolation_segment_resource.go +++ /dev/null @@ -1,9 +0,0 @@ -package resources - -// IsolationSegment represents a Cloud Controller Isolation Segment. -type IsolationSegment struct { - //GUID is the unique ID of the isolation segment. - GUID string `json:"guid,omitempty"` - //Name is the name of the isolation segment. - Name string `json:"name"` -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/last_operation_resource.go b/vendor/code.cloudfoundry.org/cli/resources/last_operation_resource.go deleted file mode 100644 index 03b24dc..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/last_operation_resource.go +++ /dev/null @@ -1,34 +0,0 @@ -package resources - -type LastOperationType string - -const ( - CreateOperation LastOperationType = "create" - UpdateOperation LastOperationType = "update" - DeleteOperation LastOperationType = "delete" -) - -type LastOperationState string - -const ( - OperationInProgress LastOperationState = "in progress" - OperationSucceeded LastOperationState = "succeeded" - OperationFailed LastOperationState = "failed" -) - -type LastOperation struct { - // Type is either "create", "update" or "delete" - Type LastOperationType `json:"type,omitempty"` - // State is either "in progress", "succeeded", or "failed" - State LastOperationState `json:"state,omitempty"` - // Description contains more details - Description string `json:"description,omitempty"` - // CreatedAt is the time when the operation started - CreatedAt string `json:"created_at,omitempty"` - // UpdatedAt is the time when the operation was last updated - UpdatedAt string `json:"updated_at,omitempty"` -} - -func (l LastOperation) OmitJSONry() bool { - return l == LastOperation{} -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/manifest_diff_resource.go b/vendor/code.cloudfoundry.org/cli/resources/manifest_diff_resource.go deleted file mode 100644 index fff5376..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/manifest_diff_resource.go +++ /dev/null @@ -1,18 +0,0 @@ -package resources - -type DiffOperation string - -const AddOperation DiffOperation = "add" -const ReplaceOperation DiffOperation = "replace" -const RemoveOperation DiffOperation = "remove" - -type Diff struct { - Op DiffOperation `json:"op"` - Path string `json:"path"` - Was interface{} `json:"was"` - Value interface{} `json:"value"` -} - -type ManifestDiff struct { - Diffs []Diff `json:"diff"` -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/package_resource.go b/vendor/code.cloudfoundry.org/cli/resources/package_resource.go deleted file mode 100644 index c17e66a..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/package_resource.go +++ /dev/null @@ -1,105 +0,0 @@ -package resources - -import ( - "encoding/json" - - "code.cloudfoundry.org/cli/api/cloudcontroller" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" -) - -// Package represents a Cloud Controller V3 Package. -type Package struct { - // CreatedAt is the time with zone when the object was created. - CreatedAt string - - // DockerImage is the registry address of the docker image. - DockerImage string - - // DockerPassword is the password for the docker image's registry. - DockerPassword string - - // DockerUsername is the username for the docker image's registry. - DockerUsername string - - // GUID is the unique identifier of the package. - GUID string - - // Links are links to related resources. - Links APILinks - - // Relationships are a list of relationships to other resources. - Relationships Relationships - - // State is the state of the package. - State constant.PackageState - - // Type is the package type. - Type constant.PackageType -} - -// MarshalJSON converts a Package into a Cloud Controller Package. -func (p Package) MarshalJSON() ([]byte, error) { - type ccPackageData struct { - Image string `json:"image,omitempty"` - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty"` - } - var ccPackage struct { - GUID string `json:"guid,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - Links APILinks `json:"links,omitempty"` - Relationships Relationships `json:"relationships,omitempty"` - State constant.PackageState `json:"state,omitempty"` - Type constant.PackageType `json:"type,omitempty"` - Data *ccPackageData `json:"data,omitempty"` - } - - ccPackage.GUID = p.GUID - ccPackage.CreatedAt = p.CreatedAt - ccPackage.Links = p.Links - ccPackage.Relationships = p.Relationships - ccPackage.State = p.State - ccPackage.Type = p.Type - if p.DockerImage != "" { - ccPackage.Data = &ccPackageData{ - Image: p.DockerImage, - Username: p.DockerUsername, - Password: p.DockerPassword, - } - } - - return json.Marshal(ccPackage) -} - -// UnmarshalJSON helps unmarshal a Cloud Controller Package response. -func (p *Package) UnmarshalJSON(data []byte) error { - var ccPackage struct { - GUID string `json:"guid,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - Links APILinks `json:"links,omitempty"` - Relationships Relationships `json:"relationships,omitempty"` - State constant.PackageState `json:"state,omitempty"` - Type constant.PackageType `json:"type,omitempty"` - Data struct { - Image string `json:"image"` - Username string `json:"username"` - Password string `json:"password"` - } `json:"data"` - } - err := cloudcontroller.DecodeJSON(data, &ccPackage) - if err != nil { - return err - } - - p.GUID = ccPackage.GUID - p.CreatedAt = ccPackage.CreatedAt - p.Links = ccPackage.Links - p.Relationships = ccPackage.Relationships - p.State = ccPackage.State - p.Type = ccPackage.Type - p.DockerImage = ccPackage.Data.Image - p.DockerUsername = ccPackage.Data.Username - p.DockerPassword = ccPackage.Data.Password - - return nil -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/process_resource.go b/vendor/code.cloudfoundry.org/cli/resources/process_resource.go deleted file mode 100644 index 5376f8e..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/process_resource.go +++ /dev/null @@ -1,131 +0,0 @@ -package resources - -import ( - "encoding/json" - "fmt" - - "code.cloudfoundry.org/cli/api/cloudcontroller" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - "code.cloudfoundry.org/cli/types" -) - -type Process struct { - GUID string - Type string - // Command is the process start command. Note: This value will be obfuscated when obtained from listing. - Command types.FilteredString - HealthCheckType constant.HealthCheckType - HealthCheckEndpoint string - HealthCheckInvocationTimeout int64 - HealthCheckTimeout int64 - Instances types.NullInt - MemoryInMB types.NullUint64 - DiskInMB types.NullUint64 - AppGUID string -} - -func (p Process) MarshalJSON() ([]byte, error) { - var ccProcess marshalProcess - - marshalCommand(p, &ccProcess) - marshalInstances(p, &ccProcess) - marshalMemory(p, &ccProcess) - marshalDisk(p, &ccProcess) - marshalHealthCheck(p, &ccProcess) - - return json.Marshal(ccProcess) -} - -func (p *Process) UnmarshalJSON(data []byte) error { - var ccProcess struct { - Command types.FilteredString `json:"command"` - DiskInMB types.NullUint64 `json:"disk_in_mb"` - GUID string `json:"guid"` - Instances types.NullInt `json:"instances"` - MemoryInMB types.NullUint64 `json:"memory_in_mb"` - Type string `json:"type"` - Relationships Relationships `json:"relationships"` - - HealthCheck struct { - Type constant.HealthCheckType `json:"type"` - Data struct { - Endpoint string `json:"endpoint"` - InvocationTimeout int64 `json:"invocation_timeout"` - Timeout int64 `json:"timeout"` - } `json:"data"` - } `json:"health_check"` - } - - err := cloudcontroller.DecodeJSON(data, &ccProcess) - if err != nil { - return err - } - - p.Command = ccProcess.Command - p.DiskInMB = ccProcess.DiskInMB - p.GUID = ccProcess.GUID - p.HealthCheckEndpoint = ccProcess.HealthCheck.Data.Endpoint - p.HealthCheckInvocationTimeout = ccProcess.HealthCheck.Data.InvocationTimeout - p.HealthCheckTimeout = ccProcess.HealthCheck.Data.Timeout - p.HealthCheckType = ccProcess.HealthCheck.Type - p.Instances = ccProcess.Instances - p.MemoryInMB = ccProcess.MemoryInMB - p.Type = ccProcess.Type - p.AppGUID = ccProcess.Relationships[constant.RelationshipTypeApplication].GUID - - return nil -} - -type healthCheck struct { - Type constant.HealthCheckType `json:"type,omitempty"` - Data struct { - Endpoint interface{} `json:"endpoint,omitempty"` - InvocationTimeout int64 `json:"invocation_timeout,omitempty"` - Timeout int64 `json:"timeout,omitempty"` - } `json:"data"` -} - -type marshalProcess struct { - Command interface{} `json:"command,omitempty"` - Instances json.Number `json:"instances,omitempty"` - MemoryInMB json.Number `json:"memory_in_mb,omitempty"` - DiskInMB json.Number `json:"disk_in_mb,omitempty"` - - HealthCheck *healthCheck `json:"health_check,omitempty"` -} - -func marshalCommand(p Process, ccProcess *marshalProcess) { - if p.Command.IsSet { - ccProcess.Command = &p.Command - } -} - -func marshalDisk(p Process, ccProcess *marshalProcess) { - if p.DiskInMB.IsSet { - ccProcess.DiskInMB = json.Number(fmt.Sprint(p.DiskInMB.Value)) - } -} - -func marshalHealthCheck(p Process, ccProcess *marshalProcess) { - if p.HealthCheckType != "" || p.HealthCheckEndpoint != "" || p.HealthCheckInvocationTimeout != 0 || p.HealthCheckTimeout != 0 { - ccProcess.HealthCheck = new(healthCheck) - ccProcess.HealthCheck.Type = p.HealthCheckType - ccProcess.HealthCheck.Data.InvocationTimeout = p.HealthCheckInvocationTimeout - ccProcess.HealthCheck.Data.Timeout = p.HealthCheckTimeout - if p.HealthCheckEndpoint != "" { - ccProcess.HealthCheck.Data.Endpoint = p.HealthCheckEndpoint - } - } -} - -func marshalInstances(p Process, ccProcess *marshalProcess) { - if p.Instances.IsSet { - ccProcess.Instances = json.Number(fmt.Sprint(p.Instances.Value)) - } -} - -func marshalMemory(p Process, ccProcess *marshalProcess) { - if p.MemoryInMB.IsSet { - ccProcess.MemoryInMB = json.Number(fmt.Sprint(p.MemoryInMB.Value)) - } -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/revision_resource.go b/vendor/code.cloudfoundry.org/cli/resources/revision_resource.go index 39d577a..8f73549 100644 --- a/vendor/code.cloudfoundry.org/cli/resources/revision_resource.go +++ b/vendor/code.cloudfoundry.org/cli/resources/revision_resource.go @@ -1,11 +1,10 @@ package resources type Revision struct { - GUID string `json:"guid"` - Version int `json:"version"` - Deployable bool `json:"deployable"` - Description string `json:"description"` - Droplet Droplet `json:"droplet"` - CreatedAt string `json:"created_at"` - UpdatedAt string `json:"updated_at"` + GUID string `json:"guid"` + Version int `json:"version"` + Deployable bool `json:"deployable"` + Description string `json:"description"` + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` } diff --git a/vendor/code.cloudfoundry.org/cli/resources/route_binding.go b/vendor/code.cloudfoundry.org/cli/resources/route_binding.go deleted file mode 100644 index cb71b99..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/route_binding.go +++ /dev/null @@ -1,23 +0,0 @@ -package resources - -import ( - "code.cloudfoundry.org/cli/types" - "code.cloudfoundry.org/jsonry" -) - -type RouteBinding struct { - GUID string `jsonry:"guid,omitempty"` - RouteServiceURL string `jsonry:"route_service_url,omitempty"` - ServiceInstanceGUID string `jsonry:"relationships.service_instance.data.guid,omitempty"` - RouteGUID string `jsonry:"relationships.route.data.guid,omitempty"` - LastOperation LastOperation `jsonry:"last_operation"` - Parameters types.OptionalObject `jsonry:"parameters"` -} - -func (s RouteBinding) MarshalJSON() ([]byte, error) { - return jsonry.Marshal(s) -} - -func (s *RouteBinding) UnmarshalJSON(data []byte) error { - return jsonry.Unmarshal(data, s) -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/route_resource.go b/vendor/code.cloudfoundry.org/cli/resources/route_resource.go index 5bf31b4..1a7d20f 100644 --- a/vendor/code.cloudfoundry.org/cli/resources/route_resource.go +++ b/vendor/code.cloudfoundry.org/cli/resources/route_resource.go @@ -14,10 +14,8 @@ type RouteDestinationApp struct { } type RouteDestination struct { - GUID string - App RouteDestinationApp - Port int - Protocol string + GUID string + App RouteDestinationApp } type Route struct { diff --git a/vendor/code.cloudfoundry.org/cli/resources/service_credential_binding_details_resource.go b/vendor/code.cloudfoundry.org/cli/resources/service_credential_binding_details_resource.go deleted file mode 100644 index 8b5eb3b..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/service_credential_binding_details_resource.go +++ /dev/null @@ -1,5 +0,0 @@ -package resources - -type ServiceCredentialBindingDetails struct { - Credentials map[string]interface{} `json:"credentials"` -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/service_credential_binding_resource.go b/vendor/code.cloudfoundry.org/cli/resources/service_credential_binding_resource.go deleted file mode 100644 index 0cd9bb9..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/service_credential_binding_resource.go +++ /dev/null @@ -1,42 +0,0 @@ -package resources - -import ( - "code.cloudfoundry.org/cli/types" - "code.cloudfoundry.org/jsonry" -) - -type ServiceCredentialBindingType string - -const ( - AppBinding ServiceCredentialBindingType = "app" - KeyBinding ServiceCredentialBindingType = "key" -) - -type ServiceCredentialBinding struct { - // Type is either "app" or "key" - Type ServiceCredentialBindingType `jsonry:"type,omitempty"` - // GUID is a unique service credential binding identifier. - GUID string `jsonry:"guid,omitempty"` - // Name is the name of the service credential binding. - Name string `jsonry:"name,omitempty"` - // ServiceInstanceGUID is the service instance that this binding originates from - ServiceInstanceGUID string `jsonry:"relationships.service_instance.data.guid,omitempty"` - // AppGUID is the application that this binding is attached to - AppGUID string `jsonry:"relationships.app.data.guid,omitempty"` - // AppName is the application name. It is not part of the API response, and is here as pragmatic convenience. - AppName string `jsonry:"-"` - // AppSpaceGUID is the space guid of the app. It is not part of the API response, and is here as pragmatic convenience. - AppSpaceGUID string `jsonry:"-"` - // LastOperation is the last operation on the service credential binding - LastOperation LastOperation `jsonry:"last_operation"` - // Parameters can be specified when creating a binding - Parameters types.OptionalObject `jsonry:"parameters"` -} - -func (s ServiceCredentialBinding) MarshalJSON() ([]byte, error) { - return jsonry.Marshal(s) -} - -func (s *ServiceCredentialBinding) UnmarshalJSON(data []byte) error { - return jsonry.Unmarshal(data, s) -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/service_instance_resource.go b/vendor/code.cloudfoundry.org/cli/resources/service_instance_resource.go index 3259c3e..2a8b1cb 100644 --- a/vendor/code.cloudfoundry.org/cli/resources/service_instance_resource.go +++ b/vendor/code.cloudfoundry.org/cli/resources/service_instance_resource.go @@ -1,7 +1,6 @@ package resources import ( - "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/jsonry" ) @@ -9,7 +8,6 @@ type ServiceInstanceType string const ( UserProvidedServiceInstance ServiceInstanceType = "user-provided" - ManagedServiceInstance ServiceInstanceType = "managed" ) type ServiceInstance struct { @@ -21,28 +19,6 @@ type ServiceInstance struct { Name string `jsonry:"name,omitempty"` // SpaceGUID is the space that this service instance relates to SpaceGUID string `jsonry:"relationships.space.data.guid,omitempty"` - // ServicePlanGUID is the service plan that this service instance relates to - ServicePlanGUID string `jsonry:"relationships.service_plan.data.guid,omitempty"` - // Tags are used by apps to identify service instances. - Tags types.OptionalStringSlice `jsonry:"tags"` - // SyslogDrainURL is where logs are streamed - SyslogDrainURL types.OptionalString `jsonry:"syslog_drain_url"` - // RouteServiceURL is where requests for bound routes will be forwarded - RouteServiceURL types.OptionalString `jsonry:"route_service_url"` - // DashboardURL is where the service can be monitored - DashboardURL types.OptionalString `jsonry:"dashboard_url"` - // Credentials are passed to the app - Credentials types.OptionalObject `jsonry:"credentials"` - // UpgradeAvailable says whether the plan is at a higher version - UpgradeAvailable types.OptionalBoolean `json:"upgrade_available"` - // MaintenanceInfoVersion is the version this service is at - MaintenanceInfoVersion string `jsonry:"maintenance_info.version,omitempty"` - // Parameters are passed to the service broker - Parameters types.OptionalObject `jsonry:"parameters"` - // LastOperation is the last operation on the service instance - LastOperation LastOperation `jsonry:"last_operation"` - - Metadata *Metadata `json:"metadata,omitempty"` } func (s ServiceInstance) MarshalJSON() ([]byte, error) { diff --git a/vendor/code.cloudfoundry.org/cli/resources/service_instance_usage_summary_resource.go b/vendor/code.cloudfoundry.org/cli/resources/service_instance_usage_summary_resource.go deleted file mode 100644 index 45be72e..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/service_instance_usage_summary_resource.go +++ /dev/null @@ -1,22 +0,0 @@ -package resources - -import ( - "code.cloudfoundry.org/jsonry" -) - -type ServiceInstanceUsageSummaryList struct { - UsageSummary []ServiceInstanceUsageSummary `jsonry:"usage_summary"` -} - -func (s *ServiceInstanceUsageSummaryList) UnmarshalJSON(data []byte) error { - return jsonry.Unmarshal(data, s) -} - -type ServiceInstanceUsageSummary struct { - SpaceGUID string `jsonry:"space.guid""` - BoundAppCount int `jsonry:"bound_app_count"` -} - -func (s *ServiceInstanceUsageSummary) UnmarshalJSON(data []byte) error { - return jsonry.Unmarshal(data, s) -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/service_offering_resource.go b/vendor/code.cloudfoundry.org/cli/resources/service_offering_resource.go index dbdc8da..85fee1d 100644 --- a/vendor/code.cloudfoundry.org/cli/resources/service_offering_resource.go +++ b/vendor/code.cloudfoundry.org/cli/resources/service_offering_resource.go @@ -1,7 +1,6 @@ package resources import ( - "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/jsonry" ) @@ -12,16 +11,10 @@ type ServiceOffering struct { Name string `json:"name"` // Description of the service offering Description string `json:"description"` - // DocumentationURL of the service offering - DocumentationURL string `json:"documentation_url"` - // Tags are used by apps to identify service instances. - Tags types.OptionalStringSlice `jsonry:"tags"` // ServiceBrokerGUID is the guid of the service broker ServiceBrokerGUID string `jsonry:"relationships.service_broker.data.guid"` // ServiceBrokerName is the name of the service broker ServiceBrokerName string `json:"-"` - // Shareable if the offering support service instance sharing - AllowsInstanceSharing bool `json:"shareable"` Metadata *Metadata `json:"metadata"` } diff --git a/vendor/code.cloudfoundry.org/cli/resources/service_plan_resource.go b/vendor/code.cloudfoundry.org/cli/resources/service_plan_resource.go index 2c708aa..33c62c2 100644 --- a/vendor/code.cloudfoundry.org/cli/resources/service_plan_resource.go +++ b/vendor/code.cloudfoundry.org/cli/resources/service_plan_resource.go @@ -27,10 +27,6 @@ type ServicePlan struct { ServiceOfferingGUID string `jsonry:"relationships.service_offering.data.guid"` // SpaceGUID is the space that a plan from a space-scoped broker relates to SpaceGUID string `jsonry:"relationships.space.data.guid"` - // MaintenanceInfoDescription is the description of the associated version - MaintenanceInfoDescription string `jsonry:"maintenance_info.description"` - // MaintenanceInfoVersion is the version of the service plan - MaintenanceInfoVersion string `jsonry:"maintenance_info.version"` Metadata *Metadata `json:"metadata"` } diff --git a/vendor/code.cloudfoundry.org/cli/resources/shared_to_spaces_resource.go b/vendor/code.cloudfoundry.org/cli/resources/shared_to_spaces_resource.go deleted file mode 100644 index b6ec971..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/shared_to_spaces_resource.go +++ /dev/null @@ -1,15 +0,0 @@ -package resources - -import ( - "code.cloudfoundry.org/jsonry" -) - -type SharedToSpacesListWrapper struct { - SharedToSpaceGUIDs []string `jsonry:"data[].guid"` - Spaces []Space `jsonry:"included.spaces"` - Organizations []Organization `jsonry:"included.organizations"` -} - -func (s *SharedToSpacesListWrapper) UnmarshalJSON(data []byte) error { - return jsonry.Unmarshal(data, s) -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/sidecar_resource.go b/vendor/code.cloudfoundry.org/cli/resources/sidecar_resource.go deleted file mode 100644 index fc3c53f..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/sidecar_resource.go +++ /dev/null @@ -1,9 +0,0 @@ -package resources - -import "code.cloudfoundry.org/cli/types" - -type Sidecar struct { - GUID string `json:"guid"` - Name string `json:"name"` - Command types.FilteredString `json:"command"` -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/space_feature_resource.go b/vendor/code.cloudfoundry.org/cli/resources/space_feature_resource.go deleted file mode 100644 index 3c00a25..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/space_feature_resource.go +++ /dev/null @@ -1,6 +0,0 @@ -package resources - -type SpaceFeature struct { - Name string - Enabled bool -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/stack_resource.go b/vendor/code.cloudfoundry.org/cli/resources/stack_resource.go deleted file mode 100644 index e312504..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/stack_resource.go +++ /dev/null @@ -1,13 +0,0 @@ -package resources - -type Stack struct { - // GUID is a unique stack identifier. - GUID string `json:"guid"` - // Name is the name of the stack. - Name string `json:"name"` - // Description is the description for the stack - Description string `json:"description"` - - // Metadata is used for custom tagging of API resources - Metadata *Metadata `json:"metadata,omitempty"` -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/task_resource.go b/vendor/code.cloudfoundry.org/cli/resources/task_resource.go deleted file mode 100644 index 4bc1f96..0000000 --- a/vendor/code.cloudfoundry.org/cli/resources/task_resource.go +++ /dev/null @@ -1,41 +0,0 @@ -package resources - -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" -) - -// Task represents a Cloud Controller V3 Task. -type Task struct { - // Command represents the command that will be executed. May be excluded - // based on the user's role. - Command string `json:"command,omitempty"` - // CreatedAt represents the time with zone when the object was created. - CreatedAt string `json:"created_at,omitempty"` - // DiskInMB represents the disk in MB allocated for the task. - DiskInMB uint64 `json:"disk_in_mb,omitempty"` - // GUID represents the unique task identifier. - GUID string `json:"guid,omitempty"` - // MemoryInMB represents the memory in MB allocated for the task. - MemoryInMB uint64 `json:"memory_in_mb,omitempty"` - // Name represents the name of the task. - Name string `json:"name,omitempty"` - // SequenceID represents the user-facing id of the task. This number is - // unique for every task associated with a given app. - SequenceID int64 `json:"sequence_id,omitempty"` - // State represents the task state. - State constant.TaskState `json:"state,omitempty"` - // Tasks can use a process as a template to fill in - // command, memory, disk values - // - // Using a pointer so that it can be set to nil to prevent - // json serialization when no template is used - Template *TaskTemplate `json:"template,omitempty"` -} - -type TaskTemplate struct { - Process TaskProcessTemplate `json:"process,omitempty"` -} - -type TaskProcessTemplate struct { - Guid string `json:"guid,omitempty"` -} diff --git a/vendor/code.cloudfoundry.org/cli/resources/user_resource.go b/vendor/code.cloudfoundry.org/cli/resources/user_resource.go index 602aaa6..cc6d9c6 100644 --- a/vendor/code.cloudfoundry.org/cli/resources/user_resource.go +++ b/vendor/code.cloudfoundry.org/cli/resources/user_resource.go @@ -8,8 +8,3 @@ type User struct { PresentationName string `json:"presentation_name"` Origin string `json:"origin"` } - -type K8sUser struct { - Name string `json:"name"` - Kind string `json:"kind"` -} diff --git a/vendor/code.cloudfoundry.org/cli/types/json_object.go b/vendor/code.cloudfoundry.org/cli/types/json_object.go deleted file mode 100644 index b8adfa4..0000000 --- a/vendor/code.cloudfoundry.org/cli/types/json_object.go +++ /dev/null @@ -1,16 +0,0 @@ -package types - -import "encoding/json" - -// JSONObject represents a JSON object. When not initialized it serializes to `{}`, -// whereas a `map[string]interface{}` serializes to `null`. -type JSONObject map[string]interface{} - -func (j JSONObject) MarshalJSON() ([]byte, error) { - switch len(j) { - case 0: - return []byte("{}"), nil - default: - return json.Marshal(map[string]interface{}(j)) - } -} diff --git a/vendor/code.cloudfoundry.org/cli/types/optional_boolean.go b/vendor/code.cloudfoundry.org/cli/types/optional_boolean.go deleted file mode 100644 index d82bf66..0000000 --- a/vendor/code.cloudfoundry.org/cli/types/optional_boolean.go +++ /dev/null @@ -1,34 +0,0 @@ -package types - -import ( - "encoding/json" -) - -type OptionalBoolean struct { - IsSet bool - Value bool -} - -func NewOptionalBoolean(value bool) OptionalBoolean { - return OptionalBoolean{ - IsSet: true, - Value: value, - } -} - -func (o *OptionalBoolean) UnmarshalJSON(rawJSON []byte) error { - if err := json.Unmarshal(rawJSON, &o.Value); err != nil { - return err - } - - o.IsSet = true - return nil -} - -func (o OptionalBoolean) MarshalJSON() ([]byte, error) { - return json.Marshal(o.Value) -} - -func (o OptionalBoolean) OmitJSONry() bool { - return !o.IsSet -} diff --git a/vendor/code.cloudfoundry.org/cli/types/optional_object.go b/vendor/code.cloudfoundry.org/cli/types/optional_object.go deleted file mode 100644 index f3e4bf0..0000000 --- a/vendor/code.cloudfoundry.org/cli/types/optional_object.go +++ /dev/null @@ -1,43 +0,0 @@ -package types - -import "encoding/json" - -// OptionalObject is for situations where we want to differentiate between an -// empty object, and the object not having been set. An example would be an -// optional command line option where we want to tell the difference between -// it being set to an empty object, and it not being specified at all. -type OptionalObject struct { - IsSet bool - Value map[string]interface{} -} - -func NewOptionalObject(v map[string]interface{}) OptionalObject { - if v == nil { - // This ensures that when IsSet==true, we always have an empty map as the value which - // marshals to `{}` and not a nil map which marshals to `null` - v = make(map[string]interface{}) - } - - return OptionalObject{ - IsSet: true, - Value: v, - } -} - -func (o *OptionalObject) UnmarshalJSON(rawJSON []byte) error { - var receiver map[string]interface{} - if err := json.Unmarshal(rawJSON, &receiver); err != nil { - return err - } - - *o = NewOptionalObject(receiver) - return nil -} - -func (o OptionalObject) MarshalJSON() ([]byte, error) { - return json.Marshal(o.Value) -} - -func (o OptionalObject) OmitJSONry() bool { - return !o.IsSet -} diff --git a/vendor/code.cloudfoundry.org/cli/types/optional_string.go b/vendor/code.cloudfoundry.org/cli/types/optional_string.go deleted file mode 100644 index 1b6c603..0000000 --- a/vendor/code.cloudfoundry.org/cli/types/optional_string.go +++ /dev/null @@ -1,34 +0,0 @@ -package types - -import ( - "encoding/json" -) - -type OptionalString struct { - IsSet bool - Value string -} - -func NewOptionalString(v string) OptionalString { - return OptionalString{ - IsSet: true, - Value: v, - } -} - -func (o *OptionalString) UnmarshalJSON(rawJSON []byte) error { - o.IsSet = true - return json.Unmarshal(rawJSON, &o.Value) -} - -func (o OptionalString) MarshalJSON() ([]byte, error) { - return json.Marshal(o.Value) -} - -func (o OptionalString) OmitJSONry() bool { - return !o.IsSet -} - -func (o OptionalString) String() string { - return o.Value -} diff --git a/vendor/code.cloudfoundry.org/cli/types/optional_string_slice.go b/vendor/code.cloudfoundry.org/cli/types/optional_string_slice.go deleted file mode 100644 index 4b20942..0000000 --- a/vendor/code.cloudfoundry.org/cli/types/optional_string_slice.go +++ /dev/null @@ -1,52 +0,0 @@ -package types - -import ( - "encoding/json" - "strings" -) - -type OptionalStringSlice struct { - IsSet bool - Value []string -} - -func NewOptionalStringSlice(s ...string) OptionalStringSlice { - return OptionalStringSlice{ - IsSet: true, - Value: s, - } -} - -func (o *OptionalStringSlice) UnmarshalJSON(rawJSON []byte) error { - var receiver []string - if err := json.Unmarshal(rawJSON, &receiver); err != nil { - return err - } - - // This ensures that the empty state is always a nil slice, not an allocated (but empty) slice - switch len(receiver) { - case 0: - o.Value = nil - default: - o.Value = receiver - } - - o.IsSet = true - return nil -} - -func (o OptionalStringSlice) MarshalJSON() ([]byte, error) { - if len(o.Value) > 0 { - return json.Marshal(o.Value) - } - - return []byte(`[]`), nil -} - -func (o OptionalStringSlice) OmitJSONry() bool { - return !o.IsSet -} - -func (o OptionalStringSlice) String() string { - return strings.Join(o.Value, ", ") -} diff --git a/vendor/code.cloudfoundry.org/cli/util/batcher/batcher.go b/vendor/code.cloudfoundry.org/cli/util/batcher/batcher.go deleted file mode 100644 index ad5ad47..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/batcher/batcher.go +++ /dev/null @@ -1,29 +0,0 @@ -package batcher - -import "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - -const BatchSize = 200 - -type callback func(guids []string) (ccv3.Warnings, error) - -func RequestByGUID(guids []string, cb callback) (ccv3.Warnings, error) { - var allWarnings ccv3.Warnings - - for len(guids) > 0 { - remaining := len(guids) - if remaining > BatchSize { - remaining = BatchSize - } - - batch := guids[:remaining] - guids = guids[remaining:] - - warnings, err := cb(batch) - allWarnings = append(allWarnings, warnings...) - if err != nil { - return allWarnings, err - } - } - - return allWarnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/util/checksum.go b/vendor/code.cloudfoundry.org/cli/util/checksum.go index 81169e7..3f5d1c4 100644 --- a/vendor/code.cloudfoundry.org/cli/util/checksum.go +++ b/vendor/code.cloudfoundry.org/cli/util/checksum.go @@ -7,7 +7,7 @@ import ( "os" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Sha1Checksum +//go:generate counterfeiter . Sha1Checksum type Sha1Checksum interface { ComputeFileSha1() ([]byte, error) diff --git a/vendor/code.cloudfoundry.org/cli/util/clissh/listener_factory.go b/vendor/code.cloudfoundry.org/cli/util/clissh/listener_factory.go deleted file mode 100644 index 2e04cf7..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/clissh/listener_factory.go +++ /dev/null @@ -1,19 +0,0 @@ -package clissh - -import "net" - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . ListenerFactory - -type ListenerFactory interface { - Listen(network, address string) (net.Listener, error) -} - -type listenerFactory struct{} - -func DefaultListenerFactory() listenerFactory { - return listenerFactory{} -} - -func (listenerFactory) Listen(network, address string) (net.Listener, error) { - return net.Listen(network, address) -} diff --git a/vendor/code.cloudfoundry.org/cli/util/clissh/secure_client.go b/vendor/code.cloudfoundry.org/cli/util/clissh/secure_client.go deleted file mode 100644 index f0e0af5..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/clissh/secure_client.go +++ /dev/null @@ -1,41 +0,0 @@ -package clissh - -import ( - "net" - - "golang.org/x/crypto/ssh" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . SecureClient - -type SecureClient interface { - NewSession() (SecureSession, error) - Conn() ssh.Conn - Dial(network, address string) (net.Conn, error) - Wait() error - Close() error -} - -type secureClient struct { - client *ssh.Client -} - -func (sc secureClient) Close() error { - return sc.client.Close() -} - -func (sc secureClient) Conn() ssh.Conn { - return sc.client.Conn -} - -func (sc secureClient) Dial(n, addr string) (net.Conn, error) { - return sc.client.Dial(n, addr) -} - -func (sc secureClient) NewSession() (SecureSession, error) { - return sc.client.NewSession() -} - -func (sc secureClient) Wait() error { - return sc.client.Wait() -} diff --git a/vendor/code.cloudfoundry.org/cli/util/clissh/secure_dialer.go b/vendor/code.cloudfoundry.org/cli/util/clissh/secure_dialer.go deleted file mode 100644 index 8acf397..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/clissh/secure_dialer.go +++ /dev/null @@ -1,33 +0,0 @@ -package clissh - -import ( - "golang.org/x/crypto/ssh" - "golang.org/x/net/proxy" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . SecureDialer - -type SecureDialer interface { - Dial(network, address string, config *ssh.ClientConfig) (SecureClient, error) -} - -type secureDialer struct{} - -func DefaultSecureDialer() secureDialer { - return secureDialer{} -} - -func (secureDialer) Dial(network string, address string, config *ssh.ClientConfig) (SecureClient, error) { - conn, err := proxy.FromEnvironment().Dial(network, address) - if err != nil { - return secureClient{}, err - } - - c, chans, reqs, err := ssh.NewClientConn(conn, address, config) - if err != nil { - return secureClient{}, err - } - client := ssh.NewClient(c, chans, reqs) - - return secureClient{client: client}, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/util/clissh/secure_session.go b/vendor/code.cloudfoundry.org/cli/util/clissh/secure_session.go deleted file mode 100644 index a010c47..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/clissh/secure_session.go +++ /dev/null @@ -1,21 +0,0 @@ -package clissh - -import ( - "io" - - "golang.org/x/crypto/ssh" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . SecureSession - -type SecureSession interface { - RequestPty(term string, height, width int, termModes ssh.TerminalModes) error - SendRequest(name string, wantReply bool, payload []byte) (bool, error) - StdinPipe() (io.WriteCloser, error) - StdoutPipe() (io.Reader, error) - StderrPipe() (io.Reader, error) - Start(command string) error - Shell() error - Wait() error - Close() error -} diff --git a/vendor/code.cloudfoundry.org/cli/util/clissh/ssh.go b/vendor/code.cloudfoundry.org/cli/util/clissh/ssh.go deleted file mode 100644 index 43fd4f1..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/clissh/ssh.go +++ /dev/null @@ -1,409 +0,0 @@ -package clissh - -import ( - "crypto/md5" - "crypto/sha1" - "crypto/sha256" - "encoding/base64" - "errors" - "fmt" - "io" - "net" - "os" - "os/signal" - "runtime" - "strings" - "sync" - "syscall" - "time" - - "code.cloudfoundry.org/cli/cf/ssh/sigwinch" - "code.cloudfoundry.org/cli/util/clissh/ssherror" - "github.com/moby/moby/pkg/term" - log "github.com/sirupsen/logrus" - "golang.org/x/crypto/ssh" -) - -const ( - md5FingerprintLength = 47 // inclusive of space between bytes - hexSha1FingerprintLength = 59 // inclusive of space between bytes - base64Sha256FingerprintLength = 43 - - DefaultKeepAliveInterval = 30 * time.Second -) - -type LocalPortForward struct { - LocalAddress string - RemoteAddress string -} - -type SecureShell struct { - secureDialer SecureDialer - secureClient SecureClient - terminalHelper TerminalHelper - listenerFactory ListenerFactory - - localListeners []net.Listener - keepAliveInterval time.Duration -} - -func NewDefaultSecureShell() *SecureShell { - defaultSecureDialer := DefaultSecureDialer() - defaultTerminalHelper := DefaultTerminalHelper() - defaultListenerFactory := DefaultListenerFactory() - return &SecureShell{ - secureDialer: defaultSecureDialer, - terminalHelper: defaultTerminalHelper, - listenerFactory: defaultListenerFactory, - keepAliveInterval: DefaultKeepAliveInterval, - localListeners: []net.Listener{}, - } -} - -func NewSecureShell( - secureDialer SecureDialer, - terminalHelper TerminalHelper, - listenerFactory ListenerFactory, - keepAliveInterval time.Duration, -) *SecureShell { - return &SecureShell{ - secureDialer: secureDialer, - terminalHelper: terminalHelper, - listenerFactory: listenerFactory, - keepAliveInterval: keepAliveInterval, - localListeners: []net.Listener{}, - } -} - -func (c *SecureShell) Close() error { - for _, listener := range c.localListeners { - listener.Close() - } - return c.secureClient.Close() -} - -func (c *SecureShell) Connect(username string, passcode string, appSSHEndpoint string, appSSHHostKeyFingerprint string, skipHostValidation bool) error { - hostKeyCallbackFunction := fingerprintCallback(skipHostValidation, appSSHHostKeyFingerprint) - - clientConfig := &ssh.ClientConfig{ - User: username, - Auth: []ssh.AuthMethod{ssh.Password(passcode)}, - HostKeyCallback: hostKeyCallbackFunction, - } - - secureClient, err := c.secureDialer.Dial("tcp", appSSHEndpoint, clientConfig) - if err != nil { - if strings.Contains(err.Error(), "ssh: unable to authenticate") { - return ssherror.UnableToAuthenticateError{Err: err} - } - return err - } - - c.secureClient = secureClient - return nil -} - -func (c *SecureShell) InteractiveSession(commands []string, terminalRequest TTYRequest) error { - session, err := c.secureClient.NewSession() - if err != nil { - return fmt.Errorf("SSH session allocation failed: %s", err.Error()) - } - defer session.Close() - - stdin, stdout, stderr := c.terminalHelper.StdStreams() - - inPipe, err := session.StdinPipe() - if err != nil { - return err - } - - outPipe, err := session.StdoutPipe() - if err != nil { - return err - } - - errPipe, err := session.StderrPipe() - if err != nil { - return err - } - - stdinFd, stdinIsTerminal := c.terminalHelper.GetFdInfo(stdin) - stdoutFd, stdoutIsTerminal := c.terminalHelper.GetFdInfo(stdout) - - if c.shouldAllocateTerminal(commands, terminalRequest, stdinIsTerminal) { - modes := ssh.TerminalModes{ - ssh.ECHO: 1, - ssh.TTY_OP_ISPEED: 115200, - ssh.TTY_OP_OSPEED: 115200, - } - - width, height := c.getWindowDimensions(stdoutFd) - - err = session.RequestPty(c.terminalType(), height, width, modes) - if err != nil { - return err - } - - var state *term.State - state, err = c.terminalHelper.SetRawTerminal(stdinFd) - if err == nil { - defer func() { - err := c.terminalHelper.RestoreTerminal(stdinFd, state) - log.Errorln("restore terminal", err) - }() - } - } - - if len(commands) > 0 { - cmd := strings.Join(commands, " ") - err = session.Start(cmd) - if err != nil { - return err - } - } else { - err = session.Shell() - if err != nil { - return err - } - } - - wg := &sync.WaitGroup{} - wg.Add(2) - - go copyAndClose(nil, inPipe, stdin) - go copyAndDone(wg, stdout, outPipe) - go copyAndDone(wg, stderr, errPipe) - - if stdoutIsTerminal { - resized := make(chan os.Signal, 16) - - if runtime.GOOS == "windows" { - ticker := time.NewTicker(250 * time.Millisecond) - defer ticker.Stop() - - go func() { - for range ticker.C { - resized <- syscall.Signal(-1) - } - close(resized) - }() - } else { - signal.Notify(resized, sigwinch.SIGWINCH()) - defer func() { signal.Stop(resized); close(resized) }() - } - - go c.resize(resized, session, stdoutFd) - } - - keepaliveStopCh := make(chan struct{}) - defer close(keepaliveStopCh) - - go keepalive(c.secureClient.Conn(), time.NewTicker(c.keepAliveInterval), keepaliveStopCh) - - result := session.Wait() - wg.Wait() - return result -} - -func (c *SecureShell) LocalPortForward(localPortForwardSpecs []LocalPortForward) error { - for _, spec := range localPortForwardSpecs { - listener, err := c.listenerFactory.Listen("tcp", spec.LocalAddress) - if err != nil { - return err - } - c.localListeners = append(c.localListeners, listener) - - go c.localForwardAcceptLoop(listener, spec.RemoteAddress) - } - - return nil -} - -func (c *SecureShell) Wait() error { - keepaliveStopCh := make(chan struct{}) - defer close(keepaliveStopCh) - - go keepalive(c.secureClient.Conn(), time.NewTicker(c.keepAliveInterval), keepaliveStopCh) - - return c.secureClient.Wait() -} - -func (c *SecureShell) getWindowDimensions(terminalFd uintptr) (width int, height int) { - winSize, err := c.terminalHelper.GetWinsize(terminalFd) - if err != nil { - winSize = &term.Winsize{ - Width: 80, - Height: 43, - } - } - - return int(winSize.Width), int(winSize.Height) -} - -func (c *SecureShell) handleForwardConnection(conn net.Conn, targetAddr string) { - defer conn.Close() - - target, err := c.secureClient.Dial("tcp", targetAddr) - if err != nil { - fmt.Printf("connect to %s failed: %s\n", targetAddr, err.Error()) - return - } - defer target.Close() - - wg := &sync.WaitGroup{} - wg.Add(2) - - go copyAndClose(wg, conn, target) - go copyAndClose(wg, target, conn) - wg.Wait() -} - -func (c *SecureShell) localForwardAcceptLoop(listener net.Listener, addr string) { - defer listener.Close() - - for { - conn, err := listener.Accept() - if err != nil { - if netErr, ok := err.(net.Error); ok && netErr.Temporary() { - time.Sleep(100 * time.Millisecond) - continue - } - return - } - - go c.handleForwardConnection(conn, addr) - } -} - -func (c *SecureShell) resize(resized <-chan os.Signal, session SecureSession, terminalFd uintptr) { - type resizeMessage struct { - Width uint32 - Height uint32 - PixelWidth uint32 - PixelHeight uint32 - } - - var previousWidth, previousHeight int - - for range resized { - width, height := c.getWindowDimensions(terminalFd) - - if width == previousWidth && height == previousHeight { - continue - } - - message := resizeMessage{ - Width: uint32(width), - Height: uint32(height), - } - - _, err := session.SendRequest("window-change", false, ssh.Marshal(message)) - if err != nil { - log.Errorln("window-change:", err) - } - - previousWidth = width - previousHeight = height - } -} - -func (c *SecureShell) shouldAllocateTerminal(commands []string, terminalRequest TTYRequest, stdinIsTerminal bool) bool { - switch terminalRequest { - case RequestTTYForce: - return true - case RequestTTYNo: - return false - case RequestTTYYes: - return stdinIsTerminal - case RequestTTYAuto: - return len(commands) == 0 && stdinIsTerminal - default: - return false - } -} - -func (c *SecureShell) terminalType() string { - term := os.Getenv("TERM") - if term == "" { - term = "xterm" - } - return term -} - -func base64Sha256Fingerprint(key ssh.PublicKey) string { - sum := sha256.Sum256(key.Marshal()) - return base64.RawStdEncoding.EncodeToString(sum[:]) -} - -func copyAndClose(wg *sync.WaitGroup, dest io.WriteCloser, src io.Reader) { - _, err := io.Copy(dest, src) - if err != nil { - log.Errorln("copy and close:", err) - } - _ = dest.Close() - if wg != nil { - wg.Done() - } -} - -func copyAndDone(wg *sync.WaitGroup, dest io.Writer, src io.Reader) { - _, err := io.Copy(dest, src) - if err != nil { - log.Errorln("copy and done:", err) - } - wg.Done() -} - -func fingerprintCallback(skipHostValidation bool, expectedFingerprint string) ssh.HostKeyCallback { - return func(hostname string, remote net.Addr, key ssh.PublicKey) error { - if skipHostValidation { - return nil - } - - var fingerprint string - - switch len(expectedFingerprint) { - case base64Sha256FingerprintLength: - fingerprint = base64Sha256Fingerprint(key) - case hexSha1FingerprintLength: - fingerprint = hexSha1Fingerprint(key) - case md5FingerprintLength: - fingerprint = md5Fingerprint(key) - case 0: - fingerprint = md5Fingerprint(key) - return fmt.Errorf("Unable to verify identity of host.\n\nThe fingerprint of the received key was %q.", fingerprint) - default: - return errors.New("Unsupported host key fingerprint format") - } - - if fingerprint != expectedFingerprint { - return fmt.Errorf("Host key verification failed.\n\nThe fingerprint of the received key was %q.", fingerprint) - } - return nil - } -} - -func hexSha1Fingerprint(key ssh.PublicKey) string { - sum := sha1.Sum(key.Marshal()) - return strings.Replace(fmt.Sprintf("% x", sum), " ", ":", -1) -} - -func keepalive(conn ssh.Conn, ticker *time.Ticker, stopCh chan struct{}) { - for { - select { - case <-ticker.C: - _, _, err := conn.SendRequest("keepalive@cloudfoundry.org", true, nil) - if err != nil { - log.Errorln("err sending keep alive:", err) - } - case <-stopCh: - ticker.Stop() - return - } - } -} - -func md5Fingerprint(key ssh.PublicKey) string { - sum := md5.Sum(key.Marshal()) - return strings.Replace(fmt.Sprintf("% x", sum), " ", ":", -1) -} diff --git a/vendor/code.cloudfoundry.org/cli/util/clissh/terminal_helper.go b/vendor/code.cloudfoundry.org/cli/util/clissh/terminal_helper.go deleted file mode 100644 index 092fe49..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/clissh/terminal_helper.go +++ /dev/null @@ -1,43 +0,0 @@ -package clissh - -import ( - "io" - - "github.com/moby/moby/pkg/term" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . TerminalHelper - -type TerminalHelper interface { - GetFdInfo(in interface{}) (fd uintptr, isTerminal bool) - SetRawTerminal(fd uintptr) (*term.State, error) - RestoreTerminal(fd uintptr, state *term.State) error - GetWinsize(fd uintptr) (*term.Winsize, error) - StdStreams() (stdin io.ReadCloser, stdout io.Writer, stderr io.Writer) -} - -type terminalHelper struct{} - -func DefaultTerminalHelper() terminalHelper { - return terminalHelper{} -} - -func (terminalHelper) GetFdInfo(in interface{}) (uintptr, bool) { - return term.GetFdInfo(in) -} - -func (terminalHelper) GetWinsize(fd uintptr) (*term.Winsize, error) { - return term.GetWinsize(fd) -} - -func (terminalHelper) RestoreTerminal(fd uintptr, state *term.State) error { - return term.RestoreTerminal(fd, state) -} - -func (terminalHelper) SetRawTerminal(fd uintptr) (*term.State, error) { - return term.SetRawTerminal(fd) -} - -func (terminalHelper) StdStreams() (io.ReadCloser, io.Writer, io.Writer) { - return term.StdStreams() -} diff --git a/vendor/code.cloudfoundry.org/cli/util/clissh/tty_request.go b/vendor/code.cloudfoundry.org/cli/util/clissh/tty_request.go deleted file mode 100644 index 052dcae..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/clissh/tty_request.go +++ /dev/null @@ -1,10 +0,0 @@ -package clissh - -type TTYRequest int - -const ( - RequestTTYAuto TTYRequest = iota - RequestTTYNo - RequestTTYYes - RequestTTYForce -) diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/config.go b/vendor/code.cloudfoundry.org/cli/util/configv3/config.go index c6afb35..eeb6da9 100644 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/config.go +++ b/vendor/code.cloudfoundry.org/cli/util/configv3/config.go @@ -8,13 +8,6 @@ import ( "code.cloudfoundry.org/cli/version" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . UserConfig - -type UserConfig interface { - CurrentUser() (User, error) - CurrentUserName() (string, error) -} - // Config combines the settings taken from the .cf/config.json, os.ENV, and the // plugin config. type Config struct { @@ -31,8 +24,6 @@ type Config struct { detectedSettings detectedSettings pluginsConfig PluginsConfig - - UserConfig } // BinaryVersion is the current version of the CF binary. @@ -106,7 +97,3 @@ func (config *Config) Verbose() (bool, []string) { return verbose, filePath } - -func (config *Config) SetKubernetesAuthInfo(authInfo string) { - config.ConfigFile.CFOnK8s.AuthInfo = authInfo -} diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/default_user_config.go b/vendor/code.cloudfoundry.org/cli/util/configv3/default_user_config.go deleted file mode 100644 index f2d96df..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/default_user_config.go +++ /dev/null @@ -1,58 +0,0 @@ -package configv3 - -import ( - "github.com/SermoDigital/jose/jws" -) - -type DefaultUserConfig struct { - // ConfigFile stores the configuration from the .cf/config - ConfigFile *JSONConfig -} - -// CurrentUser returns user information decoded from the JWT access token in -// .cf/config.json. -func (config DefaultUserConfig) CurrentUser() (User, error) { - return decodeUserFromJWT(config.ConfigFile.AccessToken) -} - -// CurrentUserName returns the name of a user as returned by CurrentUser() -func (config DefaultUserConfig) CurrentUserName() (string, error) { - user, err := config.CurrentUser() - if err != nil { - return "", err - } - return user.Name, nil -} - -func decodeUserFromJWT(accessToken string) (User, error) { - if accessToken == "" { - return User{}, nil - } - - token, err := jws.ParseJWT([]byte(accessToken[7:])) - if err != nil { - return User{}, err - } - - claims := token.Claims() - - var name, GUID, origin string - var isClient bool - if claims.Has("user_name") { - name = claims.Get("user_name").(string) - GUID = claims.Get("user_id").(string) - origin = claims.Get("origin").(string) - isClient = false - } else { - name = claims.Get("client_id").(string) - GUID = name - isClient = true - } - - return User{ - Name: name, - GUID: GUID, - Origin: origin, - IsClient: isClient, - }, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/dynamic_user_config.go b/vendor/code.cloudfoundry.org/cli/util/configv3/dynamic_user_config.go deleted file mode 100644 index 86c6ea5..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/dynamic_user_config.go +++ /dev/null @@ -1,22 +0,0 @@ -package configv3 - -type DynamicUserConfig struct { - ConfigFile *JSONConfig - DefaultUserConfig UserConfig - KubernetesUserConfig UserConfig -} - -func (config DynamicUserConfig) CurrentUser() (User, error) { - return config.pickConfig().CurrentUser() -} - -func (config DynamicUserConfig) CurrentUserName() (string, error) { - return config.pickConfig().CurrentUserName() -} - -func (config DynamicUserConfig) pickConfig() UserConfig { - if config.ConfigFile.CFOnK8s.Enabled { - return config.KubernetesUserConfig - } - return config.DefaultUserConfig -} diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/home_dir_unix.go b/vendor/code.cloudfoundry.org/cli/util/configv3/home_dir_unix.go index b735d7b..425f34f 100644 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/home_dir_unix.go +++ b/vendor/code.cloudfoundry.org/cli/util/configv3/home_dir_unix.go @@ -1,4 +1,3 @@ -//go:build !windows // +build !windows package configv3 diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/home_dir_windows.go b/vendor/code.cloudfoundry.org/cli/util/configv3/home_dir_windows.go index 18b1eee..60a5f6d 100644 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/home_dir_windows.go +++ b/vendor/code.cloudfoundry.org/cli/util/configv3/home_dir_windows.go @@ -1,4 +1,3 @@ -//go:build windows // +build windows package configv3 diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/json_config.go b/vendor/code.cloudfoundry.org/cli/util/configv3/json_config.go index c672de9..fed6438 100644 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/json_config.go +++ b/vendor/code.cloudfoundry.org/cli/util/configv3/json_config.go @@ -2,6 +2,8 @@ package configv3 import ( "time" + + "github.com/SermoDigital/jose/jws" ) // JSONConfig represents .cf/config.json. @@ -10,7 +12,6 @@ type JSONConfig struct { APIVersion string `json:"APIVersion"` AsyncTimeout int `json:"AsyncTimeout"` AuthorizationEndpoint string `json:"AuthorizationEndpoint"` - CFOnK8s CFOnK8s `json:"CFOnK8s"` ColorEnabled string `json:"ColorEnabled"` ConfigVersion int `json:"ConfigVersion"` DopplerEndpoint string `json:"DopplerEndPoint"` @@ -18,7 +19,6 @@ type JSONConfig struct { LogCacheEndpoint string `json:"LogCacheEndPoint"` MinCLIVersion string `json:"MinCLIVersion"` MinRecommendedCLIVersion string `json:"MinRecommendedCLIVersion"` - NetworkPolicyV1Endpoint string `json:"NetworkPolicyV1Endpoint"` TargetedOrganization Organization `json:"OrganizationFields"` PluginRepositories []PluginRepository `json:"PluginRepos"` RefreshToken string `json:"RefreshToken"` @@ -65,9 +65,19 @@ func (config *Config) APIVersion() string { return config.ConfigFile.APIVersion } -// AuthorizationEndpoint returns the authorization endpoint -func (config *Config) AuthorizationEndpoint() string { - return config.ConfigFile.AuthorizationEndpoint +// CurrentUser returns user information decoded from the JWT access token in +// .cf/config.json. +func (config *Config) CurrentUser() (User, error) { + return decodeUserFromJWT(config.ConfigFile.AccessToken) +} + +// CurrentUserName returns the name of a user as returned by CurrentUser() +func (config *Config) CurrentUserName() (string, error) { + user, err := config.CurrentUser() + if err != nil { + return "", err + } + return user.Name, nil } // HasTargetedOrganization returns true if the organization is set. @@ -80,11 +90,6 @@ func (config *Config) HasTargetedSpace() bool { return config.ConfigFile.TargetedSpace.GUID != "" } -// LogCacheEndpoint returns the log cache endpoint. -func (config *Config) LogCacheEndpoint() string { - return config.ConfigFile.LogCacheEndpoint -} - // MinCLIVersion returns the minimum CLI version required by the CC. func (config *Config) MinCLIVersion() string { return config.ConfigFile.MinCLIVersion @@ -101,11 +106,6 @@ func (config *Config) OverallPollingTimeout() time.Duration { return time.Duration(config.ConfigFile.AsyncTimeout) * time.Minute } -// NetworkPolicyV1Endpoint returns the endpoint for V1 of the networking API -func (config *Config) NetworkPolicyV1Endpoint() string { - return config.ConfigFile.NetworkPolicyV1Endpoint -} - // RefreshToken returns the refresh token for getting a new access token. func (config *Config) RefreshToken() string { return config.ConfigFile.RefreshToken @@ -172,11 +172,8 @@ type TargetInformationArgs struct { Doppler string LogCache string MinCLIVersion string - NetworkPolicyV1 string Routing string SkipSSLValidation bool - UAA string - CFOnK8s bool } // SetTargetInformation sets the currently targeted CC API and related other @@ -189,17 +186,11 @@ func (config *Config) SetTargetInformation(args TargetInformationArgs) { config.ConfigFile.LogCacheEndpoint = args.LogCache config.ConfigFile.RoutingEndpoint = args.Routing config.ConfigFile.SkipSSLValidation = args.SkipSSLValidation - config.ConfigFile.NetworkPolicyV1Endpoint = args.NetworkPolicyV1 - - config.ConfigFile.UAAEndpoint = args.UAA - config.ConfigFile.AuthorizationEndpoint = args.Auth // NOTE: This gets written to the config file, but I do not believe it is currently // ever read from there. config.ConfigFile.AuthorizationEndpoint = args.Auth - config.ConfigFile.CFOnK8s.Enabled = args.CFOnK8s - config.UnsetOrganizationAndSpaceInformation() } @@ -265,11 +256,6 @@ func (config *Config) TargetedSpace() Space { return config.ConfigFile.TargetedSpace } -// UAAEndpoint returns the UAA endpoint -func (config *Config) UAAEndpoint() string { - return config.ConfigFile.UAAEndpoint -} - // UAAGrantType returns the grant type of the supplied UAA credentials. func (config *Config) UAAGrantType() string { return config.ConfigFile.UAAGrantType @@ -304,9 +290,9 @@ func (config *Config) UnsetUserInformation() { config.SetRefreshToken("") config.SetUAAGrantType("") config.SetUAAClientCredentials(DefaultUAAOAuthClient, DefaultUAAOAuthClientSecret) - config.SetKubernetesAuthInfo("") config.UnsetOrganizationAndSpaceInformation() + } // V7SetSpaceInformation sets the currently targeted space. @@ -314,3 +300,36 @@ func (config *Config) V7SetSpaceInformation(guid string, name string) { config.ConfigFile.TargetedSpace.GUID = guid config.ConfigFile.TargetedSpace.Name = name } + +func decodeUserFromJWT(accessToken string) (User, error) { + if accessToken == "" { + return User{}, nil + } + + token, err := jws.ParseJWT([]byte(accessToken[7:])) + if err != nil { + return User{}, err + } + + claims := token.Claims() + + var name, GUID, origin string + var isClient bool + if claims.Has("user_name") { + name = claims.Get("user_name").(string) + GUID = claims.Get("user_id").(string) + origin = claims.Get("origin").(string) + isClient = false + } else { + name = claims.Get("client_id").(string) + GUID = name + isClient = true + } + + return User{ + Name: name, + GUID: GUID, + Origin: origin, + IsClient: isClient, + }, nil +} diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/k8s.go b/vendor/code.cloudfoundry.org/cli/util/configv3/k8s.go deleted file mode 100644 index e7e69aa..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/k8s.go +++ /dev/null @@ -1,10 +0,0 @@ -package configv3 - -type CFOnK8s struct { - Enabled bool `json:"Enabled"` - AuthInfo string `json:"AuthInfo"` -} - -func (config *Config) IsCFOnK8s() bool { - return config.ConfigFile.CFOnK8s.Enabled -} diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/kubernetes_user_config.go b/vendor/code.cloudfoundry.org/cli/util/configv3/kubernetes_user_config.go deleted file mode 100644 index 0ae5f48..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/kubernetes_user_config.go +++ /dev/null @@ -1,17 +0,0 @@ -package configv3 - -type KubernetesUserConfig struct { - // ConfigFile stores the configuration from the .cf/config - ConfigFile *JSONConfig -} - -// CurrentUser returns user information decoded from the JWT access token in -// .cf/config.json. -func (config KubernetesUserConfig) CurrentUser() (User, error) { - return User{Name: config.ConfigFile.CFOnK8s.AuthInfo}, nil -} - -// CurrentUserName returns the name of a user as returned by CurrentUser() -func (config KubernetesUserConfig) CurrentUserName() (string, error) { - return config.ConfigFile.CFOnK8s.AuthInfo, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/load_config.go b/vendor/code.cloudfoundry.org/cli/util/configv3/load_config.go index 90470e2..7304882 100644 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/load_config.go +++ b/vendor/code.cloudfoundry.org/cli/util/configv3/load_config.go @@ -166,12 +166,6 @@ func LoadConfig(flags ...FlagOverride) (*Config, error) { tty: isTTY, } - config.UserConfig = DynamicUserConfig{ - ConfigFile: &config.ConfigFile, - DefaultUserConfig: DefaultUserConfig{ConfigFile: &config.ConfigFile}, - KubernetesUserConfig: KubernetesUserConfig{ConfigFile: &config.ConfigFile}, - } - return &config, jsonError } diff --git a/vendor/code.cloudfoundry.org/cli/util/configv3/write_config.go b/vendor/code.cloudfoundry.org/cli/util/configv3/write_config.go index 15f0263..11e2d74 100644 --- a/vendor/code.cloudfoundry.org/cli/util/configv3/write_config.go +++ b/vendor/code.cloudfoundry.org/cli/util/configv3/write_config.go @@ -6,7 +6,6 @@ import ( "os" "os/signal" "syscall" - "time" ) // WriteConfig creates the .cf directory and then writes the config.json. The @@ -45,14 +44,6 @@ func (c *Config) WriteConfig() error { return err } - for i := 0; i < 5; i++ { - if err := os.Rename(tempConfigFileName, ConfigFilePath()); err == nil { - return nil - } - - time.Sleep(50 * time.Millisecond) - } - return os.Rename(tempConfigFileName, ConfigFilePath()) } diff --git a/vendor/code.cloudfoundry.org/cli/util/download/http_client.go b/vendor/code.cloudfoundry.org/cli/util/download/http_client.go index 8ffc025..ac09942 100644 --- a/vendor/code.cloudfoundry.org/cli/util/download/http_client.go +++ b/vendor/code.cloudfoundry.org/cli/util/download/http_client.go @@ -2,7 +2,7 @@ package download import "net/http" -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . HTTPClient +//go:generate counterfeiter . HTTPClient type HTTPClient interface { Get(url string) (resp *http.Response, err error) diff --git a/vendor/code.cloudfoundry.org/cli/util/download/progress_bar.go b/vendor/code.cloudfoundry.org/cli/util/download/progress_bar.go index 6f84a15..9ca592f 100644 --- a/vendor/code.cloudfoundry.org/cli/util/download/progress_bar.go +++ b/vendor/code.cloudfoundry.org/cli/util/download/progress_bar.go @@ -6,7 +6,7 @@ import ( pb "gopkg.in/cheggaaa/pb.v1" ) -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . ProgressBar +//go:generate counterfeiter . ProgressBar type ProgressBar interface { Finish() diff --git a/vendor/code.cloudfoundry.org/cli/util/extract/extract.go b/vendor/code.cloudfoundry.org/cli/util/extract/extract.go deleted file mode 100644 index 917960e..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/extract/extract.go +++ /dev/null @@ -1,64 +0,0 @@ -package extract - -import ( - "reflect" - "strings" - - "code.cloudfoundry.org/cli/util/unique" -) - -type appender func(string) - -func UniqueList(expr string, input interface{}) []string { - return unique.StringSlice(List(expr, input)) -} - -func First(expr string, input interface{}) string { - l := List(expr, input) - if len(l) > 0 { - return l[0] - } - return "" -} - -func List(expr string, input interface{}) []string { - var result []string - app := func(v string) { - result = append(result, v) - } - - path := strings.Split(expr, ".") - val := reflect.ValueOf(input) - - extract(app, path, val) - return result -} - -func extract(app appender, path []string, input reflect.Value) { - switch input.Kind() { - case reflect.Struct: - extractStruct(app, path, input) - case reflect.Slice: - extractSlice(app, path, input) - case reflect.Interface: - extract(app, path, input.Elem()) - } -} - -func extractSlice(app appender, path []string, input reflect.Value) { - for i := 0; i < input.Len(); i++ { - extract(app, path, input.Index(i)) - } -} - -func extractStruct(app appender, path []string, input reflect.Value) { - v := input.FieldByName(path[0]) - if v.IsValid() { - switch v.Kind() { - case reflect.String: - app(v.String()) - default: - extract(app, path[1:], v) - } - } -} diff --git a/vendor/code.cloudfoundry.org/cli/util/generic/architecture.go b/vendor/code.cloudfoundry.org/cli/util/generic/architecture.go deleted file mode 100644 index 3dc90dc..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/generic/architecture.go +++ /dev/null @@ -1,18 +0,0 @@ -package generic - -func GeneratePlatform(runtimeGOOS string, runtimeGOARCH string) string { - switch { - case runtimeGOOS == "linux" && runtimeGOARCH == "amd64": - return "linux64" - case runtimeGOOS == "linux" && runtimeGOARCH == "386": - return "linux32" - case runtimeGOOS == "windows" && runtimeGOARCH == "amd64": - return "win64" - case runtimeGOOS == "windows" && runtimeGOARCH == "386": - return "win32" - case runtimeGOOS == "darwin": - return "osx" - default: - return "" - } -} diff --git a/vendor/code.cloudfoundry.org/cli/util/generic/executable_filename_unix.go b/vendor/code.cloudfoundry.org/cli/util/generic/executable_filename_unix.go deleted file mode 100644 index 65de127..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/generic/executable_filename_unix.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build !windows -// +build !windows - -package generic - -// ExecutableFilename appends does something on Windows, but it is a no-op -// on the many flavors of UNIX. -func ExecutableFilename(name string) string { - return name -} diff --git a/vendor/code.cloudfoundry.org/cli/util/generic/executable_filename_windows.go b/vendor/code.cloudfoundry.org/cli/util/generic/executable_filename_windows.go deleted file mode 100644 index 12b3910..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/generic/executable_filename_windows.go +++ /dev/null @@ -1,18 +0,0 @@ -//go:build windows -// +build windows - -package generic - -import ( - "fmt" - "strings" -) - -// ExecutableFilename appends '.exe' to a filename when necessary in order to -// make it executable on Windows -func ExecutableFilename(name string) string { - if strings.HasSuffix(name, ".exe") { - return name - } - return fmt.Sprintf("%s.exe", name) -} diff --git a/vendor/code.cloudfoundry.org/cli/util/generic/map.go b/vendor/code.cloudfoundry.org/cli/util/generic/map.go deleted file mode 100644 index 8d747a4..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/generic/map.go +++ /dev/null @@ -1,153 +0,0 @@ -package generic - -import ( - "fmt" - "reflect" -) - -type Map interface { - IsEmpty() bool - Count() int - Keys() []interface{} - Has(key interface{}) bool - Except(keys []interface{}) Map - IsNil(key interface{}) bool - NotNil(key interface{}) bool - Get(key interface{}) interface{} - Set(key interface{}, value interface{}) - Delete(key interface{}) - String() string -} - -func NewMap(data ...interface{}) Map { - if len(data) == 0 { - return newEmptyMap() - } else if len(data) > 1 { - panic("NewMap called with more than one argument") - } - - switch data := data[0].(type) { - case nil: - return newEmptyMap() - case Map: - return data - case map[string]string: - stringMap := newEmptyMap() - for key, val := range data { - stringMap.Set(key, val) - } - return stringMap - case map[string]interface{}: - stringToInterfaceMap := newEmptyMap() - for key, val := range data { - stringToInterfaceMap.Set(key, val) - } - return stringToInterfaceMap - case map[interface{}]interface{}: - mapp := ConcreteMap(data) - return &mapp - } - - fmt.Printf("\n\n map: %T", data) - panic("NewMap called with unexpected argument") -} - -type Iterator func(key, val interface{}) - -func newEmptyMap() Map { - return &ConcreteMap{} -} - -type ConcreteMap map[interface{}]interface{} - -func (data *ConcreteMap) Count() int { - return len(*data) -} - -func (data *ConcreteMap) Delete(key interface{}) { - delete(*data, key) -} - -func (data *ConcreteMap) Except(keys []interface{}) Map { - otherMap := NewMap() - Each(data, func(key, value interface{}) { - if !Contains(keys, key) { - otherMap.Set(key, value) - } - }) - return otherMap -} - -func (data *ConcreteMap) Get(key interface{}) interface{} { - return (*data)[key] -} - -func (data *ConcreteMap) Has(key interface{}) bool { - _, ok := (*data)[key] - return ok -} - -func (data *ConcreteMap) IsEmpty() bool { - return data.Count() == 0 -} - -func (data *ConcreteMap) IsNil(key interface{}) bool { - maybe, ok := (*data)[key] - return ok && maybe == nil -} - -func (data *ConcreteMap) Keys() (keys []interface{}) { - keys = make([]interface{}, 0, data.Count()) - for key := range *data { - keys = append(keys, key) - } - - return -} - -func (data *ConcreteMap) NotNil(key interface{}) bool { - maybe, ok := (*data)[key] - return ok && maybe != nil -} - -func (data *ConcreteMap) Set(key, value interface{}) { - (*data)[key] = value -} - -func (data *ConcreteMap) String() string { - return fmt.Sprintf("% v", *data) -} - -func Contains(collection, item interface{}) bool { - switch collection := collection.(type) { - case Map: - return collection.Has(item) - case []interface{}: - for _, val := range collection { - if val == item { - return true - } - } - return false - } - - panic("unexpected type passed to Contains") -} - -func Each(collection Map, cb Iterator) { - for _, key := range collection.Keys() { - cb(key, collection.Get(key)) - } -} - -func IsMappable(value interface{}) bool { - if value == nil { - return false - } - switch value.(type) { - case Map: - return true - default: - return reflect.TypeOf(value).Kind() == reflect.Map - } -} diff --git a/vendor/code.cloudfoundry.org/cli/util/generic/merge_reduce.go b/vendor/code.cloudfoundry.org/cli/util/generic/merge_reduce.go deleted file mode 100644 index a21f473..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/generic/merge_reduce.go +++ /dev/null @@ -1,52 +0,0 @@ -package generic - -type Reducer func(key, val interface{}, reducedVal Map) Map - -func DeepMerge(maps ...Map) Map { - mergedMap := NewMap() - return Reduce(maps, mergedMap, mergeReducer) -} - -func Merge(collection, otherCollection Map) Map { - mergedMap := NewMap() - - iterator := func(key, value interface{}) { - mergedMap.Set(key, value) - } - - Each(collection, iterator) - Each(otherCollection, iterator) - - return mergedMap -} - -func Reduce(collections []Map, resultVal Map, cb Reducer) Map { - for _, collection := range collections { - for _, key := range collection.Keys() { - resultVal = cb(key, collection.Get(key), resultVal) - } - } - return resultVal -} - -func mergeReducer(key, val interface{}, reduced Map) Map { - switch { - case reduced.Has(key) == false: - reduced.Set(key, val) - return reduced - - case IsMappable(val): - maps := []Map{NewMap(reduced.Get(key)), NewMap(val)} - mergedMap := Reduce(maps, NewMap(), mergeReducer) - reduced.Set(key, mergedMap) - return reduced - - case IsSliceable(val): - reduced.Set(key, append(reduced.Get(key).([]interface{}), val.([]interface{})...)) - return reduced - - default: - reduced.Set(key, val) - return reduced - } -} diff --git a/vendor/code.cloudfoundry.org/cli/util/generic/slice.go b/vendor/code.cloudfoundry.org/cli/util/generic/slice.go deleted file mode 100644 index d523660..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/generic/slice.go +++ /dev/null @@ -1,10 +0,0 @@ -package generic - -import "reflect" - -func IsSliceable(value interface{}) bool { - if value == nil { - return false - } - return reflect.TypeOf(value).Kind() == reflect.Slice -} diff --git a/vendor/code.cloudfoundry.org/cli/util/lookuptable/name_from_guid.go b/vendor/code.cloudfoundry.org/cli/util/lookuptable/name_from_guid.go deleted file mode 100644 index 472f624..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/lookuptable/name_from_guid.go +++ /dev/null @@ -1,20 +0,0 @@ -package lookuptable - -import "reflect" - -func NameFromGUID(input interface{}) map[string]string { - val := reflect.ValueOf(input) - if val.Kind() != reflect.Slice || val.Type().Elem().Kind() != reflect.Struct { - return nil - } - - result := make(map[string]string) - for i := 0; i < val.Len(); i++ { - element := val.Index(i) - guid := element.FieldByName("GUID") - name := element.FieldByName("Name") - result[guid.String()] = name.String() - } - - return result -} diff --git a/vendor/code.cloudfoundry.org/cli/util/lookuptable/resource_from_guid.go b/vendor/code.cloudfoundry.org/cli/util/lookuptable/resource_from_guid.go deleted file mode 100644 index 878a6b9..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/lookuptable/resource_from_guid.go +++ /dev/null @@ -1,27 +0,0 @@ -package lookuptable - -import "code.cloudfoundry.org/cli/resources" - -func OrgFromGUID(orgs []resources.Organization) map[string]resources.Organization { - result := make(map[string]resources.Organization) - for _, org := range orgs { - result[org.GUID] = org - } - return result -} - -func SpaceFromGUID(spaces []resources.Space) map[string]resources.Space { - result := make(map[string]resources.Space) - for _, space := range spaces { - result[space.GUID] = space - } - return result -} - -func AppFromGUID(apps []resources.Application) map[string]resources.Application { - result := make(map[string]resources.Application) - for _, app := range apps { - result[app.GUID] = app - } - return result -} diff --git a/vendor/code.cloudfoundry.org/cli/util/railway/railway.go b/vendor/code.cloudfoundry.org/cli/util/railway/railway.go deleted file mode 100644 index 1564004..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/railway/railway.go +++ /dev/null @@ -1,19 +0,0 @@ -package railway - -import "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - -type funcWithWarningsAndError = func() (ccv3.Warnings, error) - -func Sequentially(tracks ...funcWithWarningsAndError) (ccv3.Warnings, error) { - var warnings ccv3.Warnings - - for _, track := range tracks { - trackWarnings, err := track() - warnings = append(warnings, trackWarnings...) - if err != nil { - return warnings, err - } - } - - return warnings, nil -} diff --git a/vendor/code.cloudfoundry.org/cli/util/sorting/alphabetic.go b/vendor/code.cloudfoundry.org/cli/util/sorting/alphabetic.go deleted file mode 100644 index 727a803..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/sorting/alphabetic.go +++ /dev/null @@ -1,42 +0,0 @@ -package sorting - -import ( - "unicode" -) - -type AlphabetSorter func([]string) func(i, j int) bool - -// LessIgnoreCase returns true if first is alphabetically less than second. -func LessIgnoreCase(first string, second string) bool { - iRunes := []rune(first) - jRunes := []rune(second) - - max := len(iRunes) - if max > len(jRunes) { - max = len(jRunes) - } - - for idx := 0; idx < max; idx++ { - ir := iRunes[idx] - jr := jRunes[idx] - - lir := unicode.ToLower(ir) - ljr := unicode.ToLower(jr) - - if lir == ljr { - continue - } - - return lir < ljr - } - - return false -} - -// SortAlphabeticFunc returns a `less()` comparator for sorting strings while -// respecting case. -func SortAlphabeticFunc(list []string) func(i, j int) bool { - return func(i, j int) bool { - return LessIgnoreCase(list[i], list[j]) - } -} diff --git a/vendor/code.cloudfoundry.org/cli/util/ui/config.go b/vendor/code.cloudfoundry.org/cli/util/ui/config.go deleted file mode 100644 index f17cd6e..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/ui/config.go +++ /dev/null @@ -1,17 +0,0 @@ -package ui - -import "code.cloudfoundry.org/cli/util/configv3" - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Config - -// Config is the UI configuration. -type Config interface { - // ColorEnabled enables or disabled color - ColorEnabled() configv3.ColorSetting - // Locale is the language to translate the output to - Locale() string - // IsTTY returns true when the ui has a TTY - IsTTY() bool - // TerminalWidth returns the width of the terminal - TerminalWidth() int -} diff --git a/vendor/code.cloudfoundry.org/cli/util/ui/display.go b/vendor/code.cloudfoundry.org/cli/util/ui/display.go deleted file mode 100644 index 5b1faa2..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/ui/display.go +++ /dev/null @@ -1 +0,0 @@ -package ui diff --git a/vendor/code.cloudfoundry.org/cli/util/ui/i18n.go b/vendor/code.cloudfoundry.org/cli/util/ui/i18n.go deleted file mode 100644 index 38b5c10..0000000 --- a/vendor/code.cloudfoundry.org/cli/util/ui/i18n.go +++ /dev/null @@ -1,137 +0,0 @@ -package ui - -import ( - "bytes" - "encoding/json" - "fmt" - "strings" - "text/template" - - "code.cloudfoundry.org/cli/i18n/resources" - log "github.com/sirupsen/logrus" - "golang.org/x/text/language" -) - -const ( - // assetPath is the path of the translation file inside the asset loader. - assetPath = "resources/%s.all.json" - // chineseBase is the language code for Chinese. - chineseBase = "zh" - // defaultLocale is the default locale used when one is not configured. - defaultLocale = "en-us" - // unspecifiedScript is what is returned by language#Script objects when the - // script cannot be determined. - unspecifiedScript = "Zzzz" -) - -type LocaleReader interface { - Locale() string -} - -// TranslationEntry is the expected format of the translation file. -type TranslationEntry struct { - // ID is the original English string. - ID string `json:"id"` - // Translation is the translation of the ID. - Translation string `json:"translation"` -} - -// TranslateFunc returns the translation of the string identified by -// translationID. -// -// If there is no translation for translationID, then the translationID is used -// as the translation. -type TranslateFunc func(translationID string, args ...interface{}) string - -// GetTranslationFunc will return back a function that can be used to translate -// strings into the currently set locale. -func GetTranslationFunc(reader LocaleReader) (TranslateFunc, error) { - locale, err := determineLocale(reader) - if err != nil { - locale = defaultLocale - } - - rawTranslation, err := loadAssetFromResources(locale) - if err != nil { - rawTranslation, err = loadAssetFromResources(defaultLocale) - if err != nil { - return nil, err - } - } - - return generateTranslationFunc(rawTranslation) -} - -// ParseLocale will return a locale formatted as "-" for all non-Chinese lanagues. For Chinese, it will return -// "zh-